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
Kendo UI Sales Hub Overview This article is an overview of the Kendo UI Sales Hub sample project. The Kendo UI Music Store includes two sub-projects: the Home and the Order Sales Hub page. Figure 1. A screenshot of the Kendo UI Sales Hub Home page Basic Concepts The Sales Hub project is an Order Management System that demonstrates the usage of Telerik UI for ASP.NET MVC in an enterprise environment. The goal of this sample project to is show how to use a subset of Kendo UI widgets using Telerik UI for ASP.NET MVC as well as to show how to easily implement server-side filtering for DataSource requests, using the server-side components that Telerik UI for ASP.NET MVC provides. This sample is not feature-complete and is only meant to be used as a reference for how to use Telerik UI for ASP.NET MVC. The Project View the Live Site To view the demo of the Kendo UI Sales Hub sample project, refer to demos.telerik.com/kendo-ui/saleshub. Get the Source Code Start by getting the source for the SalesHub from GitHub. Important This sample project is compatible with Microsoft Visual Studio 2012, and requires MVC 4, NuGet, Telerik UI for ASP.NET MVC, and SQLExpress to run. Add the Extensions Important Due to licensing restrictions, the sample project does not include the dll for the Telerik UI for ASP.NET MVC. If you have a license for Telerik UI for ASP.NET MVC, use the Telerik Control Panel to download and install the extensions. If you do not have a license yet, download and install the free trial for the extensions. Once you download and install the extensions, copy \wrappers\aspnetmvc\Binaries\Mvc3\Kendo.Mvc.dll from the installation directory of Telerik UI for ASP.NET MVC to the SalesHub\libs directory. Important The standard installation directory for the extensions is C:\Program Files (x86)\Progress\UI for ASP.NET MVC <version>. For versions prior to R3 2017, the default installation folder is C:\Program Files (x86)\Telerik\UI for ASP.NET MVC <version>. Build and Run the Application Once you copy Kendo.Mvc.dll to the correct location, you should be able to build and run the application. The first time the application launches, it creates and seeds its database. Seeding the database may take a few minutes to complete. View the Solution Structure Figure 2. The Solution Explorer structure There are three main projects in the Kendo UI Sales Hub sample application, as listed below. SalesHub.ClientThis is a standard MVC project which uses the default MVC project structure with one exception. The data services, which are MVC controllers that return JSON results, are in their own namespace— SalesHub.Client.Api—so as to avoid confusion about which controllers return Views and which return JSON. SalesHub.DataThis project contains the Entity Framework repositories for data models. SalesHub.CoreThis project contains the data models and the repository interfaces used by SalesHub.Data. See Also The other chapters of the tutorial on the Kendo UI Music Store sample project are located at:
https://docs.telerik.com/aspnet-mvc/tutorials/tutorial-saleshub/kendo-saleshub-intro
CC-MAIN-2018-17
refinedweb
523
65.93
Since most of your gain will be short-term capital gains your should pay in the third quarter 31% of you gains to Federal estimated income tax. You should also do the same in the fourth quarter. Short-term capital gains rate is tax at a taxpayer's ordinary income tax rates. For 2008, individuals are subject to an underpayment penalty unless total withholding and estimated payments equal the smaller of: 90% of the tax show on the 2008 return. 100% of the tax shown on the 2007 return (110% if the taxpayer's 2007 adjusted gross income , or AGI, was over $150,000 ($75,000 for MFS) What was your tax for 2007? If your husband will pay $7,000 in Federal income tax withholding this year you should pay at least $7,480 in estimated tax payments to be safe and to avoid underpayment tax penalty.
http://www.justanswer.com/tax/1ejoq-2007-worked-paid-quarterly-tax-payments-when-completed.html
CC-MAIN-2015-40
refinedweb
148
64.75
Segment One 70.(PraNavam) SvatantrAshtOtthrasatha virOdha-parihAra- vidhE nama: Salutations to the SadAchAryan , who identified the 108 doubts that might arise in VisishtAdhvaitha darsanam and came up with the answers for resolving them in his SrI Sookthi, VirOdha ParihAram . The Rahasya Grantham , VirOdha ParihAram contains the 108 potential doubts that might arise and Swamy Desikan's responses to clear these doubts. VirOdha ParihAram is the Rahasya grantham created by Swamy Desikan after he completed his magnum opus , Rahasya Thraya Saaram out of compassion for us . ------------ Segment Two. -------------- Segment Three Swamy Desikan's VirOdha PrihAram is considered as His Swan Song.This was written to help us , who might have still unresolved doubts about the tatthvams covered in Srimad Rahasya Thraya Saaram. VIRODHA PARIHARAM : PART 1 SrimAn VenkatanAthArya: kavithArkika kEsarI VedhanthAcharya VaryOmE SannidhatthAm sadhA Hrudhi RaamAnuja DayApAthram Jn~Ana VairAghya BhUshaNam Srimadh VenkatanAdhAryam VandhE VedhAnhta Desikam Dear Members of Bhagavadh RaamAnuja SiddhAntham : Enormous and magnificent indeed are the granthams that Swami Desikan blessed us with for our ujjevanam ( uplift and salvation ) .They arose from him as UbhayaVedAntham , PrakaraNa granthams , SthOthrams , Rahasya granthams , Kaavyams , Naatakam , Tamizh Prabhandhams , VyAkyAnams , Vaadha Granthams , RakshA Granthams and anushtAna granthams . His great upakAram to us flowed forth in four forms : Works in chaste Sanskrit , Sundara Tamizh , Sweet PrAkrutham and the MaNipravALam "language" used first by Thirukkuruhaip PirAn in his 6000 Pati . Swami Desikan's power of Jn~Anam Pravachana sakthi , anushtAna srEyas and debating skills are a direct result of the anugraham of Sri Hayagreeva BhagavAn . In his ninth & final decade of life , after a rich life involved in grantha nirmANam , Sri Bhagavadh RaamAnuja SiddhAntha Pravachanam and Para matha Kantanam , Swami Desikan had a concern . He felt that he has left some thing undone . This concern related to the creation of an all-encompassing grantham that dealt with : 1. a lucid explanation of Tattva-Hitha -PurushArthams at one site 2. a detailed exposition there on the richness of the meanings of the three rahasyams dear to Sri VaishNavAs 3. a grantham that incorporated all the hithOpadesams for the chEthanAs in MaNipravALam format . With the blessings of his AchaaryAs and Sri Hayagreevan arose the magnificient and incomparable grantham of SRIMADH RAHASYA THRAYA SAARAM (RTS ) . In its 32 chapters , the three TattvAs , the Three RahasyAs, the Artha PanchakA and Prapatthi are discussed . Today , it is one of the four granthams ( Grantha chathushtayam ) that Sri VaishNavAs have to learn thru KalakshEpam under their AchAryAs besides Sri Bhaashyam , GitA Bhaashyam of AchArya RaamAnujA and the Bhagavad Vishayam by KurkkEsA . After completing this magnum opus of RTS , Swami went one step further out of his great compassion for aRivilis ( ignoramus ) like us and created his final grantham in his very last years of his life on earth . This very last grantham given to us as Kula dhanam by Swami Desikan is " VIRODHA PARIHAARAM " .This is the grantham that clears the lingering doubts of a Mumukshu ( one who desires Moksham thru an understanding and practise of the three Rahasyams ). Swami Desikan achieved his goal through a list of 108 Questions and answers based on PramANa Vaakhyams .It is also written in MaNi pravALam , a mixture of Sanskrit and TamiL . VirOdha ParihAram has the following four chapters: (1) Moola ManthAdhikAram (2) DhvayAdhikAram (3) Sarama slOkAdhikAram and (4) NigamanAdhikAram . There are a total of 108 doubts that Swami Desikan anticipates from the Mumukshu and answers them one by one under the headings of the above four chapters . The largest number of doubts that he answers , Eighty , pertain to Mula Manthram ; the number of doubts addressed in the Dhvaya , Sarama and Nigamana adhikArams are Ten , Ten and Eight respectively adding upto the grand total of 108 doubts and corresponding answers for those doubts . Swami Desikan's VirOdha ParihAra Grantham was translated and annotated by Oppiliappan Koil Navaneetham SrirAma DesikAcchAr Swamy , my manaseeka AchArya . Few months back , the prakrutham Pundareekapuram Andavan brought out a new edition of this grantham commented by Navaneetham Swami , which had been out of print for a while . Number of BhaskthAs of the Bhakthi List contributed funds for this effort and have become blessed . I will be following this recent edition of VirOdha ParihAram for a series of postings in SaraNAgathi Journal as it starts on its second decade of issues . May Swami Desikan's and his UpAsanA murthy"s blessings be with us as we engage in studying together the most magnificient rahasya grantham conceived as a sequel to Srimadh Rahasya Traya Saaram and try to prepare it for SamarpaNam for the BahudhAnya samvathsara Thirunakshthrams of Swami Desikan (October 1 ) and the First Jeeyar of AhObila Mutt , AdhivaNN SatakOpa Yatheendhra MahA Desikan , whose 600th aaniversary of the establishment of Ahobila Mutt that we will be celebrating on September 11 ( Kettai ) . Mangala SlOkams in Sanskrit and Tamil for VirOdha ParihAram ************************************************************ SlOkma 1 ******** Sriman NaarayaNa: Swaami SaraNya: SarvadEhinAm bhUyAnn nijapadha prApthi VirOdhi vinivAraka: ( Meaning ) : May Sriman NaarAyaNan , who is the protector of all Janthus and who is the Master of all the Jeevans chase away all the obstacles and enemies in your efforts to reach His aasthAnam , Sri Vaikuntam . slOkam 2 ******** udhitham bhavatha: pAyAth OushadhAdhri sameepatha: Oushadham chEthasA sEvyam apuna: sthanya paayinAm (Meaning ) : Our Lord Hayagreevan appeared near the Hill of Medicinal plants ( Oushadha Giri ) at Thiruvahendhrapuram and He is the Oushadham (Medicine) for those , who want to be cured of the afflictions of SamsAram . May that Lord , who is the nectar for dhyAnam by the mind ,protect you all , who wish not to drink again mother's milk ( not to be born again in this earth ) . ApunarArvruthti is hinted here . The very last Brahma sUthram asserts : AnAvrutthi SabdhAth , AnAvrutthi SabdhAth { There is no return (for these released souls ) because the scriptures say so }. That is what Swami Desikan is requesting the Lord as a boon for us . SlOkam 3 : prapadhanamayE vidhyAbhEdhE prathishtitha chEthasa: prathipadhamiha praj~yA dhAyam disanthu dayA dhanA : Sataripu sukha vyAsa prAchEsAdhi nibhandhana sramapariNatha suddhA-suddhAsayA mama DesikA : May my AchAryAs , who are profoundly conversant with the different aspects of Prapatthi Vidhyai serving as the means for Moksham , who have the sraddhA ( faith and deep trust ) in Prapatthi arising from their tireless study and clear understanding of the granthams of NammAzhwAr , Sukhar , VyAsar and VaalmIki , who have the purest of hearts brimming with compassion for us as their wealth , May those revered AchAryAs of mine bless every word of this grantham , VirOdhi ParihAram with the wealth of true knowledge ( JN~Ana Sampath ) . -). Segment One Two Three ------------------------------------------------------------ Segment One The VirOdha ParihAram by Swamy Desikan (1268-1369 C.E). It is a rahasya grantham , which houses 108 doubts and objections relating to the topics covered by Swamy Desikan's SrIMad Rahasya Thraya Saaram (SRTS). At a very ripe old age , Swamy Desikan took the trouble to write this brilliant SrI Sookthi to banish from our minds the doubts that might have arisen from our poor comprehension of the topics covered in SRTS . Swamy Desikan's precocious son and AchAryA in his own right wrote a Sanskrit commentary about VirOdha ParihAram by his illustrious father and AchAryan . BTW , KumAra VaradAchAran (1316-1401 C.E) has commented on many SrI sookthis of his father (avidhyA KaNDana , AasrayAnupatthi , Tatthva Traya chuLakArtha Sangraham , VirOdaparihAra ). Swamy Desikan answers 80 doubts that might arise from improper understanding of Moola Manthram , 10 doubts that might plague one about Dhvayam and 10 more doubts associated with the Charama SlOkam and 8 more doubts linked to NigamanaadhikAram. The first Question/doubt for which Swamy Desikan gives the answer is: How does EmperumAn , who watches the troubles of the Jeevan can be called Sarvarakshakan(protector of All)? The seventh Question is: How can you call animals and plants as the Daasans of EmperumAn? How do you explain that? The 37th question for which Swamy Desikan gives His answer is: " Is there specific time limits to Bhagavath Kaimkaryams or can they be performed at any time we choose ? The 38th doubt is about:If the AchAryan makes a mistake , what should the Sishyan do? The 47th doubt raised and answered is: Is it the AathmA or SarIram that experiences pleasures and pains ? The 67th Doubt removed with the brilliant answer is: What is the parama PurushArtham for a liberated soul in SrIvaikuntam? Is it Bhagavath anubhavam or Bhagavath Kaimkaryam? The 68th doubt is: Is Parama Padha prApthi and VishNulOka PrApthi one and the same ? Moksham is described both as anishta nivrutthi and Ishta prApthi ? How can this be reconciled ? ( Anishta Nivrutthi is the removal of inauspiciousness ; Ishta prApthi is the gaining of what one seeks as auspicous)...76th doubt . In his 102nd question Swamy Desikan asks and answers why each of the three rahasyams essential ? The final doubt (108th) addressed is: How can one clear one's doubts further about the three rahasyams? Just a sampling to demo the scope of the doubts , which Swamy Desikan anticipates that a student of Rahasya Thrayams might have . Hopefully , adiyEn would have the bhAgyam in future about each of these doubts and Sawmy Desikan's authoritative responses to banish them. Swamy Desikan ThiruvadigaLE SaraNam , Oppilaippan Koil VaradAchAri SadagOpan -------------------------------------------------------------------------------- Segment Two.: -------------------------------------------------------------------------------- Segment Three Jaya and Vijaya episode From: Anand Karalapakkam (kgk_at_md2.vsnl.net.in) Date: Wed Jun 07 2000 - 11:08:13 PDT Jaya and Vijaya Episode : **************************** The question is to know whether the curse took place in either SrI VaikuNTham Or kArya VaikuNTham (replica of SrI VaikuNTham in the material world). This question is dealt by SwAmi Desikan Himself in His VirOdha ParihAram ( part of Chillarai rahasyam). Swami Sri Desikan says in VirOdha parihAram #107: -------------------------------------------------------------- "ippadi sila janmAntara SamskArAdikaL upakarikka anukUla SvabhAvarAyp piRandu muktarAkap prAptarAnAlum, janmAntarankaLilum pratikUlanAy antima janmattilum tAn padumaLavum (i.e. until death) etirambu kOttu ninRa sisupAlanukku "pratibhavam aparAddhu: mugddha SAyujadObhU:" (stOtra ratnam #63) enkiRapadiyE mOksham koduttapadi en? ennil, adiyilE sri vishnu lOkattilE dvArapAlapadam peRRAr iranDu ksEtrajyar bhAgavatapachAra-visEshattAl moonRu janmam pratikUlarAyp piRandu, avvapachAra phalavasAnattilE pazhaiya padam peRRu kramENa muktaRAy ninRArkaL enRu purANasiddham AakaiyAlE ippadippatta vishayangaLilum munpuRRai (that which was present earler) adhyAtma- sikshai adiyaaga mOksham ennumidam siddham." Essence of the above (Using Sri SrirAmadEsikAchAryA's vivaraNam, published by Poundarikapuram Ashramam ): Qtn 107 : It is understandable to see someone who is born as a good person, with good habits (due to sukrudams of previous births), get the opportunity for mOksham. But, how come someone, like Sisupalan, who committed offenses in previous births, and continued to commit offenses even in the current birth till the time he died, got moksham, as described in ALavandhAr's sthOthra ratnam #63? Answer : There is a lOkam under Sri Vaikuntam called Vishnu lOkam (kArya VaikuNTham). Two exalted jIvas who were holding the post of guards for the Lord in this lOkam committed offenses against bhAgavathas. Because of this they were born three times as opponents of the Lord. In this way they suffered the consequences of their bhAgavatha apachaaras. After that they got their old posts back. Then, in due course of time, due to the upAyas they undertook they attained mOksham. This history is clear from purANas. Thus, in matters such as this, it is clear that moksham can be attained through an upAya (either bhakti or prapatti) because of the already present knowledge on vEdAnta . --------------------------------------------------- Thus Jaya and Vijaya who were being cursed, were dwArapAlakAs at Vishnu lOkam and not at SrI VaikuNTham. Some devotees didn't knew about the declaration of SwAmi dESikan regarding this issue and thought that this incident took place at Sri VaikuNTham, for PerumAL to just have a vyAjA(excuse) for incarnation. This reasoning was strongly based on the fact that there are nitya soorIs named Jaya and Vijaya, who are at Sri VaikuNTham as dwArapAlakas. Actually, Jaya and Vijaya at Sri VaikuNTham were not at all involved in this episode. They being nitya soorIs were serving PerumAL at Sri VaikuNTham. Vishnu lOkam has the exact replica of Sri VaikuNTham and the "post"/service of the gatekeeping was performed by two baddha jIvAtmAs. The name of the "post" got identified with their name ie. Since at SriVaikuNTham, the nitya soorIs Jaya and Vijaya serve as gatekeepers, any baddha jIvAtmA serving as gatekeepers in Vishnu lOkam are also called as Jaya and Vijaya. Lets take the example of Siva, Indra, Brahma etc. These are actually posts. A baddha jIvAtma will take these posts for a particular period and later on, that post will be occupied by some other baddha jIvAtma. Similarly , in the Vishnu lOkam, the dwArapAlaka kainkaryam ( Jaya and Vijaya) is a specific post obtained by certain exalted baddha jIvAtmas. Ofcourse, not all the posts in Vishnu lOkam be given to baddha jIvAtmAs. Here also nitya soorIs will be performing kainkaryams. We can't make any blanket statements that everyone at VishNu lokam are only baddha jIvAtmas. -------------------------------------------------------- But a question naturally arises here : In the kArya vaikuNTham , exalted devotees perform the kainkaryam of gate keeping. Why then they have to suffer like that of being born in earth as HiraNyakaSipu and HiraNyAksha in Kruta yuga, RAvaNa and KumbhakarNa in trEta yuga, SisupAla and Dantavakra in dwApara yuga ? Answer : BhAgavatha apachAram to the rishis (Already answered). This BhAgavatha apachAram is made as a vyAja for perumAL to start His avatAra leelAs. NityasoorIs like AzhwArs demonstrated how a baddha jIvAtma should behave ; jaya & vijaya ( non-nitya sooris) in their three births demostrate in a way as to how a baddha should not behave. The bottomline is that PerumAL needs different roles for His fulfilment of avatAra leelAs. Such key roles are occupied by nitya soorIs, baddha jIvAtmas from kArya vaikuNTham etc. ----------------------------------------------------- Finally, lets look into what Srimad BhAgavatham actually says regarding this issue : Sage NArada tells King YudhiSThira (7.1.36) : " yekadA brahmaNaha putrA vishNu lOkam yadrucchayA | sanandanAdayO jagmushcarantO bhuvanatrayam || " " Once upon a time, when the sons of (chatur mukha) Brahma, namely, Sanaka, Sanandana, SanAtana and Sanat-kumAra were traveling throughout the three worlds, they by chance came to _VishNu lOka_". Here it is explicitly told that Sanaka and others (who are not muktas yet) went to VishNu lOkam only. Also, when they are traveling inside the material world, they can't by chance enter Sri VaikuNTham. adiyEn rAmAnuja dAsan ananthapadmanAbha dAsan krishNArpaNam
http://www.ibiblio.org/sripedia/ebooks/vdesikan/virodha_parihaaram/index.html
CC-MAIN-2014-42
refinedweb
2,349
57.91
Welcome to the 14th part of our Machine Learning with Python tutorial series.. The datasets here are organized by types of machine learning often used for them, data types, attribute types, topic areas, and a few others. Very useful both for educational uses, as well as for machine learning algorithm development. I find myself coming back here frequently, it's definitely worth a bookmark. From the Breast Cancer Dataset page, choose the Data Folder link. From there, grab breast-cancer-wisconsin.data and breast-cancer-wisconsin.names. These may not download, but instead display in browser. Right click to save as if this is the case for you. After downloading, go ahead and open the breast-cancer-wisconsin.names file. Looking at this file, scrolling down to just after line 100, we get the names of the attributes (columns). With this information, we're going to just manually add these labels to the breast-cancer-wisconsin.data file. Open that, and enter a new first line: id,clump_thickness,uniform_cell_size,. Right out of the gate, you should be thinking what our features will be and what our label will be. We're attempting to classify things, so it should be obvious that the classes are going to be that the list of attributes leads to a benign or malignant tumor. Also, most of these columns appear to be of use, but are there any that are similar to the others or maybe useless? Absolutely, this ID column is not something we actually want to feed into the classifier. uniform_cell_shape,marginal_adhesion, single_epi_cell_size,bare_nuclei,bland_chromation, normal_nucleoli,mitoses,class Missing/bad data: This dataset also has some missing data in it, which we're going to need to clean! Let's start off with our imports, pulling in the data, and some cleaning: import numpy as np from sklearn import preprocessing, cross_validation, neighbors import pandas as pd df = pd.read_csv('breast-cancer-wisconsin.data.txt') df.replace('?',-99999, inplace=True) df.drop(['id'], 1, inplace=True) After reading in the data, we take note that there are some columns with missing data. These columns have a "?" filled in. The .names file informed us of this, but we would have discovered this eventually via an error if we attempted to feed this information through to a classifier. In this case, we're choosing to fill in a -99,999 value for any missing data. You can choose how you want to handle missing data, but, in the real world, you may find that 50% or more of your rows contain missing data in one of the columns, especially if you are collecting data with extensive attributes. -99999 isn't perfect, but it works well enough. Next, we're dropping the ID column. When we are done, we'll comment out the dropping of the id column just to see what sort of impact it might have to include it. Next, we define our features (X) and labels (y): X = np.array(df.drop(['class'], 1)) y = np.array(df['class']) The features X are everything except for the class. Doing df.drop returns a new dataframe with our chosen column(s) dropped. The labels, y, are just the class column. Now we create training and testing samples, using Scikit-Learn's cross_validation.train_test_split: X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.2) Define the classifier: clf = neighbors.KNeighborsClassifier() In this case, we're using the K Nearest Neighbors classifier from Sklearn. Train the classifier: clf.fit(X_train, y_train) Test: accuracy = clf.score(X_test, y_test) print(accuracy) The result should be about 95%, and that's out of the box without any tweaking. Very cool! Just for show, let's show what happens when we do indeed include truly meaningless and misleading data by commenting out the dropping of the id column: import numpy as np from sklearn import preprocessing, cross_validation, neighbors import pandas as pd df = pd.read_csv('breast-cancer-wisconsin.data.txt') df.replace('?',-99999, inplace=True) #df.drop(['id'], 1, inplace=True) X = np.array(df.drop(['class'], 1)) y = np.array(df['class']) X_train, X_test, y_train, y_test = cross_validation.train_test_split(X, y, test_size=0.2) clf = neighbors.KNeighborsClassifier() clf.fit(X_train, y_train) accuracy = clf.score(X_test, y_test) print(accuracy) The impact is staggering, where accuracy drops from ~95% to ~60% on average. In the future, when AI rules the planet, note that you just need to feed it meaningless attributes to outsmart it! Interestingly enough, adding noise can be a way to help or hurt your algorithm. When combatting your robot overlords, being able to distinguish between helpful noise and malicious noise may save your life! Next, you can probably guess how we'll be predicting if you followed from the regression tutorial that used Scikit-Learn. First, we need some sample data. We can just make it up. For example, I will look at one of the lines in the sample file, and make something similar, merely shifting some of the values. You can also just add noise to do further testing, provided the standard deviation is not outrageous. Doing this is relatively safe as well, since you're not actually training on the falsified data, you're merely testing. I will just manually do this by making up a line: example_measures = np.array([4,2,1,1,1,2,3,2,1]) Feel free to search the document for that list of features. It doesn't exist. Now you can do: prediction = clf.predict(example_measures) print(prediction) ...or depending on when you are watching this, you might not be able to! When doing that, I get a warning:. Okay, no problem. Do we have a single feature? Nope. Do we have a single example? Yes! So we will use X.reshape(1, -1): example_measures = np.array([4,2,1,1,1,2,3,2,1]) example_measures = example_measures.reshape(1, -1) prediction = clf.predict(example_measures) print(prediction) Output: 0.95 [2] The output here is first the accuracy (95%) and then the prediction (2), which is what we modeled our fake data to be. What if we had two samples? example_measures = np.array([[4,2,1,1,1,2,3,2,1],[4,2,1,1,1,2,3,2,1]]) example_measures = example_measures.reshape(2, -1) prediction = clf.predict(example_measures) print(prediction) Darn this hard-coding. What if we don't know how many samples!?! example_measures = np.array([[4,2,1,1,1,2,3,2,1],[4,2,1,1,1,2,3,2,1]]) example_measures = example_measures.reshape(len(example_measures), -1) prediction = clf.predict(example_measures) print(prediction) As you can see, implementing K Nearest Neighbors is not only easy, it's extremely accurate in this case. In the next tutorials, we're going to build our own K Nearest Neighbors algorithm from scratch, rather than using Scikit-Learn, in attempt to learn more about the algorithm, understanding how it works, and, most importantly, one of its pitfalls.
https://pythonprogramming.net/k-nearest-neighbors-application-machine-learning-tutorial/?completed=/k-nearest-neighbors-intro-machine-learning-tutorial/
CC-MAIN-2022-40
refinedweb
1,158
59.6
Hi I wanted to know if I can store an array of type double as an element of an entity(a row)? I have an object that has 4 properties: 1) Location 2) Date 3) double[] Amplitude 4) double[] Phase My data context stores location and date successfully, but I assignmet values to Amplitude and Phase too and it did not save those to the table. Anthing of how I should proceed? Convert the array to byte and then store it as an element, isn't what I have on mind. I would really like if someone can just look at the table and still be able to make sense what the data is! Regards, Rakesh. RK Hi, As far as i know, please do not add array in TabelServiceEntity as a property of table storage directly, because Table Storage is REST service, all data need be serialized. So please try to serialize your array to a Stream or Xml or other types, then you can use Table Storage API to upload them normallly. Hope it can help you. Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework Hi, thanks for the question. Arwind is correct, and the behavoir you are seeing is "normal" - arrays will not be stored in table entities, as they are not one of the types supported by .NET Data Services (bool, DateTime, Byte[], byte[], double, Guid, int, Int32, Int64, and string). However, you can store a non-supported type (including your double[]) by converting to and from one of the supported types, likely either string or one of the byte arrays. Here's some sample code that shows storing an array of doubles as a semicolon delimited string, but you could obviously change it to a different format or use this approach to deal with storing other types as well. Please make sure you test it for your uses, as this is just "proof-of-concept" type code, not tested for production uses (though I've at least tried to include suggestions for null and empty cases). One note to keep in mind with this code and others, is that the maximum legal size for a table entity is 1MB, and the maximum size for a batch transaction is 4MB. So if your serialization format is large (like XML), then you may run into those limits earlier. Some brief explanation of this code: your application would do all access through the get/set for MyDoubles. When you set MyDoubles, this will set myDoubles and also set myDoubleString. Operations to and from table storage will then use the get/set for MyDoubleString. The “get” reads myDoubleString, which is always updated by the set for MyDoubles, and the “set” (used when reading entities from table storage), initializes myDoubles appropriately. // A simple enitity which has a double array public class DoublesArrayEntity : TableServiceEntity { private double[] myDoubles; private string myDoubleString; // This is for access by your application, which will work with the array. public double[] MyDoubles { get { // Just return the private array, which is updated by both setters return myDoubles; } set { // Simple assignment to the private array myDoubles = value; // This check is necessary to make sure we preserve "null" as different than "empty" if (myDoubles != null) { // Build a string representing the doubles in the list, like "1.5;2.2;3.4;4.8" StringBuilder sb = new StringBuilder(); foreach (double d in value) { sb.Append(d); sb.Append(';'); } // Trim the last semi-colon, so that we have "1;2;3" instead of "1;2;3;" myDoubleString = sb.ToString().TrimEnd(';'); } else { // Assign null to the string to preserve the fact that the array was null myDoubleString = null; } } } // This is for storing in table storage public string MyDoubleString { get { // Just return the private string, which is updated by both setters return myDoubleString; } set { // Simple assignment of the string read from table storage myDoubleString = value; // Initialize the array by converting the string. Make sure that null and empty are treated correctly. if (!String.IsNullOrEmpty(myDoubleString)) { // Split on ';' to get the individual doubles string[] dStrings = value.Split(';'); int len = dStrings.Length; // Create an array the same length myDoubles = new double[len]; for (int i = 0; i < len; i++) { // Store each in the same order they were retured. myDoubles[i] = Convert.ToDouble(dStrings[i]); } } // Empty string would split to one string if we didn't handle it separately, resulting in the wrong array. else if (myDoubleString == String.Empty) { // So we just create a new empty array here. myDoubles = new double[0]; } else { // If it's null, just assign that. myDoubles = null; } } } public DoublesArrayEntity() { } } -Jeff Thanks guys! Yeah, this is probably a good idea. The only problem is that my worker role sends a request to the WCF service, hosted somewhere else, to work on this data(array of 40 + 40, for 365 days) and then perform some very complex operation on it, which takes a lot of time, during this time the underlying connection(HTTP binding b/w client(worker role) and server(WCF service)) gets killed by the load balancer ( This exception, in detail here ). So, converting to one type and then re-converting would add up more time for the operation. Still trying to find a solution for this. Hi - glad this helped somewhat. If performance is your primary concern over human-readability, you could consider other serialization options, such as BinarySerializer, which may be faster. Binary serialization will probably also result in a smaller entity size. However, unfortunately the double[] type is not supported at this time, so a type conversion is necessary to store this data in a table entity. Let us know if we can help any further! Hello, I have recently released an Azure Storage Table client, Lucifure Stash, which supports arrays and list intrinsically. This is done by storing each element of the array as a separate property in the table after applying an index suffix to the array name. This is a shameless plug, but Lucifure Stash, is available absolutely free for personal use, no strings attached. It simplifies array storage and supports many other features like enumerations, string and byte array larger than 64K, in-built and user-defined serialization etc. It comes with a tutorial written as C# test cases to demonstrate all the features. You can get it at. Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site. Would you like to participate?
http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/e1b1b230-721c-4870-bb09-a8b86b2d9ce0
CC-MAIN-2013-20
refinedweb
1,106
60.45
Learning Python Using Python Python is a general-purpose interpreted programming language. It emphasizes readability through the use of whitespace and supports multiple programming paradigms such as functional and object-oriented models. Using External Modules Python has a robust community that contributes to external modules. In the past, these had to be downloaded and often even individually compiled for different operating systems. To help streamline this process, the tool pip now exists. Installing Pip For Linux-based and MacOS X systems, pip can be installed (if it is not already) through following the instructions on the Installation page. For Windows systems, it is highly recommended to download a version of Python 3 or greater that comes with pip built into it. Using Pip As a command-line tool, pip is used through typing commands. To install a package using pip, it looks like the following: pip install packageName Once a package is installed, it is available to be used in a Python file. Working with Modules To include an external module in a Python project the keywords from and import are used. from Some modules contain many files or multiple possible modules to use. The from keyword helps in selecting from what project to include files. import The import keyword includes the specified modules. When used on a collection of files, it will include all of them. When paired with from in the pattern of from… import… only the specified modules will be included.
https://videlais.com/2018/12/22/using-python-part-4-using-external-modules/
CC-MAIN-2019-30
refinedweb
244
55.24
import json into google example is a import json into google document that shows the process of designing import json into google format. A well designed import json into google example can help design import json into google example with unified style and layout. import json into google example basics When designing import json into google document, it is important to use style settings and tools. Microsoft Office provide a powerful style tool to help you manage your import json into import json into google styles may help you quickly set import json into google titles, import json into google subheadings, import json into google section headings apart from one another by giving them unique fonts, font characteristics, and sizes. By grouping these characteristics into styles, you can create import json into google documents that have a consistent look without having to manually format each section header. Instead you set the style and you can control every heading set as that style from central location. you also need to consider different variations: import json into excel, import json into excel word, json to csv, json to csv word, jquery google docs api, jquery google docs api word, google spreadsheet json authentication, google spreadsheet json authentication word Microsoft Office also has many predefined styles you can use. you can apply Microsoft Word styles to any text in the import json into import json into google documents, You can also make the styles your own by changing how they look in Microsoft Word. During the process of import json into google style design, it is important to consider different variations, for example, google spreadsheet json parse, google spreadsheet json parse word, google spreadsheet json export, google spreadsheet json export word, json import python, json import python word, import xml into google spreadsheet, import xml into google spreadsheet word. import json into google example how to import json data into google spreadsheets in less than 5 how to import json data into google spreadsheets in less than 5 heres how create a new google spreadsheet. click on tools gt script editor. click create script for spreadsheet. delete the placeholder content and paste the code from this script. rename the script to importjson.gs and click the save button. how to import json data into google spreadsheets there is importxml function to import data from any of various structured data types including xml, html, csv, tsv, and rss and atom importjson importjson. importjson imports data from public json apis into google spreadsheets. it aims to operate similarly to how the native google spreadsheet adds what amounts to an importjson function to a google a library for importing json feeds into google spreadsheets. importjsonadvanced for use by script developers to easily extend the functionality of this is there a way to import a json file into google sheets definitely. while it is not a function that is available in google sheets, you can easily create a custom function importjson in google how to import data from json we have a bunch of wonderful functions that allow us to import external data to google sheets. one such function is importxml . you can import json data into google spreadsheet as suggested, you should be using json.stringify parse. importjson imports data from public json apis into google spreadsheets. it aims to operate similarly to how the native google spreadsheet functions importdata and importxml work. retrieve json data into google spreadsheet here is how you retrieve json data on a google spreadsheet this script will create the importjson spreadsheet function used to retrieve google script for parsing json to google spreadsheets google script for parsing json to google spreadsheets fastfedora google docs blob master scripts importjson code.gs. the concept is that you can input an api call and flatten the retrieved data into the spreadsheet cells.
http://www.slipbay.com/import-json-into-google-spreadsheet/
CC-MAIN-2017-17
refinedweb
639
55.07
Details Description I'd like to bring attention of JNDI guys to the following issue. This is about InitialContext. Currently the InitialContext constructor implementation roughly speaking does the following: 1. gets the properties passed to constructor (if any) 2. searches the system properties for corresponding to JNDI stuff 3. searches for jndi.properties in CLASSPATH and gets the properties from that (if any) (in case of InitialContext() we don't have the first step) This is quite cool until we face big amount of InitialContext() creations - then we see a lot of file system operations from step 3. For example during the Oracle App Server startup (with SPECjAppServer2004 onboard) - there is a lot of "new InitialContext()", every Bean creation. So we see about 27 millions of searches for "jndi.properties" in jar files from the Oracle App Server classpath (tens of jars). Is there anything can be done on this?.. Well as it turned out the JDK1.6.0 DOES NOT searches for the "jndi.properties" in CLASSPATH for the second time we create InitialContext(). Once it's loaded the "jndi.properties" properties for the first time it does not bother to do it later. I suggest to do the same in harmony. Here is the output of the test demonstrating such a behaviour difference:{man@earth:~/tmp} cat jndi3.java import java.io.*; import javax.naming.*; public class jndi3 { public static void main(String args[]) throws Exception public static void createJndiPropertiesFile() throws Exception{ FileOutputStream fos = new FileOutputStream("jndi.properties"); PrintStream ps = new PrintStream(fos); ps.println("java.naming.factory.initial=MyDefaultInitialContextFactory"); ps.close(); } public static void deleteJndiPropertiesFile() throws Exception{ File f = new File("jndi.properties"); f.delete(); } }{man@earth:~/tmp} /export/jdk1.6.0/bin/java jndi3 context1= javax.naming.InitialContext@1034bb5 context1.env={} context2= javax.naming.InitialContext@15f5897 context2.env={} ~/harmony579850.clean/bin/java jndi3 context1= javax.naming.InitialContext@108d9d1f context1.env={} context2= javax.naming.InitialContext@109242b5 Uncaught exception in main: javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hashtable {} [Root exception is java.lang.NullPointerException] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:239) at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:261) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:291) at javax.naming.InitialContext.getEnvironment(InitialContext.java:540) at jndi3.main(jndi3.java:17) Caused by: java.lang.NullPointerException at java.lang.Class.forName(Unknown Source) at javax.naming.spi.NamingManager$1.run(NamingManager.java:772) at javax.naming.spi.NamingManager$1.run(NamingManager.java:1) at java.security.AccessController.doPrivilegedImpl(Unknown Source) at java.security.AccessController.doPrivileged(Unknown Source) at javax.naming.spi.NamingManager.classForName(NamingManager.java:768) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:227) at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:261) ... 3 more I've created a simple proof-of-concept of my idea: what about to not to do any of steps (1, 2, 3) not just 3? So please note that THIS IS NOT THE FIX! The actual fix should avoid only step 3 and probably should do it more carefully. Here are some measurements with respect to this (see jndi3per.java in attachment):{man@earth:~/tmp} ~/harmony579850.clean/bin/java jndi3perf 20000 20000 constructor calls 1. 17442 millis 2. 11281 millis 3. 11598 millis 4. 10951 millis 5. 10906 millis ^C ~/harmony579850.jndi3/bin/java jndi3perf 20000 20000 constructor calls 1. 466 millis 2. 114 millis 3. 107 millis 4. 110 millis 5. 107 millis ^C Talking back about Oracle App Server and SPECjAppServer2004: startup times burst comparing harmony without and with the proposed patch are: -Xem:client - 4X -Xem:server - 2x Furthermore SPECjAppServer2004 execution period is concerned to this as well: as it turned out we have ABOUT 3000 OF LOOKUPS of "jndi.properties" in jar files PER SECOND (transaction rate is about two hundreds). I'd say handling this should not decrease our current scores on SjAS2004. Activity - All - Work Log - History - Activity - Transitions Sergey thanks for your reminder! I agree the sync issues is necessary, I will fix it soon. Thanks again for your helps! Regis thanks for you fix! Unfortunately due to technical reasons I cannot check the performance of your fix. I just can say that your patch works. I'll try to check the performance as soon as it will be possible. I looked at the diff and and just caught you're using HashMap: don't you think we can have a sync issues because of using HashMap not Hashtable as a map [classloader -> props]? last path doesn't fix file.exists problem, this one can fix it correctly, I think. And after this path on my machine, the performance of harmony is better than ri. Sergey, It's very kind of you and very helpful if you could use SPECjAppServer2004 measure the path. Thanks. Regis, the numbers of your last improvement (11000 millis -> 300 millis) are really cool. Sergey, I test Harmony-4942.new.diff using your test case on my machine, the performance is still low than ri but have great improvement. the output is: on ri: 20000 constructor calls (default) 1. 167 millis 2. 81 millis 3. 82 millis 4. 85 millis 5. 86 millis 6. 83 millis 7. 82 millis 8. 86 millis on harmony: 20000 constructor calls (default) 1. 653 millis 2. 339 millis 3. 316 millis 4. 324 millis 5. 317 millis 6. 324 millis 7. 329 millis 8. 333 millis In this case, all properties files will be read only once. And because there is only one classloader, CLASSPATH will search once, i think there would be another bottleneck somewhere, i will try to find it. Regis I am watching this issue. Thank you for you work! Yesterday I've made performance measurements with respect to your first patch Harmony-4942.diff. Comparing to my POC version ( jndi3_POC.patch) your patch is 3% slower. But of course this is just for the record because my patch is not valid. The test I used is SPECjAppServer2004 on Oracle Application Server. I will post the measurement number of your second patch soon. Hi Tony, I have test the ri's behavior, you are right, ri doesn't reload the property file under "java.home/lib/jndi.properties" after jvm init, the test prove it: ===================start==================== Hashtable<Object, Object> env = new Hashtable<Object, Object>(); env .put("java.naming.factory.initial", "org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockContextFactory"); InitialContext context = new InitialContext(env); System.out.println(context.getEnvironment().containsKey( "java.naming.provider.url")); // generate properties file File propsFile = new File(System.getProperty("java.home") + "/lib/jndi.properties"); FileOutputStream fos = new FileOutputStream(propsFile); PrintStream ps = new PrintStream(fos); ps.println("java.naming.provider.url="); ps.close(); context = new InitialContext(env); System.out.println(context.getEnvironment().containsKey( "java.naming.provider.url")); propsFile.delete(); ========================end================= the output is: false false I will re-create a path to fix it soon. Hi Regis, Seems the performance is not as good as ri. I did a quick look and found the bottleneck is that we call the file.exists() every time, basically, it is a very time-consuming operation with jni call. I suppose that ri just check the property file when vm init, would you please have a try on that? the path fix the problem that InitialContext search the whole CLASSPATH every construction time Yes, the performance is very low, I agree that search the whole CLASSPATH should do one time. But this is a problems: we use thread context classloader (Thread.currentThread().getContextClassLoader()) to do the step 3, different classloaders may have different properties value. It very useful for app server which use different classloaders separate apps context. If just use static variable will cause conflict between classloaders. I'm not sure how ri do this, i will write test soon. this patch(Harmony-4942.syn.fix.diff) use Hashtable instead of HashMap for propsCache to make it thread safe.
https://issues.apache.org/jira/browse/HARMONY-4942?focusedCommentId=12539526&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
CC-MAIN-2015-32
refinedweb
1,315
53.88
Beginning with the End in Mind When I buy something (software, consumer electronics, etc.), it's important for me to know the capabilities of the item I'm purchasing. I prefer to know up front what's "under the hood" as opposed to finding out later. In our industry, developers and users feel the same way: they want to know the capabilities of a tool or product they're about to use. So the objective of this article is to help developers new to Visual Studio 2005 become more aware and knowledgeable about the different areas where Microsoft has improved and enhanced .NET. Baker's Dozen Spotlight: Second, many developers know that passing and returning datasets across physical boundaries carries substantial overhead and incurs performance penalties. ADO.NET 2.0 supports true binary serialization in remoting environments by providing a new RemotingFormat property, which a developer can set to SerializationFormat.Binary. Depending on the size of the dataset, the binary serialization may yield a result as much as six times smaller than XML serialization, resulting in faster transfer speeds and smaller required bandwidth resources. Note that this enhancement only works in remoting environments: because Web services (by definition) pass XML. Datatable independence! In Visual Studio .NET 2003, several methods were only available for the dataset. One example is writing (and reading) XML data: a developer who wanted to write the contents of a data table to an XML file had to create a dataset, add the data table to the dataset, and use the dataset's WriteXml method. ADO.NET 2.0 now provides the same method for the data table. The following is a full list of methods that are available at the data table level: DataView.ToTable: ADO.NET 2.0 allows developers to create a new data table from any dataview. The ToTable method also contains an overload for the developer to create a subset list of columns in the new table. Bulk Copy: ADO.NET 2.0 contains a new SqlBulkCopy class to perform bulk inserts of data from a .NET application to SQL Server. Any object that implements IDataReader can utilize the SqlBulkCopy capability. Provider factories: In ADO.NET 1.1, supporting multiple data providers meant coding a CASE statement and IDbConnection. ADO.NET 2.0 has new provider factory classes to instantiate the desired provider type. At the end of this section, I'll provide an excellent reference that covers this in detail. Miscellaneous features: You can now fill a DataTable with a DataReader (and vice-versa). There's a new SqlConnection class to obtain connection statistics, improved connection-pool handling, and multiple active result sets when using SQL Server 2005 and namespace-qualified tables. I'm very pleased with the enhancements in ADO.NET 2.0. There are some enhancements that I hope Microsoft will consider for the next version. Even with the new independence of the data table, there are still capabilities that require a dataset. For instance, you can only establish a data relation between two data tables in the same dataset. Situations where master codes exist in multiple transaction tables require some additional coding when relations need to be established. Suggested reading: Please enable Javascript in your browser, before you post the comment! Now Javascript is disabled. Your name/nickname Your email WebSite Subject (Maximum characters: 1200). You have 1200 characters left.
http://www.devx.com/codemag/Article/30159
CC-MAIN-2016-07
refinedweb
562
56.05
Assuming you have the machine learning data file downloaded, then you're ready to learn how to parse the data. The data set we have mimics exactly having visited the web pages at the time, only we're not actually needing to visit the page. We have the full HTML source code, so it is just like parsing the website, minus the bandwidth use. First, we're going to want to know what the corresponding date is to our data, then we're going to pull the actual data. To start: import pandas as pd import os import time from datetime import datetime path = "X:/Backups/intraQuarter" Above, we're importing pandas for the Pandas module, os so that we can interact with directories, time and datetime for managing time and date information. Finally, we define "path," which is the path to the intraQuarter folder (you need to unzip the original zip file you downloaded from this website). def Key_Stats(gather="Total Debt/Equity (mrq)"): statspath = path+'/_KeyStats' stock_list = [x[0] for x in os.walk(statspath)] #print(stock_list) Here, we begin our function, with the specification that we're going to try to collect the Debt/Equity value. Statspath is the path to the stats directory. stock_list is a quick one-liner for loop that uses os.walk to list out all contents within a directory. for each_dir in stock_list[1:]: each_file = os.listdir(each_dir) if len(each_file) > 0: Above, we're cycling through every directory (which is every stock ticker). Then, we list "each_file" which is each file within that stock's directory. If the length of each_file, which is a list of all of the files in the stock's directory is greater than 0, then we want to proceed. Some stocks have no files/data. for file in each_file: date_stamp = datetime.strptime(file, '%Y%m%d%H%M%S.html') unix_time = time.mktime(date_stamp.timetuple()) print(date_stamp, unix_time) #time.sleep(15) Key_Stats() Finally, we run a for loop that pulls the date_stamp from each file. Our files are stored under their ticker, with a file name of the exact date and time from the information being pulled. From there, we explain to date-time what the format for our date stamp is, then we convert to a unix time stamp.
https://pythonprogramming.net/getting-data-machine-learning/?completed=/data-acquisition-machine-learning/
CC-MAIN-2019-26
refinedweb
384
64.2
If. public interface Publisher { public <T> boolean publish(T report); } If you remember, the requirement was: 7 . Publish the report using email or some other technique. In this blog I’m dealing with the concrete part of the requirement: sending a report by email. As this is a Spring app, then the simplest way of sending an email is to use Spring’s email classes. Unlike those stalwarts of the Spring API, template classes such as JdbcTemplate and JmsTemplate, the Spring email classes are based around a couple of interfaces and their implementations. The interfaces are: - MailSender - JavaMailSender extends MailSender - MailMessage …and the implementations are: - JavaMailSenderImpl implements JavaMailSender - SimpleMailMessage implements MailMessage Note that these are the ‘basic’ classes; you can send nicer looking, more sophisticated email content using classes such as: MimeMailMessage, MimeMailMessageHelper, ConfigurableMimeFileTypeMap and MimeMessagePreparator. Before getting down to some code, there’s the little matter of project configuration. To use the Spring email classes, you need the following entry in your Maven POM file: <dependency> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> <version>1.4</version> </dependency> This ensures that the underlying Java Mail classes are available to your application. Once the Java Mail classes are configured in the build, the next thing to do is to set up the Spring XML config. <!-- Spring mail configuration --> <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="host" value="${mail.smtp.host}"/> </bean> <!-- this is a template message that we can pre-load with default state --> <bean id="mailMessage" class="org.springframework.mail.SimpleMailMessage"> <property name="to" value="${mail.to}"></property> <property name="from" value="${mail.from}"/> <property name="subject" value="${mail.subject}"/> </bean> For the purposes of this app, which is sending out automated reports, I’ve included two Spring beans: mailSender and mailMessage. mailSender, is a JavaMailSenderImpl instance configured to use a specific SMTP mail server, with all other properties, such as TCP port, left as defaults. The second Spring bean is mailMessage, an instance of SimpleMailMessage. This time I’ve pre-configured three properties: ‘to’, ‘from’ and ‘subject’. This is because, being automated messages, these values are always identical. You can of course configure these programatically, something you’d probably need to do if you were creating a mail GUI. All this XML makes the implementation of the Publisher very simple. @Service public class EmailPublisher implements Publisher { private static final Logger logger = LoggerFactory.getLogger(EmailPublisher.class); @Autowired private MailSender mailSender; @Autowired private SimpleMailMessage mailMessage; @Override public <T> boolean publish(T report) { logger.debug("Sending report by email..."); boolean retVal = false; try { String message = (String) report; mailMessage.setText(message); mailSender.send(mailMessage); retVal = true; } catch (Exception e) { logger.error("Can't send email... " + e.getMessage(), e); } return retVal; } } The Publisher class contains one method: publish, which takes a generic argument T report. This, as I’ve said before, has to be the same type as the argument returned by the Formatter implementation from my previous blog. There are only really three steps in this code to consider: firstly, the generic T is cast to a String (this is where it’ll all fall over if the argument T report isn’t a String. The second step is to attach the email’s text to the mailMessage and then to send the message using mailSender.send(…). The final step is fulfil the Publisher contract by returning true, unless the email fails to send in which case the exception is logged and the return value is false. In terms of developing the code that’s about it. The next step is to sort out the scheduling, so that the report is generated on time, but more on that later… - The code for this blog is available on Github at:. If you want to look at other blogs in this series take a look here…
http://www.javacodegeeks.com/2014/04/tracking-exceptions-part-4-springs-mail-sender.html
CC-MAIN-2014-42
refinedweb
636
56.15
* A friendly place for programming greenhorns! Big Moose Saloon Search | Java FAQ | Recent Topics Register / Login JavaRanch » Java Forums » Java » Beginning Java Author Yet ANOTHER string problem.... Steve Jensen Ranch Hand Joined: Sep 23, 2002 Posts: 126 posted Feb 02, 2003 16:35:00 0 OK, OK, i admit that over the past 3 weeks or so, I have put up quite a few queries regarding strings, and nothing else. I've neglected the javaranch assignments, etc..., just to read this colussus chapter on strings in Ivor Horton's epic "Beginning Java 2". Well, I have yet another query regardiong strings..... Below is a program that reads a string of text, and displays the number of occurences of the words 'and' and 'the'. I broadly follow it, but I have a query or two, regarding it. The code for the program is listed below. public class FindCharacters { public static void main (String[] args) { // Text to be analysed String text = "To be or not to be, that is the question;" + "Whether 'tis nobler in the mind to suffer" +" the slings and arrows of outrageous fortune, " +" or to take arms against a sea of troubles, " +" and by opposing end them?"; int andCount = 0; //Number of ands int theCount = 0; // Number os thes int index = -1; // Current index position String andStr = "and"; //Search substring String theStr = "the"; //Search substring // Search forwards for "and" index = text.indexOf(andStr, index); // Find first 'and' while(index >= 0) { ++ andCount; index += andStr.length(); // Step to position after last 'and' index = text.indexOf(andStr, index); } // Search backwards for "the" index = text.lastIndexOf(theStr); // Find the last 'the' while (index >= 0) { ++theCount; index -= theStr.length(); // Step to the position before the last 'the' index = text.lastIndexOf(theStr, index); } System.out.println("The text contains " + andCount + " ands\n" + "The text contains " + theCount + " thes"); } } Well... First off Why is the variable index initialised to the value -1, as in :- int index = -1; Secondly... What;s going on with the lines of code :- while(index >= 0) { ++ andCount; index += andStr.length(); // Step to position after last 'and' index = text.indexOf(andStr, index); } Ok, i know we're saying while the index is greater than 0, i.e., provided we find an occurence of 'and', increase the value of andCount. But what's going on, on the 2 lines after that? I have spent an eternity redaing the chapter on arrays and strings in this text book (Ivor Horton's book). Simply because I've been told that string manipulation is fundamental to Java. Is this really the only way to learn - i.e., reading waffly, long-winded text books? John Bonham was stronger, but Keith Moon was faster. Mike Curwen Ranch Hand Joined: Feb 20, 2001 Posts: 3695 I like... posted Feb 02, 2003 17:10:00 0 Initializing the index to -1 has a certain philosophical niceness to it. A string has something at the zeroeth character - the 'first' character of the string; it's that whole 'off by one' thing. So because zero is an actual valid index for a string and has "meaning", the author would choose -1. This initializes the variable and has the added benefit of meaning "I'm no where near the string yet" or imagine a pointer that is sitting at the imaginary position of 'just before the start of the string'. I also checked the API to be sure there was no special meaning for negative numbers in the indexOf method: There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero Mike Curwen Ranch Hand Joined: Feb 20, 2001 Posts: 3695 I like... posted Feb 02, 2003 17:20:00 0 As for the next two lines of code... When you read a book you use a bookmark to mark your place. That is the job of the variable index. But not only does it mark where you last stopped reading, it indicates where you should start reading again. To find the very first instance of the word, start at the beginning of the string (index = -1). When you find an instance of the word, place the bookmark there (reset index from -1 to the index of the start of the word). index = text.indexOf(andStr, index); Assuming this returns a positive index, we've found a word, so let's remember that we found the word... ++ andCount; But now we are at the *beginning* of the word.. let's skip the word so we don't count it again. Adjust the value of our index to be just *after* the word. index += andStr.length(); And now repeat the procedure, from our point just after the just-found word, again moving our 'bookmark' (adjust index from "just after the last found word" to "start of the next found word"). index = text.indexOf(andStr, index); The counting and moving and searching are all in a loop until index is -1 (word not found). [ February 02, 2003: Message edited by: Mike Curwen ] Mike Curwen Ranch Hand Joined: Feb 20, 2001 Posts: 3695 I like... posted Feb 02, 2003 17:28:00 0 As for this one: Is this really the only way to learn - i.e., reading waffly, long-winded text books? The textbooks have plenty of sample code and the like, but also plenty of "blah, blah, blah" that seems really esoteric and not interesting. I think the best way to learn is doing. It seems like silly or often-heard advice, but really the best way to learn is to write little 'nothing' programs; programs that start their life with your thought along the lines of "I wonder if I can do **this** with Java?" If you suffer from a lack of imagination (like I do), you can at least use the textbooks for a starting point. For example.. if you modified the above program, and put in a whole bunch of System.out.println("index is now: " + index) , I bet you would have figured it out. And of course, the CattleDrive. Steve Jensen Ranch Hand Joined: Sep 23, 2002 Posts: 126 posted Feb 03, 2003 08:14:00 0 Wow! Seems a bit heavy - i'll need a bit of time to make it sink in, so that i understand it, but i think i can follow the explanations. Thanks for the help. Cheers! It is sorta covered in the JavaRanch Style Guide . subject: Yet ANOTHER string problem.... Similar Threads pass values to static method To retrive a particular line from the file JText Area..searching and replacing text June Newsletter Puzzle How to do a fast substring search on an Array of strings? All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter JForum | Paul Wheaton
http://www.coderanch.com/t/393203/java/java/string
CC-MAIN-2013-48
refinedweb
1,129
71.95
ODF Plugins and a Microsoft Promise of Cooperation 262 Posted by ScuttleMonkey from the playing-nice-or-moth-to-the-candle-flame dept. from the playing-nice-or-moth-to-the-candle-flame dept. Andy Updegrove writes "Last week, the Massachusetts Information Technology Division (ITD) issued a Request for Information (RFI) on any plugins that might be under development to assist it in migrating from a MS Office environment to one based upon software that supports ODF. The RFI acknowledges the fact that it may be necessary or advantageous to see some of the code in Office in order to enable the types of features that the ITD is looking for. Conveniently, Jason Matusow, Microsoft's Director of Standards Affairs, had this to say on the occasion of ODF's approval by the members of ISO and the IEC: ." Presumably such support will include helping the plug-in developers that will assist Massachusetts migrate from a MS Office environment to one based upon ODF-compliant office productivity software." let me be the 1st to say ... (Score:5, Funny) embrace and extend!! Re:let me be the 1st to say ... (Score:5, Insightful) They can't win, can they? Re:let me be the 1st to say ... (Score:5, Informative) Based on what they did to Java, HTML and everything else they have ever touched it'll be a almost compliant version, to an out of date standard, that is a massive pain in the ass to use with non-MS products. (Ref IIS/IE/Frontpage etc etc.) KOffice also supports the ODF format (Score:5, Informative) Micro$soft is lying through their nose. They know very well that KOffice [koffice.org], the Free & Open Source office suite that comes with the KDE [kde.org] desktop environment also supports the ODF format. In fact, they were publically informed [slashdot.org] about KOffice's capabilities last year in a open letter [kde.org] sent by the KOffice developers. Yet they continue to spread the outright lie that only OpenOffice and its derivatives support the Oasis Open Document Format (ODF) [oasis-open.org]. KOffice has a much cleaner architecture and a leaner codebase than OpenOffice, making its startup faster and facilitating the addition of new features [koffice.org]. Because improving KOffice to meet the usability needs of governments, businesses and disabled individuals can be done with much less effort, KOffice is an even greater threat to Micro$oft. Re:KOffice also supports the ODF format (Score:2) I think the more important question is does MS Office have features that OOo/StarOffice don't have? If so, are they features that would be disabled by using ODF, or are they things like, say, formatting a table is easier in MS Word* but once its formatted it can be saved just fine as ODF? MS wants to give people the impression that using ODF will cripple MS Office down to the level of OOo**, but that's just not the case. MS Office people will sti Re:KOffice also supports the ODF format (Score:2, Informative) Apart from that, this has been the case virtually every time you chose to export a document from whatever source to whatever format, so I don't really see why there is such a big fuzz about all of it. Having one dedicated format for 'office documen Re:KOffice also supports the ODF format (Score:5, Interesting) I'd love to rewrite that dialog so that it says something like "you are about to save in a text-only format. are you sure? if you do this, you will be able to access this information for the rest of your life, even if you don't continue to buy our software. Think about it very carefully, then press continue... Re:KOffice also supports the ODF format (Score:3, Informative) Qt has pretty much always had a Windows version. The problem with Qt3, which is what KOffice 1.x uses, is that the Windows version isn't available under a F/OSS license. Qt4, however, is F/OSS-friendly on all three major platforms instead of just Mac and *nix/X11. KDE4 and KOffice 2 will use Qt4 (this is probably the porting that you were thinking of). With KDE and KOffice using a toolkit Re:let me be the 1st to say ... (Score:2) Re:let me be the 1st to say ... (Score:5, Informative) Re:let me be the 1st to say ... (Score:2) *sigh* OK, if Microsoft don't implement ODF they are rejecting open standards. If they do, they're embracing and extending. They can't win, can they? Think about it as the case of an ex convicted con artist. If he doesn't try to get a job, he must be up to something. If he does, he must be doing it as part of a scam. Given Microsoft history, that's more or less their position, they will always be suspects, they can't win, of course, but they put themselves in that position through their past actions regarding Re: Damned if they do, damned if they don't... (Score:2) if Microsoft don't implement ODF they are rejecting open standards. If they do, they're embracing and extending. They can't win, can they? Microsoft has spent more than 25 years developing its reputation as the business partner who will steal your ideas then stab you in the back and dump your carcass in the ditch as they continue their triumphant shamble down the Information Highway. Microsoft has put more time, money, and effort into developing this reputation than they have put into developing any of Re:let me be the 1st to say ... (Score:5, Insightful) So uh... (Score:5, Insightful) Gosh, not that I'd like to insult the integrity of a company with such a spectacular record of interoperability and standards compliance as Microsoft, but I really just can't think of anything obvious that their closed document format offers beyond lack of compatibility with anything but their own products. Re:So uh... (Score:5, Informative) Seriously, open up a Word document that you've worked on and modified several times. Select the whole document, copy it, paste it into a new document, and save it. The documents should largely be identical (you might've missed headers and footers or page margins). Now compare the fize sizes. The old document might be several megabytes. The new one is probably a few hundred K. What's missing? Gobs and gobs of metadata about every keystroke, ever action, every cursor positioning. Ever open up a Word document, scroll arounda nd read but make no changes, close it, and have Word ask to save changes? Metadata. Re:So uh... (Score:3, Interesting) You can see the same thing if you print it to a file, in PDF format. Instead of positioning the cursor at the start of a line and then printing the line, Word does a separate cursor positioning for each character. A typical PDF file printed by MS-Word is at least ten times as big as would be needed to print the document in exactly the same format using the features of the PDF standard. Re:So uh... (Score:2) Re:So uh... (Score:3, Interesting) Most likly cause: multiple development groups. One develops the file format, one develops what is saved, one develops what is used from session to session. Re:So uh... (Score:2) The features name is "Track changes" (Score:2) Word's "Track Changes" feature is one of the few things that make it such a useful writing tool. Every version of MS Word since Office 95 has it, and they all allow you to customize what is seen and how it's seen. Don't want the balloons in XP-on? Do what I do and turn them off. Want to only see the changes from Director Bob, or ignore al Re:So uh... (Score:2) this sounds like you have "QuickSave" (ot whatever its called in english) enabled. (this appends all Changed to the file) Re:So uh... (Score:2) Re:So uh... (Score:5, Interesting) Oh, there are lots of features only found in MS Word that aren't in OpenOffice. These are things like their document wizard, VBA scripting, object insertion, watermarking, cross-referencing, index marking, and our favorite, Clippy the paperclip. Ever used these features? No? That's probably why they're not in OpenOffice. There are several reasons for all of these features: You've got one application that's trying to make sure that anyone who uses it can find the features they need. Because MS has hundreds of developers working full time on MS office, and they got to do something to justify their jobs. It looks good in ad copy (millions of features!). And, it is an important element of FUD. (If you switch to OpenOffice, there might be some feature not in OpenOffice that you will need.) Re:So uh... (Score:4, Insightful) Yes, although rarely. VBA scripting Yes. object insertion Yes. cross-referencing Yes. Ever used these features? No? That's probably why they're not in OpenOffice. Just because *you* don't use a feature, or know anyone else that does, doesn't mean that no-one uses it. Re:So uh... (Score:2) Because most slashdotters are unix guys and they don't understand complex software or modern technology. To them, if a program uses color, it's a waste of time, resources and processor clicks. Don't worry, they're a dying breed and on their way out. Re:So uh... (Score:2) as is index marking and watermarking, also used them (or seen them in use on documents i've opened) If by object insertion you mean ole objects, then yes openoffice also supports that but it will result in proprietary binary blobs existing inside your document which is far from ideal. There is no clippy, but openoffice does sport an almost-as-annoying lightbulb. And as to VBA scripting, openoffice supports macros written in openoffice basic, java, Re:So uh... (Score:2) Re:So uh... (Score:3, Insightful) > > And, it is an important element of FUD Is it just me, or is there a certain irony to be observed in the above statements? - Oisin Decent performance; extended XML (Score:5, Informative) Beyond that, I can't say there's too much I've run into that I can do in Office but not OO.o . A lot of things are much smoother in Office, though I think MS's argument is a lot weaker with regards to the file format, though I'm certainly no expert. I do expect that they'll be able to implement their own formats with better performance in Office than the ODF formats, but that's hardly surprising given that they designed them with that as one of their key goals. More interestingly, the Office XML formats require implementing programs to preserve unrecognised valid markup from other namespaces. This lets you do things like embed (eg) an order record in an Office document, embed a JDF specification (when Publisher gets around to going XML as well), and so on. It's not exciting for the end user, but for developers and larger businesses it's a really nice thing to see. One could argue that Microsoft are getting XML "right" in a way that few have so far. Most interestingly by far, you can link the foreign markup in to your Office documents, so that (eg) a user can fill in a form in a document that's actually an XForm with your own structured data. Alternately, a newspaper could insert some custom metadata when exporting stories from a database, so it can tell what's been done with it, keep the DB up to date when the story is imported again, and so on. It's quite interesting stuff. Check out Brian Jones' weblog for some interesting use cases and discussion (and some persistent questions about the licensing issues from me). The ODF spec only briefly refers to this issue at all. IIRC it permits apps to do this perservation, but does not require it or provide any facilities to support it. If apps aren't required to preserve your markup, then in my view it's not much darn good - it's somewhat like saying that apps may preserve your document text and structure. OpenOffice doesn't preserve foreign markup at all. If it's not directly in the ODF spec, you can't use it. This really loses one of the great advantages that XML has, and is very disappointing. If we had a standard office document format that I could rely on having these features, there are some very interesting things I could do with it, especially at work. This fragementation and the ODF limitations are extremely frustrating, especially given that the ODF folks are always banging on the XML gong while missing one of the key abilities of XML entirely. I think MS screwed up very badly at the start by attacking ODF with rhetoric and poorly thought out garbage, not a solid arguement over capabilities and other real issues. Insufficient audiovisual support indeed... Personally I don't care much whether ODF or MS Office XML wins, so long as the resulting standard: Re:Decent performance; extended XML (Score:3, Interesting) Re:So uh... (Score:2) They don't have to, there is a bit of them that John Doe will never use, but bother some more advanced users. Like plotting experimental data with different error (uncertainity) value for each measurement. In OOo it's possible to do just the basics - i.e. same error (+/- value or percentage) for each measurement. This of course could bring questions like what sick people use Excel for p Re:So uh... (Score:4, Informative) Another alternative is R [r-project.org], which is much more powerful than anything MS Office has to offer, is Free, and runs on most platforms. Re:So uh... (Score:2, Informative) Honestly, right now, Office 97 suits plenty of people's needs compared to 2003 or XP or 2000. A lot of offices still use Office 2000 or XP and will not bother with getting 2003 ever. There's just no need. The amount of money and time to deploy on systems is not worth it to them. Secondly, what are the new features after XP to 2003 that are so important? Nothing at all. Not even from 97. I like to think of what I did with Offic Re:So uh... (missing features) (Score:2) The OpenDocument Foundation already has a plugin (Score:4, Informative) slashdot covered the plugin too... (Score:5, Informative) Re:slashdot covered the plugin too... (Score:2) Maybe slashdot uses dupes to keep unloyal users informed! Re:The OpenDocument Foundation already has a plugi (Score:2) We gave the government a way to keep using M$ Office. We as tax payers are paying the license fees for the government. If the plugin hadn't been available, odf format was mandated, and MS Office was not capable. The government may have had to use cheaper or free software. Saving the tax payer money. Money that could then be spent on o Re:The OpenDocument Foundation already has a plugi (Score:2) Re:The OpenDocument Foundation already has a plugi (Score:2) Re:The OpenDocument Foundation already has a plugi (Score:2) Excellent (Score:4, Insightful) This is extremely significant news. What this means is that, after years and years of MSO having no competition, years after they basically wiped out wordperfect etc... There is now significant competition to Microsoft Office, and they are being forced to acknowledge it. Hopefully this will mean that Microsoft will start developing some new revolutionary stuff in Microsoft Office instead of just resting on their laurels (sorry but I don't think any version since 6.0 has been that huge of an upgrade compared to going to 6.0). This is good news. We are all going to get better products instead of everyone just copying each other's minor features. Open Office is here to stay. They have succesfully gotten a multi-billion dollar company to acknowledge them as a serious competitor just like Linux forced them to acknowledge that windows has competition. Microsoft no longer has the monopoly they did a few years ago. Genuinely interested (Score:5, Insightful) Nearly all the users in our office are doing standard officey things in MS Office. None of them use features that aren't present in OpenOffice - in fact, hardly any of them use MS Office as anything more than a glorified typewriter with a handy spell checker. Re:Genuinely interested (Score:2) But I would say most if not all features in MS office are there because someone, somewhere needs those features on a regular basis. You might not know of any of these people but there are probably people out there who would kiss Bill Gates personally for the inclusion of this feature that makes their task so much easier. People don't need most features (Score:5, Informative) No. About ten years ago I read an interview by a top executive from Microsoft (Nathan Myrwold, iirc) that most features do not come from customer requests, but from magazine comparisons. When someone wrote an article comparing different office suites they would include a table with tickmarks showing which features were included in each software. It became an obvious competitive advantage to have more tickmarks than the competition. In that interview, Myrwold mentioned that MS-Word had over a thousand different commands, and that was a problem because most of those commands would never be used by the majority of users and it had a big impact on usability. That's how Clippy was born, it was an attempt to concilate the wants of marketing who insist on putting useless features with the needs of users who want to perform simple tasks most of the time. Office is the bloated one? (Score:2) Office might've been bloated once, and arguably still is, but it's nothing compared to the awe-inspiring bulk of OO.o in action. Re:Office is the bloated one? (Score:2) Re:Genuinely interested (Score:5, Interesting) Re:Genuinely interested (Score:3, Insightful) I don't disagree that people use features in MS Office that aren't present i Re:Genuinely interested (Score:2) Those silly scripted pieces of annoyance are rolled out to every user in a large organization, and hey presto, most users of office are using "advanced" features, mostly because they can't be turned off easily. I've not been in a large enterprise Re:Genuinely interested (Score:2) That's like saying that you haven't been in a large enterprise organisation that did NOT have shell scripts in their unix machines, or that didn't depend on C programming - it must be on page 1 of The Unix Programming Environment. Seriously, if you buy a tool and don't use its features... S Re:Genuinely interested (Score:2) you either have to deploy ms office everywhere or live with the huge pain of multiple almost but not quite compatible office suites. Much the same thing happens with different versions of office itself in fact. Re:Genuinely interested (Score:2) These days I no longer spend weeks working on building one spreadsheet (thank God) and I am quite happy with Gnumeric. Not everyone agrees with me and one guy who used to work for me, and now does do big spreadsheets using Excel, says he prefers Excel. The embedded video and audio in office documents is a menace. It just gets used as a way of emailing stuff tha Re:Genuinely interested (Score:3, Interesting) Now, the way it goes seems to be they start out with MS Word, as it is most familiar. After having lost a couple of papers to its mysteries, they switch to OO Writer. Now, OpenOffice seems to lose just as much data Re:Genuinely interested (Score:2) MikTeX (Score:2) It is very easy to install. I can get nearly identical output from the windows workstations at work as I get on my Linux machines. One particularly nice feature is that if you request the use of a package that isn't installed to your texmf folder, it will prompt you & ask you if you want to download it from CTAN. I suppose that this might not work well for multi-user environments. So, perhaps your peers want to use other packages, but don't have permis Re:Genuinely interested (Score:2) LyX and LaTeX (Score:2) For any math stuff, you should use LaTeX or some frontend like LyX. Word is a disaster, and MathType is awful. Wjy reproduce that garbage? Maybe OO could use some LyX Matheditor code to create eps objects for equations. This is basically what I do with tgif, where I have nice eps equation images. Click on them, it opens Lyx to edit, save and close lyx and the equation is exported to ps, converted to eps, then uploaded into tgif again. Basically, tgif allows you to add the lyx file onto the eps image and s Re:LyX and LaTeX (Score:2) Actually, you can... (Score:2) You can insert video (as well as many other types of media). Insert... Plugins Then just choose which type of media you're inserting. I can't say I think it's very useful, but it can be done. Re:Genuinely interested (Score:2) When taking a Numeric Methods For Differential Equations course, I got the other students in my group to install OpenOffice exactly because of the math editor!! We would still be writing equations if we used MSOffice!! I remember writing equations with Re:Genuinely interested (Score:2) Re:Genuinely interested (Score:2) Math Editors in MS Word, OO.o Writer (Score:2) A couple points: Remember they were discussing differences in file formats. ODF is no worse at storing equations than DOC. I have DOCs that I've converted to ODT in OO.o writer & equations are identical. (You did mention these were "implementation issues (by which you really mean INTERFACE issues," but it is worth emphasizing.) Also: the equation editor that ships with Word is VERY bad. It is basically a limited sha Re:Math Editors in MS Word, OO.o Writer (Score:2) I do understand that. However, for a file format to be really useful, it must have good application support. So far, the app that supports it best is OO.o, but it still needs to be improved a lot (which is what I was trying to point out). Can you clarify what you mean by [sound is] "buggy?" Or at least give examples? I mean that 1) it's a bit of a pain to insert sounds in the first place and 2) On both my machines, sounds don't even work when I'm in pre Re:Genuinely interested (Score:2) Granted, I rarely use OpenOffice, but am curious to see how it stacks up. I actually do enjoy the fact that many of the more "advanced" features in word work extremely well when I need them. The features for managing large documents are appreciated as well with support for tables-of-contents and excellent footnote support. I'm no big Microsoft fan Re:Genuinely interested (Score:4, Insightful) Can I get some of what you're smoking? The commenting is one hell of a mess. Oh yeah, it looks all shiney and look! colours! on the surface, but have you ever tried to really _work_ with it? The only use is within small workgroups where a little bit of improved communication would make it superfluous anyways. I've tried working with both commenting and versioning in a non-trivial environment where several different - and at times hostile - parties are involved. You can forget about it. We're currently using In And let's not even speak about versioning. 20 year old CVS beats it with one arm tied behind its back. Almost all of Words advanced features are half-assed at best. I'll celebrate the day its market share plummets to insignificance. Removing personal info in OOo (Score:2) Tools - Options - General - OpenOffice.org - Remove personal information on saving (tick it) You can also go into File - Properties - General and then press the Delete user data button on any existing document to clear revisions, user data etc. HTH Re:Genuinely interested (Score:3, Informative) I believe that the granparent's point was that this feature (commenting/version-tracking) is useful in some circumstances and is not included in Open Office. And I am willing to agree that it is useful in many cirucumstances. However: OO Re:Genuinely interested (Score:3, Insightful) (* Note that I said primarily; please don't take me to task because not only geeks read slashdot Re:Genuinely interested (Score:3, Insightful) Re:Genuinely interested (Score:2) After 15 years using MS Office, I've never found a "common" (to me) feature that OpenOffice can't replicate. YMMV. I think what this announcement translates to is "Resistance is futile! You will be assimulated." Meaning: We will ensure that every time you us a MSFT product to open a ODF file, it will be converted to the superior technology without delay and we will repeatedly question the intelligence of any motions to continue with this puny ODF format. This is typical behaviour for their software app Time for the obligatory Admiral Ackbar quote (Score:4, Funny) Jonathan [justgofaster.com] Slowly (Score:2) delusions about ms office (Score:5, Insightful) I am constantly amazed by the sort of mass-delusion people seem to have about MS office, intentionally perpetuated by ms - the idea that ms office is a framework of acceptably workable office productivity applications. Wrong wrong wrong. Each and every office application is buggy, has gaping holes in terms of usability (for example the Access report designer makes adding columns to data a nightmare - you have to align line elements to the pixels manually, or use the severely clunky grid system), and makes any use beyond bare minimum severely frustrating (my job is to work with Microsoft Office and I'm at expert level with it so I know those only too well). Microsoft dominate the market, and they have abused it as most public companies in a monopoly would do. The software is incomplete and as far as I'm concerned unacceptably faulty but it's the best out there given that they have had virtually no competition. Now that's changing, they act as if their so-far monopolised customer base would find other software unacceptably bad. It's ridiculous. Thank God for open source giving people a more usable, workable solution not only for portability's sake but to finally give us an alternative so we can all show ms what is and isn't acceptable. In my opinion it isn't there yet - but it's only a matter of time before Openoffice exceeds MS in terms of functionality I'm convinced of it. I know I'm probably gonna be modded down for trolling/off-topic/etc. but I feel so strongly about this - please can we all stop acting as if their software is acceptable. In any other industry a company producing such faulty goods would have gone out of business, and rightly so from the customer's point of view. We're only encouraging Microsoft to not bother fixing anything time and time again if we stay complacent, and yet again us customers' will be cheated out of decent software. They could do it. They have very talented people working for them. But they only understand the language of commerce - so let's make the competition strong and force them to change their ways. It's time for change. /rant Re:delusions about ms office (Score:2) Disruptive Technologies (Score:2) Say what? (Score:3, Insightful) ODF is indeed geared toward OO.o's needs (Score:2) Allow me to quote from [openoffice.org] OpenOffice.org XML file format: The OpenOffice.org XML file format is the native file format of OpenOffice.org 1.0. It has been replaced by the OASIS Op Re:ODF is indeed geared toward OO.o's needs (Score:2) Ah, but thats where you are wrong. MS *pretended* to open up their formats. In reality, there will still be XML-encoded binary portions that will only be understandable using MS provided Windows-only libraries, and their licensing terms prohibit GPL software from implementing it. ODF had to have somwhere to start - it would have taken quite a bit longe Re:ODF is indeed geared toward OO.o's needs (Score:2) This is a contest between open formats (where the use controls access to and use of the documents they create and closed formats where Microsoft controls access to and use of users documents. This is an important distinction. For Microsoft, it is about control of the customer. For OpenOffice.org it is about giving the user control. It's not really about functionali Embrace & Destroy (Score:4, Insightful) Transparent as it is, the strategy is remarkably effective. The masses blame the standards-compliant software for "not working", not Microsoft for having poisoned the standard. The courts will sit on their hands and a couple of billion-dollar buyouts will silence the commercial opposition. Re:Embrace & Destroy (Score:3, Informative) Add C++ and Kerberos to the list. Oh, and Active Directory is a clever way to sabotage LDAP. Let's see now ... (Score:4, Funny) Re:Kooks. (Score:5, Insightful) It is more like Microsoft must provide ODF compatibility or the state government as well as local governments will not be buying Office. Notice that this promise came after they tried to bribe and threaten the state government to back down on its ODF requirement. Failure to reverse the ODF decision means that no matter what decision Microsoft makes they will lose the Office monopoly. Bill Gates can choose to keep a piece of the action or lose everything. Re:Before we get the usual FUD and Tinfoil Respons (Score:3, Insightful) The two examples that you provide are probably used by 0.01% of Microsoft Word documents. I would not call them "real world" examples. Re:Before we get the usual FUD and Tinfoil Respons (Score:5, Insightful) If Microsofts wants to support ODF, and needs more features, all they'd have to do is propose extensions and present a well founded argument for why they should be allowed. They haven't. In essence, Microsoft likes to whine about this, because it serves their purpose to keep ODF adoption rates down, but they show no interest in doing anything about it. Re:Before we get the usual FUD and Tinfoil Respons (Score:2) What would be the point in us emailing them? Microsoft has its own representatives on the committees responsible for this standard, at least with respect to the OSI. I'm sure they would be welcome to participate elsewhere too. If they want to contribute their suggestions then there's nothing st That's fine (Score:5, Informative) The idea is that the constituents of the Commonwealth should be able to read the digital documents produced by their government. It is FUD in the most classic sense that the idea was to mandate some ODF-only office suite that allowed people to work only in ODF. This is not the case. The point is accessibility for the final product. Think of a magazine. Magazines are commonly laid out in Quark XPress (as a common example). Quark has features like revision control, graphics control, text kerning and leading and flow-control. Myriad tweakable parameters that allow the people who work on the magazine to make it look and read the way they feel is best. We as magazine readers do not need this functionality at all in order to read the magazine. We just want to be able to pick up the publication and flip through the pages and read stories, look at pictures, and so on. These are two completely different modes of interacting with the document that are not mutually exclusive, but that intersect in the act of publication. ODF is this simplified translation for uses that do not require things like XAML. This is where Microsoft sought to sow seeds of doubt that the sky of document creation and workflow was falling. This is not the case, and what we read here is that what ODF proponents predicted has come true: Microsoft would not stand in the way of their users choosing to "Save As..." in the ODF format. It's just bad business for them to do so and I for one see this story as Microsoft acknowledging a big, fat "I told you so." I don't even want to touch the accessibility/ADA aspects of embedded media, which is entirely uneccessary for the purposes that Massachussetts wants to use ODF for, but that Microsoft purported to be 110% necessary for anybody to create documents in the future. They were trying to embrace and extend their reach into the very act of creating a document. Is any government document dependent on the creator being able to publish their Inkitudes in a native format? I don't think so! The fact remains, however, that government employees can use whatever techniques they like to create a document, but if it's going to wind up being a public document then people need to be able to access it forevermore. I certainly didn't see them promising THAT in the runup to MA's decision to use ODF. ODF is just another output format and there's no reason that the laws and other byproducts of governmental communication can't be published in a format that people can be confident can be incorporated into future products - it being an open and documented format - and won't be aged out in favor of Microsoft's decision that maybe Ink should be the lingua franca of Office formats (downsampled into Palatino if desired). Microsoft did not want to cede control of one iota of their Office franchise and they preferred to be able to hold the reins on just what software would be able to read a Microsoft Office document. Office 2007 formats are standards (Score:2) Is that why Office 2007's default formats will be open standards, recognized by ECMA, and later ISO? Is that why the OpenXML developer's group already provides Java sample code that manipulates that file format without any need for Office 2007 being used? Is that why a Novel dev is already working on a spreadsheet Re:Office 2007 formats are standards (Score:2) "Competitors are... effectively precluded from bidding against Microsoft or its suppliers for any... contract specifying use of Microsoft's software file formats." He first noted that the patent license for the format "is structured to be read restrictively, in Microsoft's favor... it states that: 'All rights not expressly granted in this license are reserved by Microsoft. No additional rights are granted by implication or estoppel or otherwise.' This is not the customary 'all rights reserv Re:Before we get the usual FUD and Tinfoil Respons (Score:5, Informative) "Ink" information can be stored in an ODF document using the Gif format as a metatdata container. This can be specified by using the Gif parameter of the Ink.Save Method. From MSDN; Gif 2 Re:Before we get the usual FUD and Tinfoil Respons (Score:3, Interesting) You say, Here's the problem. Someone gives me a document with ink and associated content. I decide to use a "not ink-enabled" app to alter the document, and then pass the altered document to someone that views it with "an ink-enabled application". The document that I pas Re:Before we get the usual FUD and Tinfoil Respons (Score:2) And you'd be foolish to edit something in an app that doesn't support it! Re:Before we get the usual FUD and Tinfoil Respons (Score:2, Informative) I didn't say that, Microsoft did. It's a quote from their Tablet PC API documentation. Re:Before we get the usual FUD and Tinfoil Respons (Score:2, Insightful) Fix the huge problem first and then aim for new features. I'm a little doubtful that a significant amount of the population will start using much of what is added at this point to the very mature product that is a Re:Couldn't agree more (Score:2) ODF is XML, so by default ODF has this ability. In addition, ODF has partial support of W3C XForms. There is no way in ODF to include your own data with your own schema (in a separate namespace) and have OO.o preserve that data, keep it with the appropraite document elements, delete it if the associated document elements are deleted, and so on. This isn't a problem with the form Why am I replying? (Score:3, Interesting) The simplest reason to want to preserve your own markup is to integrate with other systems. Here's a simplistic example: A content management system may want to store the identity of a document in the document in such a way as that it can be reognised as the same document when re-imported into the CMS after someone's been working on it on some disconnected laptop. Re:Why am I replying? (Score:2) Since the goal of the ODF is to have a transparent document that can be displayed or edited by any software that supports the standard, there can be no room for allowing extensions. If you want such things, work in anothe Re:OO = Basic (Score:2) Please wait while I wet myself laughing at your ignorance. From your post I have extracted the following metadata:
http://slashdot.org/story/06/05/07/0346201/odf-plugins-and-a-microsoft-promise-of-cooperation
CC-MAIN-2014-49
refinedweb
6,371
61.67
- Overview - First Steps - Connecting to an LDAP server - Making LDAP requests - Examiing LDAP responses and exceptions - Handling Referrals - LDAP Operation examples - Examining a search response - LDAP controls - Other features - Further Information - Example 1. Connecting to an LDAP server - Example 2. Connecting to a secure port via SSL - Example 3. Simple bind - Example 4. Bind with SASL - Example 5. Add request - Example 6. A Search operation Overview The Test programmer's API consists of a set of Java classes that act as an LDAP client API. This can be used to develop tests that extend the scope of VSLDAP. A test program must be able to do the following: Connect to the LDAP server under test Send any number of LDAP requests to the server Receive and interpret any responses from the server Disconnect from the server log the test result and other comments The API provided to acheive this acts like an LDAP client API but it is important to understand that the VSLDAP test programmer's API is not a full-featured LDAP client API, nor is it intended to be. It shares with the typical client API those features that allow it to carry out the required LDAP Certified tests. Having said this, the VSLDAP API is reasonably flexible and can be used to create new tests that test aspects of LDAP server performance that lie outside the LDAP Certified conformance requirements. This test programmer's API guide provides an overview for those interested in using VSLDAP as a development tool by writing new tests. First steps Being a TETware-based suite, VSLDAP tests should be written using the TETware java API (It is possible to use other non-standard APIs but that outside the scope of this guide). The programmer should be familiar with basics of writing TETware tests - this involves reading the TETware Programmer's Manual. Essentially, each test is created as a standalone class with a `main' method that is invoked via a TETware superclass, typically SimpleTestCase. The following code fragment can be regarded as a skeleton for typical TETware Java API based tests. import TET.*; import vsldap.api.*; public class mytest extends SimpleTestCase { public static void main( String[] args ) { main( args, new mytest() ); } public void i1t1( TestSession ts ) { // Test code goes here } public void i1t2( TestSession ts ) { // Second test purpose } public void i2t1( TestSession ts ) { // Second Invocable component } } Note that the TETware java API is imported in the TET package which is a supported component of TETware versions 3.4 and later. When called by tcc, the invocable methods are passed an instance of the TestSession class which provides the method with a handle to standard TETware methods and configuration parameters. There are three public methods: i1t1, i1t2 and i2t1. These are named according to a convention described in the TETware programmer's guide. The `i' identifies an invocable component, the `t' identifies a test purpose - terms that are explain in the TETware documentation. So in this example there are two invocable components: i1 and i2. I1 has two test purposes: t1 and t2 whereas i2 has a single test purpose. The Java classes of the VSLDAP test programmer's API are imported from the package vsldap.api which contains a number of clasess that are documented in the VSLDAP API document. Their use is illustrated with several examples below. Connecting to an LDAP server Before a client can begin to interact with an LDAP server, a connection must be established. This is done by creating a `context' object which represents the LDAP session and then calling one of the object's connect methods. The context object is an instance of the vsldap.api.LDAPSession class. The class is a sub-class of a more basic VSLDAP class that implements an interface to the low-level LDAP SDK calls. The API documentation for all LDAPSession methods is located in the description of vsldap.intf.base.LDAPmethods. Example 1. Connecting to an LDAP Server - public void i1t1( TestSession ts ) - { - LDAPSession ldap = new LDAPSession (ts); - // attempt to connect to the server - try{ - ldap.connect(); - // We've connected, now we can do other stuff... - } - catch( LDAPexception e ){ - ts.tet_infoline("Failed to connect, got LDAPexception "+e.result.resultCode ); - ts.tet_result( ts.TET_FAIL ); - } - // send an unbind request to end the session - try{ - ldap.unbind(); - } - catch( LDAPException e ){ - ts.tet_infoline("Failed to unbind, got LDAPexception "+e.result.resultCode ); - ts.tet_result( ts.TET_FAIL ); - } - } Line 3: A vsldap.api.LDAPSession object `ldap' is created (The test script generation program automatically imports vsldap.api.* for us). The LDAPSession constructor takes a variable called `ts' as it's sole argument. `ts' is an instance of class TET.TestSession that represents the TETware session context. In this fragment, as with real test scripts we can safely assume that ts has been automatically generated for us by the VSLDAP program that converts test scripts into pure Java source files. So now we have an object `ldap' that acts as a handle to our LDAP Session. Line 6: We call the connect() method of LDAPSession. This attempts to open a connection to an LDAP server. We have put this call in a try-catch block because the connect() method can throw an exception object called LDAPexception. This version of connect() uses default values of hostname and port to connect. When the TETware controller `tcc' executes a test, it looks for a configuration file, called `tetexec.cfg' by default. This file contains user-defined values which are passed to the test program via the TestSession ts object which we use in the LDAPSession constructor (Line 1). The tetexec.cfg file for VSLDAP contains the global configuration variables VSLDAP_SERVER_HOST and VSLDAP_PORT among others, which declare the hostname and port number respectively of the server under test. LDAPSession.connect() uses these values. A TETware test session can be used to execute any number of tests (in any required order) and only requires the one tetexec.cfg file to configure this session. All the tests that run in that test session have access to the same value of VSLDAP_PORT and all of the other configuration values. Lines 11,12: If the connection request fails then an LDAPexception object is thrown. In this catch block we call two methods of the TestSession class: tet_infoline() and tet_result(). tet_infoline takes a string as it's argument and writes this string to the journal file that TETware has created to log the test session. tet_result also logs a value to the test session journal file. In this case it is a record of the result of the test. TETware maps common results onto a set of constants (like an enumeration). In this case, the connection has failed, and since the purpose of our test was to connect to the server, so we inform TETware that the test has failed by calling tet_result() and passing it the pre-defined constant ts.TET_FAIL. Lines 15-21: The second try-catch block calls the LDAPSession.unbind() method in an attempt to disconnect gracefully from the server and end the LDAP session. Once unbind() has been (successfully) called, the LDAPSession object `ldap' is no longer an active handle to an LDAP session and can not used be used to send LDAP requests until a new session is created. Again, if the unbind operation fails, we log some pertinent information in the journal file. Example 2. Connecting to a secure port via SSL - LDAPSession ldap = new LDAPSession( ts ); - // SSL data is stored as a `feature'. We need to get the SSLFeature object - // which contains the relevant data - SSLFeature ssl_feature = (SSLFeature)ldap.get_feature( "sslConnection" ); - if( ! ssl_feature.get_ifActive() ) - { - // The SSL configuration is incorrect - // send auto-generated error message to journal - ssl_feature.statusToJournal( ts ); - ts.tet_result( ts.TET_UNTESTED ); - return; - } - // Attempt to connect, passing the SSLFeature object. - try - { ldap.connect( ssl_feature ); } - catch( LDAPexception e ) - { - // if we can't connect, the test has not failed but is untested - ts.tet_infoline( "Failed to connect, resultCode: "+e.response.resultCode ); - ts.tet_result(ts.TET_UNRESOLVED); - return; - } In the example we provide the connect method with the necessary information in the form of an SSLFeature object. This is one of several feature classes that represent optional LDAP functionality that VSLDAP is designed to test. The feature is automatically loaded into the object via the TETware test controller. The relevant data is configured in the tetexec.cfg file that is used as the master configuration file for any test run. (See Using VSLDAP for details on how to configure this). This is the only supported method of requesting an SSL connection. Making LDAP requests When a client requires a server to perform an LDAP operation it sends a request to the server using the LDA Protocol. The VSLDAP API models this by defining a set of request classes (members of the vsldap.api package), one for each of the ten operations specified in RFC2251. The LDAPSession class gives access to a corresponding set of methods. A request is sent by calling the appropriate method with an instance of the relevant request class as it's sole argument. The request object contains all of the data required by RFC2251 to specifiy the request. The test programmer populates the request object with the necessary data. The request object constructors provide default values for any optional data. The LDAPSession request method returns a response object which contains information returned by the server on successfully processing a request ( i.e when the server returns a resultCode of 0 == `success'). If the request fails at any stage, or the server returns a resultCode other than `success' then an exception is thrown. The exception object is an instance of the LDAPexception class, a member of the vsldap.api package. This object contains information about the failure including the LDAP resultCode value as defined in RFC2251. The operational request methods available via the LDAPSession class are: Method Argument (request object) Return type abandon abandonRequest LDAPResult add AddRequest LDAPResult bind BindRequest BindResponse compare CompareRequest LDAPResult delete DeleteRequest LDAPResult extended ExtendedRequest ExtendedResponse modify ModifyRequest LDAPResult modifyDN ModifyDNRequest LDAPResult search SearchRequest SearchResponse unbind <no argument required> <no data returned> The methods behave synchronously, that is, the methods wait for a result from the server and then return the response. The member data of the request objects are public for easy modification and the naming follows that of the structures defined in RFC2251. LDAPString, LDAPOID, LDAPDN and other data represetned as text are treated as java.lang.String objects. Sequences are stored as java.util.Vector lists. Binary OCTET STRINGS are represented as byte[] arrays. Enumerated values are represented as integers with a corresponding vsldap.api class containing static member values providing a mapping of named values. For example the ENUMERATED resultCode value of the LDAPResult structure in RFC2251 is represented by the vsldap.api.LDAPresultCode class. Examining LDAP responses and exceptions The vsldap.api.LDAPResult class contains the resultCode value, matchedDN string, errorMessage string, referral list and returned server control list. Note that these values are public.The control list is the only value not defined in the RFC2251 LDAPResult structure. RFC2251 places the returned control list in the LDAPMessage block. It is moved to vsldap.api.LDAPResult since the API does not provide methods that return an RFC2251 LDAPMessage structure directly. The resultCode value can be interrogated by reading the value directly or by comparing to the vsldap.api.LDAPresultCode class. E.g.if( res.resultCode != LDAPresultCode.success )The above example is unrealistic since a request method that returns a non-zero resultCode will throw an exception. The vsldap.api.LDAPexception contains a vsldap.api.LDAPResult object called response. A more realistic code fragment would be: { // do something }try{Note that most simple requests return an LDAPResult containing the required resultCode. More complex operations that return data, such as bind, search and extended operations return a specialised sub-class of LDAPResult which contains the usual LDAPResult values and also any extra specific data such as a list of matched search entries. LDAPResult res = ldap.add( my_add_request); // success, now do something with res } catch( LDAPexception e ){ System.out.println( "Add request failed, resultCode = "+e.response.resultCode ); } Handling Referrals Any response may contain a list of referrals. The server is expected to return a resultCode of `referral' (#10) in this case and so any referral handling code must be placed in the catch block of the request method since the API will throw a exception for a non-zero resultCode. The referrals list is a java.util.Vector list of vsldap.api.LDAPurl objects. The LDAPurl class contains the original LDAPURL as a string and also contains a parsed break-down of the URL into it's components: hostname, port, dn, etc. Note that beacause these are parsed values, URL-encoded characters have been replaced by plaintext equivalents. The `url' field contains the orginal unparsed URL string. LDAP Operation examples The following code fragments demonstrate the way to make LDAP requests and analyse the responses using the vsldap.api package. In these examples it is assumed the an LDAPSession object (`ldap')has been created and that a successful connection to the server had been established. Example 3. Simple bind The bind operation establishes the client's identity and credentials. In LDAP v3 bind can be called repeatedly during an LDAP session. The level of access available to the client is determined by the permissions allocated by the server to the client following the most recent (successful) bind. The client is not required to unbind before re-binding on second or subsequent occasions during a session. In fact, an unbind will permanently terminate the session. This example shows a simple anonymous bind request. - // Construct a simple, anonymous bind request - BindRequest breq = new BindRequest(); - - // Make the bind request - try{ - BindResponse bres = ldap.bind( breq ); - } - catch( LDAPException e ){ - ts.tet_infoline("Failed to bind, got resultCode "+e.result.resultCode ); - ts.tet_result( ts.TET_FAIL ); - } - - // Now perform other LDAP operations... To bind as a particular user, a BindRequest should be created by passing the Distinguished Name of the user and a plaintext password. The BindResponse contains the usual LDAPResult values. The serverSaslCreds field of the response may contain server-provided binary data following a request to bind using the SASL method (see example below). Example 4. Binding with SASL If the server supports the SASL bind mechanism then the client can attempt to bind using this mechanism. The bind is requested as for a simple bind but in this case a special BindRequest constructor is used that takes a Distinguished Name and a vsldap.api.SaslCredentials object containing any relevant SASL credentials as it's arguments. Note that VSLDAP is required to test only SASL binds that use the EXTERNAL mechanism over a secure SSL connection. The API allows any SASL bind mechansim to be requested in principle but the behaviour of the VSLDAP test suite with these mechanisms is unsupported. - // Construct a SASL bind request object declaring the MY_SASL mechanism - // DN to identify the user to bind as - - String dn = "cn=Joe Schmoe, ou=users, o=myorg, c=UN"; - - // Mecahnism name - String mech = "MY_SASL"; - - // credentials data - byte[] my_creds = some_data; - - SaslCredentials saslcreds = new SaslCredentials( mech, my_creds ); - - BindRequest breq = new BindRequest( dn, saslcreds ); - - // Make the bind request - try{ - BindResponse bres = ldap.bind( breq ); - } - catch( LDAPException e ){ - ts.tet_infoline("Failed to bind, got resultCode "+e.result.resultCode ); - ts.tet_result( ts.TET_FAIL ); - } Example 5. Add request This example illustrates the way that attributes are handled by the VSLDAP API. The code is based on the VSLDAP version of the BLITS 3.3.4.2 test (VSLDAP 1.4.7.1). An array of vsldap.api.Attribute objects is created and loaded into the AddRequest object. - // DN of the entry to be added - String entry = "cn=Austin Powers, ou=Client1, ou=Vendor1, ou=Add, o=IMC, c=US" ); - - // New add request object - AddRequest Request = new AddRequest( entry ); - - // We want to add 8 attributes for this object - int n_attributes = 8; - String[] type = new String[ n_attributes ]; - String[][] vals = new String[ n_attributes ][4]; - Attribute[] attr = new Attribute[ n_attributes ]; - - // The objectclass attribute has 4 values - type[0] = "objectclass"; - vals[0][0] = "top"; - vals[0][1] = "person"; - vals[0][2] = "organizationalPerson"; - vals[0][3] = "inetOrgPerson"; - - // Create Attribute objects to hold the data - attr[0] = new Attribute( type[0] ); - // Add values to attribute #0 - attr[0].addValue( vals[0][0] ); - attr[0].addValue( vals[0][1] ); - attr[0].addValue( vals[0][2] ); - - // The next 7 attributes have one value each so we use a - // convenient Attribute constructor that takes type - // and single value. - type[1] = "sn"; - vals[1][0] = "Powers"; - attr[1] = new Attribute( type[1], vals[1][0] ); - - // Note the escaped " characters in the name - type[2] = "cn"; - vals[2][0] = "Austin \"Danger\" Powers"; - attr[2] = new Attribute( type[2], vals[2][0] ); - - type[3] = "telephoneNumber"; - vals[3][0] = "+44 582 10101"; - attr[3] = new Attribute( type[3], vals[3][0] ); - - type[4] = "mail"; - vals[4][0] = "secret_agent_man@imc.org"; - attr[4] = new Attribute( type[4], vals[4][0] ); - - type[5] = "description"; - vals[5][0] = "Yea Baby!!"; - attr[5] = new Attribute( type[5], vals[5][0] ); - - type[6] = "uid"; - vals[6][0] = "secret_agent_man"; - attr[6] = new Attribute( type[6], vals[6][0] ); - - type[7] = "description"; - vals[7][0] = "Behave!!"; - attr[7] = new Attribute( type[7], vals[7][0] ); - - // Load the attributes into the AddRequest object - for( int i=0; i<n_attributes; i++) - { - Request.addAttribute( attr[i] ); - } - - - try{ - LDAPResult Response = ldap.add( Request ); - } - catch( LDAPexception e ){ - // The add request has failed, note the details - // in the TETware journal - - ts.tet_infoline( "add failed, resultCode = "+e.response.resultCode ); - ts.tet_result( ts.TET_FAIL ); - } Example 6. A search operation The search request is the most complex of the LDAP requests and is discussed in some detail in this example. - LDAPSession ldap = new LDAPSession (ts); - - // attempt to connect to the server - try{ - ldap.connect(); - } - catch( LDAPexception e ){ - ts.tet_infoline("Failed to connect, got LDAPexception "+e.result.resultCode ); - ts.tet_result( ts.TET_UNRESOLVED ); - } - - // New we will send a search request to the server. - // We start by constructing a SearchRequest object - String baseObject = "ou=Search, o=IMC, c=US"; - - String filter = "sn=Bakers"; - - SearchRequest request = new SearchRequest( baseObject, filter ); - - request.scope = Scope.wholeSubtree; - - // Now make the request - try{ - SearchResponse response = ldap.search( request ); - // success! lets look at the results - response.dumpEntries(); - } - catch( LDAPexception e){ - { - // The request failed... - ts.tet_infoline("The search request failed, resultCode = "+e.result.resultCode); - } Lines 1-10: These lines contain the standard snippet of code for creating an LDAP session. One small difference from the earlier examples is that the catch block returns a result of ts.TET_UNRESOLVED instead of ts.TET_FAIL. The reason for this is that we can only fail a test if it fails the stipulated purpose of the test (the associated assertion phrases this test purpose). In this example, we are not testing the connection and so if it fails it is wrong to set the test result to TET_FAIL because this failure to connect has nothing to do with our test purpose (which is to test the search operation). In cases like this, we set the test result to TET_UNRESOLVED which means that the test didn't work but the failure is not the subject of the assertion, so we note it in the journal as a problem to be investigated. Lines 14-20: We wish the server to perform a search operation and send us the results. This means that we have to compose a SearchRequest and send this to the server. The SearchRequest is a class from vsldap.api and is similar to the SearchRequest structute defined in RFC2251. We know from the LDAP spec. that a search request must specify, among other values a baseObject: the DN of the starting point of the search and a filter: the matching expression for the search. From experience it is found that apart from baseObject and filter, the other search request parameters can often be left with default values. This is why, when we create an instance of SearchRequest in Line 15, we pass only two arguments: baseObject and filter. The constructor ensures that all other parameters are set to default values. If we wish to override these defaults we can since the fields of the SearchRequest object are publically accessible. Line 16 is an example of overriding the default value. We set the scope of search to Scope.wholeSubtree, where Scope is a simple vsldap.api class that contains constants to define the three possible search scopes (The default value was request.scope = Scope.baseObject). Note that there is no data-hiding here, the scope field of SearchRequest is public. It can be modified directly. In many APIs data fields are protected, with acces only via `get' and `set' methods. This level of encapsulation is suitable for some designs, but not here, where objects are mostly short-lived, single-use containers that rarely leave the scope in which they were created. Lines 23-32: We send the SearchRequest to the server by passing the object to the ldap.search() method. This method returns an instance of the SearchResponse class, so we roll the call to search() and declaration of SearchResponse response into a single line. As with most LDAPSession methods, search() can throw an LDAPexception and so the method is called inside a try-catch block. If the search request fails, the an exception will be thrown and we deal with it as shown. If the search request succeeds, the server will perform the search operation and return the results, which are delivered to us in the SearchResponse object. We can now examine the contents of that object to see what we have netted in our search. Line 26 features SearchResponse.dumpEntries() - a handy development method which dumps the contents of all the entries returned from the search onto `system.out' (as defined by Java). Exactly what we see when we call dumpEntries() depends on the Directory that we are searching. VSLDAP requires the server under test to running a specially designed Directory, based on the BLITS Directory, which contains carefully chosen entries and other features to test all aspects of LDAPv3. Examining a search response A SearchResponse object contains two public Vector lists: entries and references. The `entries' field is a list of vsldap.api.SearchResultEntry objects, each of which contains the DN string and a Vector list of Attribute objects. The fields are public - to examine the data use the standard java.util.Vector API to iterate the lists. The SearchResultEntry class provides a method `attributeExists()' that test for the presence of a specified attribute type,value pair. Passing the attribute value "*" will match to any value, thus providing a test for the presence of an attribute in an entry. The `findAttribute()' method returns the Attribute object of a named attribute, if present. Any continuation references that have been returned by the server will be contained in the `references' list. This is a Vector list of LDAPurl objects, as with referrals (see above). LDAP Controls LDAP controls are sent implicitly with every request. Controls are stored in a Vector list in the request object. When a request object is created the list is empty. To add a control create a vsldap.api.LDAPcontrol object and add it to the `controls' field of the request object using the java.util.Vector API (the controls list is public). Other Features There are several features of the VSLDAP API which are provided to aid certification testing but are not sufficiently general and flexible to merit discussion in this guide. These features include asynchronous requests (only for the compare operation in this version), optional feature data (although see example 2) and methods for generating certain types of DN used by the BLITS test directory. Examination of the test scripts included in this release and the API documentation will provide some information on the use of these features. Further Information - API Documentation The vsldap class documentation is available in the vsldap/doc/api directory in html format. - The test scripts for VSLDAP are in directories below vsldap/ts and are arranged by RFC.
https://www.opengroup.org/openbrand/testing/checklist/guide/tests.html
CC-MAIN-2017-30
refinedweb
4,003
55.44
Austin, TX/Buildings Import/Contributor Guide So you want to help out with the Austin building import? Great! We could use the help. Here's how. Contents - 1 Overview - 2 1) Select a task and initialize JOSM - 3 2) Work on Data in JOSM - 4 4) Upload Data to OSM - 5 Validation - 5.1 Did everything import? - 5.2 Validation errors and warnings to watch out for - 5.3 If Your Area is Invalidated - 5.4 Using geofabrik QA tool - 5.5 Using osmose QA tool - 6 How to get help - 7 More info Overview - This is a work in progress, feel free to add to it or give feedback! Thank you for your interest in helping with the Austin building import! Here is a guide for how to contribute. Install and Configure What You Need The How to start section contains steps that only need to be completed one time at the beginning. This data import process requires a bit more software setup than nomal OSM editing, but we'll try to make it fast and painless. See our Software Setup Guide. 1) Select a task and initialize JOSM Now that those preparations are complete, we're ready to start working with the building and address data. The OSM Tasking Manager is our central tool for coordinating this buildings import project. Take a task In order to make sure two people don't work on the same block group at the same time, when you "take" a task the task tracker will mark it as "currently worked on" and not give it to anybody else. Here's how: - Start with the task manager here: (Note: you should log in with your username_atxbuildingsaccount) - Now you should be able to browse the map of the city and see what areas are complete and what areas need work. You "take" a task by clicking on a block group on the map. - Grey areas are still available to be imported. Click on one of these grey areas to see the task for that block group. - Green areas have been uploaded *and* verified (checked by a second set of eyes) - Yellow areas have been uploaded but not yet verified - Start with areas that you are familiar with - neighborhoods where you have lived or worked, for example - If you don't care what block group you will work on, you can click on "Contribute" and then "Take a task at random". - Click the green "Start Mapping" button to lock the task. Only one person can lock a task at a time, so this signals to other mappers that you are working on this task. The lock on the task will automatically expire in 2 hours. Open in JOSM Before proceeding farther, make sure JOSM is running (with remote control enabled, as described above) - Now you should see a dropdown to start mapping. Select Edit with JOSM. This will load the pre-existing data from OSM into JOSM in a new layer. - Turn on satellite imagery layer to give you a better frame of reference. Select Imagery -> Bing from the menu bar. The Mapbox Satellite imagery is also good. If imagery is badly misaligned you can adjust it by right clicking the layer and choosing New Offset - this won't affect the building data, only your visuals in JOSM. 2) Work on Data in JOSM - A side note: JOSM can be a bit daunting to use at first. This is OSM's advanced offline editor, which is quite powerful and allows us to integrate nicely with the task manager and import data. So it is the best fit for this import process. But for many other situations we'd likely prefer OSM's more friendly online editors like iD. This step is the bulk of our work. Now we will use JOSM to review and make any changes or merges to the data before uploading to OSM's database. Until the upload step, no changes are made to the public map, so you can still bail out if you have problems. General JOSM editing info If you haven't used JOSM before, there is a nice guide on this wiki that may be helpful. For our purposes JOSM/Basic_editing will contain most of what's needed to get up to speed. And there's another guide here from the folks at learnosm.org. (Of couse you can also just learn by trying, we're here to help) Tips for Editing - Use a mouse, not a trackpad if you can. - Control + Click will drag the map (or right click). - Two finger slide up or down will zoom the map (or mouse wheel). - Command + Shift + V will paste all copied tags into selected item. - Go to preferences and remap the Delete key to something else (like Eject) if you are on a keyboard without a number pad. - Add commonly used menu items to the top quick bar. - Shift Click selects multiple items at once, Control Click deselects. - Shift Click to select multiple tags at once, right click a tag for more options (copy selected, copy all, etc). You can watch/listen to a demo of this step from the NYC buildings folks: click here for youtube video. Importing and Editing Data The City of Austin buildings and addresses have been split into three files for import, found in the "import links:" comment of the task (under the Contribute tab). Not every task will have all three. To open a file in JOSM, just click on its link. buildings-to-import.osm These are the building footprints that are ready to directly import into JOSM. They have been processed to exclude any buildings that intersect with an existing building, but it's possible a building or two has slipped after the data was processed. addresses-to-import.osm These are the address nodes that are ready to directly import into JOSM. These are address points that either do not intersect a building (for example an empty lot), or address points for buildings that have multiple addresses (for example a duplex). addresses-to-conflate.osm These are the address nodes that need to be conflated to OSM buildings. These are address points that intersect with an preexisting OSM building (not from the CoA dataset). They need to be conflated to their respective OSM buildings using the JOSM Conflation plugin (JOSM/Plugins/Conflation). For our purposes we'll be using address points as reference layer in the conflation plugin and the existing buildings will be the subject layer. Steps to do the conflation: - Make sure the Conflation plugin is installed and the Conflation window has been added to JOSM (via menu UI: Windows -> Conflation). - Click on the addresses-to-conflate.osm link to load the file into JOSM as a separate layer. - Activate the addresses-to-conflate layer so that the green checkmark appears to the left of it. - Select all these address nodes (via menu: Selection -> Select All, or use the equivalent keybind). - Click the Configuration button in the Conflation window to open up the Configure conflation settings dialog. - Click the Freeze button of the Reference section of the Configure conflation settings dialog to lock in the address points as the things we want to conflate from. - Activate the Data Layer layer and open a search dialog (via menu UI: Edit -> Search... or by keybind) - For the search string, use type:way building=*, choose the replace selection option and click the Start search button to select all of the existing buildings. - Click the Freeze button of the Reference section of the Configure conflation settings dialog to lock in the building ways as the things we want to conflate to. - Click the Generate matches button of the Configure conflation settings dialog to generate the matches between address nodes and building ways. You may see a window pop up that contains a java.lang.NullPointerException - you can ignore this, the conflation will still work and the conflation window should show the results. - The Conflation window has three sections: Matches, Reference only, and Subject only - we only care about the first two. Select all the matches in the Matches section (shift+click to select multiple) and then click the Conflate button. (A Conflation confirmation dialog will pop up saying the that tags are used conflictingly, you can choose Do not show again (this session) to avoid having to click through this for each match.) - Then the conflict dialog will show which tags will be applied to buildings. If there are no conflict (already existing addr:* tags), then everything should merge cleanly. Click the Apply button for each match. - Now check the matches in the Reference only section of the Conflation window. These are address nodes that the conflation plugin failed to match to a building for some reason. These need to be manually checked. Often they can be merged into the nearby building, but can happen in weird cases too. For example: an address node falls in the middle of a courtyard of a bldg that has an address already - we don't want to import the node in that case. - Hurray! Run the validator and upload your edits. - Restart JOSM after uploading your edits. It looks like that's the only way to clear out "frozen" Subject and Reference features. 3) Run Validator JOSM tool JOSM has something called a Validator (click for details) that attempts to automatically find common errors and alert us to fixes before we finish. - Run JOSM validator and review any errors/warnings it presents. Typically these only come up in very dense areas with lots of buildings. Most will be about duplicate nodes or ways, which are minor and should be automatically fixed. - May find these warnings: Crossing buildings; Self-intersecting ways; Building inside building Now fix the Errors automatically with JOSM. Click the Errors folder in the bottom right, and click the Fix button (see image to the right). Then re-validate and there should be no more errors! If there are fix them manually. If there are still Warnings related to buildings or ways, please fix those manually (right click the warning and click Zoom to see it): - If a way intersects a building, you can modify the road so it goes around the new building. Reference the satellite imagery. - If the interior of a building should be cut out (eg, for a courtyard), the problem is usually that there are 2 interior shapes. Left click and drag to select the entire interior shape, the double click the 'building' selection. - If you have serious doubts about the data's accuracy or suspect a technical glitch, contact the rest of the import team for assistance or a second opinion. Some errors and warnings are from existing data problems with boundaries, roads, tagging etc. If they were already there and not part of buildings or addresses or roads ovelapping buildings, you cna ignore them. 4) Upload Data to OSM You can watch/listen to a demo of this step from the NYC buildings folks: click here for youtube video. Note: If you changed the existing OSM user data (ie, removed buildings or addresses), upload the changes for this layer first! Then upload the city data layer from task manager. Click the upload button which looks like this: on the top button toolbar. This will only upload the active layer, so make sure it's selected! You'll be faced with a dialog listing the modified objects (likely a lot, in the case of our import). It will also ask you for a brief comment and source. We're going to follow a consistent format for these two fields throughout the import, which is important as it allows us to track our work within this rather large chunk of data. It also clearly documents our work so that others in the OSM community to understand how this data got here. JOSM Upload Changeset Comment and Tags Make sure you include the following info in changesets to make them more easy to track. Comment If anything special or out of the ordinary happened, include that in the changeset comment. At the very least, each changset should include this line: This changeset is part of an import of buildings and addresses for the City of Austin and surrounding areas. Full details on the import can be found at #atx-buildings-import import Set the import=yes tag on every changeset. Source Source should always be set to: City of Austin Mark complete in task manager Back in your web browser, there is a third box with a field for comment. This is a good place to put qualitative thoughts on how the data seemed to you, which parts you are more or less confident of, or any other notes you think the next person looking over this section should see first. Then click Mark task as done. Now the area will show as done on the task tracker (colored in yellow). Congratulations! Validation After areas are marked as done on the task manager, a second mapper will check it over to see if everything looks right. This is our final QA/QC check for the import, so be sure to only mark a task as valid if you are completely sure that it is done and error-free. Don't validate your own tasks. This will allow some cross-over so at least two people will need to have signed off on a task. Things to look for before marking a task as valid: Did everything import? Kind of obvious, but buildings and addresses for the task should have made it into OSM. Validation errors and warnings to watch out for crossing ways OR crossing buildings meaning: This happens whenever two ways intersect. With imported buildings, this can happen when buildings were imported on top of pre-existing ways or if there was funky import data for whatever reason. If one of the ways involved is not a building we imported, then don't worry about it (you can definitely fix if you want, but it's not a blocker). how to fix: - Check imagery to see what's going on. - Sometimes the features are just off and can be fixed by moving them as appropriate. - If a way actually passes underneath a building then set layer=* or covered=* tags as needed. examples: - A toll booth building over a highway. The correct way to map this is to split the highway into segments with nodes joined to the building way where it passes under the building. The segment under the building should have the covered=yes tag set. The building should also have the building=roof tag set. - A creek crossing a building. This often indicates that the creek runs through a culvert underground here. If that is the case, then the creek should be split into segments where it passes underground, and both layer=-1 and tunnel=culvert tags should be set on that segment. building node within a building way meaning: There are many variants on this, but happens if a node already existed for a building before the building was imported and now there is a building way and node in the same area. how to fix: Either merge the tags from the building way and node into the building way, or just leave the node and remove the building tag. If the tag is more specific than building=yes, then set that building value on the building way. duplicate nodes meaning: This might indicates that addresses nodes were have been imported twice by accident. how to fix: You can just run auto-fix on this. duplicate ways meaning: This might indicate that buildings were imported twice by accident. If this happened from a duplicate import, there will usually be a ton of them (as many as there are buildings, so at least a few hundred). If the duplicate ways are not buildings, then you can ignore this. how to fix: Use the JOSM reverter plugin roll back all but one of the duplicate changesets. See the reverter plugin page at JOSM/Plugins/Reverter for instructions on how to do that. abbreviated street name meaning: This is a pre-existing error in OSM but we should fix it now since it affects the address we are importing and is important for routing. This occurs when an OSM street name is abbreviated (for example: Lighthouse Landing Dr should be Lighthouse Landing Drive) how to fix: - Expand the abbreviate of the name= value on the street way - Also update any address node or building that has the abbreviated street name. - Open Edit -> Search tool: search for any object with the incorrect addr:street tag (example search string: "addr:street":"Lighthouse Landing Dr") and have the replace selection radio button selected. This will select all the objects with the former name. - Then use the Tags window to update all these tags at once by setting the correct expanded value for the "addr:street" tag If Your Area is Invalidated When an area is invalidated, it is no longer highlighted in the Task Manager. Find it again and click it to see the comments from the admin. If you want to try and fix the errors, just download the JOSM - there is no need to use the .osm file any more since all that data has been sent to OSM already. When you've addressed their concerns upload just the JOSM layer and set the task as done again. Using geofabrik QA tool - Using osmose QA tool (replace myname_atxbuildings by your user account) - - How to get help - We are hanging out in the #osmimport channel of the ATX OSG slack: atxosg.slack.com - Contacting Austin mappers organizing this project: - There's a great community of OSM helpers available here: - How to add a note asking for others to check: More info - General information on Imports in OSM - The original data source: - The source code for processing the data into .osmfiles:
https://wiki.openstreetmap.org/wiki/Austin,_TX/Buildings_Import/Contributor_Guide
CC-MAIN-2018-09
refinedweb
2,999
69.92
Sometimes it is necessary to run a program on user logon. In this tip, I will you how to run a C# program automatically in Windows Forms. First, we need to know the location of the Startup folder. To do that, we use this code: Startup string startupFolder = Environment.GetFolderPath(Environment.SpecialFolder.Startup); Now, we need to create the shortcut. To do that, we need to add a reference to the Windows ScriptHost Object Model. If you use Visual C#, you can see on this pictures how to add the reference: And then, choose the Windows Script Host Object Model in the tabpage 'COM': Windows Script Host Object Model Now, add this using namespace statement at the top of your code file: using using IWshRuntimeLibrary; Then, create the shortcut: WshShell shell = new WshShell(); string shortcutAddress = startupFolder + @"\MyStartupShortcut.lnk"; IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutAddress); shortcut.Description = "A startup shortcut. If you delete this shortcut from your computer, LaunchOnStartup.exe will not launch on Windows Startup"; // set the description of the shortcut shortcut.WorkingDirectory = Application.StartupPath; /* working directory */ shortcut.TargetPath = Application.ExecutablePath; /* path of the executable */ shortcut.Save(); // save the shortcut Optionally, you can set the arguments of the shortcut: shortcut.Arguments = "/a /c"; Do that before you save the shortcut. Setting the arguments is not required; do it only if your program needs that. But don't use a name such as "MyStartupShortcut.lnk", because there is a risk that other programs use that name, and that you overwrite that shortcut. Create a shortcut name such as "Clock.lnk" if you've a clock application, or "TcpServer.lnk" if you've a TCP/IP application. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) Form if (!System.IO.File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.Startup) + "MyShortcut.lnk")) { // create shortcut } General News Suggestion Question Bug Answer Joke Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages. News on the future of C# as a language
http://www.codeproject.com/Tips/474092/Run-Csharp-application-on-Windows-startup-Windows?msg=4400152
CC-MAIN-2014-10
refinedweb
347
50.02
Does your pair programmer maintain order, keeping the mean streets (ie. remote branches) clean? Let’s ride along with a remote branch cop to see how they work. fetch Once inside the squad car, the cop runs git fetch origin: remote: Counting objects: 45, done. remote: Compressing objects: 100% (27/27), done. remote: Total 28 (delta 23), reused 0 (delta 0) Unpacking objects: 100% (28/28), done. 0417137..5eb7f00 2933-upgrade-factory-girl -> origin/2933-upgrade-factory-girl * [new branch] 3159-fix-mobile-web -> origin/3159-fix-mobile-web The manual tells us what happened: The above command copies all branches from the remote refs/heads/ namespace and stores them to the local refs/remotes/origin/ namespace. This is useful for seeing what’s new in the remote named origin. rebase If we’re currently working in a local feature branch, we might look for something like this in the output of git fetch origin: 84d3635..19780cc master -> origin/master If a line like that is in the output, there’s something new in origin/master that we might want to investigate and git rebase origin/master into our feature branch. tracking However, the output in this case tells us that two remote branches have changed: 0417137..5eb7f00 2933-upgrade-factory-girl -> origin/2933-upgrade-factory-girl * [new branch] 3159-fix-mobile-web -> origin/3159-fix-mobile-web The 2933-upgrade-factory-girl branch is one we had tracked and was since updated. The 3159-mobile-web-fixes branch is a new branch. git branch -r We view our existing known remote branches with git branch -r: origin/2933-upgrade-factory-girl origin/3114-add-validations-for-subscription-token origin/3159-fix-mobile-web origin/HEAD -> origin/master origin/master origin/production origin/staging The git branch -r command works without an internet connection. It has all the data stored in git objects from the earlier git fetch origin. remote tracking branches We can see those objects with ls .git/refs/remotes/origin: 2933-upgrade-factory-girl 3114-add-validations-for-subscription-token 3159-fix-mobile-web HEAD master production staging These are the “remote branches”, or more formally named “remote-tracking branches” in the git man pages, but who has time for that mouthful when serving and protecting the general populace? The more formal name is clearer because the remote branches are not the actual remote’s branches. They are like pointers or bookmarks to origin‘s branches. naming convention The naming convention of ticket-number-verb-noun is nice for quickly finding things and tab completing. For example: git branch -r | ack 2933 outputs: origin/2933-upgrade-factory-girl For more on ack, see betterthangrep.com. When a teammate asks us to review their code on “ticket 2933”, we could: git fetch git diff origin/master..`git branch -r | ack 2933` However, that’s only the diff without syntax highlighting. GitHub is better for this. We can do better by using the number to check out a new tracking branch: git checkout `git branch -r | ack 2933 | sed 's/.*\///'` Switched to branch '2933-upgrade-factory-girl' Your branch is behind 'origin/2933-upgrade-factory-girl' by 1 commit, and can be fast-forwarded We’re too busy fighting crime to type that again. So, we abstract it to a script: #!/bin/sh code-review() { branch=`git branch -r | ack $1 | sed 's/.*\///'` git checkout $branch } Now, we can code-review 2933 or even code-review 3159, which creates a new branch and immediately tracks origin/3159-fix-mobile-web. local machine code reviews GitHub pull requests for feature branch code reviews have benefits: - People can review code at the same time (parallel processing). - People can comment at the line level (good for discussion). However, code reviews on our local machines have benefits, too: - Run tests after checkout so they run while you review (parallel processing). - Read surrounding context of the diff in your editor (faster understanding). - Make small changes yourself, without relaying to the original author things like “formatting”, “spelling”, “parentheses” in comments (faster fixes). - Use the app, perhaps in a web browser. (smoke test it works as intended). squash While helping our teammates is part of the job, we have our own beat (our own feature branches) to finish and send for a code review. We’ve been working on a feature that adds the Chosen plugin to an admin screen, which required about an hour of overriding styles with !important. The code now works, passes tests, and looks great in a browser. We’re almost ready for a code review. We’ve been making many small commits in our feature branch as we wrote the feature but to be nice guys toward the reviewer, we squash the commits down to one good commit message: git checkout 4000-use-chosen-in-admin-section git rebase -i origin/master The -i flag is an interactive rebase, and opens our EDITOR with: pick 28e91bb [#4000] Add Chosen as Javascript asset pick 2043850 [#4000] Link to Chosen stylesheet in admin layout pick fd38b60 [#4000] Add Chosen to select field pick 34c2e5c [#4000] Fix Chosen formatting # Rebase 19780cc..34c2e5c onto 19780cc # # comment tells us what to do but we’re no rookies: been doing this for years! Fingers like lightning, we squash it down: pick 28e91bb [#4000] Add Chosen as Javascript asset squash 2043850 [#4000] Link to Chosen stylesheet in admin layout squash fd38b60 [#4000] Add Chosen to select field Since we didn’t actually change anything, we don’t feel the need to run the tests again and just force push to origin: git push -f We ask a teammate for a code review. They oblige. A few minutes later, they surprise us with a question: Did you forget to commit some files? Confused, we check the commit. To our horror, we realize we accidentally dd'ed in vim the time-consuming commit that we don’t think we can easily re-write. To make matters even worse, with the interactive rebase, we re-wrote the git history! When we force pushed, we overwrote the clone on origin! Our families start screaming: “We’re burning alive! I can’t feel my legs!” Here comes the meatwagon: “Whee-ooh! Whee-ooh!” The medic gets out and says Oh. My. God. New guy’s in the corner puking his guts out: “Bleah! Bleah!” reflog Just then, your grizzled old partner calmly types git reflog into the shell: df83012 HEAD@{0}: checkout: moving from 4000-use-chosen-in-admin-section to df83012 3bc02a4 HEAD@{1}: commit (amend): [#4000] Use Chosen in admin section 9dd0667 HEAD@{2}: rebase -i (squash): [#4000] Add Chosen to select field 9dd0667 HEAD@{3}: rebase -i (squash): [#4000] Link to Chosen stylesheet in admin layout 7d14c9d HEAD@{4}: rebase -i (pick): [#4000] Add Chosen as Javascript asset 7a0ed21 HEAD@{5}: rebase -i (squash): updating HEAD 19780cc HEAD@{6}: checkout: moving from 2933-upgrade-factory-girl to 19780cc47583778009f7a2c4b52dbb50bda1d78f b6fd856 HEAD@{7}: commit: [#4000] Fix Chosen formatting He copies the SHA1 hash and types git merge b6fd856, then git log: 9eaa992 [2 seconds ago] Merge commit 'b6fd856' into 4000-use-chosen-in-admin section Whoa. That was close. We make a mental note to run tests after future rebases and before force pushes, for reflog is an option of last resort, like a union lawyer. prune Before we end our shift, we git remote prune origin: - [deleted] 3159-fix-mobile-web The manual explains: Deletes all stale remote-tracking branches under origin. These stale branches have already been removed from the remote repository referenced by origin, but are still locally available in remotes/origin. So, it looks like 3159 was merged in or deleted on origin by another teammate. Works for us. Let’s go for a taste. Fake movie poster by Kyle Fiedler. For more posters, see Team Rotations.
https://thoughtbot.com/blog/remote-branch
CC-MAIN-2020-45
refinedweb
1,309
61.46
User Tag List Results 1 to 2 of 2 Thread: Change Password Page - Join Date - Jan 2006 - 268 - Mentioned - 0 Post(s) - Tagged - 0 Thread(s) Change Password Page I have a change password page in my app, so users can change their password. This page was working fine a few days ago, and I'm not sure what I changed, but now it is giving me validation errors. (outlined below) Here are my pages: user.rb Code: validates_confirmation_of :password validates_length_of :password, :minimum => 6 Code: def changepass if request.post? #form submitted @user.update_attributes(params[:user]) if @user.save flash[:notice] = "Password Successfully Changed" end end end Code: <form id="changepass" action="" method="post"> <fieldset> <legend>New Password</legend> <label for="user_password">New Password:</label><%= password_field("user", "password")%> <label for="user_password_confirmation">Confirm Password:</label><%= password_field("user", "password_confirmation", {:value => ""}) %> <input type="submit" class="submit" value=" Change Password "/> </form> 1 error, --> Password must be at least 6 characters. When I put in a 6+ character password in both boxes (they match): 2 errors --> Password must be at least 6 characters and Password confirmation does not match password. I do have a before_create method, in user.rb, that auto-assigns a password for when the account is created, could this be the problem? I would think that would only get called on a new user, not updating a current one. Any ideas?If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. Here is what the action should look like: Code: def changepass if request.post? #form submitted @user = User.find(params[:id]) if @user.update_attributes(params[:user]) flash[:notice] = "Password Successfully Changed" end end endStop Global Bookmarks
http://www.sitepoint.com/forums/showthread.php?427991-Change-Password-Page&p=3122564
CC-MAIN-2018-09
refinedweb
292
55.13
SEXTANTE includes a practical tool that allows you to run algorithms without having to use the toolbox, but just typing the name of the algorithm you want to run. This tools is known as the SEXTANTE commander, and it is just a simple text box with autocompletion where you type the command you want to run. Figure SEXTANTE 28: The commander is started from the Analysis menu or, more practically, pressing Shift + Ctrl + M (you can change that default keyboard shortcut in the QGIS configuration if you prefer a different one). Apart from executing SEXTANTE algorithms, the commander gives you access to most of the functionality in QGIS, which means that it gives you a practical and efficient way of running QGIS tasks, and allows you to control QGIS reducing the usage of buttons and menus. Moreover, the commander is configurable and you can add your custom commands and have them just a few keystrokes away, making it a powerful tool to become more productive in your daily work with QGIS The commands available in the commander fall in the following categories: To run any of the above, just start typing and then select the corresponding element from the list of available ones the first time you open the commander, with a few example functions. argument. When calling the function from the commander, parameters have to be passed separated by spaces. Here is an example of a function that loads a layer and takes a parameter with the filename of the layer to load. import sextante def load(*args): sextante.load(args[0]) If you want to load a layer in /home/myuser/points.shp, type load /home/myuser/points.shp in the commander text box.
http://www.qgis.org/en/docs/user_manual/processing/commander.html
CC-MAIN-2014-10
refinedweb
286
54.46
Decorator to Log Slow Calls One of the most common examples given for Python decorators is a decorator that tracks how long the execution of the wrapped function took. While this is very useful in and of itself, it can cause issues when you want to apply that into production usage. The issue I faced was that when I was trying to find out why my servers were too slow (only under production loads), I first added the simple timing decorators to everything I thought might be slow in the hopes of catching all the slow calls and maybe finding some patterns. Well, this approach worked in the sense that I did find the slow parts quickly, but it was producing much more logs than before, and I wasn’t really interested in most of this timing information. What I really wanted was a timing decorator that would log only when the wrapped callable took too long to execute. But there were still some calls that I wanted to log always for accurate statistical purposes. I figured the best way was to make my decorator take a threshold argument with some reasonable default that I could override if I wanted. Now while I have written decorators before, this was the first decorator that called for optional arguments. Python treats decorators that don’t take any arguments slightly differently from those that require arguments, so this complicates things a bit. The sample in Python decorator library is almost scary! I think my approach is nice and simple yet fairly sophisticated: from time import time import logging import functools log = logging.getLogger(__name__) def time_slow(f=None, logger=log, threshold=0.01): def decorated(f): @functools.wraps(f) def wrapper(*args, **kw): start = time() try: ret = f(*args, **kw) finally: duration = time() - start if duration > threshold: logger.info('slow: %s %.9f seconds', f.__name__, duration) return ret return wrapper if f is not None: return decorated(f) return decorated This decorator can be placed on a callable without any arguments, or with a custom logger or threshold value. In other words, both of these would work: @time_slow def myfast(): pass @time_slow(threshold=0) def myslow(): from time import sleep sleep(0.001) and typically calling myslow only would produce log output. I chose 0.01 as a reasonable default threshold, but this of course depends a lot on the use case. The log includes the slow function’s name, as well as the time formatted with 9 decimals in order to avoid the exponential notation, which makes it easier to work with the log output ( sort -n, for example). I have just used a single threshold, but an easy improvement would be to pass a list of thresholds and log at different levels depending on the duration. Tarek: Note that if your function is CPU bound, you could use Pystones instead of time. I did that to create a decorator that would raise an assertion in the tests when part of the app was getting too slowFebruary 3, 2011, 1:56 am Heikki Toivonen: Ok, so the use case for a Pystones decorator like here would then be to measure initial performance and put a decorator in the unit tests, and later on as more code gets added etc. this makes sure that the performance of those decorated functions does not get too slow. Are there other use cases? The downside of Pystones decorator seems to be that you can’t put it in production code because of performance penalties. In my case the code was performing fast in tests, but when production loads where thrown in “random” things became slow. I’ll blog more about that in a later post.February 3, 2011, 9:24 am Tarek: > The downside of Pystones decorator seems to be that you can’t put it in production code because of performance penalties. Just at startup though, because once you have run pystone at startup to get a stone value, the decorator is similar to yours, it just converts the time in stones, using the ratio value. That value could also be cached in a file on the box.February 3, 2011, 9:28 am Sven Wilhelm: This kind of decorator implementation is really the best one I ever saw.February 11, 2011, 8:15 am Should be publish official as a recommendation.
http://www.heikkitoivonen.net/blog/2011/02/02/decorator-to-log-slow-calls/
CC-MAIN-2014-42
refinedweb
727
59.23
This is a simple "Hello world!" example, written in Serpentine. We begin by declaring a unique namespace for the package we are creating. This is typically based on the reversed form of a domain name and should be unique to this package. __package__ = "com.example.hello" We also import the classes that will be needed by the application. Since this is a simple example, we only need three of them. from android.app import Activity from android.os import Bundle from android.widget import TextView We define a class based on the standard Activity class. This represents the application, and will be used to present a graphical interface to the user. The initialisation method simply calls the corresponding method in the base class. This must be done even if no other code is included in the method. class HelloActivity(Activity): def __init__(self): Activity.__init__(self) The onCreate method is called when the activity is created by Android. The return type and parameter types expected by the method are declared using the following decorator. Since the parameter types for the onCreate method are defined in the Activity base class, this decorator is not strictly necessary. @args(void, [Bundle]) def onCreate(self, bundle): Activity.onCreate(self, bundle) view = TextView(self) view.setText("Hello world!") self.setContentView(view) As with the __init__ method, we must call the corresponding method in the base class. The user interface for the application is simply a TextView widget that displays a string of text. The final call ensures that the widget is used as the main view for the application.
http://www.boddie.org.uk/david/Projects/Python/DUCK/Examples/Serpentine/Hello/docs/hello.html
CC-MAIN-2017-51
refinedweb
264
51.14
The wcscat() function is defined in <cwchar> header file. wcscat() prototype wchar_t* wcscat( wchar_t* dest, const wchar_t* src ); The wcscat() function takes two arguments: dest and src. This function appends a copy of the wide character string pointed to by src the end of wide string pointed to by dest. The null terminating wide character at the end of dest is replaced by the first character of src and the resulting character is also null terminated. The behaviour is undefined if - the strings overlap. - the dest array is not large enough to append the contents of src. wcscat() Parameters - dest: Pointer to a null terminating wide string to append to. - src: Pointer to a null terminating wide string that is to be appended. wcscat() Return value - The wcscat() function returns dest. Example: How wcscat() function works? #include <cwchar> #include <clocale> #include <iostream> using namespace std; int main() { setlocale(LC_ALL, "en_US.utf8"); wchar_t dest[50] = L"\u0905 \u0906 \u0907 \u0908 "; wchar_t src[50] = L"\u0915 \u0916 \u0917 \u0918 "; wcscat(dest, src); wcout << "After appending: " << dest ; return 0; } When you run the program, the output will be: After appending: अ आ इ ई क ख ग घ
https://cdn.programiz.com/cpp-programming/library-function/cwchar/wcscat
CC-MAIN-2021-04
refinedweb
195
64
I've searched through the forum to see if this question has been posted previously but I can't find it so apologies in advance if I missed it... What I am trying to do is to run the program to check through each letter of the sentence and as it does this I want it to record if it finds a letter through it. At the end of the loop, I want it to tell me if it found all the letters of the alphabet (a pangram) or if it did not. however I cannot get it to achieve this. Can someone give me some guidance? Code Java: import javax.swing.JOptionPane; public class CSQ2 { public static void main (String [] agrs) { String sentence = JOptionPane.showInputDialog(null, "Please enter a sentence"); String result = ""; String alphabet = "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"; if (sentence.equals("")) result = "You have not entered a sentence"; else if (sentence.length()<26) result = "You have not entered a pangram"; else if (sentence.length()>=26) for (int i = 0; i<sentence.length();i++) { String aChar = sentence.substring(i,i+1); String alph = alphabet.substring (i,i+1); if(alph.indexOf(aChar)!=-1) result = "You have entered a pangram"; else result = "You have entered a pangram"; } JOptionPane.showMessageDialog(null, result); } }
http://www.javaprogrammingforums.com/%20whats-wrong-my-code/33592-pangram-question-all-letters-alphabet-sentence-printingthethread.html
CC-MAIN-2014-15
refinedweb
232
67.76
One of the important capabilities we shipped with the Beta1 release of Silverlight 2 was a unit test harness that enables you to perform both API-level and UI-level unit testing. This testing harness is cross browser and cross platform, and can be used to quickly run and verify automated unit tests: In addition to shipping this unit test harness for Silverlight, we also shipped the source to ~2,000 unit tests built with it that provide automated coverage for the Silverlight control source that we also shipped under a permissive license (you can take the control source, modify it, run the unit tests to verify the behavior, then re-ship the controls however you want). Jeff Wilcox (who developed the Silverlight unit test framework and harness) has a great blog post that talks about how to add a Silverlight Unit Test project to a solution here. You can download the chat application that he shows testing from this expression blend blog post tutorial I did last month. You can also watch this cool video post that Jeff created where he walks through the unit test framework and test cases we've shipped. As Jeff shows in his post, you can now add a "Silverlight Test Project" to your Visual Studio solution which encapsulates unit tests for an application you are working on: You can then add unit test classes to the test project that test APIs or simulate UI action within the Silverlight controls (simulate button clicks, etc). You can then run the test project and execute the tests within it to verify and report their status. Jeff's test framework automatically provides a browser based test harness and reporting system (which means you can run it on any browser/OS combination that Silverlight runs on): Jeff's test framework supports quickly re-setting controls after each test (and avoids needing to re-launch a new browser instance for each test cases - which makes it really fast). You can quickly rip through hundreds or thousands of automated tests in seconds: Green results mean the tests passed. Red results flag that a test case failed and log the assertion failure and/or runtime exceptions that occurred. If you've ever struggled to try and come up with a strategy for doing automated unit testing or TDD with AJAX applications, I think you'll find Silverlight provides some much nicer test options. Using Visual Studio you can also separate your tests into a separate project in your solution, and you do not need to embed the tests within your Silverlight application in order for them to run. In addition to supporting the above unit test harness and framework, we are also going to support UI automation APIs with the final release of Silverlight 2. These will enable accessibility scenarios (allowing screen readers to work with Silverlight and enable Section 508 compliance of Silverlight applications). These UI automation APIs will also enable UI testing scenarios where you can build end to end browser UI automation that simulates real mouse and keyboard interactions and enables automated end to end experience testing. The combination should enable you to build much more solid and maintainable RIA solutions. Hope this helps, Scott P.S. For more tutorial posts and links on Silverlight 2, check out my new "Silverlight Tips, Tricks, Tutorials and Links" page. Pingback from Unit Testing with Silverlight - ScottGu's Blog Really valuable post, thanks. Trackback from SilverlightShow.net Nice post :-) Btw, you really should stop talking to yourself on the chat client :-) Having something that dumps unit testing results to a html page for WebForms/MVC would be great - Rspec does it with Rails and it looks great and I got rather jealous. Thanks for the tutorial! Christian Pfeil You've been kicked (a good thing) - Trackback from DotNetKicks.com Nice! Will we see something like this for standard WPF applikations as well? UI automation APIs for WPF apps and WinForm apps would be very usefull for testing. Would this mean that the unit tests are also send down to the client, since the testing harness runs locally? Good post, thanks. Pingback from AJAX coding school » Blog Archive » AJAX Tutorials [2008-04-02 12:43:55] Thanks Scott. This is some great info. Hey Scott This is great for testing View based components and controls. However ideally I would love to be able to test my Model/Controller/Utility Classes within Visual Studio / MSTest like I can with code not built on the Core CLR. TestDriven.NET have a way of doing this, although AFAIK it doesn't work with the latest Silverlight 2 Beta. It would be great to be able to host CoreCLR assemblies within a CLR process and have the two communicate (a bit like the SL's HTML Bridge). Do MS have any plans to provide this? Great info, thanks. How can I do this from my msbuild file? On a continuous integration server? Does it *need* a browser? Pingback from Brian Noyes / WPF Update on .NET Rocks « Mark Gilbert’s Blog Pingback from Daily Find #50 | TechToolBlog Good to see more example of unit testing. 'daveloper', To your question about whether unit tests are also sent down to the client, they are only if you include the tests in the same Silverlight application project. I'd recommend creating a separate test project (details in the tutorial), your tests are then in one .Xap file - Test.Xap - and your app is in another, App.Xap. -Jeff Håkan Forss, The UI testing that's being done with this current framework is actually testing the wired up APIs- verifying that events sink, elements are in the visual tree, etc. At this time there isn't an actual mouse/keyboard automation component there. That said, I think many people are interested in what it would take to perform UI automation for WPF and WinForms apps, I'll share your feeback with some folks. Thanks! nmosafi, That's good feedback about being able to run Core CLR tests from within Visual Studio. One question I have for you: if you had a way to test "Silverlight" applications right in Visual Studio, you'd only be able to test basic APIs and class libraries: the HTML DOM bridge, the entire rich presentation framework in Silverlight, all those things would -not- be accessible to those tests. Would that be acceptable? In my opinion, I'm more interested in exercising those Silverlight-specific features in the browser, since I can just as easily compile the same source files in my regular desktop CLR and run them as regular Visual Studio test projects to verify that my code is working fine. - Jeff Thanks for the tutorial!!! jwilcox, Thanks for clearing that up! TDD with ASP.NET UI components isn't as intuitive compared to logic layers, this really helps out. Michael Sync posted a list of SL2B1 problems, Rob Houweling produced a Motion Blur demo, LeeOnTech with How do I get the cool background of the editor that you are showing above in an example. Off the topic..sorry :-) Pingback from Silverlight 2 has built in Unit Testing « An Original Idea Why are you using a Mac? Aren't Microsoft people supposed to hate them? Are you informally admitting Microsoft's inferiority? Or did you just want to demonstrate the cross-platform capabilities of Silverlight? Pingback from AlanLe.net » links for 2008-04-03 Hi Scott, Is there any tutorial on the UNIT TEST functionality built within VS 2008? Are you planning to take up any tutorials on the. Dave Parslow Helped a lot! Thanks. Back to work. - There should be a Scott fan-site. Para los amantes de Silverlight ya tenéis cómo podéis hacer vuestras pruebas unitarias con este tipo Hi Ashutosh, >>>>>> Is there any tutorial on the UNIT TEST functionality built within VS 2008? Are you planning to take up any tutorials on the same? Stephen Walther has a great post here that should help: weblogs.asp.net/.../tdd-test-driven-development-with-visual-studio-2008-unit-tests.aspx Thanks, Hi D. There will be an update to ASP.NET MVC later this month that makes testing controllers much easier, and won't require mocking any objects to-do so. To Everyone, Make sure to check out Jeff's answers above - he has jumped in and answered several of the earlier questions on unit testing. I am really linking Silverlight Hi Jeff I think a combination of both types of testing would be good. If tests can be run from MSTest then I can integrate them into my build process. Those tests which have a dependency on the browser to run would not be able to run via MSTest and would require the browser. Also a good point that you could compile the same source files as a normal CLR assembly and test them that way. I might try that! Neil Hi Tom, >>>>>>> How do I get the cool background of the editor that you are showing above in an example. Off the topic..sorry :-) Here is a pointer to my VS settings file if you want the same VS color scheme: I all: YOu can read this post in spanish here: thinkingindotnet.wordpress.com/.../tests-unitarios-con-silverlight Pingback from Tests unitarios con Silverlight « Thinking in .NET Pingback from Silverlight Reading « Tales from a Trading Desk Steve Andrews on Tech-Ed with the Blogfather. Tim Huffam on VSTS not recognizing unit tests - Run Tests... Pingback from Wöchentliche Rundablage: ASP.NET MVC, Silverlight 2, .NET, RegEx, .NET, Icons, CSS, UI | Code-Inside Blog Why only be able to run and see results of unit tests from the browser? It would be useful to be able run from the command line and generate a results file so that I can include in my CI process! Please don't assume we are all vendor-locked into Team System for CI either. Resumo da semana - 07/04/2008 Pingback from Finds of the Week - April 6, 2008 » Chinh Do Nice post, ready to give it the old tire kick and test drive. Hi, Great post... I have one question though...is there a place where i can see sample code for testing something asynchronously...something like testing the play() for a MediaElement... Raviraj, I'll post an asynchronous tutorial to my blog soon. In the meantime, try: 1. Having your test class inherit from SilverlightTest base, inside Microsoft.Silverlight.Testing namespace 2. Marking the test method for asynchronous testing with the [Asynchronous] attribute, in the same namespace 3. Inside your test call the play() method on your MediaElement. Hook up to an appropriate event for the player, OR use a DispatcherTimer, etc., to verify that everything is OK and make any assertions. In the method with the verification at the end of testing, call TestComplete(). This is a method that is exposed by the SilverlightTest base class. Hope this helps. Do you have any estimate on when the UI automation interface will be available? We need this ASAP to implement browser based tests of Silverlight apps which we didn't build. Very useful post, along with the comments. On the subject of testing Silverlight, are there any UI Test Harness tool from Microsoft that is publicly available for driving UI test Automation? I have to say, coming from adobe flash ui development, this is quite a leap regarding testing. I am very happy with it so far. A This post is nice! I was talking with a co-worker recently. He had stumbled onto Scott Hanselman's Blog. We... Pingback from Silverlight unit test framework download for Silverlight 2 Beta 2 ??? In the fifth part of our series, we examined Unit Testing in Silverlight 2. Not only did we release the Zolpidem fedex. Zolpidem. Pingback from Lexapro » Lexapro (Escitalalopram) Unit-Testen mit Silverlight Pingback from Silverlight unit testing templates updated - Jeff Wilcox Pingback from Silverlight Unit Testing Templates updated Your Story is Submitted - Trackback from DotNetShoutout Pingback from Mozketo’s Ultimate Visual Studio 2008 Theme | Mozketo Performance Tuning Silverlight Projects Pingback from Performance Tuning Silverlight Projects « Todd Morrison Blog Pingback from Silverlight 2 Unit Test Frameworks « vincenthome’s Tech Clips Now you might be wondering where part 1 is at and I fully agree that this looks weird. The reason for Working with alot of larger clients at IdentityMine we frequently work with teams that use automated Pingback from Silverlight Unit Test Framework | ET?????? - Silverlight?????????????????? Last few weeks I received quite a few complaints from people that it was quite impossible to run automated Présenté lors du MIX 2008 à Las Vegas par Scott Guthrie , le Silverlight unit test framework est une
http://weblogs.asp.net/scottgu/archive/2008/04/02/unit-testing-with-silverlight.aspx
crawl-002
refinedweb
2,115
71.44
Red Hat Bugzilla – Bug 138493 s-c-printer doesn't work Last modified: 2014-03-16 22:50:09 EDT PyXML-0.8.3-7. $ system-config-printer Traceback (most recent call last): File "/usr/sbin/system-config-printer", line 9, in ? import queueTree File "/usr/share/printconf/util/queueTree.py", line 57, in ? import printconf_conf File "/usr/share/printconf/util/printconf_conf.py", line 83, in ? from xml.utils import qp_xml ImportError: No module named utils python 2.4b2 requires not-yet-released PyXML-0.8.4 :( *** Bug 138707 has been marked as a duplicate of this bug. *** *** Bug 138719 has been marked as a duplicate of this bug. *** Building PyXML-0.8.4-0.cvs20041111.1. There are no Python testsuite regressions. There are two PyXML testsuite regressions (), but having a mostly-working PyXML is still better than no PyXML at all. I'll keep the bug open as a reminder to update to a released version of 0.8.4 as soon as it is available. *** Bug 138985 has been marked as a duplicate of this bug. *** I can see that there's a number of problems with python 2.4 just by keeping rawhide up to date, but hacked a few of the problems anyway. I'm fairly sure this is obvious to all here, but I'm new to these things and thought I saw the problem and put this patch together. For all I know, it may cause holes in the ozone layer and should be discarded immediately: --- /usr/share/printconf/util/printconf_conf.py.sav 2004-11-13 10:32:41.1602 44713 -0800 +++ /usr/share/printconf/util/printconf_conf.py 2004-11-13 10:29:41.354044284 -0 800 @@ -80,7 +80,8 @@ import signal # Used for parsing foomatic and printer test files -from xml.utils import qp_xml +#from xml.utils import qp_xml +from _xmlplus.utils import qp_xml # ============================================================================= ==================== # Debugging Functions That patch may obscure the symptom, but the real problem was that: python -c "from xml.utils import qp_xml" failed, and this was due to PyXML being an older release than required by the new Python. Please try the current PyXML package instead of using the above patch. It was only a temporary workaround. The version of PyXML is the latest from the rawhide tree (PyXML-0.8.3-7). Which package are you referring to as the 'current PyXML'? Thanks. See comment #4. PyXML-0.8.4-1 should be in rawhide soon. i have updated sc-printer and PyXML to the latest available release and i always have this error: rpm -q PyXML PyXML-0.8.4-1 rpm -q system-config-printer system-config-printer-0.6.123-1 system-config-printer Traceback (most recent call last): File "/usr/sbin/system-config-printer", line 9, in ? import queueTree File "/usr/share/printconf/util/queueTree.py", line 70, in ? import gnome.ui ImportError: No module named gnome.ui
https://bugzilla.redhat.com/show_bug.cgi?id=138493
CC-MAIN-2016-44
refinedweb
485
70.19
On Mon, Mar 04, 2013 at 12:34:33PM -0500, Eric Blake wrote: > > When given a CA cert with basic constraints to set non-critical, > > and key usage of 'key signing', this should be rejected. Version > > of GNUTLS < 3 do not rejecte it though, so we never noticed the > > test case was broken > > > > Signed-off-by: Daniel P. Berrange <berrange redhat com> > > --- > > > + /* Technically a CA cert with basic constraints > > + * key purpose == key signing + non-critical should > > + * be rejected. GNUTLS < 3 does not reject it and > > + * we don't anticipate them changing this behaviour > > + */ > > +# if GNUTLS_VERSION_MAJOR >= 3 > > + DO_CTX_TEST(true, cacert5req, servercertreq, true); > > +# else > > + DO_CTX_TEST(true, cacert5req, servercertreq, false); > > +# endif > > To avoid the #if, you could write this as: > > DO_CTX_TEST(true, cacert5req, servercertreq, > GNUTLS_VERSION_MAJOR >= 3); > > ACK with that tweak. Ok pushed with that change & tested both gnutls 2.x and 3.x Daniel -- |: -o- :| |: -o- :| |: -o- :| |: -o- :|
https://www.redhat.com/archives/libvir-list/2013-March/msg00116.html
CC-MAIN-2015-22
refinedweb
145
69.11
Templated scraping syntax Project description Scrapepath Scrapepath is a templated web scraping syntax. Scrapepath is pip installable via pip install scrapepath. Requirements Install the required Python dependencies using the provided requirements.txt file, by: pip install -r requirements.txt Usage To run an example, execute on the command line without arguments: ./parser To use within Python: from parser import NodeParser np = NodeParser(soup_template, soup, live_url) np.hop_template() print (json.dumps(np.result_dict, indent = 2, default = str)) Where soup_template is a BeautifulSoup of the template file, soup is a BeautifulSoup of the scraped page and live_url the url of the scraped page. Templates HTML pages are scraped using HTML templates, consisting of a mixture of the most important tags, and statements. Templates consist of HTML files containing nested tags leading to the scraping element of interest. The parser is based on BeautifulSoup. Example 1: Scraping data The following examples are from scraped pages examples/example1a.html and template examples/scraped1.html. Run the example using: ./parser.py examples/example1a.html examples/scraped1.html This scrapes the target page scraped1.html using the template example1a.html. The text item "Tea" is scraped from the target page using the record attribute in the template page. A path to the target text ("Tea") is specified in the template using tags that correspond to the target page. So, to scrape from: <ul class = "my_list"> <li class = "my_item">Coffee</li> <li class = "my_item"><span class = "cuppa">Tea</span></li> <li class = "my_item">Milk</li> </ul> Use template: <ul class = "my_list"> <span class = "cuppa" record = "text as favorite"></span> </ul> This yields a dictionary containing the scraped data under the key "favorite" as specified in the record attribute: { "favorite": "Tea" } The text statement within the record attribute corresponds to a function that obtains text from inside the HTML tag, and favorite is the key to record the data against. The text function can be replaced with custom Python functions. Starting from the outer node, <ul> , in the template, the parser looks for the first node in the scraped page that matches the template node in type and attributes. In this case, matching a ul with a ul, and class my_list with class my_list. Then, the same search takes place using the template node children, now confined within the children of the scraped node. So nested template nodes represent paths. The <li> node is not included in the template, as it would point the search to the first element of the list. In this case, nesting the template nodes is needlessly specific. There are no other nodes of class "cuppa", so we can omit the <ul> and <li> items, and the following template will record the same data: <span class = "cuppa" record = "text as favorite"></span> So paths along many nested nodes in the scraped page can be summarized by only a few nodes that define a unique path to the scraped data. Loops: A for loop scrapes all items in the list. In this simple example, we record only one variable (item_text) per item: Template: <ul class = "my_list"> <for items = "items" condition = "i < 5"> <li class ="my_item" record = "text as item_text"> </li> </for> </ul> This results in the output: { "items": [ { "item_text": "Coffee" }, { "item_text": "Tea" }, { "item_text": "Milk" }, { "item_text": "Biscuits" }, { "item_text": "Chocolate" } ] } Here, the parser matches all the children of the <for> template node to the children of the <ul> node in the scraped page scraped1.html . Run the example using: ./parser.py examples/example1b.html examples/scraped1.html. The condition node indicates that only the first 5 items should be recorded, where i is the loop counter variable. Example 2: for loops on mixed nodes In the following html, a <for> template loop node needs to enclose two template nodes, one for each tag (div and p) and class (my_item and milk_class): To scrape from: <div class = "my_list"> <div class = "my_item">Coffee</div> <div class = "my_item"><span class = "cuppa">Tea</span></div> <p class = "milk_class">Milk</p> <div class = "my_item">Biscuits</div> Chocolate </div> Use template: <div class = "my_list"> <for items = "items" > <div class ="my_item" record = "text as item_text"></div> <p class ="milk_class" record = "text as item_text"></p> </for> </div> However, the <for> template loop node is unable to record the text element "chocolate", as the <for> only looks for proper nodes among the children of the <div class = "my_list"> node. To do this, a <forchild> template loop node is needed, along with a <str> template node to record the NavigableString element "chocolate": Template: <div class = "my_list"> <forchild items = "items_with_string" > <div class ="my_item" record = "text as item_text"></div> <p class ="milk_class" record = "text as item_text"></p> <str record = "text as item_text"></div> </forchild> </div> In this case, the parser looks for the first match to the first template node (the child of the <for> node), and loops over its sibblings, probing with all template nodes (the children of this for node). Run this example using examples/example1b.html and examples/scraped1.html. Example 3: Jumping to linked pages Follow links on pages using the <jump> template node: To scrape from: <a href="example_linked.html"></a> Use template: <a record = "href as my_link"> <jump on = "my_link"> <ibody> <div class = "message" record = "text as msg_from_link"></div> </ibody> </jump> <a> Here, the nodes within the <jump> node act on the linked page. This example is invoked with: ./parser.py examples/example3a.html examples/scraped3.html Project details Release history Release notifications | RSS feed Download files Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
https://pypi.org/project/scrapepath/
CC-MAIN-2022-27
refinedweb
923
66.57
(For more resources related to this topic, see here.) Protecting DFS with DPM DFS stands for Distributed File System . It was introduced in Windows Server 2003, and is a set of services available as a role on Windows Server operating systems that allow you to group file shares held in different locations (different servers) under one folder known as DFS root . The actual locations of the file shares are transparent to the end user. DFS is also often used for redundancy of file shares. For more information on DFS Windows Server 2008: Windows Server 2008 R2 and Windows Server 2012: Before DFS can be protected it is important to know how it is structured. DFS consists of both data and configuration information: The configuration for DFS is stored in the registry of each server, and in either the DFS tree during standalone DFS deployments, or in Active Directory when domain-based DFS is deployed. DFS data is stored on each server in the DFS tree. The data consists of the multiple shares that make up the DFS root.. These methods would allow you to restore DFS by restoring the data and either system state or Active Directory depending on your deployment type. Another option is to use the DfsUtil tool to export/import your DFS configuration. This is a command-line utility that comes with Windows Server that can export the namespace configuration to a file. The configuration can then be imported back into a DFS server to restore a DFS namespace. DPM can be set up to protect the DFS export. You would still need to protect the actual data directly. An example of using the DfsUtil tool would be: Run DfsUtil root export \\domainname\rootname dfsrootname.xml to export the DFS configuration to an XML file, then run DfsUtil root import to import the DFS configuration back in. For more information on the DfsUtil tool, visit the following URL: That covers the backing up of DFS with DPM. Protecting Dynamics CRM with DPM Microsoft Dynamics CRM is Microsoft's customer relationship management (CRM) software in the CRM market. Microsoft Dynamics CRM Version 1.0 was released in 2003. It then progressed to Version 4.0 and the latest one is 2011. CRM is a part of the Microsoft Dynamics product family. In this section we will cover protecting Versions 4.0 and 2011. Note that when protecting Microsoft Dynamics CRM on either Version 4.0 or 2011, you should keep a note of your update-rollup level some place safe, so that you can install CRM back to that level in the event of a restore. You will need to restore the CRM database and this could lead to an error if CRM is not at the correct update level. To protect Microsoft Dynamics CRM 4.0, back up the following components: Microsoft CRM Server database This is straightforward; you simply need to protect the SQL CRM databases. The two databases you want to protect are the following: The configuration database: MSCRM_CONFIG The organization database: OrganizationName_MSCRM Microsoft CRM Server program files By default, these files will be located at C:\Program Files\Microsoft CRM\. Microsoft CRM website By default the CRM website files are located in the C:\Inetpub\wwwroot directory. The web.config file can be protected. It only needs protecting if it has been changed from the default settings. Microsoft CRM registry subkey Back up the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM key. Microsoft CRM customizations To protect customizations or any third-party add-ons you will need to understand the specific components to back up and protect. Other components to back up for protecting Microsoft CRM include the following: System state of your domain controller. Exchange server if the CRM's e-mail router is used. To protect Microsoft Dynamics CRM 2011, back up the following components: Microsoft CRM 2011 databases This is straightforward, you simply need to protect the SQL CRM databases. The two databases you want to protect are: The configuration database: MSCRM_CONFIG The organization database: OrganizationName_MSCRM Microsoft CRM 2011 program files By default, these files will be located at C:\Program Files\Microsoft CRM\. Microsoft CRM 2011 website By default the CRM website files are located in the C:\Program Files\Microsoft CRM\CRMWeb directory. The web.config file can be protected. It only needs protecting if it has been changed from the default settings. Microsoft CRM 2011 registry subkey Back up the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM subkey. Microsoft CRM 2011 customizations To protect customizations or any third-party add-ons you will need to understand the specific components to back up and protect. Other components to back up for protecting Microsoft CRM 2011 include: System state of your domain controller. Exchange server if the CRM's e-mail router is used. SharePoint if CRM and SharePoint integration is in use. Note that for both CRM 4.0 and CRM 2011, you could have more than one OrganizationName_MSCRM database if you have more than one organization in CRM. Be sure to protect all of the OrganizationName_MSCRM databases that may exist. That wraps up the Microsoft Dynamics CRM protection for both 4.0 and 2011. You simply need to configure protection of the mentioned components with DPM. Now let's look at what it will take to protect another product from the Dynamics family. Protecting Dynamics GP with DPM Dynamics GP is Microsoft's ERP and accounting software package for mid-market businesses. GP has standard accounting functions but it can do more such as Sales Order Processing, Order Management, Inventory Management, and Demand Planner for forecasting, thus making it usable as a full-blown ERP. GP was once known as Great Plains Software before acquisition by Microsoft. The most recent versions of GP are Microsoft Dynamics GP 10.0 and Dynamics GP 2010 R2. GP holds your organization's financial data. If you use it as an ERP solution, it holds even more critical data, and losing this data could be devastating to an organization. Yes, there is a built-in backup utility in GP but this does not cover all bases in protecting your GP. In fact, the built-in backup process only backs up the SQL database, and does not cover items like: Customized forms Reports Financial statement formats The sysdata folder These are the GP components you should protect with DPM: SQL administrative databases: Master, TempDB, and Model Microsoft Dynamics GP system database (DYNAMICS) Each of your company databases If you use SQL Server Agent to schedule automatic tasks, back up the msdb database forms.dic (for customized forms) can be found in %systemdrive%\Program Files (x86)\Microsoft Dynamics\GP2010\ reports.dic (for reports) can be found in %systemdrive%\Program Files (x86)\Microsoft Dynamics\GP2010\ Backing up these components with DPM should be sufficient protection in the event a restore is needed. Protecting TMG 2010 with DPM Threat Management Gateway (TMG ) is a part of the Forefront product family. The predecessor to TMG is Internet Security and Acceleration Server (ISA Server ). TMG is fundamentally a firewall, but a very powerful one with features such as VPN, web caching, reverse proxy, advanced stateful packet, WAN failover, malware protection, routing, load balancer, and much more. There have been several forum threads on the Microsoft DPM TechNet forums asking about DPM protecting TMG, which sparked the inclusion of this section in the book. TMG is a critical part of networks and should have high priority in regards to backup, right up there with your other critical business applications. In many environments, if TMG is down, there are a good amount of users that cannot access certain business applications which causes downtime. Let's take a look at how and what to protect in regards to TMG. The first step is to allow DPM traffic on TMG so that the agent can communicate with DPM. You will need to install the DPM agent on TMG and then start protecting it from there. Follow the ensuing steps to protect your TMG server: On the TMG server, go to Start | All Programs | Microsoft TMG Server . Open the TMG Server Management MMC. Expand Arrays and then TMG Server computer , then click on Firewall Policy . On the View menu, click on Show System Policy Rules . Right-click on the Allow remote management from selected computers using MMC system policy rule. Select Edit System Policy . In the System Policy Editor dialog box, click to clear the Enable this configuration group checkbox, and then click on OK . Click on Apply to update the firewall configuration, and then click on OK . Right-click on the Allow RPC from TMG server to trusted servers system policy rule. Select Edit System Policy . In the System Policy Editor dialog box, click to clear the Enforce strict RPC compliance checkbox, and then click on OK . Click on Apply to update the firewall configuration, and then click on OK . On the View menu, click on Hide System Policy Rules . Right-click on Firewall Policy . Select New and then Access Rule . In the New Access Rule Wizard window, type a name in the Access rule name box. Click on Next . Check the Allow checkbox and then click on Next . In the This rule applies to list, select All outbound traffic from the drop-down menu and click on Next . On the Access Rule Sources page, click on Add . In the Add Network Entities dialog window, click on New and select Computer from the drop-down list. Now type the name of your DPM server and type the DPM server's IP address in the Computer IP Address field. Click on OK when you are done. You will then see your DPM server listed under the Computers folder in the Add Network Entities window. Select it and click on Add . This will bring the DPM computer into your access rule wizard. Click on Next . In the Add Rule Destinations window click on Add . The Add Network Entities window will come up again. In this window expand the Networks folder, and then select Local Host and click on Add . Now click on Next . Your rule should have both the DPM server and Local Host listed for both incoming and outgoing. Click on Next , leave the default All Users entry in the This rule applies to requests from the following user sets box, click on Next again. Click on Finish . Right-click on the new rule (DPM2010 in this example), and then click on Move Up . Right-click on the new rule, and select Properties . In the rule name properties dialog box (DPM2010 Properties ), click on the Protocols tab, then click on Filtering . Now select Configure RPC Protocol . In the Configure RPC protocol policy dialog box, check the Enforce strict RPC compliance checkbox, and then click on OK twice. Click on Apply to update the firewall policy, and then click on OK . Now you will need to attach the DPM agent for the TMG server. Follow the ensuing steps to complete this task: Open the DPM Administrator Console. Click on the Management tab on the navigation bar. Now click on the Agents tab. On the Actions pane, click on Install . Now the Protection Agent Install Wizard window should pop up. Choose the Attach agents checkbox. Choose Computer on trusted domain , and click on Next . Select the TMG server from the list and click on Add and then click on Next . Enter credentials for the domain account. The account that is used here needs to have administrative rights on the computer you are going to protect. Click on Next to continue. You will receive a warning that DPM cannot tell if the TMG server is clustered or not. Click on OK for this. On the next screen click on Attach to continue. Next you have to install the agent on the TMG firewall and point it to the correct DPM server. Follow the ensuing steps to complete this task: From the TMG server that you will be protecting, access the DPM server over the network and copy the folder with the agent installed in it down to the local machine. Use this path \\DPMSERVERNAME\%systemdrive%\program files\Microsoft DPM\DPM\ProtectionAgents\RA\3.0\3.0.7696.0\i386. Then from the local folder on the protected computer, run dpmra.msi to install the agent. Open a command prompt (make sure you have elevated privileges), change directory to C:\Program Files\Microsoft Data Protection Manager\DPM\bin then run the following: SetDpmServer.exe -dpmServerName <serverName> userName <userName> Following is the example of the previous command: SetDpmServer.exe -dpmServerName buchdpm Now restart the TMG server. Once your TMG server comes back, check the Windows services to make sure that the DPMRA service is set to automatic, and then start it. That is it for configuring DPM to start protecting TMG, but there are a few more things that we still need to cover on this topic. With TMG backup you can choose to back up certain components of TMG, depending on your recovery needs. With DPM you can back up the TMG hard drive, TMG logs that are stored in SQL, TMG's system state, or BMR of TMG. Following is the list of components you should back up depending on your circumstances: What can be included in TMG server backup: TMG configuration settings (exported through TMG) TMG firewall settings (exported through TMG) TMG logfiles (stored in SQL databases) TMG install directory (only needed if you have custom forms for things such as an Outlook Web Access login screen TMG server system state TMG BMR None of the previous components are required for protection of TMG. In fact, protecting the SQL logfiles tends to cause more issues than it helps, as they change so often. These SQL log databases change so often that DPM will send an error when the old SQL databases no longer shown under protection. The logfiles are not required to restore your TMG. For a standard TMG restore, you will need to reinstall TMG, reconfigure NIC settings, import any certificates, and restore TMG configuration and firewall settings. For more information on backing up TMG 2010, visit the following page:. DPM cannot back up the TMG configuration and firewall settings natively. This needs to be scripted and scheduled through Windows Task Scheduler, and then placed on the local hard drive. DPM can back up the .XML settings for TMG export from there. You can find the TMG server's export script at. Place this script into a .VBS file, and then set up a scheduled task to call this file to run. This automates the export of your TMG server settings. There is another way to back up the entire TMG server. This is a new type of protection, specific to TMG 2010. This protection is BMR and is available because TMG is now installed on top of Windows Server 2008 and Windows Server 2008 R2. Protecting the BMR of your TMG gives you the ability to restore your entire TMG in the event that it fails-configuration and firewall settings included. BMR will also bring back certificates and NIC card settings. Note that BMR of TMG restored on a virtual machine can't use its NIC card settings. It only on the same hardware. Well that covers how to protect TMG with DPM. As you can see that there are some improvements through BMR, and if you do not employ BMR protection you can still automate the process of protecting TMG. How to protect IIS Internet Information Services (IIS ) is Microsoft's web server platform. It is included for free with Windows Server operating systems. Its modular nature makes it scalable for different organization web server need. The latest version is IIS 8. It can be used for more than standard web hosting, for example as an FTP server or for media delivery . Knowing what to protect when it comes to IIS will come in handy in almost any environment you may work in. Backing up IIS is one thing but you need to ensure that you understand the websites or web applications you are running, so that you know how to back them up too. In this section, we are going to look at the protection of IIS. To protect IIS, you should backup the following components: IIS configuration files Website or web applications data SSL certificates Registry (only needed if website or web application required modifications of the registry) Metabase The IIS configuration files are located in the %systemdrive%\windows\system32\inetsrv\config\ directory (and subdirectories). The website or web application files are typically found in C:\inetpub\wwwroot. Now this is the default location but the website or web application files can be located anywhere on an IIS server. To export SSL certificates directly from IIS, follow the ensuing steps: Open the Microsoft IIS 7 console. In the left-hand pane, select the server name. In the center pane click on the server certificates icon. Right-click on the certificate you wish to export and select export . Enter a file path, name the certificate file, and give it a password. Click on OK and your certificate will be exported as a .pfx file in the path you specified. Metabase is an internal database that holds IIS configuration data. It is made up of two files: MBSchema.xml and MetaBase.xml. These can be found in %SystemRoot%\system32\inetsrv\.. That covers the items you will need to protect IIS with DPM backup. Protecting Lync 2010 with DPM Lync 2010 is Microsoft's Unified Communication platform complete with IM, presence, conferencing, enterprise video and voice, and more. Lync was formerly known as Office Communicator. Lync is quickly becoming an integral part of business communications. With Lync being a critical application to organizations, it important to ensure this platform is backed up. Lync is a massive product with many moving parts. We are not going to cover all of Lync's architecture as this would need its own book. We are going to focus on what should be backed up to ensure protection of your Lync deployment. Overall, we want to protect Lync's settings and configuration data. The majority of this data is stored in the Lync Central Management store. The following are the components that needs to be protected in order to back up Lync: Settings and configuration data Topology configuration (Xds.mdf) Location information (Lis.mdf) Response group configuration (RgsConfig.mdf) Data stored in databases User data (Rtc.mdf) Archiving data (LcsLog.mdf) Monitoring data (csCDR.mdf and QoeMetrics.mdf) File stores Lync server file store Archiving file store These stores will be file shares on the Lync server, named in the format \\lyncservername\sharename. To track down these file shares if you don't know where they are, go to the Lync Topology Builder and look in the File stores node. Note the files named Meeting.Active should not be backed up. These files are in use and locked while a meeting takes place. Other components as follows: Active Directory (User SIP data, a pointer to the Central Management store, and objects for Response Group and Conferencing Attendant) Certification authority (CA) and certificates (if you use an internal CA) Microsoft Exchange and Exchange Unified Messaging (UM) if you are using UM with your Exchange Domain Name System (DNS) records and IP addresses IIS on Lync Server DHCP Configuration Group Chat (if used) XMPP gateways if you are using XMPP gateway Public switched telephone network (PSTN) gateway configuration, if your Lync is connected to one Firewall and Load Balancer (if used) configurations Summary Now that we had a chance to look at several Microsoft workloads that are used in organizations today and how to protect them with DPM, you should have a good understanding what it takes to back them up. These workloads included Lync 2010, IIS, CRM, GP, DFS, and TMG. Note there are many more Microsoft workloads that DPM cannot protect natively, which we were unable to cover in this article. Resources for Article : Further resources on this subject: - Overview of Microsoft Dynamics CRM 2011 [Article] - Deploying .NET-based Applications on to Microsoft Windows CE Enabled Smart Devices [Article] - Working with Dashboards in Dynamics CRM [Article]
https://www.packtpub.com/books/content/dpm-non-aware-windows-workload-protection
CC-MAIN-2015-35
refinedweb
3,372
64.61
: September 3, 1897573 - . . j ( , << , ., , , , =- ,.. .- "; , I , , ', \ t t" 'tz ::; ...' . " , ' : ." ,, - \ u \ --v----:: : \ Q Fs z 3 I, ATLANTIC, ,OQEANNORTH; SOUTH I '. h' pe.r1 , ,', . ' , "---- ; i\ \ , '- \ / > :$r2 < > i c 1d .,.1 Sy '- ' o 3 I Y i 3 n R gd , r t ' S m rw s ; i' e r an U 1 H 0 h V : , " : 'I ' " tocoArrUTS ' ,...... : \ l.i : , \ \ I '' : I I '; : : .,, \I,\ \\ ?; i:, ' I, he ia rill strop -. l _ < \, [ ' ' ... \ 1 BANANAS \ "-o J. . I -: 4 ' : I \ I'J : ' VOL. 3---N($:i'7. ,MIAMI, DADE: (SB&Sffi; :) FRIDAY,, ,SEPTEMBER 3, 1897. PRICE 5 CENTS. \ , _. -- , | -i r i 1 i ' : T ' # We are.alka "glad to receive report Try a tandem ride on;i the Kiaga a I -Jiaveilthe! \nneUt line of renting (\ ,Why not buy a wheel Prices are A bicycle squeaking- makes one have of any society/erects, church or lodgemuting8 Tandem at The Miami Cycle Co.'g. I wlieel on the Eest Coast. The Miami; easy{and costs: less, than : tbe shivers as he rides, down, down. e8, celebrations, I C tle-' Co. "" renting.. The Miami Cycle Co. W e' rune that for tic -and upward.The . banquets,I efcy Such events are Ire- Rev. J. Uv Howland will preatht Miami Cycle Co. ' .. quenlty ofaprivate nature and] the, attendance ,- 'the Lem n City Methodist Church W.,M. Featherly! has been takingaaqation I. F. C. Bush, W., D. Kelley and W. 8. James ' prominent real fe limited to members only, or Sunday the 12th inst, morning andyening. \' -of a couple of, weeks which Graham and son, made...a trip to I Cape T.Bogg, a estate , 'I. invited guests. Hrnce the METROPOLIS, I IProf. \ will terminate toor row. lie has. I Florida' one day last'week, in, Hon*F. agent from Melbourne, and E. P. -t... w" is not able to Branch cashier the Melbourne u.. representative State always report in _ been pushing improvements on bis fine S. Morse's comfortable yacht Amy. ? - ",- such occurrences. If the secretary ( .:R. H. Coxe and If. A. Dunca I Ban k,came down on the excursion to((0'spect - fgftf such meetings or another person Lake' J iaj front lot,.just forth of the city charge of Captain; Henry: net. . -':, will/urnfoft us with a report it will'be 0 f, City, connected; with the Agricultural limits, during th $t few, days. The report that they,went gold hunting . Miami and incidentally attend :' >"* 'appreciated not : but mil be << College, arrived in the cit spa certain business matters.' Mr. Hogghas only by us i is Mrs.( a fake, but, they bad a good time read with interest by our local, sub' ait\ night. !I 'I i \I' Helen M. Reynolds'and (laugher sailing on the blue waters of, the Bay ., placed several good, real estate* ,scribers.luj I of Titusville came down on the excursion - :.. t ".' ,-I 'L ,John,H. ,, one of the pleasant land bathing the ocean beach. loan i on property inthis"vicinityrtecentlys :_ ', 1 Wednesday night and repiseretl 7 r' Besides banker Mr- i i | being' , down the gentlemen ame on excursion - 4 IIIIlIIl111INCE III tEA T. from( nni"S ourne. lie is at they t at the Hotel Co 0111. Irs. Reynolds i i\ Wm., Varnadoe" ",the ,contractor who Branch) is .also an author. He has.-J' ..: ., : is engaged'in the dressmaking ,has, superintended such,vast. amount written'several very f- Miami I' Hotel < t I |\I and jmilliner, .rbubinessl, -Titusuille.! of' blasting ,and grading in this city, l Report says that popularks. :..... '. : ,; Horseradish mustard is delicious I left' last Monday morning to spenda ;' Minor: Miscellaneous Miami Matters real estate bachelors is making - : ondiment. For( I sale' at Gautier's. Mr- Loan, children of Key West, preparations three weeks' vacation with his IJtDt owed. PrIce' 25 .cents. I !sep3-tf I who have been on art tended visit at family tatake unto, himself a wife. If 4Mod say -" in South At the end of that Georgia. \ his is true there be effectual to ' \. Mrs.T. R. Pindar's at Cutler, left this seems. an t, Hon. F. S. made ' Morse a trip time he will return to'Miam'i to I I.- show week'. for ,their "home.! Mrs. (Awe'sdaughters. super- remedy for a long standing case of -t' t{).Snake Cree'la Tuesda to a intend other work in his line which has ! French sar815e,2 for 25e a-r.Gan- Misses Lou se and Geneva, chronic :bachelorism. It ,has always 'tier's. : ', -r. a party of land buyers, some propertyin been ordered done. ' i' sep3tfOur that' vicinity. \' I will be greatly, missed in the social'circle \ been said that Cupid's smiles would in' real estate me ,,rjport businessas \ I I" there. ; The choir of the M. E.. church"will:, the end overcome the most obstinatecase'of'this active and c )nsUntlyqproving.W. Townley Bros have purchased ,a lot give an entertainment at the M., E. awful malady and we begin 'j. next, to Luminue's grocery}and will The city election will take place on church on Friday' night. The; entertainment 'to think,it true. Of coursethis, 'meansa j jOIX. .. S. Wagstaff' 'a newspaperman of ireceed to- a 2-story brick build-, he tth Monday in October, the 25th will be an "Auction Sale." palatial residence on the south side. , Jacksonville is! in the city agaifiv Four! aldermen will be elected " :- : , f 25x60 hereon. ; dome ng .bUir t and see it. Refreshments will We have been very ,busy the last If you will ,ball, your eyes will Mrs. W.: and' Iso one major, one marshal and one be served after the,entertainment.: week with repair work. This because, tested free at Idner', & Son's -I't ti ; eatherly daughter, ,ity c erk and ,ass.e or. The METROP- The our ,work is satisfactory. Our pricesare , ... "* rl Jacksonville Monday' proceeds to be used, in the purcljiase ' . \i leaver LIS Columns are open to any candi- reasonable. The Miami Cycle Co. r ,;H.A. DunCa rand R. H.Case of Lake: Jwill' of ,of sinRIIJ'K'books.\\ are cordially - 'iThey spend a couple ; (ates who mywish to announce them- J. R. Parrott, vice-president and R.1'; 'c" , City are spending) a few days in Miami.Hon.F. weeks hat oity''visiting friends. invited. No: charge for admit ; ehes at $di an announce rent. ;, T.,Goff, superintendent Tof ,the,Florida' tance. ' Wl' .JEwan Duke of Dade : , , East Coast Railway Wood Company, arrivedon Tinraynent cements patching , was'in the city again-on business last ingle tubel ce nt, graphite and all The youngest child of Mr. and Mrs. Ve put in wood rims correctly. We a special last Tuesday night :about : Adam orell has been ill for the use only the' finest material. Our ' -y ' Wednesday. : bicycle goods atjl e Miami Cycle Co.'s.J.A. ry o'clock., They left again at 6 p. m.,, prices: are the lowest. The :Miamj Cyrcl # week its I past' Qn last Sunday: condition ! ' Salted mackerel lOc; at T. N. Gau- Caruthers, ofc of the conductors was Co. I Wednesday night direct for St. Augus- sidered critIcal. We : ' con are tier's. J\ ,_ sep3-tf of the Florida' EastlSpast Railway, pleasedjto}I lea n that it has been 8towlyimprov.ng J., A.Lovelace, who was so popularas tine. They ca'me down for the puz- E.C.F.Sanchez;Esq.:,of Gainesville, i8 now,comfortably domicm, *! with his fo the past few days and isnw'corisider 'purser on the steamer Monticellolast : pose of inspecting tbe work being done, ' I a practicing.attorney ;of some. prominence ,. familY, in one of the new Flayer cottages d out of dan er. winter, is now'acting as purser on : at the new terminal and witnessing the- is in the cjty. iiA '- the Biscayne, and; Purser,,Fritot is taking operation of the big suction dredge $ I ; J. P. P ulse and T. Hen 'sberg came, that and the, pile driver. t a rest. It is" expected: Mr.: B. Borden of Fernandina, he of R v''Y.\ Blackman was called" ' Palm ofrom.Mode\ (\ 01 on Wednesday night Lovelace will continue to act, as purser E. L. White, ,county commissioner " ,filibustering f amet is in the city., West Beacn 1 on WedneSda,to officiate ' X 1 left for h me this tao ninlr. Mr.Hsu on the steamer Biscayne until January for[ this ,district, has a touch of the 1 , | { , at the funeral of Mrs. W.J. Cad) i I Combination fcsberg ha] bought a tract of land will gold-fever, but he does not intend to on when he 'i:- The Tandem of Tbe wife of W. J.; CVdy pastor of, tpe Con next,. probably go on B-J- | Miami[ Cycle"Co.jis certainly a beauty. 'gregationalchuiteh.' at Mouclo whi h he is having cleared board the new Nassau' steamer as go to the Klondike. He says there is a . \ F. A. Bays, i0f Jacksonville came lid and will plant grove of citrus fruits:. purser.' t strata; of hard quartz'oar flint at the, " | ,' The Ladies, Society at Cutler He will alscrfouild a house | bottom of the well on his, home place at 1 inspect , down on the excursion to '' Thomas Pomar, assistanttauditor.oftbe will give an ice cream social 'Saturday Lemon He in i City: put, a,,.heavycharge , Miami. \ \ Have le woDd ri polished Florida East O $.RailwaYyC m- ,j afternoon, the ,4th inst., The!:ladies your' bicy I of dynamite last Saturday to Rico and suckers for sale invitation and revarnish d 'fhe' M ami Cycle pany, arrived from St.' Augustine last oht8o , Porto slips tend 'a cordial to their Co., ; blow e of the quartz ',,so that it i from importedri stock. Apply" to U. friends tb attend. l', 1 Saturday, night and stayed in the city 'be examined but the well\OJled. might , ( \ Price Williams.o\\ ami River augU-tf The beginner !on the coxnet, who resides ; until Wednesday morn g. He came 'i ,Punctures 'mended and gdar nteed in the, of ( for the auditing the up with,.water. He will pump it out 1 vicinity theMpostoffiCe purpose/of down ' \ \ 'Mrs.Julia D. t the has about com for six, months,'25c, at The,Miami Cycle and try, again. , [ 'dividua of ,'Fritot 'of ! Co.'I3, i is certainly industrious i accounts purser steamer pleted her extensive improvements atFort \ 1 One of these" he will'be to Biscayne and installing Captain J. A.Lovelace Don't* send your wheel, away for're. [ Dallas.. I' E. F.ln'atch and R. Q. Hammond of .. I dajs ale: pairs. ',We have the best shop on tbe t toot;the horn v >ry well, but at present in the position! :vacated "by1, East Coast and the tools and brains to, r .$. H;, West ofWett '.Madison and W. 8.' Eau,Gallic haye.purchased a tract of I , r r I I -;well, wq will! forbear from stating; Mr.'>i ritot.XPW .1 II repair Tour wheel at moderate: prices.TheMiami . of Valdosta, Ga.., are in' the ;city, 10 acres of land near Lemon City for the facts in the.ase related, to, us by i Cycle Co. .. y of Cocoanut Grove A. A. for a few days. ". ', gardening. The\l 8aleVas; iinade those whq Jiave their offices in, thatneighborlnpod. "I Boggs I . IC9ngregational . iI- \ stepped aboard the train this morning : through,E. A. :Wadell. . Mrs.,A. S.,Pell,! of St..Augustine, is, with/ aserapbic expression of counte, Services.; . n tie, city. ,She jis registered at'the ,Seward F. of, Titusville whoIs J. De and chi dren I"returned nanc The, wires had told him' that' Public, religious services on !Sunday Mrs. R. on >lly House. ,'; \', } i connected, with]\ the palmetto{fibre [Miami"'ey last .nght.-: Mrs.: 1oggs;rind the baby, and a sister next, in'' the .River View House, at 11 '' to Monday ; . and ,tannic"acid factory;of that town, a. m. and'7:30 pm.. conducted by tbe 4Rev I E asy, payments, on bicycles at The Our popular l 'and efficient "telegraph' of Mr.. Boggwould'arrive; to-night. do-.yn the excursion. James Bolton pastorof isetoppin Union came on He , imi Cycle Cd.'a.llJoseph i l and agent Is consequently He cbuld not.'w& t until ,then, but,decided . v ex ress - operator ; \i I at the Conolly Rouse., Church of Miami. The public is cordially - to run up as% ar as Fort Pierce and for ' the A., McDonald, who has been very happy past_ invited to attend. : , absent' for,about six!weeks, is expected: We are $soon going to give awa another few, day has bee )resting his patrons to meet; them. j I .. .. I . ack;'to-night. f i' Miami bike, to'oar: many 1 patrons- be with even, i4ore< Cycle, Co. than usual. guards' :chains, spokes, saddles "fis ; ,sy ; 1 H. A. West a real estate dealer qf Have your bicyle dress guards:relaced , .. Mrs. Sue Bradley ohnson.and Jl W. rims, wholesale or retail; ire. correct - The Miami l ladison, is in the ity looking over. the Have. your wheel cleaned inside and ,prices.: Tbe Miami Cycle: Co.'\, by Cycle 90. .; I n Johnson, of ,Key Vest, ,were at |the I : \\ city' lots and may infest.s Hotel Conolly ;',ft ,co pIe pf days bis The out and Miami properly cycle,Co.adjusted for Toe: _by Geo. JH" Woodall, yardmaster oKfche::. Forty;Acres of Land for. Sale. ,' : 3apUin George pillion, of!,Key West week. Mr' Johnson Is'a partner ot E, Florid" East Coast Railway at Misfit!, Belonging to Dr. Wm. C. Cutler, adjoining ' t 'bas, .accepted the,position\ of first ;mate A. "Wadde'li' our 'rea estate hustler... ' All of the liquor dealers intne county -, oiUthe! steamer.Biscayne. ,.' will appear before ,the board of! vacation.,. He goes'Atlanta, to Join .., \ :J. M: Bryan, Jr., of Kissimmee: ,rbg= commissioners' 'at its-regular andvCutler. Price $1,200. 'Apply to . children ' county Mrs. Woodall and the who lave WM. your watches1 : F0ZZAED and jewelry; re- , istered at the 1 H Miami last pa red'\at Idn !r &\ zaOIl'8. All' work Strohm te1i i Palm monthly meeting next Monday and have been in that city: :,for, several I au sep21 Cutler,Florida.' dope!I quickly and guaranteed.e.MaryE.Rogei: night. G.,\G. of' West present, their, applications! for ;>ermits weeks. :,From, Atlanta Mr. Woodall Reliable Seeds. ' Beach was',an ,arrival ,at the' note to sell liquor j There will bet ree applications and family) will go to Asheville, X. C. ' \ ,of Okahumpka, Miami last>:night, also' W. D. Cook of Miami fol- _I. am handling ,A. W. Livingston from precinct as to spend a week or so. They will all Sons* is i very pleasant excursionist who id \new crop seeds and keep them in ( !' New, myr 1a. lows: William X. Woods & Co.y W.P. return to Miami i about the end, of the bulk.J, Sold at catalogue prices. Send' r stopping at the HoteE:Miami. ' J.'R. Parrott, vice-president,and fe. Hafcbett and'th'e; new firm of Mooney present month.. for LlviDgs: {)n'8 fall catalogue for gardeners. 1 "heels overhauled! frames;, reset,'at T.; Goff, superintendent, expect' to rundown & Knight." ; t,! I ', JIvES A.'PlXC:,' Wm. il. Brwn president of :the al3-tf;: Postmaster Cocoanut Grove, ,,80i9.ll cgst,by The Miimi Cycle -* , ; ko Mimi every :week or ten.day sIn : A. Waddell of I " Hon. Key otourmerchant l James Bank of Bay Biscayne, made ai, run up " hi l' report business : future to inspect the',progress, being West, at the persuasion of many to Titusville last Saturday inconneo' Notice. \ A t,as qeing' gocxj,with the'prospect of be- ; made.the. new.. terminal aid friends,, hasfinally\ yielded to! their tion, with: his business interests.at that The city registration books will be conjing; even better Snlfuture.rj push it along. 'hai open in the council chamber from 8 to wishes and entered the race .orre. point and returned to this city,on MOD 10 o'clock' every [morning from Sep- i G. B siin' leaves ,to-morrow K.'B..Raulerson>.of.1 Tort Pierce, t le e lection as mayor,of.t e Island!.cifi. day night.! He, will probably [remain, tember 6th to the end of the month i on1 kjtrip J of several weeks". He goes cattle, king of the'East Coast, who is The position i.t|: truly a mostthaikless; in:Miami continuously for !the next and all day on. the 'last,day of j the flrsdto, Ocala, then: toasb !ille. partner lathe firm of R ""ulen!>n & Brot, one 'and'"'if Mr. Waddell consulted his few week* or until Chas. H.Garthside,,I month,so that all who may desire odor' T 1 I* K I : '' 4.' so may have an opportunity to regis , J received, a stock, of ,,toe..;;:clipsr 7 of this city, took,advantage;of the:excursion own wishes; and peace?of mind tae. are the popular' cashier, returns from hisvacation. ter. , '. ' ,\ :, ,aeve -al styles, popular 1,prices'at Fhe to run 'down and' ,spend a 'day confident he would much'prefer not to He is now at Saratoga, , l x J. M. (3a.taait,! ' ' .Mia. i Cycle. Co.'..! f :\'i' ',( or two"with bis friend' make the race.1 ,' : N. Y. \ \ t: sep =octl', \\t! City Clerk, ': : '- .,.' '. l"': ''i-;! o. > \ \ " "" ; ? ..\t \ 1 '< .: I K, \' ,,1 'SI "i ;t; S I1 p' "!,\ $..-- r : - : ; \j , \ '1 ,; .a ' I " , II I _, ... 4 , ...... ; l' .' "", ,:' ,!- .,.\ ,., ;t F" ;. 'jft_ : -- :1 ,, ... -. \' ", .1 I .. -.-- ,-, t jt .. 'i: i- r "I "' '" -;., r \ d ; y ' 2 \ i vj THE MIAMI M tR POLISi SEPt' 3,- 1897\ c e ; 'f.r . I I -|I ' ' FRED BUTTER Forty acres on the south fork of the The 'METROPOLIS is the best advertising !" -t ( s \ i t St. Lncie' river, being n }4 of lot.4, of medium in the county. Why M F. C & p R.R ContrActor and Builder Sec .17, T. 88 'S., R. 41 E. 'Good pineapple TOUR "ad" not seen here ? t.... ,. I land at $3, not $:tt), an cre. Ap- ' TtioPr Iessionsr All kind. ''\'of' Stone Work. ply to ROBB NH & GRAHAM. \july2tfin Dentists Card. Shortest LineBktteen Florida and all .f.- Plans and estimates fnri i Dr. Charles Wetzel'oi AshLirid Kentucky I E \ DiBbed free. l If our subscribers 'will look at the, will return to Cocoanut. Grove Northern l Points. : 11 une-97tf "' : MIAMI. FLORIDA date which i sa part of the addresz on and open an office'on 'or about November their paper kind.will remit they are' 1st. lie conies highly recommend.ed Everett Sann.nah.. Augusta, Ga-, ,Colombia r--- --raA --- .' arrears ,it' will be appreciated. by prominent residents of, the; Washington, Baltimore, : ,GEo. M. BOBBINS. WALTER S. GRAHAM Letter from, Tallahassee'I i I'' Money ,is hard to get hold,! of at this Grove who have known him for many' Philadelphia Boston,and New the York 4'' -:*,"; v . : j. I TALLAHASSEE: FLA., August |n. season, of the I I.year., I years. AglStf EasL .t. ROBBINS & GRAHAM CO. present_ site for the bttate, Capi Central Business' Lot fob Sale., 50,000 choice smooth cayenne pine-i! Nahville.Everett, Louisrille Macon, ,Atlanta Cincinnati, Chattanooga and Chicago.i ! the Florida as selected in July The west CO feet of the lot upon apple suckers, 12 inches up, all home]; Krertttt Birmingham Holly Springs, Mempbld. -' 18 by three eoinnmsionerst' appointed which stand the Metropolis [building grown, at |12.SO per 100, or $125 per Little Rock, Kansas City,St.Louis' Chicao *... : { A 30-foot street divides lot. Enquire IOOOwht'n ordered lots.! Sioux City ., 1 _ :.2I..ttoxneys-a.t-LaW" b)] Territorial Governor Wra P. naval, ; in 1,000 or more Hirer Junction,Pensacola. Mobile, New Or- '" uwasourfrstTerritoria1Governor "f W. M. Feajtherly.Cheap i Cash with orders.. Freight prepaid!' pans, Texas. Mexico California. and. the{fad- lAMI BADE COUMT, FLORIDA,. W I guarantee every plant perfect" tic, Coat **" thtn residing at '\iSt. Marks. Previous Wild Lands.: Address, GKO. II. WRIGHT, EFFECTIVE MAY 10, 1897 . ' *tll>rA ctice In all conrtsVstatc and Federal this had been but two Orlando Fla. I .w YOKK EXPRESS No. 38. Leave Jacksonville , time [ to We offer 50 with front the gf$8p24 a Special facilities for examining: and perfecting there acres good on 8:is a, m., with Through Pullman Sleep CI Laud Title We bare tbe only complete sessions of the Territorial Councilonemet Bay situated Ion Key, Largo near Pnmp- era forsvannah.Colnmbia.Washington,B lliuore. - .. ai> and I'receivCvdally report from the Clerk I I lot 11 of 55 Sooth LAM OFFICE AT OAIVE TILL ,} , all land eectifn 13. Township W. L Train No:37 reaches Jacksonville .30p.m. the Circuit Court at Jnno showing Pen&acola. The Territorial Cc until : transfer AllXtbe certlHed Abstracts Title Range 40 East Price $1$ per a re. August 9., 1*Jl. f NEW,YORK FAST MAIL' No. 36..Leave Jacksonville - ; for South Dade bounty are made. at our Miami ,, that met at {Tallahassee way Convened i Also'lot 4 oCt section 31, and lots 1 and Notice ,If hereby given that the fo'.iowlng- 7:(W r m., daily for same point. DOrtb.i' : t {It V, office \ 1.tf, .ht December gist 1824, and i is said 2 of section J 32, Township GO, Southof named' settler has tiled notice of his Intentionmake Carries York.: Return TbronJb.lllef'pen No.: ii arirea Jacksonville J-cktonvlller to New( 9;.10 .i '\ Range 37 East 111.. ibis to' final proof In IIDilr of his claim,and a-n*. , acres. [ is a ' to have held it deliberations in a J I WILLIAM SCOTT \ OORbOJi E. EKOOMK *1 peninsula neat Madeira Hammock, 'bn 'hit said proof ,will be made before Ill' M. tSiiNRAnASDJAcgsoxrn. No. 38 Leave 'I"I i ' house situated in the southeast *, larkftonvitle t W p. m_ via Kverelt, Mama, " log Corner Featberljr, C S. Coininl xlonr 'at Miami . the mainland. SCOTTBRQ.OME j It has a mile of nice shell 'Atlanta.Chattanooga Connect for Louisville.' ' a of the present, Capitol building beach and madeira timber. Plica S3 per ., Florida, on September, 1897 viz-'Charles / Nashville.: Louis Chicago and all Northern rt'( r, .Att& =: rs-at-Zaw. gro Inds. The UJS. Government had acre. \ f Rose of. Cocoanut Urore,:Florida. ihoraestead, and Jackeonville8loa.m.Wetiterii points. Returning r train arrives. " i' ; NOTARY.PUBLIC IN'OFFICE the present l 'building erected, 2 18)'lr' \x I RoBBINS & GRAhAM, ?77G for the south' half of southw.ft,qunrter, I ASHKTIIXK KocrE Through Pullman Sloep-' i tVIIl practice in all State atod Federal Courts \ Capitol section 10. and north half of northwest quarter, nr'Car service Cincinnati; via SavannahColumbia. ,_ I 'r'i Colletlious, promptly attended to. :: and, at the same time a' fort and arsenal Nice! Building Site, section' 15 township M -i-onth range:41 eai t.Hp. . Asbeville Hot Springs., KnoxvUlethrough : of. '.. t ; {. OFFICE!: OVER. BANE OF BAY. BISCATKE I l at Chattah hee, which is now Close to the Bay front, north 'of A. IL. ',names tbe following wifne !ses-to:prove North Carolina.tbe celebrated Leaves 3ountalnCouutrg Jacksonville 7:DO p.m:: ! ':. t: l1'Jun-97.U. the tate Insane :Asylum. The Capitol Simmons', place, south of Cocoanut 61'l'Ont.lnUOUSI'resideueeppon. and jcnltirationf Arrives Cincinnati 740 a.m. Return' gr.rtives7acksonvllle :- 9 HJa.fa. % i ,. Grove Price 8300 said land viz: : containing acres. building cost 'MOOO and the fort 14 Only line through tbe beautiful hill ;i-H- JAB; ?.SANDKfW n. F. ATKIXSOX \ ;2. 8-tt BOBBINS & GRAHAM.. Charles B. Davis of Cocoanut drove, Fla.. of Middle Florida Pensacola. and Escambi eo1IDtrJ'I. '" and arsenal at hattahoochee' cost John B. McKenzie of Miami.FlaMlliam leave Jacksonville 9:15 . Bar a.nu by No. 2 daily : ""SANDERS\ &: ATKINSON.I about $30,000. The, Territorial' Council LotT-Ewanion:]fights i three acres, \ J. White of, Miami.'FU Tallahassee for[ Lake City,.River Lire Oak Junction, Madison, Penl.cola.(0, Hontieello-t*J"!,! I held its sessions at the Capitol lor front south of peacock Earnest Blown of Ulan& Fla.13amg.lsept" title New and ' Bay onri mile Orleans, the southweat.@Xico.*' Attorney<< 'and-Counsrtors at .Law, nearly twenty ,years, before the erection Inn at Cocual ut Grove $300.', Very .J M. RAacot-Register. ers California Return and No-1 the Pacific arrive. Coast.at Jacksonville Carries Sleep 7.56: cheap. OUT 400 feet front i Office In Room 1 and 2, \ of the present Capitol building. on county I' a. m - L Notice of Attachment Jacksonville .Brown Brick Building \ road and small front on the Bay. Beautiful : Leaves ,915"a 1 m. for Starke, f 'MIAMI.'tLA" which was probably completed before ,building site'just south! of the lu,the County Court oi 'the. Mate of Florida, In Hawthorne, Silver Spring. Ocala.. Gainesville ' ItrtlS JI \1844. The, State was admitted into place of'_Hon.' J. W. Ewau. Apply to' and for Dade County) Cedar ,Key.Orlando.Wildwood Lacoochce Lees Dade! burg City Tavuea.Apopkft ,Put. . the Union i in 1845. One of the first ads july2-tf \{\ ROBBINS GRAHAM. 7. E. fjJMMUS' 1 I City.Tampa. .unveJ.ckllOn'rl1let:15p..DL l lliashillle. i /( J Robert R. Taylor, \ Territorial Oounc'il of 1824 was CEO B BAVINS and ttachimeht.H. Route-Throng! Pullman SliepenLtvt \ ' see I Make Worth Front For Sale. L. IU MK. j .1 Everett, Macon, | t Atlanta .- Attornnayat-Scat to laV off the city of Tallahassee, one Chattanooga . ; J \ 'rwenly.ightacre8'\ situate two miles To Ceo B. Bio ins and Hi L. lUrnie, defendants Leave Jacksonville 7-CO p. m.. arrive >asb-|h. : 'I MIAMI FLORIDA.. i mile J square, create. .he county 6f Leon, south bf West Palm Beach in Section 3 In above entitled suit,and all other, persons vide?:OOnextp'm.9och. Leave Nashville t Ii' I naming, the city of Tallahas9eF as the ofTownRhip 44, South, of Range'43 East. interested < Title:10 next m.; arrive Jackson i : i Office on Uth street, next I Ir I. county site and tne capital I of' the t Price &>0.per acre.218tf Ton are b l'l'bYIIOUfted that a writ of attachment 8:15 a. m-tJacboD1'ille/ for 'Brun s-'I 3wickDy C I\1! Wat. qp's. Hardware store.. State. :BOBBINS &: GRAHAM. has been tonedagainst: you and)ouf property Cumberland the Sound.Cumberland. Boutelteamer: and* ' 1-8-lf 11 'I I 'I' to satisfy the. demand f.t, E. Lummus, 4:oo p. m.-Local for Everett. Close confiection . \\ Florida has 1,781 white: schools. and j5GO \ Ho For Cocoannt' Grove.I amounting to slxtytwo dollars and t\\'tnti.I' ? for Brunswick. 'Shortest and quickest 1 .H $ AR'O 'Simmons, \ negro,schools, With an enrollmen! I cents. Now,unless you shall appear before the route. l I The fast .a nil commodious launch 6:00 p. m-L0c8'1 for Tallahassee find intermediate .. II I II of 6oMX) white' and 35,009(>> Court in said suit and plead ordernor' to the . pupils negrpupils. < "I>ailillt.ru leaves Peacock wharf at Cocoanut : points Arrive Jacksonville 4:15 p. m. I It I\ ', '..2I..ttoxna.t -, atfcOCOANUT -'Ld.t annual troll' every deiUration nUnl i therein at the Clerk's office in 940 p. m-For Tamp and intermediate r >" Our revenue; Grove 'morning : excepl points Pullman Arrive Jacksonville Juno, said County and State/on the Rule'Day in sleepers. - .- < ;t \ GROVE FLA. all for school purposes is about Sunday at 8 o'clock for Miami'arriV'' 735 um.Through . said i soirees October, A. D.IS'J7, being the 4th day of Sleepers for Cineinnativts Asheville . ing at foot of Avenue D at 9 o'clock, Ii .' / 750000., Several or Our educational month,A default jrill be entered against you in leave Jacksonville 7.00 p.m-, arrives \ Office at,Residence i! /H1Th leaving Miami for Cocoanut Grove at due course and application will be made to'the Asheville:45 p_ ...,arrives Cincinnati 1:40: a.m. I t I .I institutions( now mpare favorably 10 :30 a. m. Far 23 ft'ntsi' .each)\, way.. For Macon. Atlanta,two trains daily. Leave \ with \ many of the!, highest. in the; Will make special trips i returning, to court for final Judgment,and your, property will Jacksonville 8:15a. m.and 7:00 p.'m. '. Ii Allen be sold to pay the,debt. Summer rates to excursion. points In effect ; ** : c. II'! .I\ ,Ueo. W. South. I Miami in the eV tiag for accommodation Jane 1st.Pullman. ' 1\ i '' Date this 1st day of July 1m. i [" 1 / \ >,Volume 38 of) Florida Court(' of parties, reasonable rates. .\. F. QUIMBY. Sleepers on all Diehl train I. "j.A.'ttQrney atKKY =I2t.QT. \ ; SupreiRe' I' Go down and send: k day or two at [SEAL.] Clerk. ot County Court. |y Send for Best Indexed Township Map of 1: I F'' / \, Reports,is,just out and contains" )!decisions Coffnanut:Grove, the prettiest place on SANDERS: & ATKINSOS.Attorney Wtorll1ato'A., MCDONNELL* WEST; General f.. I / ,' of the June term, 1806. I olume the(Bay. Spend a day\at the home-like. *for Plaintiff Ju )"2-t.o-octt N. S. -aseengerAgent. a Will p tn all the.Courts State and'I 39 will'.!I ,be out by January 1st] 'The Peacock Inn- and see the avenue of royal ,, PENNINGTOL 1'raiHo II........ .. "- ,'1 ,,1': r Federal. 1-9-tf. Aetst ,r the last session of the legislature palms, clumps of giant bamboos and Notice of Attachment. e . f may other interesting sights in tbe In the County Court <>f the State of Florida in : : . "' : I in the hands of the binder., are vicinity1 tf. : tor : { j \ and Dade County '' j, S. Mills ;Fowler M. D, )and will, be out in a week or so. \| I. ; \1 FRANK T. BDDOB:, 1GKO .. .The Scotchmen* I I Letters patent haves been issued this A Tempting.Offer.We I Ta.dttacbmenf ; B BLEVINS and These are the mea for to intorvUwl '! HtatEOPATHIST.( week to the Jordan rnold Manufacturing offer lots 1.2 and 4 of Block E H.L.HATME,' } you p /, \ Co. with 'a capitalization of Mia i. They aret[ situated on the sothside To,Geo. B. Bier Ins and H LJlarnleddendants: THEY REPAIR > ' pf the river. -.Tfapee''lots comprise a in the above entitled cau-en, , ',. .Office Brst. floor. of Hotel Miami. $10,000] and to the Elktric{ ,Power 5o. tract of land having frontage of 111 feet You 'are hereby notified that a writ of 'attachment Guns ' ". :Aug-27-tf ; with a Capitalization f$20,000bothof. ,, facing, the river;.also 100'feet front on has,been issued against you and your " I Gainesfllle; also to the St.John's,Can- .Avenue D. and 2CO, feet on 18tb street. property to saulfyltbe--) .od of' Frank T. Bicycles, . Dr. .Jas. M. Jackson Jr., ning-C6. of Green Cove Springs withacapitalizatlonof \We bought these lots cheap last May and Budge amounting "L09. Now,I unless you I.. ." $ ,000. offer the three fpr f 1,650. Will be pleased,. shall appear before the Court in !said stet and Sewing Machines, ( 1 :; ;MIAMI' i to show them at any' time. l plead or demur.to the declaration filed therein, . 1 J, .'- \ Suits bare, been filed his week i in the 2.18-tf BOBBINS & GBAB )(. at the Clerk's office in Juno,said County and 'Locks, fAnything .' !\i ,t/, t. .--: LORIDA. I i;eon County, Circuit Court against, ex- r State; on the Rule bay in October.i i ,807.being 4 Collinl 4th of ,said month,A default win be en- tbe day Offlee kt .5 5TOWN :JreasurerC| .JB.: and his bondsmen : .t LKY lQ8'.DRU:. ST B.E. toy h* that tered against you and application Wilt'be madeto Everything.All . I ,,. "I- ;to..recover\ ,'a shortage of the ex- Is hereby given I will sell a lot of the Court for final judgment,and ''your prop- ' r' ,/' ,treasurer. ,\found, by, a special committee accounts due: the 1 undersigned as-t as- lirty111 be sold to satisfy! the debt. fork Guaranteed"FirstClass, in alII, . ,I' D R.;E.. C IAFER. of .the last l legislature to be $58,000. 4ignee ii or Dewey A\| Lummusof Miami, Dated this 2d day ot July,A. P. 1897. ;esP6 ts.. ' f '' It 1 .'Iori' ::1, to the hig and best bidder A. F. QUIMBYi, , : ; Board of trust of the' State i, J!) NTIST.Orrice : The es at mv office in the post office buildingat UALf Clerk( County:Court, I' GIVE THEM A TRIAL. J :Agricultural: college at Lake City held th corner of 13th street and 'Ave. SANDaBSdfATKiRSOF: Avenue ' . -Foot of D MIAML ; I : river.Banlereon's.t . Market, n. e.:.' a meeting this week to investigatecharges D, Mi ami,. Fla., on Tuesday the 31st Attorney lpr I'1alnUif.. }aly34 octl OctMlypd tt |' \ b ': corner.Avenue D and 13th street.. : against Preside it Chile,-which day of August 12 o'clock mid-day, .: '' .1. ,* .9-tf. stand rd time. Said lot of accounts + : I { \t:1. -. "I was rendered, .unnecessai y by.the p '\'t.8i- consist of those I have been unable\, to ' John S. "Frederick, I dent's ,resignation. T le: Board has collect and I have been advised by jthe t { : : < : elected kon. W. N.. Seats,. State, superintendent court to advertise ame for.two weeks Florida East Coast CiYilEligineerT i p' au& purveyor : of education, to the posi! and sell I them in a lump to the highest .. .I : 1\ bidden ro (' sh. Allist\ of the accounts tion. Mr. Sheata has 'nbt yet signiped ,Tim Table :N*. 9 Corraeted J... ta a. 1897 '. % 'Public for; State at.Large.' .. which I w II offer for sale may be inspected _ ' ,Particular Attention! given to SubDmd'infflargi 'whether \or,not he will ccept the position at my office at \anytime between - SOUTH BOUND . i tracts. ,, Th'e pay is| $2, WO per annum 18 a. m. and the.hour of sale on, (Bad Down)! NORTH BOUND"BesdUp). it ; ' Office 20th St Ar. D, south Bide 'with bouse rent In' the event the day of sale. !\ W.:S. GRAHAM', No a7 o 1 STATIONS' NG 82 , : t ., J1ear'l.' ; : free. auii13--7l ., ...... Ycua ...... 703Lv._.. . 1o 1-21-tf.' 1! I MIAMI FLORID Assign of Dewey&; umDl.us. Jacksonville ..,.Ar. 18 14M .._.. _.._ | , Prof.,1Sheats accepts tie position 1 of .... IO 8' ..,... Ar.......t.AnguatiDe.Lv. 626 .... lOQa ..,.....?, .. '. of the State Agricultural ::.:.10UaI ..._ ..i.F.\ ...... L'.Bt., AU 1UtLo"'t..Ar. I )...... ......, ...... ...... { J :,. .T'i j IDe, 1BRovlN,, college president', 4\ will, devolveernor pon the Gov-: IN1 I fIR- un o*.COIBT,FLORIDA, SElVTH, iv: AVI*JUDICIAL'FOR DADE CIRcui !' -. :;:::.:..::.uONa It :::: .::...'...{" .:. : .5.::..a....t..Paluka Palatka.nga...;......:.::,? :. :f.:: :::::: .:::::.:: .:::::. I ,1 to appoint 'an ad interjm Stateeuperjnteodentofeducatop. / C9U Vn-IN JDHANCERrr 1 ...::.. ..... ... p ,. .:. w..,....+..1'.latka..Ar. 4 :,.:.. ... ...... ...... '( ARCHITECT This will; /ThelAm rican Contract antI Finance- ] \ ....... 59a..:..........;......: ,. .....:.;... Lv..SaD At.--1-i{ San l1a&eo.-.Ar.tato:.....; ..Lv. alGi! .t.'..... L-..:.... .."... :.... I Il6p : l" . al. Com Iainants, r. I CoinpIl.nry I\ ;'I ,"..-F ., swell the' il ready; large t.icket tor nit ,I y Perlrlne et ,'.et al f i.. I } -.S.1 ::.: ...4 1. ...::..:: Lv..41" : } 0rtnond Daytona::..:..::1. r :,. .. :.......i.. . 1d-tt t'\ MIAMI FLORIDA.i ygar's.'general. ; election. i i'i 1 Driencunts.bplicbtion I . : : g : : : : ;g: 1 1 ,v , 'i Governor Blozbam has'. .turned"from' :(::fliona ''of thd complainants In the ',. .. .., ... .\ .. .. :'" ....._,t.Atckaville.: _....r I .....: ,..:. ,... ...... : .. I I r his summer! vacation. stted .. It 'appearing on'the sworn .... 252x.r. N .,. .... ; i ' \, above IUI .. "' .:.Qlt 14dnt. ::.. .5 - r JOHN,.KRONOWITTER) The-following are a few!of the names affldarit if their' agent and attorney.that the ; I : 5. ... !ir :i .!.,.. .i..' . asap .. f " defendant*, Henry"E. PeM end Emma Folsomt .. v ,.. Rockiedse .. i and' addressee of recent, inquirers at the Per his Radcliffe ...... tUlIp ...... _!+ ...;;-. "ja..Ban Galhe.....;:.. 1155. :__.... ..p---...... ...n'....-... n.... 1" .. 'z : AX1.C wife Clara Rodgers . T >:EI.i. net } 1.- 409p.() '..4. -. .. ... .Sal'DO: .. 1182.4lap .. ... ... \ ) ..- State, Bureau of Immigration for information and Robert Dunbar RadtUffe, her husband, ..;... ...... ':'Of' ....,. .. ..........Helhonrne:...... 11 ..... .....:. ...... . yl :i'; Over wi years Experience.. . *' about Florida :,:lit. Belcher Jeannettel Stoat Walter,' :James TbwnsendU ....I. C Mp ...... .'::..\. ...... .... _....",, 10 xis ...... :..: :. ...... -- : ; 4119p .... .... ...4t i '+ ...>rg8Ro.ielandebaetun...... . .. .. . .. ... l.* | r Metropolis. BnDdin Miami.Fall Haymarkei, Va., wan sln ormatlon dn ,II divldnally and a U' Executor of Hester ...... 1S9p ....;. ....,. ...... ,........8'_ Locie. ....... :; 1038a.1J43& : ....,.:.. ...... oJI: ) " 1. i'' Stock of Sample of all Latest Weaves Perrfae Walter, and Wells Walker,b S ...... Imp ...... .....1. 5 ......,.... .port Pierce........ 1J3Oa ...,.. ;.;... .... :t 'i.iv'!' 'i4" ',: : :' >, tobacco, cane, and truck far an English! wife! 'Herirj Iteiman Ducat t' and Nannie 0. ...... 635p .... '. ...4. Io'a; ." ........d+...EdoIl.l..4..,.... 901a ...... ..t....-."..... 610p a 45p i .c ;! Box ..:.. 140p. .. .... 6ROn ..... Jensen.' .. Wl 294 ; Dajr- 857a colony Barrington, -t. : .. . " { .It"f .< ; Duval hlsj ,wife, Curtis. ,[ b and Elite ...... 84Sp..\.:. ....?:. 840a \...\...t.rr.8tuart.\ ;; tt49a ....i..1.... .. '...... 890p t wm Varnadoe tontO./co4nzation|. ; P. Wt. Neal, Mayfield I beth!, A IMcomb, his wi e. Ueiiry R. Durf@r. ...,' 70lp ...... ...... 711a ."il ......i..IAUcia;.......... 8S5a :.. .. .. ...... IQ6P'l { I ,, ,: I ' '...... 721p .._ ....... 813& 'C ,., Hobe .. .t. ! Nl C.I tobacco F. P Davis BraziL and \Fannie E, Near are non of the -- I. r Sound. .813& ....:.. .., ....... imp : ; residents .;.... 7a.1p ..,... ......f 85d6 ...... .Weat JupiterL.....r.. 800a ... '.. ,...... 1240p " CONTRACTOR.ty"Bock : i Ind., \Iwants information about State of Florida, and ate residents of a Stat ...... 802p ... ......r JOb" : : Riviera: .. 783& ...-... "..;.'. ...., IllS. t 'f.. ; or country! other than tbe. State of ....... S lop ..;.:. .....j 11 tile Ar'.I.West Palm Beaeh..Lv.; '? _'. 10!ita 1. _,West. Florida: Isaac: ''Keeler,' 31 K: Florida, ajiid' are :reiddents, of' the Unite ...... 8j6p!..;., .....l2.'ip .. __.,... .,..Llntoul '! ..: .24a..4.. .. ...... "f-.:. .' 114. ,,fa.' : W6rk and Blasting a Specialty. street,'X.E.Washington, D. C., geI'- ...... lJ85p....... ..... 1SIp (.....Fort Lauderdale-..._ .. S 53a ....... -1 I ......yw 118a . | States,:and thai there Is no tenon In the'Stat ......1020p '............ tOlp ....t..LeIDOI.l City... .. .... ..1 60Ua .. .-t. .10. 182a- y *, I,MIAMI, FLORIDA.: eral infor ation; Wm. Hammond, ...... . .__. .. .... .t. -S ' 1 ; ; \ ,' Walthairi of'Florida the service; fl| bpo na upon who &lPAr: ,I.: l&mli. .. 'a'raI..__... .....: ..__.. 110. Aledo III.) J. E. Searing -lamp.- : Estimates Furnished on Application. 1 1M2-lis. would -indlsiR-h defendant4,or either of them . ...i | ,. '. 'Mass;'B.:Singer, Nicaraguan .consulate '! and that thb said defendants are each over the .., A. of W:'BRANCH. + Trains 8".35.a7 and 78, between Jack- r \ I R. JIj1t. 112 Dearborn 0.8 I er'nvilleand5t.Augasttnedally: ,ChicagoriII.\ ; | 8TATION NO -i2-e j age owe tyore yeirv t : : = L : Train'me, between Miami and Port .. ".. Dlw'.MERRITT\ .s reetj'Chicago, 111.; W.Dawson, Itti therefore ordered,That' the said defendants l5p 11} Lv..NeW' Sl11yrna.Ar.. I'ldp S Rip Fierce dalr) except 8UDday." . ; R. } C gop 11 0'1'1 Lv.:....LakeHelen..Lv._is alp 4 Mp Train between ' ; 1. Prestonia, Mop; Mrs A McDonald 2I1U. )'on Pierce u4 .. \ \ ij il L .. 473 Memphis Tenn. col' ,do aMicar' to.the Bilf of Complaint,tn the, a 11p 11 Lv..Orange.City.._:.Lv.1219p: S Rip[Miami dial7.except . "t f ContM ; Shelby rfeti. I above\stated cause upon Monday the Bth day of 5" U .Ar..OraDre' City.at..Lv. 12 l5p a 25p Trains 85 aDd 78 .ontkof 8$. Augur . .. l tort; .. >>a-.. "'" onlzation.1.i- September,D897,'at the'oflW!of the Clerk of said 1 : tine daily, eJee1)Btmd.ay.i-: L . 1. "*\LI.Candidates mees.'I''I (Courtj tn Juno, Dade County' F1o 'I a: Br..mat Ir' t :1 '. >..1" -. t : for;City 'And,it UfjirtherOrdered: .JTbatthis,order be : The 'i ... -: y 4- I : l I \ Those i gentlemen who. a pire tube( published the/.Miaml, MiTHOPOU9"a newspaper ' ! t. i ke( : I& /Builder. fleeted to ptyiuofflce net: October' )\ published I In\ Miami,1 Dade County I. "BFSCAYNE" ,. t , : '. : should announce; themselves jn the col-1! Floridi,oncf a week for(ontcoogeCuUyeweeks. I ; II \ ., t' t--1\ ,nmns. I ItTROPOLI8: ,,We shall. r -, itness the Hon. John I D. Broome, !IappolntedtoPerfOrmsernce..rouows., \ .". ; '. \ : , ; ; Gtveusa] chance charge: each ,annou cement 17&adran .' Judge of said Court at Jnno,Dade I t ' 'i l: I to figure on your: .gfi'tbt: I running the'our columns 'IetALl( County,'\\i1orl a.':this'23d'day: of Leave, MIAMI- 1031. p.! m;: Wednesdays. and. Saturdays, .,'connecting with Trila t. 3V' \' ,. ,"1 It ; ow on until election Y' J _A F. QUIMBY.t \. Leave: KBT WK3T&M a.M, Tuesdays and Friday_ \ ' . ,h ., i-ui ;v|.buildinIt, ?. :". occurs. \'lCome forword, gentlemen, "' -t: Clerk of said dourt.TMDAY . I t I'Coanecpna at Miami with Train 78,.following morning Jli1.1tAtl 1: .. ; ; I. ',. and let the lpublici\ know ';what ,youwant i. \ f 1 \ l " '' Refer; to .Julia .D. Tuttle ;F. T. and what nSolt . BECKW1TU.. { 'l l ,. ;; yon bare to recommend pla ts.' f' -1 t J.D.BAHVER. \ and of '* .' Tra-tO Manager. . f .A.u't.Ptdasangee-Agt+tti : Budge jBtok Bay Biscayne | jou. vX ang20-tf "b 't..p .' "" i Bt. 'r' : .. : ;" \ ... .... i atlgnatlnr J'1a. \ 1.I ; '!: y.k I '\ t"/ "' IT : '\; : 'I ( .. ., I 4 -. .: t. ," _- . , 1 ; : : 'f' ,' t , < t N: '-.. \\F j I I ; j . biuZi l' ......" .. to ...,y .: I 't, .u t ""' r ,. h i .. \0.' . II' \ F a - ; .Jt < :, . . ; "-J ; ,'A:; . x < *- r ... VU P ... >J .\}. :'t . 4' 1'1' " ',1-"ii" / . * \ --: \ .. 5 I THE .MIAMI tiTR0POLIS, -SfePT.\);: 3, 189?... ; 'V3I > Kf . . -r 1 1 }" I t : I ! I amount of tropical fruits that have harm than good. 'Please-read the estimate s Chance of Lifetime II ,. I . Tiie' :a .. I been planted \!by the farmers. Then4! fully.: , . 1" x' \ is but .a small area of the country in One blind red trees, 1,000 feu'''it per I PIANOS AND ORGANS .AT,, A SACRIFICE. 4UWCJLTUIML'NTRF.5T5 which it is safe to'plant the',most delicious tree, or ,3tl? : dozen, at 2;''' .0't8 ) 1 [ of all fruits-the In k> V \ ' tropical dozen, $ ,THJ.2r: J'r. " : 'We purchased in Jannarj last, the immeuse stock of Pianos, Organs, Sheet ' variety there is a large number and The reader '' : : reme ber that Music and Musical Instruments of t.be'A.B. Campbell Co. We tare closing: out the mint l stock of Pianos aud Organs at unheard of km,prices to,make room fpr a full line of] yearly they are! coming more and more have placed 1 the average/yield, of fruit :! ' r.I the oeebr tHj C'onover, New England, Schubert and Kin bury 'ianns./ .We have F in 'favor' Many of these' fruits are Jtrt'U1eJ110\V and th price Jess tha 1 " theitaIJkrwin r Pionoa, which are worth' from $100 ti> $200 more than.we ask for them: hard/ enough to\ .bear :shipment to the the fruit has ever, sold.. A grove.of t a ccriover, ) K wal.. ,. .,..,.$350 Haloes Bros', 6 ;............ ....$...'00. ( AllES \ Style m* EDITED A. PINE: BY : Style "hu ?' ... .. . I" .. ,'. i I. K' .eb.... ...'..:......... *.., Schubert, '.. 16 \.......... .. .... -.a, ,most distant nort.her.'l: markets. these trees. 'needs ,little or. no care t< l'1 : J *%..4i, ..." ...-,.... 290 ,Milcolral Love wa .\;......-:-. ... ....'''",OA. 1'u.+uuawG r a (_Jllt'wnut Crote., \. In.this article we shah speak of the rflit in , ". : ,"' J wal.u,..............: Sou Steibwrsjr, e ..................12.11) \ ...,.. paying quantities I .J.k ,: 1 M eb.l............ 400 Everett,] e ..... ...... .... It:; mango, as we are confident that this-is Each, year,there.is, a large number o .. \ k if K .11'.1.,...'.. :........... 3 r Kingsbuhr. ,I Style B .!. ... ...... ........'2i, \ Short, 'Ha4ti.d art McCammon 24 ;. ._ ano I A. .,..:...... .. ""IOllI'ih'd l IV ihtfAprrii'iiUural) Lr and should among the co'nfiUK',fruits of this;Sec- treescoming into bearing, but the de .. I : 2t mah..y.. .... .... .... 9N I() .KoabeG and, ...... ...,.... ...0 be;ulilr'O.o'(1 I to ,hiii) a, C'ouunut Grove.hutting As the for mand ' 'q on. compared far in of keeps advance the .. : I ......... .. .. : orange : suj . II' t wal..... ,275 Sturesftu ........ .. ...175. ) ,'. .. '' -t: I' 7 eb.... .f.: .... 2T-0: L wbr ........ ..:.. ...... eat)6alueBroa' \ hat \ general culinary purposes it is far superior. ply\\ The mango'can produced her gas ) 6 .......,.. till K(> Newby vans, /eb ...........:.... 125 mj and making my nest e'The 4 ". .Ii! 3 u ...,.... .-.c........ m Jas M. Starr, ...... .......... 110 turn the readerslof' the METROPOLIS mango before: maturing cheaply as the 'apple in northern \ i ". ... .. ........ to , 8 mab.u- 190(! Morris, \ / takes the place of the .apple in the New'Yorlu The area upon which this ,Borne of these Pianos have been.rented, bat we'have hall them repohshed and t anautne the posinon of editor of the kitchen.' Pies .and sauce made from ,fruit can be successfully produced is t ... in order and we guarantee them to be i refunded.We agricultural column of t lie METROPOLIS put thorough atisfactory or oney them areNmost, delicious'-far richer \exceedingly' small, hence there is furnish stool scarf instruction book, and deliver f. o. b. Jacksonville. Cash Kith, I trust, bt'rOl ing-modesty a fda no '' half than apple-and equal in flavor to the danger of an oversupply. There will t. or Insta1Jment Sheet Music at prioo. WrilelU8.\ dief the responsibility attachedt best varieti s-\wbje) for eating'purposes be a demand for all that can be pro '! e & BradleMusi Co. the posjtion. pending, as I will, duced.' To, the settler we say.,"plant, Fryer out of hand, the : apple or orangeis care forth them fiir aid and assistance upon all those Jn- mangoes mt bring \ 'ors1th no compari3on.\The fruit is solid into . 24 ;Eo tit.. tereted in agricaltural matters.in our : bearing quickly as possible. ( ' : B. F. 'AKIERt.lf.tlanager! 1.Jackson\ le Fla. and of a most flavor. For -5-- 5 f. . fCheap' k \, grand Bay country I .ask now forajooperatioh soar canning Bates to via the purposes, as we have Washington e t.. harty ( to: make thesecolumns tested fruits, there is nothing that will Plant System. 1. 1 DEALEltS 4N instructive! useful and read- compare with it. \ \' Only.$30.20,for the round trip from 4 ( Woods able.' Shoat, pithy articles will ben Untilrecentlj there has, been little Jacksonville ,to Washington D. C. i I'; s T kome., especi'allyfom the older resjd Ti kets sold daily until Sept.'30, limited 1 k attention ,paid the propagation of tot o. Oct. 31 to return: Remember IoA.A. l' of land-facts' nts our goodly more : > .. WhisFrom choice"varieties., The comm. or ur- th route is via.theFlant' System'and i! x theories ey than, and' ; more than' pentine variety finds a ready' sale at th Atlantic Coast Line from Jackson I ; & C wishes-ar4. what we 111 I' SO to 40 cents.per dozen;: while the\ ville. Trains leave 8 20 a. m..and 7 p. \ . O. m., with through Pullman:"sleepers: + :.. '. $12.50 to $7, per 'Ga Strawbe I more improved varieties, such as X o. nd \day coaches without change.: 1 Many ha\e!' poken t } us in',regard 11, have, sold this season aa high as 85 Quick time, prompt and reliable service - \ I PURE :RYE .ANa SE.N"Fine : \ berries-- cents per dozen. The tree in this sec- ) is: assured, patrons; of'this ,quick g 1 planting straw ,the proper \ tion is perfectly hardy and to through car route. A' cheap roundtrip time, \'arietjhereYo gptplants and grows rate of f 10 is on sale daily frtfm Ie' the priet..... We hae the assurance from perfection.upon the most rocky soils. Washington,toSe'wYork.1imited to 10 4' '" ; Wines Liquors Beeh. and Cigars one'; or the oldest andlmoat successfulstranberrj At Cocoanut Grove 'we saw a' tree from days\ which makes a,through,rate from '1"<- which 900 mangoes were Jlarket" this, Jacksonville to New York and returnonly' growers: ,in South Florida all rail. For $40.20 detail .i information , \ that out from the\ middle year that grew upon a rocky cliff upon) ' \plants put of ; Pullman. reservation,etc., address -ti .. '. September too' the middle. of October which there .was, not soil enough" to R.,L. Todd, .division.-passenger ,r i PURE!( ,GUAVAWINE Only, wine of this kind, putUnited will \\) be as far advance'' at, :Christmas cover the long, bracing; roots_ that agents< C.II. Howard city passenger: ,in the Stdtes.Bottled .. spread like a network over the surface.( agent,', O..,W. Parkhill,'city ticket _ Ul' time\!,as those planted earlier. Asloit A. W. agent, or Fritotepot' This, tree receives no attention what ticket't.t. . ! variety, no one'wjll.wis to plant the agent,Jacksonville\ a I ever more'tha a tree standing ,in the : . well : ; Goods and Jug Trade a' Specialty old,"; established unan.. There, depths of a forest. The mango tree is '. ,.J t. s. ': \, may be others/as good o|r better, but asa , fttandby.for a rapid grower and beard. fruit' lt nearly 'we' genera purposes * : It is also a most i PITiES RUiDLvc: ,Suppository : I age. prolific neve have seen it ex'eJ)led. For homeuse , la to cure Piles , Pool WIIOLESALEAGENTSFORL..I I .bearer. We have heard of trees1.bear ,- and guaranteed Constipation,, :A l and let i it get fully! ripe before picking. or moneyrefunded.SO : ing in. a single season,2,800,, mangoes.In : cents per box.' Send ,for r 'hie lye made arrang meats toy get list of testimonials and Free Sample { Beers of all inds the value' ,;the, fruit MARTIN , r estimating of RUDY Registered Pharmacist \ of several 1 arieti As soon Bill) ards pltY as Lancaster Pa. For sale by leading drtieKists - weascerlamJhat" the tof expressage on one acre,we make it most,conservative : ,and In Miami,Fla.by W.B.BONfcY .". : as an overestimate would do more \ will, be we,will quote prices deli oj ALL KINDS OF CASE 'GOODS.: a ullr-ly.1r 1b ------ - ered. " I F . ' " '' B@"Boat teM-fll.if Trade 'Catered to.i.M. |lAM I FlLA\ ,//. What question.is fertilizer 1 On shall our high I ''use pine is a lands common UO Yon Know( a Good Thing 1 OF COUBSE YOU'DOL. ''t: " r ,- (there nothing better: than Hapes' , ; A Fertilizer for, Fruit: / ,Vegetable.v' Others may be equally as I Then you HAYEN'T'SEEN. ',FLORIDA,,or'you. would BE HEBE, : ', \i' 0 ,. I II " L and[Be sure and hate plenty\ of.pot I Are yon OBOWINO: OLD? Of'course; so ABB WE,. ,., ;}li. < .. - ash acid phosphate i if L you want a, But not BO-fast, because our MILD CLIMATE .!! ;: r-"t.! '.. tj The Ideal Pineapple Fertilize olid, meaty tomato. Our: glades and I With,its wiRK.,8UN8HDTt, DAYS' and LONG' ooot NIGHTS,. .. ::5- .: -'-' -\\ j[ Makes LTFB WHAT tr OUGHT TO BE. -'" ;.,.:71" ,. . : prairiesj t lpon readily, tohorse i bought : i ,r Price $25 :OO Per Ton. manure' from; Key West. Ii' Do YOU MVE'TIOWEBS: 'frnits,and' vegetables CEBTAISLT : So do we.;,:: y': l' > Well rotted can \\be boughtfor.40! cents \' Brrr A HOME on the EAST,COAST, J, *. -U . J'f; . ANALYSIS i" / 1 barrel delivered on'the.Bay. shore WHERE you can RAISE: roUB.owx' J T: ' ( .' ?.;. ,.; Y't.., ;; GUARANTEED : per I . [ With the LEAST LABOR and EXPEKSET- j if\ |i: : ;; : 1 1 :.* ". Moisture : '- / 8 to 10 ber, cent" Add potash and dissolved boneblackand, ' :. ; :; i i l : ::Ineomonia,, f f 4K to 6 [ M .. you have an ideal fertilizer 'for 'your Do you DISLIKE vJINTEB? So do WE-,', ,, .1! ,"*" ..' <'J1 1 ;:.. .' Phosphoric Acid/ 5 to 6 M low lams. We 'should: like the Then' COMa TO FLORIDA; we're ,HEBE: TO STAY. ;. .: - 1 ..* "M experiences have SURF.BATHISO SWIMMING and BOUND. . 1 Potash (actual/ .6toS' r, We {, sAnoso ALL THE YEAH IM I of our truckers on this matter: .1 .. . Made Exclusively, of'Bright'Cotton Seed Meal, Nitrate of Soda; Blood, BonflDWoit'edpw3phateFine Heed time has': Numbers have 'ABE YOU interested IN us ? .:.--', ;x \' \ Ground Tobacco Stems } I IF s>, WE are interested IN Y U" 1 : . 1 "( " ' i ; 1 1Hf already beds, and itiquiries - Potash ' I of planted peed | A LINE to our ADDRESS Address DRAWER "M" . Write for direction.'for mina and" farther particulars.. .led.>>\, ask for a copy of,Econqmic' Fer for'seeds\ ,are' getting nu"lerous. i i Will DO' WONDEBS. . SAINT APOOSTINE, FIOBIDA. \ ; ; ,i" J I, 1 : aUltt3-tr ' tlllzer for fruit ts' In! another month the truckers will be 'r \ . Carry t Large( Stock'of:Fertilizer.Material, CS. Heal,,Tobacco dust, Potash, Eta.f as] busy t'as a hive of bees, ''preparingground 1 , ; 'Write for.prices,beforejmying, l We seek hefgravers, trade direct. ; planting' seed' 'beds, a making THE LEMON: CITY HOTEL < '' ready for:the fan and winter campaign. { . cb.The :Wilson & Boomer Fertilizer May success attend their,efforts.. S : : "MRS. i ; JOHN T., CAREY, Manager. . rom the first \lot September until! I ' 1 1MStfiL Fertilizer House' of -I; orlda.i'. middle of December eggplant'andtomato A very pleasant location Dear the Depot.' Large well rentUated' rooms l ' they . \ f < :Taolaasoaville.Flora= .a. seeds are p anted., The higher \ Grand View of the, Bay. .. t CHASE &:HARRIET,'Amenta, ;Miami;,C/M. STOWI; Agent?\Cocoannt <;1rov .. [ ',gVounils'sire 'put'jjn first,. 'while,'the Good'Tab'Ie. and all,the: Comforts of Home . larilIs orl , lower and {glades i \ prairies y fAT : , dome, in later,.afte [the September, and .. VERY: MODERATE 'RRICES.A .,, < !I I ._ . Southern October gale*.are passed.} I : planted;! now in seed_.beds had quiet delightful\(place for families.: Write for'.Vnos,.etc., to', ;, l , 9J Railwajr beat c' ha'sl tte covering! Laths \. MRS.};JOHN T. CAREY, *. : ' / four|\ feet 'long. and nailed o'strips ang27-tfgBS LEMON:_CITYj FLA, ' .. three feet Ibng make good coveringsFor . '"' "0' ,' l. ABSOlUIELY$ THE -SHORTEST ROUTE. / f'I .. energeticl .wide-. ' 1X I / : \ a go-ahead, ; OJ ;' awake, successful trucker,,com end us' FOR SALE.: +If f jmEOUQH: PULUHAH, DRAWING: .:BOOM. 'CABSJDININQ OABS, to oaf\ ygung friend, Jackson Peacock* . lL. 'THOROUGHFARE,COACHES. VESTIBULE. !),TRAINS., : Who i is: go llgto|; stake. their 1 Iqw land; t J ., I < . *i j' tomatoes" T t.etus-.1.i; ....hear" i .from" I i ir 10. The ! Pnt aud : 1 NQI.rH'tE: .5T- AND WE5T.BETWEEN .. '\:.. KTTCPEN GARDEN+!i . Ellato-DeMoerat .; ,t' ,? 1 l' .. j I I Plant some 'early Crosby fan blood , 'f ,' .' .0. DAILY TRAINS FLORIDA_ AND THE EAST.: turnip, beets!k. Young bee.tOP* make Including the;, r' . . ,:t .i I' I. "1' splendid green, f ,I |" .. J \Washington. "and'Southwestern, Limited, ft ; : < '. Plant<< a: shod row or. two.of. ra iShes. Job; 'Printing' Establishment., .. i : ..... ' / iL !And the United State Fast\ MaiU' \ following; it %I :two week* with t ; f : s. ,, up every ; The Democrat was founded in 1880 and The Equator-El Ecuador (an English , 1 ( HOUEfiAOZSOHVILLETOWASHINQTOH; new, planting!f Spanish newspaper), in 1886 by the undersigned, and both have been under.his [ / \! '. Just ,as"soonn 'as the fall rains.set'.in. ownership and editorial management* with few exceptions, since.- \ : : r jv| : OHLT 27 HOURS, JACKSONVILLE TO,STEW'',YOSK commence planting I your kitchen,I gar- j The Daily is a 7-columq folio'printed every day,.except'Snndayu; The - .1' : ..... consists of Potter cols. "' t plant one Cylinder s (9 ) 6-horse-power; boiler ' {I r.I. :' y -iJ\\' .I I !den. | (r I\ (new) ; 6-horse-power"engine: 'a double line of shafting belts, pulleys, 'etc; " I_V. tIbnJed Traits*composed of Latest ImproTedPoUnuux SleeplngCari and Hotel Din- \ Okra will do well,'but_ do; not,(tint 'ne. 10x15 power Job Press;! two 8x12 foot presses; four',Imposing Stones; I tag.Can through'without change to Washington,Baltimore, i f ,. \ '; .-!. '' ne Paper Cutter; a full linejof Body,.Display and Job Type, with. all other' - ;f ] fPhUad: \ .Iphi*,-New York and ,, i the fertilizer- 'on it. : f ceded.equipments! of, a"Country Newspaper Job Office. ' , M' I the.&as'l'l I Yet:A, 1 .', October.. 1st will I'be soon ,enoug I' tor.' .: .r The whole, induping the goodwill THROUGH PULLMAN DRAWING-ROOM i SLEEPING CARS BE Irish,potatoes ,I )' . : j. and,balance payable $50 per mpnth.i J' '.. ;, ), 4 TW EN JACKSONVILLE:AND NAS_ 1VILL.E. 'sow a 1 few"I e 11 rlyeggplantsand''t ma= I rash Key.'-West is the largest city in' the State. (is, the chief.center of the' 1: f) i: : foes. \ -', I \ ' : manufacturing industry Florida. The Government, has two companies "" = J of stationed here which will be doubled in of this , .artillery, November year. \ Sleeping Cars Dally Jacksonville to J .Jeans ate ; . Irough plant !. - : .. Snap good; some " ' \ ', 'The Yeneable Construction Company, of'.which the..Hon. ,Iloke Smith is !J ;1 Cincinnati,via: AshevHIe' ,. Through.. .the Put'in' a fe Sariy turnips i ; '" ;: one of,the largest shareholders,1 under way improvements in Key West for a. +I. 'IL't "'LAND\d Sp THE_SKY."''4. l* ; \ the.:United States Government that, wil\.cost.over. a half million of.dollars. r . .. A Plet for the Mango. : .Mr.' Flagler: has leased''andJ.1nl ni.n& the largest hotel in Key West., : ratio .chedale fntiou: .ta besides running a line of steamers from'Miami.to this - as is ; ileeptng car 'apylF is city. / . ,stay -t at th. DXBkut$. +W4YorU8CODDect1oDa< ;, ' ' -- :, The :foi-lowpng, excellent ,articlejonthis Reason for senmg-other business.t above_ is th'GIST of the whole The ;i.wtt \ dejh'ciouj} fruit is f.r'olJttb peri of matter. I do not.want'anybody:to'run:the paper. I do not...want to lease it, ".', .1. IA. SHIPMAB,P1 orida Paa&,Agt. :Bay.Street. ,; n. eFiL: >, Rev..,E. A"..Bla'cknian' in :the.. .: TingesUnion ,- tnt to sell. So" unless' J.M.OULP.1 1 .. :W'A..TURK, r I 8. H. HARDWIOZ,.'I !, : .-l :I., j|, ; advertisement.. .Address '' LCAB \ ; :. \ c.:\' ., I. -. Gen.PaaIArl.. ,.' t "1.st.'Gcm.Pa" : ', L Art.W ..'> In going versa, large_ section. .ol the, f : : PENDLETON ,' 7'.l ; Waab1DpDi. .u. f .. -4tJaAta.Ga. ' : . .. 't-\ ); ''' "" : Biscayne Bay ,jcouhtry,..your: ,correapondent -: . -+ ,. .-- r '' 1 -f' ; \ ' ... ;-'. .. ... t I >. 'I'I'' it''J, :.was" surprised 'at" the small 2llaua4t, .., ..rf'j: \ 'j i Key ;West" Fla., . 'f- : 1 .V, ' r-- -- 1 i ... ,. : ,J. { L *- t \ 1 :1 . Il. " ,, ,' \\1' il ._ 'r -'- ::r ,. : ..1 ., 4 JI 'r .. .,< : ! ; 1t 1- ; f" f'1: \1 t \, I L h\ ' 71r. : t i\t\ \. 'I'. ., <<; .,: \ 'r" ." f' \ ... '. , : ; .: : ,' ; :,. r. A:" ::., ;, ,. J'TaM'': '. .' ... .. . ,; : t j ; tJ :. s: , i?. -,. >: i ::i.'i a4: ..... ."' !." .fI'1 J : I.1 f :; "' 'f'''' 1: ; "'- , ;, ;Jt :i ;"f;:# f r t ; l' ; :": ,' : .. , IiT t; .. I I: Jt '"" " .' .. " -- ; \THEMIAMI] IET PbLIS. SEPT. (3. 1897. -.. I \ '1. , v y I '. ), -4! MANUFACTURE; OP,SALT. in position and riven down it will take ' The Miami 1otopolis How it do about( eighteen days to complete'the' ' ; would attempt u!' man- : ufacture of salt as' an industry.) in' this *front. Four Hundred piles will be B BianO' Entered' in the post m'e at iiiaml Florida vicinity % '. ,. S ', needed to complete the north end, y ls ayne: ;: + ,_,,', .,, allleCO, d-cl&llt mau r.\., ... I JF.% Le Baron in\Jan excel lent, article vt whichwillrequi eabouttendays'more.: ; THJE MOST SOUTHERN NEWSPAPER PUBLISHED in the Jacksonville! Journal 6f Comb In Abort, it 'is believed that all 'the ; 1 ON THE MAIN LJAND OF merce ,says] that one man with three .piling for 'both: ends and the front of '. \ ' , ', THE,UOTTM>BTAT is. groes'ad: a plant' consisting of two the( \ bulkhead, or I' all of the outride! MIAMI, ,FLORIDA. . .. .- Pnbllibed_ by tee Rut Coast Pn liabing Com horses, one- wagon ''and four I 7a-gallon w ilLbe finished by1 October 1st.. ' ;-. INCOBFOKATZD UNDER: ,THE LAWS OF FLORIDA.,, ':\ pauy, a CorpoFatto kettles boiled down 80bushels of salt ip Many hundred of round pine piles ,' \ .' Editor. four'i days, which sold for $80, ora; will tiles' be driven, all over the inside 'I 1 \ Conducts General : dollar bushel. of the;, inchwire,\whirh.wiU be 400 feet W III. M. BROWN a Banking. \ ;r Subscription Rates. }(r. LeBaron hj ms this was done by 706 It> -t..rrh pine piles,which are PRasmasr. Business. Issues Drafts' on "All I if I l Six One months year..frrirtr..H..I..i.$3...,M..L.j; ...L..... 1 to 00 on,the,west coast Florida.. ,lie i i" qf not reosotedar, .; tompport the netR.. R. McCORMICK; , 'P trts ofj the.-World._ Accounts t Foreign Single nbscrlption coplei..4i..v.J cents....elttrato A. 03 cover the opinion that the manufacture of, 'work' of' railwai tracks which are .Vica-PRrooeur. Solicited .an'd Eyery Favor Con | r \ ->postage.J4'V w' salt could :be made]profitable almost planned to cn4er tilt ,bulkhead, which CHARLES Hi, GART; 1SIDEsistent; With Conservative Bank \| x - Advertising Rate}. anywhere on the coast .of Florida.:. will Ul| be 1611' in with solid earth. 'l CASHIER. ing Extended- ::-'* t sINGLR ;OMC oNE MTHICRW'K. SIX ONs Wood for ,fuel, is abundant nd'co ts Later :on jhe piss which are to be \ I -' ; LOL'MN.i MO. 1 MW. MOS. YEAH.f \ drive all over interior the bulkhead ; \\1 , the. - l IneL$10O 1200 p400 600 1 19 tq nothing but the cutting and \hauling, l '. , 2 lushes, I SO 300. 6 00 I10 60 18 Otli and It could be used in large-sized: re/only intended to support the connESJOND TTS: :: I', f .. i 3 Inches. 200 < 00 00 ,{15 00 25 00 \ 1 t ' 4 inehes... s oo $w 1000 Id oo 30 lq logs. II. I railway/racks,warehouses and freight Seaboard Bank York. J ; 1 . Rational \ New 15 lncbe. 400 SCO 12 Oo 1 00 as oo tor time. the course , 6 ludies 40) 800 1400 00 42 00 The manufacture of salt j wj l,an im depots, a short In Nat'l Bank | ' Incites, 500 900 16 0 00'' 4800d of few Jacksonville; 'I-' Jacksonville. f f II i portant industry in the Bahamas, and a months the entire, bulkhead ,i. \ l- II1d L 5 so 10.006 18,00 .00 54 00 " Inches 00 11 W 2tt 00 53 00 60 00 as there is a tariff on\ the article' it i is will be filled in with solid earth. The FOREIGN CORRESPONDENT: l' e" \ 11 1 nches 700 1200 t200 $00 6G00t I I 11the+. 900 13 COa 21100 00 t 100 more than probable ,it would, par td construction of the tracks arid ware- Knauth, Nachod and Kuhne, New 'York.i'i'' I, 11 I ices, .. no is oo 00 horisea } 400 manufacture it'on Biscayne. Once cannot be deferred, however, 13 In ea.. .9 oo w oofiO 2N 011 4500 4 W Bays ' ;,' 14 tnc 9 17 UO ,D 4d 00 90 00 the i industry is established on a profit- until t his'ls. : done, put in the meantimeley + 15$ Inca ine s 10 10 U CO)' IS 19 DO 00II 82 8406 01 1 00 00 10200 96 00 able basis, there is 1 j 110 telling (!what will be constructed and supported. ,Elegant t Iron Vault and Burglar-Proof Safe With Triple C9nE ssi1"TIme Loots :: 3 471nctw s. 00 20 00 5600 00 IGI 00I proportions it might assume.. There' 5 i\ on piles.The:: ) S \ ' ,I There w1 be no deviation from t bee ratea.lReadhq { t.iy.h. i of the )Host imoroied Male. ' vertiaementsamong local news no limit to the demand for'salt, and if' dredge is alreadj' at work satisfactorily. I loeentaaliu We are pre r red to do all l kinds of Job Println can be transported by!schooner! ti> anj Up to this. time ithas only \ I ,"I la iitencCwithHI.Yel at as low 'of" the large cities'on the'Atlantic' t-oa'st J been operated ten hours a day. But \ : price**s moderate I .. A 1 '1'hecost of plant' I when Mr. ,Parrott was in the city daybefore L. BRADY: : profit.-CKWN..,_ _ very cheap. a ,, ir-ao I t ,'t \E.: & CO. . (.' yesterday Rave , j small almost ) try thtf experiment. : he orders to ems I t . The Mttropoli* U for Sale at the Following : , j Agencies:) There/wotihl': be 81119 tentdemand ploy another crewi of men, and the 1\ A.Anthony T.tarter Bros.,Coeoan.West lit Palm Groye Beach;Fla. |Fla.Mmuellielcber by"local: consumption / o'take dredge' id now being operated night Groceries, Grain, Hay and Garden Seed :and day in order that it accomplish : Mltral\r U. all that might be manufactured In testing may 4 C. M!Greer,'Miami,Fla. w/ek4 its!huge task January 1st n tt. _' ' ''I by ) 6erWeat\ rsCo.,Key 'eatFl i : the: matter for a\few on a , .,. w yr wAll small scale. j / \ I The dredge is at present at work on MIAMI AQEXT: FOR MATES' FERTILIZERS, - + corn untcatlona eased and insosi-\ : !'the li'friot canal Which is to be' . order rI'hinlJt over and if i con- ' all ehefj a,drafts,money an other remittsnres you/are 1 l made payable to ,\ 1 \ structed'from\'\ the clew terminal, downthe ' tion to do so make thejexperiment. ; We call the attention the : Bi8cBJue'our ' TUB EAST COAST PUBUSHINQ CO. of peopleof Bay atock of Staple , Miami. Fla. I"/r *\ : Bay and out of tape Florida channel and Fancy Groceries, Fruit and Food Products of al) kinds; also our stock!&r&ia.. 'J IMPRISONMENT FOR DEBT. (to deep' water. It 'is present deposjtingall Hay, Bran, Cotton Seen Meal, Ground Food and'"-Wheat. ' I: MIAMI,."FLORIDA, FRIDAY, "SEPT.As .\ t1891.. >J'Can, a man be 'imprisoned, fordetti'u'FJorida1l" \\ the earth on the east, side 'We are the only hone on Bay Biscayne dealing exclusively in the above line of ., i Was askW ]1. Herald i i L reporter of the canal l and will! continue to dose goods, We buy close and will sell close. We.invite correspondence and'solicit ' Of, iin your patronage. Very trnly.j E. L., BRADY CO. MjitMIAMI _ article itrus Fruits bn 'sicayneBaytheKlondikeofthe to-day. /soiirse we ig- all the; way down thefBay. It was generally , ' nantly replied in'the n gative and,, referred ' ,' supposed that the dredge would t 'r Soiiv ,> to Magna Charta ,and the 'judiciary - by C. E. Davis of Cocoanut; ove is : reforms I byAvhicI such a thing first operate at, the\new terminal( and I 1 f unavoidably crowded, ,out )until(next. Was rendered iqapossible nearly) one dredge out a basint,\ and that, all the \ '' Week. 1 hundred years aafo. But It would deem earth would be used in filling in the 5READ"thearticle"MoregotdD' ware' in er or, as ertain justice J :.I :: ' bulkhead first > . .. I' t courts in'this /city have].found iton''I \ But it is considered of I posits vehient, to revise the]organic stat, i importance to dredge :the canal, because - in South Dade," by K..L9Qi e|which utes of the/ republic 1 land under' i a. as an official said on Wednesday, ; 't ; l is 'good deal charge of cheating and swindling" here would be no use in_having a terminal : ."" of appears history as paKe well as These humor a''n'iF+ It manage terrified ,'I to npgroe Jail a few This friendless systeral|rand,of and I a basin if ,wet did not have ' ; is :fromj\the' pen of' a highly Valued, bul1dozit} \should not 'be,, tolerated, ,in someway: of permitting! ,vessels drawing Busini. and ftidone Lots ? though;'Irather.infrequentMZTR4POLisI this or else any man, who over tells l 1 feet of water to get to it.. \ r ,correspondent. owes Cj'lblunity. promises to' pay' it, S we have: :got to dig the canal: first.ftertbi'n ." I ,Xr can if he fails to ,do fgo. :' .. .. l ,'.. Key West Is still' in 'the land of civilization -, :1 is done, thus the dredge. will : : . and tb the fundamental be brought ,back to the terminal and a \ \ IN speaking of the tobaccocropin; amenable I A. Florida the; bulletin of the* law of the land, despite the'effort slip 500 feet widejwill: be dredged at each E.. KINGSLEY. : ' j Uplted . I 1 to, pat me.n\in jail for: debt. end and in front of bulkhead, and \ , l 1 ,States Department of Agriculture' : of These petty courts'iud half-baked 'advocates the earth will be used in lilting in the General ,Agent fore: .Mrs, Julia D./"Tuttle.. .. Florida Section,Climate and CrojSeri should not travel\ so fast |Ill) . bulkhead. the ' \ vice, sayiA;' '. great impet'us' has heel trampling upon the rights of citizens, But'," canal is needed I : .:.:. " or else the Herald may fe H coerced f 11\\- ,fiat, so as to permit the new Nassau " l given this industry by the flajtterj) l " very to making a thorough) expose df steamer to begin its! run.in January.It Prices From $00, to $1,000 Per 'Lot t, According to Location. log results; obtained from't e much'that has been overlooked in.the' time , i crop" :: sp.rii"n f past."-Key West 1I rald., !\ \i will and be enough to dredge the !RAILROAD FARE to Miami over the Florida East Coast Railway will be re ,, "I, . To all of which the f lWRo>>oii's' '!slips: 011 the bul head afterward, funded to each purchaser of a Jot, provided purchaser will produce receipt for such 1 t ,+ I 90 as to accommodate other ships when fare, which receipt.will,be received as cash in part payment for lot, " throles and It is absurd t ta . .Wtpublish? :: regula onsprescribed says :'Amen. \ : rhI.1ain when they begin to operate at the new terminal. - by the State, Florl1d,/ Iail- social equality with negroes, bul I : O: fi.ce : .5. ;\ ' i -. ;road Commission on .pages, 61 and':7 of it comes to the administration< of ' K 5 t'he operation of,the big dredge and ' ;\this_ issue., They tare very similar. to law, we believe, it should<< be driver is worth' and : HOTEL t \ pil a sight seeing MIAMI \ ',those prescribed by Cur"Cor er. 'Railroad tially' and rigidly enforced,1aA'ai thl every; afternoon lots,of!urpeople maybe : ...., !1" Commission and 'in force before rich and poor, black' and1whltr.gamb ( '101"1' ' seen wending their to the new ::t.I.ia ; its abolishment. -six' yea /lgo. 'The nK is:a, penal offense, it may ,mi5F1a.. terninal l to see the monsters at work \ I . railroads have been /a'reasonable not be enforced against foes alone] \Jlessrs. I Parrott and Goff - \ time( ,to object; or protest against,then 'and if,a'negro does not pay'I his debts) inspected ' i rules and and'to 'Itbe'same methods and others' Lh new terminal on Wednesday! ,and I r ,1- :proposed regulations no Chase/& H'arney wer pparently satisfied with the progress : show caus :why they ould be amended :whichare, used to compel whites to'do 1 , \,, 'before' they go,-into effect. j .,' ,.: so should be used against the 'negro. everything t>Bing"made i but gave orders: to Zn.suran.ce: 4 .; f fi It push fast'as along as possi-i i i .. . imply becai\se he is ignorant and .. i ' T' ,l\ THE: volume J of/laws L 'passed ..by:the* without" influential friends is noreisonirhy bJe. I I !1 . . I Fer-t11l.zers. ,( 3 last legislature I has just been* issued and be shouldmade, a tarn, Work w1! \sllOrtly be bommenced on I r I (-' r =REPRESENTING; THE L. '.- - .it '' : .' for the officers of 'law''in order grading the new,depot'grounds,"which ' ialabeUed Acts 'of 1897. ;These get the : : laws ,have]f. been-\n ,force; for',nearly that theyt,ma collect fees.' \ .j will be very extensive. They will embrace Peon Mutual I Life, Fidelity ':and "Casually Compaoyfand,; all _Leading" iie Companies j three: months,: .and.\yet their'publication J I" ... ,. I \ I a strip oll' ,running from the, i; \1 : : Special rah on dwelling property for,three and five years . I not compe 'week. Bay jdrive to, {Avenue,C a di fa.nce-9f i I I'A'1 . \ was (until last, + The New Terminal. \; 4 I ;RESIDED, AGENTS FOR ?,_ f , : The,Constitution.of'',the State provides .The pile-driver'' is doing'excellent,I 875 feet, and will be 180 ,feet wide, or i \ ,that all laws shall be published d id: btu :work,! at the new terminal driving\ the \120\; feet exclusive of the rightofwayAll : .I HALLS. SAFE,,, ;, AND,..-LOCKC'O, t j ,. : form and be,ready,within! 60 daysafter: filing at the great bulkheadl., It was, tie plans! for the depot and its ap I And brokers in Fertilizers and Fertilizer: Materials. -. -f Y, ., ] pointments, grounds 'platform, ..etc., :vva.: .. State '' ; the legislative adjourns. ))1ut they are anticipated( before it, rk that'it I I il ilI Notary: Public, a.t SJarg'., .1 seldom; ready i within, 90',:aa1rt1h would be able to drive about forty or 'have r.1ave |not yet beeii,fully decided upon I My-U I S 'MIAMI; FLORIDA- ' lence we are not i n position to give all i legislature adjourned tnJune! fifty pile*a day.. When it began work .... . : . wasupopAu' tbe details, but:will'do so\very shortly. ] . 5- I 6th. 60-day)limit resultVas; ' The the rather ' 'T' disappointing, asit'only 1 .gust 4th, but the laws were ,not "ready, ,averaged: about sixteen' piles \ In additionto ,dredging a;:channel or' II THE NEW BAKERY.. ' ', \ \j welve feet in I the Bay'from the new 5 \, \ until ; about ' September 1st. for -1-11 } day the first few,days. This was 5 II 1 .. I\> ; efminal to Cape Florida the ,dredge' ' ' t;t .. I . '\ ' due to the?fact that: the bottom is solidrock 12th Streets west of Passenger'Depot. ' Will . ; have to dredge through a few ; IF the stories,,of eaisting'conditions' atongtheBay shore. After about " in,the Klondikejregion; ;are truer, a''terrible k hundred piles were driven or about humps or ridges' outside the Cape, in Bye, '. ' ,, Bread / . i (act,it will Gage to do a little !( dredging; F"h' Vienna j"- - II i, ,tragedy will. be enacted.J inj l the the,time the dredge got about 150 feefawayvfrom ''as S , "' as far three 'I miles east of the Cape Home new gold next ,inter t shore Made . diggings ,:There the it was found:that ) \ sj> as to continuous channel ' are,about 6,000 people at Dawson City, th4 bottomwas: mud and.dand, and the provide a !\ : ', Graham, ' -IIi_' : 5' tf \feet deep from dee water . p justnorth ' i and only sufficient. supplies to support machine-Is now drivioS'.on ,an average U I Baked daily and Delivered" Free to any part 6f town. .z ,half that number., The ice king( will of forty oYfifty piles a day. I IIt Fowey Rock's ight_ to the Bolls , 'I Ga ;Bans, Cakes.Pies. Everything g first-class.!, Specialty of fresh confections bridge the Alaska rivers this month is at present driving' oiply, the pe.. \ : and nuts.:'I have one of the most modern and first-class ovens .Picnic'and excursion. ' : and cut off.all'communication with'tbe: .square,., t oibgo* and groove, creosoted parties, famished on short notice., I rADAM ' 5: 5 outside world. So matter what lion; piles., ,They arejone' foot.square' and \\ : Epworth Lea 'e. : ; MAYER, Proprietor ...'. 'roesthosepoozgoldeekeremayauffer,, I pointedj\:at,';the lefwe'r' end They are The regular,business meeting' of;the { "" Remember I deliver eretjthlng free of charge.. Remember. the..place.12th Street;Just:west ,4 nothing; ) can'\[;be done, to relieve them.; tongued and_ grooved An 1 .fit, into each, Epworth' League, which'b the* ;,firstWednesday of passenger+ 'deopt.: ,.rr:, ' 1 1-fr-Kf\, :4 11 the'eeort.whichlove'ormoney! can ('otheV, snugly;so Is. to form a solid\ wall.jAboutiwo in each month, was held at I put forth will be in, vain.,:All the I'fldI ,hundred and fifty piles are Mf. and,,airs.Nelson's.. The meetingwas ' the-Klondike will ? This well attended., '",. Mattress I not brng them now driven therefore Wovers a Maker ., 'qnVton' of provisions.. Whenall, ordinary'provisioila ;list,uce;of 250! feet at the soutRend, of Mr. 8., Bn'Merritt was a rcepted as a :G 0'onw IN'P'r \ "are.,consumed, 'then the bulkhead,running from, the hors memberr, We have now sot le, for.tf odd 'A Avenue ri, opposite Hotel' "Miami'i'; ' ,I the liorses andldop; will be eaten, diets out nto the BaJ'. The south end] istobe members., , -: I. All kinds of.Mattresses on band and \ '' made .4 'oldbootda; hofsehides; anything, ,',and 400 feet 101g.t..wfllbe,finished X Next; Sunday will_be the roll call of ', j. in remaking to order Mattresses.Particular care' taken' \ r .finally they may resort to that horrible few the League.After ", :L of ; days \The driver will then beginfo.dte \" Second-Hand. Goods, Bought-and: Sold. : < .extremity-cannibalism. Possibly.thereports piles along, the "r the the business' was attended too '2EJnlyif-His : ; "and :ettimates'of! 'what I!' in bulkhead.,.. D.tlor alfpresent\{ 'were delighted in a| social ,- { \, " <'., $tor s{ ,may: -be :exaggerated Every 1'1 The front is, to be too' r and ,gatbertngRecitations, sand I songs "" .' \'. -' -5---- -- --, -5- . _i heart']/with ,a 1 j'is I' pp.rk'; of, ; humanity" orhuman"kindness as the,pilfL.an'', : to be tongue,,and 'were'1'e's.follows, :'- '" : "' J , [ selection 1 r will pray tbat'mat. grooved and are each'.one foot Sotut **Wbfp"poorwlirl l" >s 'Blackman. 'P' at the office 1 square 1't : tern may'not' : prove, as bad'as .antici it will take 700 piles for the fron of the' I' Recitation l..N.a'... ...,.,.''a.-I{ .Ed.Nelson,R..L 3nelL11t r [f. n'Qlce n of the b1 T to> I ,: .\ '. 1atlon ruMaa's Want". )lr.(Ed. Nelson. :, i tedrr i : i \ I IIkbead\ 40 piles a day :placed . \ \ J"I\ ,I : \ ',. l'' are jBona-"Old; ;,Oa,..en. Bucket.'.;-..\>, an present.. f ; I i.- ) i -- , \ : .. - ... 1 ,, t.\: t. \ t' \ ,'I -, ., : .._, " ; \I ;:\ L ;' tc ,; i \ "I; 1' ''' ": ,*, I ;' ',. t rr, ..... , t :.1 '. 'A : " " or ,- t I! :; ... ., ,. ., .' .. ., , '"- . v" \ r' . .. " % "' ' " : .f. : .. -' ' : \ \ : ( 1-1"A t" j 1< '1 T' .. r ; \ .t '" ' rf II' - I ' I k I Ir IrI ,:' .. . " I . k , + \ ,. i " \ ,. THE. MUtfl "'METROPOLIS, SEPT. '3, 1897. r a : '\1\\ 5 -, ' .:: ... :f . . ; i' :. : I. I' \ .. .., ; . ' '' \ I. \ - . , '\ \+ \ : \ : \ ; \ t ;t' ; : \ \ :; r I"r; <: : ,.t \ ' . -., S'F'\ R1U'' :, \ ', !:, ..',I. t \\. !.I.. .\''\' .: .!....'..-t" .. ,' I-lt'''' ,,'':';. '\;' , A"II \ .IJT\ JAdhRSY I t..'." : I \ \ : I ., , "j.o '. .: ".'" t !h.' I I I I :! \ \ I l'\.. I" \I,. 1 / ,. .,. 't'-:'' ._ : : i : ,' \ \ . ; I : ;, ;, , : ': "' ' t' \ \ , ... \I" \ I I J j. ,' ' - . \ ' \ f I' . t, i I \\, l 'j \\, '1 : L', ," \ " \ i. \ '...1" \ i \ \ i ... , \ I ,,j II,\ .. '., .. \ ....*" 1\\' ' .... ., :\' ,," ,.\ : ,,\ t I I AT \ I \' \' - ',I \\ .. \, ,I .. \:' ft, 74\ '\ ,' BUDGE'SCOCOANUT i:::: :::: \ . , :,\\'\ . ';. :' \ :,.'\ H1\I \: \\\, I 1 \I \\j\' ,. ''I f \i':'. \ i, t I;" : I kI i I ' \ , . G>>.OVE. ITEMS: i arid intended to 'build on once}":MORE ABOUT GOL IN'SOUTHERN on,refreshments, Russian Pete, Daniel ERS'- OEU111 OJ , ----- ''I I \ Butt since securing the property, Just;! H\ : BADE, Clark and John Adams; judiciary and HOUS -KEh r : The club house of the House-keepers ,' north' of Captain Haden's he,has decided -,(! 1 \ arliamentary committee, William . 1 ... ' " Club is,being' palmed* ; \ not to build on his back land, but'', BelUble.rl) Data Gathered Special FriendEditol Wagner; Michael Oxar, and Andrew BT ,U. I.;[,MAC,GBEOOS." \ , , Rev. Jas. Bolton ,preacbed. in Union is having the lumber hauled to 'his bay j\ : Of the,-Metropolis.by Barr. An essay by' Ff. Infinger, ' i Chapel morning and evening last SunJ front and will build a good i hOuse ( Miami MelropolriAlluion I written in, a prophetic strain; was Florida Homes\ and Insects.To : day. : ' . ., \,: \\ thereon at once, : \>\ in your piper to a possible: found, saying that'missionary stations a close,observer it !isfevident that ' Mr. Joseph ,Frow has been laid up I Captain} Richard Carney nlnd Alfred gold; find in souther! Dade led the would be founded at North Miami Florida people would not be so troubled Peacock and others hate been', on a |writer to send immediately for a diy n- newspaper published at Miami, and a 'with its numerous insects if the houses \-" cruise to New River in scare i of,trt'as-I rptl. It \was obtai ed from I, Kala- Housekeepers' Club 'started' at Cocoanut were built' with an eye. to keeping Samuel Rhodes has a force of men ''lJ eIt\ is claimed a Spa ish lZob, Mich-. With a view of first Grove-at which, place hair-piill-- them out. _'_. \i '' aden with recked the tiiig powers near riot and possibly ink-spilling Our pleasant climate l with _ fixing: the road in front'of his prop- gold, was vs on le \ its ng such shoo 't r' arty .. ': each north: of Xew River m n)',many I Peacock Inn at Coconut Grove. Aone might occur. The object of the Alli-' mild winters makes 'a 'tight, warm r x' .. *' \year) ago. The treasure seekers claim | lady was passing' through, thealks'of ante was to keep up the price of starch house seem unnecessary Anyway, ; ' The schooner Harris Bros and ' '' a o hair a an old Spanish map showing the Inm The rapidly ap- and reduce the price liquor teach anyone noticing such things sees many L |loop |lof Key 'West stopped, at thejrove' he exact ,location:,of the wre k, and as I >rdached her.. When i he was questioned ' the members''\' how to ,sew, on buttons, houses built, carelessly, cracks in .the, ' ;,this.week.Mr. " \, hey have'taken the,divining rod along as to having any recious metal use ozone, cook Johnny 'cakes,\make ceiling and perhaps closets and pantry;, '" \( Frederick ,and family,',have been, .he prospects o'f success: seem to be very about her she(explained that her great-, tame,hogs wild and induce female W im- ,are, not. ceiled at all; not. betans! \jre since"Tuesday He is ,busy sur-, good' \ j\ grandmother had beq eat bed her a migration. money with ,which,to build: is lacking,! l ring, for,Mr. Kelley. 'I I Your ,article on ,"Gold Deposits s in pair\ of garter*,) ,the cl sp9 of which A model of,a machine designed by J. but because "tight}\! houses are 'not! several land sales arependlng,whichhope South \Dade" has created a good deal I i \ composed'\ brSpanish i to be permitted to report in'' o\ interest at, the Grove. j Several'As thH i test was Sufficient, the rod\wastakeifiu wood, pump Water, wash dishes and It is nice in some respects: ,to live in t| fur columns next week.' 'I h9mesteaders out near the Everglades\ charge; work a .cradle was found'in'' the barrel. an'easy-don't-care, style, but'it is, well r , ,; | iBall' Bros'have.. made 'number of have.brought in specimens of quartz '\The \'next experiment was made at A letter, in cipher (the ,key to which to remember: the insects when building : i improvements on their cottage onWch ore which appear to ,be rich in''gold., Its .S minoJe. The rod was placed'on the was found) from R. B. Haze (probably or there will not be the,same chance,ofan \ \ street this last.weeV. \also reported that come fine parti- ground\neir u principal l residence in meant for Hayes) to W{. H. Gleason, easy life afterward. \ JD'ercbin"ts lea of gold have been found by wash- 'that section{ Wien') it rapidly mo ed alluding to the) vote of' Dade county, }There are many beautiful homes in - 'be here must anticipate ng some of the.sand from th: bar at tor.at'dthe house, ascended to ,the certain lots at 'Jupiter! 'Inlet, ,and amait Florida' very 'many; and those built as \ V od \ trade if n'judge by the | ,; one c : )hS mouth of creek. If this Snapper chimney, came down it went to the contract from Biscayne to Per- Florida houses should be do not hive | t .y they are getting in stock.. be rue, it would seem that som e of the ; if ,parlor} where in ,:a were some ambuco at $150,000 per,annum. Haze occupants always complaining of i %s'Maud'Obencbain bas been quite 'cre' ices (of rock through which_ this 'specimens,of gold;ore.. antd was elected, and closing by' asking roaches;flies, etc. :' %or the past week. Dr. J. W. reek, finds" its underground: outlet 1.1 from he npxt attempt ade at Cut-, Hank Gleaon to wait Til-den.: If .there are not sufficient qt means to ' n has, been attending. her. 1 1J. the Everglades must be.rich, in gold. lerl Here it: ,was. 'starte i in an old A lot of unpaid bills, for supplies properly finish a,large house It would A party of prospectors are ,examining! i ha mock field. ',Jt commenced writing from a merchant named Concrete, ''be better to build a smaller one. - W. Jackson w leave n ere \ ,, l4y eyening for JUno to attend the the, landslin\ the vicinity of the \source ,in he rjrh alluviai, soh, using tbe pho- 'stores in' India, Australia'and' California Plastered walls allow- no':cracks for of Snapper, creek very carefully net' c wayof ll $20,000 ,showing that 'a foreign.trade exist oaches to occupy; but many object to x meg of tbe,,,County School Boar I, I i I I.... > I1" sp ng "Xflish ' : : j\ got ." onsu1t ng with iu old settle ed in starch or coontie. ' Mastering! because of our nearness, to v &tash and, Mr. Boggs are};domicilefcoard I 'I, LINTON LOGIC. \I II ,\ ,A formula for red' bites the : 0. curing , I the\ \facts'were, brought: out that bug oceanscausing'a salty?(damp atmosphere .. the schooner Drummer, \ I \I- Mr.I'' English had spent' about that a recipe for gopher stew, one for curing which the plastering abs3rbs. - Captaip still holds the lAndre. forts Wh1 ws i in charge of GeorgeThoms n. ilthoogb\ (the contents SSvel\ been mount there trying .to raise cottonThis ., loggerhead turtle, and a protest I Houses so finished should be \ j ,t; B 4g parties ,of ladies are* very hipped to r various points along the occurred bejfore the war. | against members wearing 'underwear, well aired ,mornings and, afternoons, pop at the Peaeock'lnQ nowadays, \ the way tol\ the Devi \\'s Den, the socks, neckties or coats., but not at noontime, as the hot air of. . oat.\; \ '. \ r 'Bvllveningdown to the Bay they' 1 next' objective point, the rod became Under' these documents 'Were found midday condenses quickly'' on cold ,e.'." ,I' Congressman' (Crump,: of Michigan, a ctive; as 4 wagon! approached in-which three horseshoes a small(bag of alligator walls, 'causing : more dampness, not \ : ordered 10,000 )[r- gs has'a force of 17, men 'at hat : / pineapple charge wer two)\ men. The thought came : musk, one patent leather slipper, a ess. A little fire in the chimney,even .r which.Peter Peterson, who,has collar button:, and of,: fine tooth in 'if the is.. \Vorkrlng\ ,hts place and,Mr. F.q. of Ibis land Will set'out. that they, Were loaded, with ''ore. They part a summer, day loudy, keeps :Bush 4 has, ,a large force at work on Vine': j' stopped.IThe' rod erin eda\, desire to comb. These three last articles '''came away dampness and germs. ' 'i his pia . t Alvi9 Sturgis of Miami, who is hereon ente the mouth of one of the men. It from the outer beach, &D'd\weri"pre.\ Papered waifs are a nuisance unless Mr. < Richardson a visit, spent several days tin Ting was prevented.' An explanation fol- served: as" relics until, correspondence there, is a closely-built wall or plaster1ngr ., and family have rge ', in tare Ever lades. lie reports game low and an assurance was given that should enlighten the -members as, to for a foundation. Many 'prefer a: , 'J-into town for the fall and ) \tIDt r. her have taken* of Mr plentiful: butjhard to', catch. ,\ he had recently bad' three teeth' filledwith their uses. ;, ;pies smooth ce ling- so neatly''joined ; ,, one + Frow's \ 'Already' seedbeds with their dainty kold. A 'rumor that a railroad would be that the smallest roach can l[find no ,.. t 8es. {I white coverings 'bu'ilJto' UieyWest caused the Alliance door to a hiding place. Ceilings ,of A. are springing up on The. Devil's Denw;, s reached at 11:30 ' F:.net, 1i 8q.,was up to your, aide {' sessions'fora time and! for various woods painted every. ,imitating a determination p. ,m. It"- is a weird place; an arm of tocea.se its our lovely; ,either I city, las [onday! : on important business ' to try h'old adage, "three, 'times \land the Everglades.1 \ Rocks in peculiar safekeeping and future! reference these, or oiled, are very beautiful.) .It is, - with; anfoe ,Dakeof Dade. drove up out.// 1\ ," Corm u f" m the ground: ; oaks, fes- articles were>buried. quite necessary that every closet and 1 ;, ;. _: his y ponies.to close ;up a land wits So far the search out-of-the-way corn.er'ho'uld be closely , deal and \ Mr.\ Hobbs,'who is engaged to teach toone air plants, :or hids and developed no minerals r ; nesday.Messrs..' \ some shopping last Wed ,the fell term: bf school here,. ,will, be moss,stretchout<< their gnarled branch- bat our, faith in,the* rci1is eStablish1 ceiled and- painted. Paints I fills or' , \warmly welcomed, for' report says he es, anu Cabbage palm ttoe8,from which and cannot,, be".8ha eD. 1- I cov'e smaJest'crack' keeping insects : ', }* .' peacock: R. Carney; pan preach,as vyell as teachthus combining grow ferns. and parasitical plants, raise COCOASUT GROVE,Fla.; Aug, 30,189: : at bay, for 'they wills not live ,_ rank, Ri,rde, and '''Harry'Peac9Ck' burinesS; with pleasure. \ heir eath red heads. A lightwood I. K. Loan IKE.Future ., about;\, fresh paint... It..sa. es;, much \ \ aye return:from, their outing.and r . i work:and to have all shelves and .: : :'Mr. J. Struthers, who ,has bee '' in fire ,was started and by its flickering c ; worry , : eport ha\g bad lots to eat and a tiafot theipast montl' light the we rdness was enh red. By of Miami. tables'about the kitchen nicely 'paint? \ oon time oerally. The trip,was,up watermelon[ to few s has buying ire-- the aid of a Jightwood% torch!\ .a search from the Key Rest Equator-Democrat. ed.' it does away with,scrubbing, as' " he" beach iove'\ 'Hillsboro''' 'and ,was, turned to 1.lnton with ship'o renewed cour- was made. In the heart Of, the den a The, Flagler terminal, at.' Miamipoints' all spots may be cleaned.off easily:; R - "adein thquac4Daimler, :' ., 4e'and'" moving] his house, .on his -of -of nog bones was:found, and pilesof '' to the, concentration' there 6fMr.'Flagler's Many housewives.: make theirs, own , Rev sh bottles'' '' i interests and enterpnserthat ivory'paste' for cleaning paints by,dissolving . | >l s.1ItoPIW1J1; :conduct, ensileorshlpi muck which ha! proposes to work for 41 gopher lls, some marked'Hostetter -, Tom is as ,a railroad terminal. Bat; in hot = "Old "KnSckerbocker ivory ,soap water to tbe - : - UaionChapel'Cocoa-. there_ ,is in it., \\ I\ ' 'nut Grove> i Sunday, September 12; a ,? un urbon?' etc., 'etc. The Biscayne will see a,wonderful"development ;, consistancy of,paste and keeping:covered r Wili Burton sailed ' in flmstyle ; pap away in the near coming rears '' Pro ., ' afad \ ;; in little jars. ' occupy .ti pulpit on each succeed vessel Bachelors surroundings appeared like those, of a '' L , in his new, the Two ably ,twelve feet can be ecured'as.deptlj a There are good paints ready' '_ InjgSdandltfiundaysof the 'month, deserted pirate's camp. The first thing, many ; I ,, Wednesday ,morning. \He will. ,of water for.. 'navigation in mixed ' al ernating 4b ibis appointment found to attract particular 'tention the and ;many',home-makers, use - )1 \ stop at Pompano, where ha will discharge ,Bay and that,can be made'' to;answer! these doing their work :The " am until frther notie*. : and. and interest \vas the end of *hat ap-; , oven 1\C a part of hisicargo\ then continue geared |o be \ all' toe:, handle' jit was the wants yet for many years to be money'..paved that way, :when: times are;;1 , S. L Frederic engaged this week bis Voyage south., The, boat, presents provided fof...JMr. Flagler is evidently 'is ." !; ''f nearly l'idderr by leaves and,branches hard, worth tbe trouble 'and \iwill $ \In j Purveying d, 80,acres",which A. A. a fine,, appearance 'and Will: looks' which had' falleu''. On pulling, it out it reaching out for theWest,; ,Indies, as hisgreat often be sufficient to buy:the,paint. ' : , fBotgs, Esq., nentiy.purchased ,from very much the captain.: terminal. , the United beyond Of .doors and ,windows ' ch .. proved to be \\a| coontie hoe i in a good ' i course screen r " I. F. SieboL s This of a contracts ' is tract States.i'Mail situated about t Jand t1 1*' ELLIOTT KEY NOTES: state of,,preservationowing, nd doubt, { and resort ho. are a necessity-always.It . ... ,' i treemiles south : " 'coaiat {\! of Co- to the quantity of' ozone which _exists, tels and, attractions for tourists will_ all ':does'i not :matter if our ,air" is - : Grove' Fredenct; >:and the ; g \ tell in developing travel., The guide '"strained'? for there is it and children Miss' Julia Lowe } of Key: West: ,_ar iD there ion of the den. On the han plenty of are w'itjMr t' Frederick. They' 'Betters' h clearly'cu books will be elegant-and the facilities one can afford to,strain out all insects,' ' last die these were A. F. + !iced lat the Key ., Saturday. ' are jdomiciled d board the commodi attached. ample. (//All hail the new; cfepa'rtarepu I being thereafter allowed to breathe oui rammer, vUcb l! is'anchored, out ) t. John g and son'Georg Q. (no county seal* aluable ) T She hoe section will benefit whether Key our pure and life-giving atmosphere in in.t e Bay. \ ICtbt. ':. 'are 'at home bow after a visit to the was,regarded as a' acquisition. \ peace,and comfort.rs % b ,West, beyond mail facilities is [benefited \ 1 rod full \ / !i' \;;' Island \ Tbe : was given: play. It danced - ' ... .J.J.,Had his made very goocprogress City. ,AlburyUnd\ 'I about gleefully! and ,finally ''stood, on or not.' If our: neighbors'prosper "Mr.H.!I.King took advantage of the s in' devopinghis. property' ? 'MrJ' ;B,. son, Horace I let us rejoice' for our. time may',come excursion rates and has! gone to Jack-. \ Near .it \ end. : {excavation: was I commenced sonville to visit Old friends. and! tiving it came up from Key Wast last week in with in ; ::- a bmelike : \ and surely peace , appearance ,goon \the\, hoe struck 'something Till paba .1 .. He ;Has buflt'a. 'gWrihouse\ and barn,! their loop Silver. '\\ I' .. 'I ' ; which forth metallic ' a cleared, almost I > wb ohas'had gavel We authorized '; n. :: QUICKEST], WAY TO A FOETFNE.. . tjl of his:land lying! ,Abner Sweeting, ,chargeof sound. Clearin ;away the debris two are to 'sIx-acre ' west tof the sectioi 'line and cut two the)\ schooner? : N,wlVenfce\ for the sheets of found. :The had lot off tbe ..Bay"ront at Ewanton Tour Thousand cret of Truck Famine Linda copper were j Heights (southern portion of Cocoanut large ditches and toriitrucr aa past,two months; is now at home. be'en :and Other Detirabi Property for Sale. evidently the bottom Grove immediately south of R. R. {'acrossl,the l : rrmot'ed from ), I have for 'aale about foar'tbonsand prairie {he' al. He. h4 'Captlin'-Thomas with' his McCormick's for I i Sweeting of a Jrge\ One I the place; $150 an acre. of truck land :many bther, .improiements! : in view and 'schooner Rosebud.' 'wenCout to the red ?following 'inscription' i**Ned ent Speak quick' if you want it. No other I I suitable acres for ,oranges farming,/.lemons,acdjanda and all ,will be". busy!; for a 3 earth-come in'completiq . last week and\'succeeded in capturing hisxmark: { I'llbe! d-dif'it, hal ," Bay front can be had in that neighborhood kinds of tropical fru situated on"Bay, s 3- tI : for less tban,$221) per,acre - hat heha r : ' already, ,planned. nine turtle. I 1 The other [had John, x I. Biscayne,'the garden spot of tbe worjiAlso ' 4 " -- Franklin C. . l Bids Wanted: city Iota Lemon City, and about , Busuviuul: William { ,1 ,4' / _ 'D.KelleyltwoyoungjgentUmen nark h :; -:mine, by bokey. V s, 17 acres of,flue Bay front land between . Board from Chicago .-'\, Dance Last Night,, >r.. I a barre on the head of'which was' Dade The/county of invite Public bids Instruction for painting of' Little River and'B-facaynePoet Office. \II ' hkv bought.a trich'of'land Just The, dance,at, be'1rot lMiami. :was,*. "0 d Cl w." Removing the the Miami'! public'school two'::,coats.. Can ',be found domiciled at _my, orange , ' fas' k nortbj, Captain .Haien's 'property. success \jn every way.. jlrwas not *o which was in' .a good sta e'oi Bidders will, please specify kind ofpiqt grove three mile northwest' Lemon" ' d They will shave it'surveyed, just as soon remarkable' fort j t nD be.rr' but ;i all the rvatto: ,;several' documents' 'were to be used. Color will probably f City, ,Please, TJ write D.WEIGHT for prices., Agent, i215tf.6p .:. . :as J.' Si Frederick' jca do the Jot?' and best: there: !. The ladies toimd" one of 'whiih tojd of\the Starch-\ be ;white with green: blinds, and the Lemon City.Dade Co.. Flal.police. t of _ 'divide1) the,\, ,tract; ,betw'een'them.,! ., The looked entrancingly i beautiful,' the music aker''\Alliance.and gave its co.n itut trimmings be m,the appropriate hands Z. T.Merrittof color"Bidsmust : . _;} u, ,., :'land they \shave; purchased has a' bay was good, the dancers' bad\.sufficien t ion and -law4-T': W.1.Fa': ;. ner, Buena. Vista opt later than September6th .; -.:: ' front ana. back totheloountytoad.Mr. rOOmi; resideD; ; and ,will ,be acted the The METBOPOLIS has '' > ,s to whirl around and everything, .. "tong John, secretary! W.IT. upon, by ; no cKibbing- ;>;.. , Bus, as- stated,'in "these Items 'last was n as it should be.. Wehavenotapace i. ., Benoitr, treasurer; J. T. Peacock, Board at its tnonthly meeting at West rates, whatever, with any other paper. : ; . week, otfns' ;and has'cleaned\ ten 'to morn \ 'andl '' Palm Beach on TuesdaySeptember7th [ at present. The' arrangements for.. ., ,: !J< ; acres saj any. more this .ngtbutwha c\vilengjne ;designer'; A. next.' i t. .Z. MKKBITT;' merit advertised are no. lodger in ' , of land.cjut near A.LEn, iley'a place !ore is necessary? ,, "'Addisonadjutant, general;\ tee & .' i, Superintendent .force! ang20-tl ' ; t' , t " :. : : x i 1 [oj: ' r, .. ;' 1> fI' : : ... t : . t 'j' t .1. l! + :: : > , l :- 4 :! 't' .j '\. '. . ;' .". '}. ; b' .- .J . :; .l tli! @ ::. '\ .>r ' I. r' i ; .- : \ i :: : : \ : '- .--'?''''?'' '' ... rt" i Y's" Lt : ,. : I.r \ ' S \. ; :,. : ;":In '. tI 1. \ : /; I .. .i' :t"/ : , \ I I! i '. THE: /I MET OPOLIS SEPT.' t'897. t. t. I : \\6 i iJ ; : \ MfAM ; : r. : 'Wh, Jackonrille'\ \ said schedule\ j of' rates, or: classification' 'i FREE*OR REDUCED: BATES '. in ; n S RAILROAD IISSION! : ja Buen ,\ -; \ \ CO I is_made, either by the Commissioner Railroad,companies' shall not be prevented - : : , - ..... '\ .. ,any railroad\"company, ''a copy of'said from the* carriage, storage'or ! STOPA1THE' change shall beimmediatety furnishedthe . \ the hauling, of property free or at reduced .1 I I Commissioners It ,Meets in Tallahassee and !Pre- office of; tit' \ and rates for charitable purposes,or tor'"- / shall be'posted ,in ihe same manner as to or. from fairs and expositions for Hotel scribes ' ' t' VistaCottage RiverVimy 1 \ Rules and Regulations.PRACTICALL above. \ exhibition.'thereat.: \ TRAFFIC %RRAN EHENTjj. . \ \ . Copies of, all rate sheet tariffs, and. SWITCHING C IAROES. CHANGE IN :RATES Riverside Avenue near ai/ I f. .\ circular orders issued, .all contracts A charge no more- than$2 per car i 4 and agreements between. railroad will.,be allowed for switching or transferring - Two miles north of Miami, \ Street!. I' \ close to the Railroad Del l : I The Existing Schedules,of Freight Rates Are companies as to the rates of a 'car from any point on any ,;' I, pot, 5 minutes frc m the, One of tbe\ 'Nearest Hotels\ in the, City/to/ I Adopted W ont Mnge With Only \1 k freight and passenger tariffs, amk all road'I ',or warehousei'within': a space of t ; k. bar. the Union Depot. L / I I T.rlo Exceptions. I arrangements and agreements] whatever t three,miles from starting point,without , 4 New Building,; large.,"airy \ I \ I as to the divisions.of;, earnings of regard to weight.or contents. .\\t ,t ; ,Bedrooms. q American 82 to $2.50 pel day I-' % '' kind \Yuen.in th. transfer of car between a Rates. any by competing or; Connecting : Hunting, Fishing, Boat'I'I j European, Rooms 50c,"756, 91 ; ' :lag'-' : I ., \ J liE Railroad Cqm. lines of railroads doing business in this !I saidpointa it is necessary;to pass over i French.' :"Caisine.Chas. I R., Bixle .& SonPROPRIETORS.' r mission i held !Ian, State, shall be submitted :to the Com%! e 'of\\ any intermediate, road or t '' \ ., Courly Prop.SHtfUs i important |meet. mission for inspection, revision and roads e maximum charge._of $2 shall i ; \, L \ \ ,. 1-3rtf itrui Li ingin 'Psllahas I approval., I I I be equitably divided between the roads , I / SS' ; \ I\ , 'j I' see last week\' toprescribe BAGGAGE at interest. When a" charge is made I ' \ rates: Each passenger shall' be entitled tc for the trarfsfer of loaded cars between ' I and formulate baggage 'not exceeding 150 pounds in 1 said points' no additional charge shall t \ .. FM1AMI4 I : rules and; reguia Weight be made for the 'return- of the' empty I" 1 I I\\ I ; ' t"i i o n s. Prominent LESS THAN''MAXIMUM RATES. cars' I t t. ,. :. I \i : officials andrepresentatives Railroads will not prohibited from DELIVERY to CONSII INa':RdaD/.. I. W7-" -w- of ,charging less than .the fates prescribed \ Railroads shall withou delay) switch i' \' . BUSINESS an&' REsmhcE /; all,i 'the railroad \\n the State were pres'i :, for the transportation of passengers,, I off and dellrer to any connecting.road, ,. eiit.With .. provided such charge is not an,,unjust of the same gauge all cars consigned'to "I. regard tb passenger rates the discrimination in favor of oragainst points on or beyond such'connecting' t , I it '\ ==='1LQTSt7N9v C mmission has(determined to adopt' persons or localities. roads. They shall, at.the'terminus or : \ ( w thout any,change' whatever, the tar- ,MINIMUM I''RIt'fen / Intermediate point, witboutf-obsm_ ,I ,\ j ', it s. now in force on the various lines. cents as: minimum fare,may be tion or delay,receive from: the connecting ,- For Sale ; 1 Iii the matter" elf freight rates the collected where,the,,regular, fare would roads of the same gauge when.offered , . { Commission, has also adopted without be less than that:sum. ; all cars .consigned to'any point' : change. the..existing, schedules, , with REDUCED:RATES, EXCURSIONS' ETC. on the'road to t I which the same IS offered , r Per Lot only: two exceptions, tb 'rates pn railroad' company shall not bd pre- or,, on any road connecting-with' '9 \1...': Prices i From $iooto: $11000 oranges and the \j rates' :bn'vegetables: vented' from the free carriage of'destitute said road to' which it is destined, and . . In these items certain reductions' are or harmless' pereon9 transportedby :: to transport,said cars to the destiDa- \ ; ; \ Accordll to Location proposed., how grdat the board- has not charitable societies, and the necessary lion with reasonable ,diligence. No \ \I '. yei indicated. ) agents employed in such transportation railroad' shall.discriminated Its rates J Jf I : jf" i 1} I' i iJ The following rules and regulations ; or from the issuance of mileage, or tariffs of, freights to' favor of.any \\ ::-* t&j 3 I , '" 'I i / \ were announced, \but will not go into, excursion,. or round-trip passenger line or 'route connected with it u!/ , e 1 1 Railroad;fare.to Miami over the Florida East Coast! Railway'will be refunded toJ effect'at once. The railroads have been tickets, or f.rom. giving free'carriage to against any other line or route* nor I,: " : I : 4. each purchaser of a: lot, provided purchaser will prodnekreceipt" 'for each fare which given until the 30th of this month to their own,officers and employees; or to when .a part of I its.own,line fs: sough/ \' receipt will be received as cash in ,part, pameutfor loi , 1 1i II examine and consider the rules and the officers ' ) I i prevent principal p f any tobe; run in connection with any otbe . J : ,, i ;. I Call on JOHN B.;I R5ILJLY, Agent, rag r!!, ions. railroad companY, or companies i from route shall such -railroad 'discrlminati :i' S Op the date named. the Commissioners ; exchanging passes or tickets with oth- favor, ': Miami such connectingJineJn, ' against \ .. Fort IalaJl) ',Landj' Company .., " .if. ? will meet to hear any protests, objections er railroad companies for their officers: of,tbe.balance of its own"line; but said ,. !\ Oftj.E. I GRAaA1.flc; Ores t, I Iii6tf.fl ''I' or arguments against the proposed , and employees' ; or,free carriage or reduced ., railroads shall have,, the same rates" for I l' /' \ .. Fort Dallas Land Co., pt. Augustine. ,Fla. I rules, which. / ire as follows:. 'rates to persons: in charge of live all and shall afford the usual arid like t r I . ; ,PROPOSED ROLES L > REGULATIONS.The stock shipped. from. .! the point'. of. ship-. customary facilities for the interchange " r ' 'v. following rules and regulations pent! to destination- and- return;, or of freight to patrons of each and al t are prescribed for! the government of from issuing secodclasdltickets'forthe \ lineaslike. ' } ; Little Bros Fertilize Phosphate Co.: fP4rsonsandprop- holders of which second-class tickets \ ROUTING FREIGHT. ,\ :4:A J the rJilr94U \ -* by companies, doing so issued second-clasa'accammoda-' The right) ,of a shipper to direct t f 'L t t 1 JACKSONVILLE FLORIDA' \, theg-t ass wholly or!\\in part within the ions shall, be furnished. what line, or lines of railroads in tb "' .: ! of Florida al41 conflicting ; : i I l 1 BULLETINS. I State his shipments shall ;be tray ' \ ; with beiuF hereby repealed : i Whenever any passenger train on!any shallM Jenedb1.aU, the ra ,' rtili \ COMPL Jln8. x j railroad in this State shall be more roads in this State. 'I- : t-.-.;' r. Manufacturers of HigFGrae F r made to the ," I ICOHM y Alllcomplaints\ bommis-, than one hour behind its, scheduled N CARRIERS.Xo . sion shall be \ and shall'distinct inlwriung time, it shall be the duty of said rail- railroad company shall declim . lp set, forth tli grounds ',of com- :' ; road coinpny"to bulletin and keepposted refuse to act as a common carre drovers should the ,Btt 'Fertilized Because th\ Best is plain, In like manner' all defenses 2iTomal\ < ... use I at every tele-graphstatJon along transport any article proper for tr: , ,," I, : ," the chca j dlf ''I'. \ shall be in,writing set fo th the gr6um( of defense. ' ; train i is offered. going ,the time such train is a. r Little Bros''. Vegetable, No. lt: and ,Little Bros o BO ADS mDEJi : behind . railroads ,its scheduled 'time, and the BATE ON SMALL SHIPMENTS. t . : \ Special are the Be 'Brand on 'tky All connecting which are time of1 its arrival as nearly;,as can'be Railroad companies mad colle& ; 1' : II under the nunagement or control by '' c' -- .: a'aiO " ; 'It\lom'a approximated. cents ass. minimum charge on ; 1 ' for .. . market iomatpes. , .:.. '\ i \ : \ '\ lase;, ownership or otherwise, one shipment, however \ 'y . MAXIMUM BATES MAT BE BEDPCED. small.:1 . | , .. Bransbomb \ and tI same company;and all con- t : \ Ellis \\ iams & Agents The schedules orates allowed and .COMPETING USES. ji \ ,:,, ( nect' railroads a aJority of; whose I I \ \ : i Railroad companies shall nol'*e '. l y : '1rT ,._ _. A.. st k i owned or controlled, either dir -,i adopted ,by tbe Railroad, Commissioners '. 4;::co! ,. tf-R8- AI i \ I' t ,indirectly, by.one of the con- for each road are, maximum rates, i any unjust discrimination! \, i receiving 2 nlctin / which shall not be transcended. They I lines shall for the of , "I I" '' , Jt a ': l'I \LA trans rtation icl app'Yi' g-thi purpose tariff, may, however! ,carry at' less than the : freights to ao"y, competing- s,,of .. ] 4 steamboats in this State.,' 3 *e cons dared,as constituting but on'ea rates allowed and adopted, providedthat f . iti: : 'Nt't1'i 'f ;' ,:'lal I rd th same'roan, anal the rates"shall if they' carry:for less for one per CLA88IFI TI01'f.' \_ ;j '! son they shall) for the like, service antler jocia- - : j' : be,, co puted upon parts of one The Southern States Freight : ; : W .. , . ., I and th< same road, unless otherwise similar circumstances and conditions tion classification,, No.24in foe Hay .: 't'.j. \ J I LH-5 speoiOea. :The fact that each of said carry for the same lessened rate if 1896, and the current add ns to ;. , r / roads hi s a separate bbard of directors for all persons, except' as mentioned and changes .therein*will bet t rved . .: \ 1.f . shall no ;prevent the'application( of this hereafter; and(if they'adopt.less freight by'the'railroad! companies deg<; business ' .-J. 'ThfeTerminal! New Will'Operate 1 tot rule. 1 rates for one, 'station,.they, shall, make in this State;'subject, hofver, to 1 4 l'' >+ \' MOST LY AND .AXNtAL BKPORT8. a reduction of the same percent, at all such additions' thereto i andbaligestherein ( , ; \ i Each railroad company shall make stations along the line of road,so as to 'as have been rescrill by the :" 1. pev oP.the...!. make non| unjust discrimination "as Railroad Commissioners of IJrida as r, and file i n the office of the Commissionby the last day of each|month a,reportof against any person or' locality) But contained in the 'hept1 :8heet,|rand ; r I when at any 'point within, this! State to such otherfurtheradlionasnd, . ,1. } ; its earnings and opej-ating ) 'N T ERN'Po'RTIO' ;r O F: 'THE CITY. the preceding: month, according expensesfor to there are competing lines of transportation changes; maybe made fro time: to J . any railroad company injuriously time hereafter by said! Comissionera.On r Wescibed form 1, the; Commission - ( I by toe ; / I"" \ ' l '-'" ) \ 1\ affected thereby ; at such i . ."..." '; t"I I I 1I d also,on or 'before September 1 of ,each may: I all shipments of ffeigb'n governed toNorth are' half year an annual of' its earnings, competing point, maker! rates .below I by' Rule No. origiating and ,-t f: Miami i and operations oPeratin'ex'pen8e general, ;t: Ternunllor, ;: a,'few minutes' ''wajk.l) ,SIze6QxlOdr\ for the preceding' year ending makings corresponding pass over the whole or porpns of two .? i t J ':, AlleT: in{, :rear;, of 1 every'lot.'! -- Cool and: breezy,.J\\1,| June 80. :, IREBATES. i road."I reduction ,along the line of Or more,the maximum roads; not" rate under charted tl same c,n,such control -, :y'J , ?. I '. j f Ji! atJons4" ,. : '\ : -fl\ There shall be no;;secret: { reduction of FREIGHTS EXEMPT : shipments shall not.be greter than the . ,. ?l..x' t 1'r \ \ \\ rate of freight or passenger fares,and The rates- 'specified or hereafter, to.be sum. of the local rates 'on neb freight, -.;; 'r- ; ,Ril'-$0.005T9: : \ Ii' drawback I other Ii allowed for, common brick; bone, lumber for the distance' bandied otr each road. :z no rebate, ,or advantagein ' 1 1I ' I t :. laths such ,shingles, ,staveirougb s onetempty' The total rate thus ascertined on I forni shall be given\or\, paid,either i any {.> 1. :Buy one! while '(they may be,;had, cheap i".!Thejf w ili dire<; ;orlindirec.tly, upon shipments barrels, corn in the ear, melonsby 'freights from'' the point q? shipment to : : tbe car load, straw, shucks, fodder, the point of,destination stall be divided. ; 'F ; >e worth I double! a ;few: ,months hence, when the ,NeTerminal trade' or service' rendered any butthe person tanbark, sawdust, household goods, in such proportions between the i roads, _ not allowed; to all, per ons, ' a. is terms.Robbins '. moss,. palmetto: leaves and,, headse, are over which such freiglts pass ai',to 't completed. ,Easy : I' 11 1J 1\\ same,shall uniform to all, and pub 'I " _I ", t it" maximum. rates; but. the railroads. are give to each road fnerested In the \ , . ,I' 1 l lic. I Irosnjro ' \\1 ' & Graham left tree to reduce the same 'at discretion.and shipment 'its local rate;or the !distance ,; , I. '. BCBEDU s. } 1 (, ..t ;; ;'y' . il\ Each rail clad company (shall post ina all such rates' are'exempt' such shipment is handled. Nothing in. .., s. ,Y ,:!J-9'-tf. t t.. "_ 1 hf. OVER tO T OFFIC cohs'picuou' place,and keep the same from the: operation: : of, the foregoing 'th rule: shall be con5t td' to prevent \; I ,1 41 I I I nl I I of its stations rule. Any complaint as! to such'rafeswill : the total of any joint rite made under 1 ' -__ L p-p continuously posted in ea 4h of upon presentation considered.' this'rule' from being Divided, in such, :: - :; ,. '. 'J:, Imported Vuelta', Ab Jo,"fl periz.** $,JoperpJ' dad. .- ,) a copy' of the scb? ule the No,rates,have been prescribed\ articles proportions between:the roads:inter* - Florida one year SUe i a \ rates revised - crown freight am '' . passenger . .r \ )iaoutaC'turin. in the classification designated'by agree \ sumatr..75CpeMoz.tol7.5Aprl:>> ested in the Jbey may , : t'i"S: Ieaf Tobacco 40c pr oz., fllprTlbi FIELD AND and adopted. for th'e'use t f such com earners ' Yt; : GARDEN SEKDS-Corn Field Virlsties.2lfj>er,gt.t I I'' ''all the p letter S. .Such articles .are subject upon, but'a failure so to agree between.. ?-i .: : ee taot pany by the Commis ion; icopy : , \ po tdH60-per bu. freight paid SUfal to special contract. The ,Commission the roads interest* [shall in no way / 4.t I VfrifctieB, 5!freight otei- the rules and regulations prescribed: ' _" vO., repay ofexcessivecharges h rged'i a; viiv I ' .press not poatl'ald\2.\ pr Ib.pout plaid, will entertain complaints ,affect the total)i4t. rate to be : .; >i uhroc pet 1b JIO'J >aM: Pearl Millet the best fodder crop. I paid_ In lots,of by the.ComnUsion. foFithegovernmentof 1 ,, ..' \ \ I for the transportation such and collected l or work delay in thetranspotation > s or over, Dot.pt *idrlVjprlb. All other eedft At equAllr reduced tatPS International n . tit k Food.tee International Poultry' Food,860 .. CAMERON4 the transportation of tabdpas-:. . ; per pkt. per pk .L. articles! in all cases except!) where the of iiich freighter be : \ 9Jan97 f-bl..f It. 'Jacksonville._ Flat -, icable tolls line of road, " k ; ; sengers app .' \, '. 1.1 1.\\ t"_ prices! charged were according, << to con; :subject of. p'peal to,the Commission by1\ :} and a > of the official classification. ; , ,- cjr py -,. shipper and carrier. . 1 .'. -i : -1 made whetber tract between: I the roads at interest. t .;'j also copies:oi all changes I , as to .1>< .. :" ,r... cno.lce'selec- tJsuchran. SHIPPERS LOAD,aY D U .LOiD.. FREIGHT' ''B" JIPT: 1. ', '''; i: .I , \ t be made the ull .same s . i r In ij t'a.n n 'tioof at-the office road cpmpary ,.or by the Ce mmission- Shippers' of 'articles 'in classes'' L,'II, All railroad companies in this State ;\ 'Y t'lle.' METROP- ers; also a t ble of-distances' between N, O;P and B may':-be required: to pay shall, upon demand, ,: issue duplicate1 ,\ :'; J ,each. station;j land. when'any change. 'in., the cost:of loading,and unloading i i : ? Continued\on. page 7.} '\. : ,,Jl. e 9 T R ,. t... .. t, \ ..Ir'l .... ,. Jo t .... .....' : :jt t :j\ h 'j1 .l; . 1 : J Fd arw' -1 .' '7' ... t, -t' . ;:;' ;I : : .. > . .. y }.j;; >: > t'" a. ' e A oI: '" j, .' ,': " .... .... -.-"""' '''r- "" .,, .. 1 .,- ', .. .... . . .. ., 'h' + ' L . ' \ . .. .' ,' .. : ; ; . 7 :: 'Jf t. \- \.')" '' \ I" \ \ :>- , ; It -r" r. f \. I t' f'f f' ' ": c ,. '' '* " , 4 . ' : : , I' 1 : \ h' I 1' \ ; i 1 \ t i. , I .. - : I ..t.. l - 1 4 ' 'r \i\ y ' rNorth \ \ THE \ :1111 Ml ME RQPOLIS,. SEPT: 3, .J897., ,: 7 i iI t' rcu ItlUUt'tt from page ror Bay Front For Sale. \,Ten ,Acres at,North,Miami - I freight rec ipts to all shippers of -rwe Ity-oUe. acres [with a frontage of Being the a '4 of ne )jj of ne'J:& of Sec- ;. : Miami l oWLots: : 1.j' \ frt'Jttt, iu 11iG11 shall be 8tl1tf'4 .'the 400 f et on the'Un,.. A splendid piece'ot E'ast\lyingbetw lion 3(5, Township: tbe, South railroad of.Range and Bay 41 1i"'I'\pr cl lSl''I of freight shippt'tl, land lyinsr between the place of li R Mo close the / to Bay 0ood land. Price very 'From' to $ 15O.1\ freight s over the railroad issuing I[Cormick and thai of A. It. Mmmoua, 81.800. '. . Ranging in Price $30 \ char Booth of Cocoanut Grove.., The finest 1 ) such receipt i and, afar as practicable land for sale the 2-18-tf _..RoBBiKH k OKAUAU.NATiONALizbz .. I Bay for theribney. . A Selected Lit of Bay Biscayne j Property.- [f fFruit :- pimeot on { _.. .. '" '. I'hallat!:" the *'barge* upon.the Price. Sjj()(). Will take one; -- -- ". --' --.----" : Tracts and \,Cheap, Lands for I tv'estrent. I .. I /alf.cash, or;only oD -t."Jrd cash if ueces- I -. Fiost-Prpof, Bearing Orange Qr \I I | No. i Pnpsphate Land BOBBINS & QRAHAU. HomeSeekersREAL . I s I \ the railro-uls giving: such reeeiptsforfreight ; N i i Choice Property of Every Description I I, shippiil 14halPbe held'in all the PLACES OF INTEREST.To .i ESTATE EXCHANGE MO' T DESIRABLE LOCATION ON BpTH THEI'E'AST, 4ND: i ourts o( tbe M, ite as responsible;for ,, .. : anil \fti.dl'Htl'ry ,of Be Seen Jn and About Miami and Biscayne .1, I : the prompt > same .. WEST COAST. 'l . I' I \ to it:> point |wf .destinationitlnii. a :Bay.Mule. ' E ;E :E: Waddell I reiMtnibh tit \\'hll'b.length!of time Klnll':,Tarpon and Spanish Mackerel Fishing 10 hanging Property for Property a i imarltfit Rapid of the Miami 1 4 Specialty. Send Description 'of what ' shall b&tieter tined after due investigation The Florida Everglades . ,. 4 . :. Miami. : .. F'l. \ sail, 8ioJ1- Seminole Indian Camps. . .. . . '. 9 ,you have and what yon want. \ . Railroad 1 I l hj' Coml i and Kuint. L 2 __ __ __ ______ The 1'atich'&IaI h '" ers. \\'lienreight he consignee of such ('Rlte Florida and the Old Light') . 8 MALABAR, INDIAN RITES,FLORIDA.. 1 PoMey Korkt Light .. . 15 - proven s the railroad receipt'to The:Florida Reefs ." ..\. .'. ... K c. C:CARROLL, , been sea Fishing! . .. 13 Oct. UHf-Is the agent,of Ui railroad last trn ISIrt. The Coral Gardens. I: . -.i '.J'!. .. .". . 30 Real Estate Agent 4y . .. . . . - ngthefr i igii; such agent hall deliver earl'ut. L. .1- : : 4Norrls .j Cut . : . '. the artules i i'h pped upon the'pajment Casar's Rock' and Creek'.. .,. :r' .- i : L'H Ke-y. . ,. . . 25 MIAMI PAINT SHOP ; if the for the class'\|6f Key Largo; ", : . 'I I . . . ,; . . .. 30 stipulated In said The Hunting Grounds. ..,.. .. .. . 15, reight as railroad Sun Filers Grove .. '-\.1' .._.r.. .-..!\. .. . . 2'' T. J. WEAVER, PR P-R. eceipt. Little Ki\er ., ' .<. ,' 6 Arch Creek: .: -::: ,.,::: : .::: ::: ::: 13 House Sign ,and CarriagePainting t- 0 1>EL1ERY OV FRE10HT. Natural Bridge. . .. : .[;{ .. .. .. .. 16 " e Railroad) Cocoanut drove.. . \. ..... 1 J... ..t.I .. .. \. .. 5 corilpanies shall deliver toe ImonCity. . :1 i, ]I. ,. .\ 5 i'h consignee of freight the article or BueuaVista.: ., :::: :::::.r:.5.'. .:. : 2 - \ .ju... .... . 15 article. mentitlned in the receipt or uUt'I"l". .5 \ F The Giant Bamtioos. . .I' :. .: .,::.::.(::::::.:: S bill of 1m the the . lading of payment \\IIdOrange: : Wil.,2: ': rite f'harlt'd l for the class ot elates 6f Wild lime Groves! \::: .: : : : : .2Rtker'sllattlorer. Decorative Wall Paper Hanging a spec- ' ; .. . . . :, 15MiaVe I - 1" r . 1' freight I lt\nt\ oed\ in the receipt, and Creek. .. JO .ialty. Graining, Hard-wood Finish-, . J The CroMxlilePond i .: .:: : :: :. : 10 \ fog and Kalsommg.' :All work , \ the( consignee sly l, II not be compelled to Ilonseof Refuge ... . . . 1 10 gUaranteed. Best of references ,; -i I pij for any artu .le or articles not re- Indian Creek, and Oyster Beds----- 1\ win be gfmi.Are .'s The'Old Ruins! on the Miami '. . 2 -- 4- (' i\'ed bj him. Where a part of, the| tort Dallas., .. rl 1 .. .. ', '. . D and 8thSt, ,MIAMI. FLA. ' A Cruise on the Bay\ot Florida and Among 7may971irhf d! jn the articles mention 1 if re'eiptshallre : the Keys ' ) 'h the point t>f destination. it 'shall The Florida CUilf Stream!. '.. :. : ,,;. , . Eiclit: Hour .1I1.to the Bahama Bank/ . . . \ " be the ,duty of tie railroad: company at THE; PEACOCK INN t urn point to deliver. the !same upon the , \ I 'amerit by tlie consignee of the -r: A. 3NTKLSWe LOCATED; OiBISCAYNE - \ 41GW( ) 'fr ight (charges oif*aid article or art \ \* 'Il" ,notwitlbtan ling the remainder of ,Manufacture all .BY, \ I kinds and sizes of I+ I lnj articles mentioned,, in the receipt; + luu 1' Five miles sooth of Miami. ; TIME ma 5. have been delayed or lost. L. 1 _. The oldest'and largest hotel . i SAFETY COMFORT QUICK LOW RATES 11 overcharges. on freight byany| II i Cypress 3 on the Bay. Headquarters , for the Yach ' Biscayne Bay , t finest Ctmine and Service, No Transfer Between Jc cksont tile and AVw ForA,. rai road in this Late shall be settled : Clab. : , 1 I The Fleet is composed of the following Handsome dew Steel Steamers: wit tin thirty day s after 'demand by Tanks Daily) i Steam Launch Connection With Miami ' the ('onsignep. or! person paying. the lit r \ Comanche (new), t Algonquin; i IroquoIs, t (Jheroiee, s. Seminole. reikht upon the a gent at the delivering \ Bates, $2.00 Per Day and Upward. ; I Special Rates by the Week. . i' dept. Ahei ever an overcharge ' ; NORTH-BOUND. G. H. DAVIS &' SON . on reight has, been, made on a' sbip- :XCI1AS. PEACOCK & SON, Proprietors, Cx:: .... \ Steamers are appointed to sail tide From Jacksonvl le, Fla., (calling at Charleston), saudaysTuesdaysaddThursdays. nerit over tv\o 3 r more railroads, it Palatka, Fla.jy COCOANTJT GROVE -FLA. r." - From Charleston S, C, Mondays, Wednesday* and fridajs hall be ettted b) [the delivering road. .r. ' For hours of sailing see 'Clyde Line" Schedule, or Jacksonville and Charleston dally papers 'I Write. for Catalogue 1 lZl-3-24-pd ' All the iS'Open :Tear. 1-1-ia 1 If the overcharge is made upon a shipment \ . .t SOUTH-BOUND. \ to a flag station, then the demand - Steamers are1appointed' to sail from Pier 29, East River, New York, at 3 p m:, as follows; I to be made' i>n' the agent at_ the ': ; : For Charleston, Su C, MondaysVeduedaysaud Fridays, aTIie-Plan F or Jacksonrllle., Fla., (calling at Cbarleston, Mondays?Wednesdays and rrtdars. regular station to which the same was Systel11 Freight bile \ I Boston and Jacksonville--Direct Line ( ) BoeRS it STATIONS. '. ' Perfect Passenger Service. , I Calling at Charleston, S.C both ways. Alt agents!lat depots or stations witliirjcorporated - l li lI i STEAMERS "GEO. W. CLYDE" AND "DELAWARE I in' tovvns and cities in Reaching the, )Most Important Points in,- Georgia i Alabama + I' 1 I Are appointed to call as follower l this. tate shale receive all freights of- South Carolina, Florida, Cuba and ' I From,foot of flog in Street, Jacksonville From Lewis'sharr.. Boston 'eredj for shipniejiit' and deliver all .*. \, FRIDAYS FRIDW3 freights appli d .for' from April to Novia Srotia. ' \I j CLYDE'S ST. JOHNS R VER LINE. October 1, between; I | a..in. and 6 p. m." ; Most: BP1en.d.14: :IIotels: . tIll.h'M jI I (DE BABY LINE) and from October 1 to April,1, between, . J'p;. . T a. in. and :6 p. ml; provided that in - \ Jacksonville, Palatka, Sanford, Enterprise, pan Intermediate ities having a population ofover.3,000 : -- -\ 5- + }i on the Stf John Jffoer. -\ , S I Landings hours! shall be from i. a* m. to 6 p. I tie.\vith' the exception of an interims w' iGt ii 1 Steamer "WELAKA" I ' of one hour from 12 111 to 1.p. ",'. I / ; I a \ _S CAPTAIN W. A. SHAW, on each day of the week, Sundays' excUpted. - { ' Leaves Jacksonvill '. .. . ,...., <.... ....... _. Tuesday and Saturdays at',* Wp.m Nothing in his rule shall bec Leaves Sanford'1.',. .. -;; ., .. i..*...r ,.. .. .. .? ... .t..f and Thursdays at 4.Oft a. m Mitt rued to prevents! the agents from ;' (} ,receiving. or delivering freightearlir . ' enrd.l.P U8 naeT and Ticket Office, 201 West Say Street, Jacksont'iUe. t|tan 6 p. m., if hey (desire. .-> :" : \ : : --=- ff \ - MIXED SHIPMENTS OF LIVE'STOCK_ . f \ UNO.;11_ HOWARD. Sun F. IRONMONGER, .lit. F. P A. .' 'j I : ,j JACK80XVHUE, PLA. | ' -: Mixed shipments cattle, hogse lr : T. O.. EQER T.\Ml W H. WARBUR ON. E. P. A. H. CLYDE. A. T.. M. rf - ', T lambs etc., will betaken in carload* at r< B - i J BOWLIlta ORIIS: MW: .voa>' k \ 55 \ .( J \ WM. '.CLYDE & CO., Gen'l'Age ts .' 1 rG carload rates for'cattle, but the carrier, .' \\ 5 Bowling'' Green;,New'1""orit City' 12 So. DO. Aloe.. Philadelphia>! 17 tf will be released ,from damage to animals - 1.1. I L1 I I ' ' I caused .by then own acts' or to Y _ 1 '0 \ 'I I each other, and from scape if not .hal j. ; .Georgia4Southerlla' R'Y. suffocation or xhaustion from In the. West. Cdast 'Region' of Florida. f heft or cold. > , : 1 ri'ght'P THE PLANT, STEAMSHIP LINE. TRJ'.Q sn't tile M all 1 The Suwanee River Route. ' .. Steamers Between Port West and \ ,\ 1 I Plying Tampa, "Key : : "I\ \ Time' a.'ble4une,15.:1.SS' '' \ : I Our Sheriff Is'\(a Poet, H vans, and Between Mobile} and Port Tampa.B. ,. ... j : \te clip't e following I curiosity In . . W. JlcFADDEN WRENN H. C. : ,' . SOUTH BOUND STATION'S.NORTH BOl't4D' the way of a sheriffs >leturn from' the Pass Traffic Manager. Asa't Oenl Pass. Agt. Y /. Atlanta Constitution bf:the 13th 'ult. ' ; i Nob No 3 No I rr o 2 No4 'Ir4o6 Savannah. Q-a.. ' ril Chat of ne\'er-lle this novel"legaldocument .. .. .. '100":11: 8 20 A x Leave....;... rAtlanta.... .....,..Arrive '13; P x 7'45.' x ...11118 \...... . i .... ... .. II 40' Arrive.... .... .MacOD..c.Le.\'l' .40 41& .IJ.. .... before.. ,One rust indeed go 1 4 TA I' x ti I' II" A X Leave ;...... .Macon....'... .Arrh'l' 4 $1 P. tO A .x 11100 A. xi away from. home to learn the news. 6 SB 1 45 p x Arrive Cordele..Leavr: 3 *0 t . i 640, 300 A 1 : ..s.,:::::::::: Tifton ::::::: ;;,.,...:. Icu, I g.. : 25 It is said to be ah exact copy ,of, an :: MallorySteamsbiD ne o IO .40 533, ......i .._. ..Yaldoeta .... ..... ..,..... 1107 A f05 2 PII: 6 \ .....,.... 640 666 I ....! ................J.sper. ,.....n..5.,. 100': 9 fit .L ..... amended return of\nulla bona recently ( ::::.::.: 615 r 16 :H'' I..:; : { ::::::'PALATA.LakeCitg ::::::::::; t.: : I0 t 44 900 L :::tt"j"'u. ::.:: I.inthe. : office |'of .the clerk of the (I N. Y. & T. S. 8. CO.) : .. _..Arri\'l' .. ... county court of Dade county, Fla. It \ : . '; 81 rb; 15 A.x Leave 1 t r Jill 6V P JI .t' t I :: :.C: 6 to 1 12 6'fi m'\ Arrive....... .:::JACKSONVILLE.,.:::Cleave.. .... 11 s AI'' 40 00 .::n i.:::..:: has ,hus become anl.actual court paper I : N.8W' York t .?..10... :!OAX 4 00 P x Leave... ....?! Ttinn.. .,_...Arrlre R'D / lIp x ...-\,... .. and may be seen by myna Who wishesto !!Key West Fla. "w ; .I... 900 515. Arrlve..hnTZGER.At.D..Lean 1oJ A II 800 ....1/.1M ..... examine tbe public, ( (!,,records. The R 1'i'P 11 1.2 63 Pt l.eave..11108ta.. ....Arrive . .... 63 40'.4 X ' P JI A 1 : '1\\" +'1' ' 49 + .1, Arrive .., '.Lean 5 3 : sheriff is i f aid to have,called) to,his assistance The magnificent steamers of.tbis line are appointed to leave, U OO 1. it :' ::j1::: .... ..:.} ,..TBO t WV w'::. :...... :7: :::: : 24 3 a Qe ; locally 1 1. '0 ....+.. 11'1() A at 1L 10 P II: Leave.4.., ..,...I'.I k..Arrl1't' .504 n 4 56 ,." .. .. I .young rgilrnow Key West Every ,_' .;':,'':' 140 PK; a 80 11 Arrive."... ..Seof Td.... .....}.e.Vl' 18 100 .. roo.. known as "The Everglades Poet.yReturn Saturday ..... .. 1001 356 .. .;;... ... .... .rtabdo........'._..;.. I 1.05 1.13)1.."f 1-0... ' 1. : a 0s '100' ._;:.......... ..r"trE'llInd..... ... .'" ...,. 930 Px 10 43 '.: :. :t.... in this caSe I had thought\.'a well arriving in NEW YORK. following Tuesday.strictly Service and accommodations .' l ......1.. 6 c.) I 800 ..... .. .... ....TAKl'A...... +: ..,. ... I to 8 till .. .. 1 1. ended\ .' first I&88. . ........ IOTA t-a .... .. .. L .:P at ......j: .Arl1vc ....- ... 4 I'>.j P r .,." .., But I am advised it is'Better\ mendeds J n ...... 1248 r X ., :. .: Arrire..r. 1' Orhtomt.Leave .: s 'l5... y.. .. VL P'O iT .' .. .". 130 ,.. ... + \-f.. R04"ldedl"e.o, \- .. ..t..... on. I! 07 .t., -t. bo'novf{ a return that will Slte:1': .the whole truth From Brunswick- c..to Hew YorkPASSENGER . ..-i". 8 10 ..M,. ,, -4- :"'-et hIm Beach.,.'r'.... .. '-n... ..: 7 U. II ..{I .M.. .. offered in lieu of the'other;forsooth RUYAii 4 - # ....,1..1105 -1' ''' .y. u.Ui......., ."...... KIAXt.,.............. ....... .., boo, ",...F... This darned execution: iSe! trfor.. to, leyy -T---: ."i '-' ; " Against the defendant wiio raft himself Aiken SERVICE_ ; \i. ... inn.Operau'8', Pullman Buffett SI Per..the..reir round between. Jactsonv> le.Fla, ,and Nash t11F, I'tegone for trim good and come. .down on him Via Feniandina (F. C. & P. RrO and Comber' VU'Everett and Southern, Railway.Lr : . Tifton T via Trains I II f: on N05a and 4. \ . i I Operate Loral Sleepers tbe Teat round- between' Palftks'Fla.; and X 'Ga.. via 0.rI is.& treaty, that[ \ Jacksonville, 'land Route : ....... ...... .......'...I..8 IS a m" Jacksonville.. .........*.........'.....4 00 pm F.|dire tonTralnsNoii.3 I But find he's no goods can ever be taken. and L' .. .. .... .... ... } \ Lv. Fernanrtin;; .1 30 P m .... ......... .... . rest Tiftbn'l The other defendant has aUed much""Wilder Ar. : ; '.... .. 'H...... .. ...' .5 80 pm'Lv. EverettJ-.A - : .x40.p.m Line to .Fitzgerald (Soldiers. Colon If.on.via. Suspicions I hate;if I put it some milder, BniDwUkDaily except Sunday.Paxeengera \. Ar. Bran wlck.\.._..._......? 30 P 111. ' { ' ,, i !\ NASHVILLE' .EXPOSITION, j jj \ For though he had lands and many a chattel allowed on board" .for sapper on',Thursdays. \ t -I j I Round Trip Tickets now wn sale at following very low rates... &: From &X. And fqughtto a finish .an oft losing,battle,. } PROPOSED SAILINGS : , Ten Limit. .. ,. ... . LT. New York,pier 21 E R.. 130 mj Time < ': : LT Brunswick and p Standard .100f Day Tuesdays Thursdays .t..t.\ ..*1I0O.i128t'( This Abner M.Wilder,the other defendant. ) .Twenty,,Day Limit T----------- ,.. '; -' .,L, T: . ...., ,. 19 25. ...... . 17 60 Friday Sept . ... .. .... ...,..,.1./n{ RIO GRANDE: ... ... ...... .Trlday ifept. 10 Ocober61st.Umit. L .y ... .... .,,, .. ._ :;:., . .. . .. . ., ,.,.. Upon hUla wyer 3 deep shrewdness dependent. Friday Sept..10. . . ........ .. . . ... .. .. COLORADO :.. . .:_....".0& .. Friday Sept. 1? 1 The Scenic Route.. :,The historical Battlefields" .H. Bonte ': : : :'; : 2..1' Tr.1Dsletrt"tl'bls, estate.alt away Friday Sept.17 . . .. ... ....,... .. .r. . RIO GRANDE, .. ....... !",Frlday.Sept.24: I.|Full formation, sleeping car reservations, etc,era be obtaineq promptly by' 9o I find in making my levy to-day, *' Fridaysept.21,, . .......,.. ... . .... .. . .COLORADO ..... ... .... FridayOetr 1 4 or. alling upon : maps. .g., Friday, Oct. 1..J: .. . ...... ... . ...., I lr-BIO GRANDE: .. ........:: ...Friday, Get. S' \ita Ue,too. has no goods,I can take. J L t 1f. :. HUGH- H.. RICHARDSON, Gen., Apt ,I This story I file of sorrowful de 'It. THE MIAMI METROPOLIS, : R. W. SOUTHWICX; . y 1 ,: \ ':: .. Hogan SL,J ekaOD'f'llle.Fla. this return is sufficiently \ ' ; And hope ,explicit. Miami Florida. Agt. Mallory Line Key Wes FJ '\ , \ J. LANEk. ;"l, ;-', ,: .: ./ "'G. ,MACDONALD, r.t r\ July[signed 6.,1897., .'*. R. CalLUs' WO)1TH' CHAS.I DAVIES, Agent, .I ; C. H. MALLORY & CO. '\ !j')" .t\ 'Otal Soperinaadat.' Ii '. .' '. '. \'., ,1.-.: ' \ Geae1FwengerAgea' ' ;1 -\I.' Sheriff,Dade County.. Jacksonville, Fla. \'Gen AgtPier 20 E. R., New York '\. ,f-4\ \,, I l: .J' t I. .. ,.J. \ r" I .. , \ "\ ,. "1 I .f"' .: d 1 I\ . ",. . > i ' \ 1 :. 'F'.. <;T H i '.. \ I,r." 45 l''h '* ,. \ ) ." .r .' 1" . 1"i'\ t' '" ;; t. .''i' ,,' V; \ 1 ;1t' :." ?- r a'J ai ..' , " \". 4 't'F' 8 THE MIAMI METROPOLIS;; SEPT.. 3, 1897. Plows " l'i i Oil Gas I 1. t. i1 I \ \I FRUIT JARS , rHarrows: \ "r'I and : I Pints 60 cents dozen. : \ . , 'and'' \ per WoodStoves.. : ' " . !r Quarts, ' 65 "H: I j " t;: Cultivators, I' TWP Quarts, 85 .. : , ' r \ Watson's ,Hardware: 'Store.. ';'./ ( i i ..\ iGjuly.f : '. . ( ... ---- -- ..- ,-_ -;- ,. , ---- d .. ddltional'jiaml'iUnce' \ ;I Trees\ Grape'Tahiti Fruit Limes, Persian Genoa and and 'Walter W Pickford IJC" ". " r-i- I }:p j Doii't forget th\ candy pUll, I I Lislion Demons' Dancy, \ k\ Ilouse-keepers'clubijouse' next \ t !!- day' ,night.1. It uilPbe an (j I) Tangerine, Hart's Tardiff, "Yellow Pine ,andCypress ' " . wn tfavel r , "aff Admission ) ] Jaffa , ; : ir.,1,) only n cents. Washington, . I > I' , ' the ladies in-the good work. H '. f I j_ :! 'NN Jaffa Blood, Ruby Blood, \ ; .' ''F ; t'b steamer Biscayne I and Parson Brown Oranges - ;,. : Bravo,t arrived from Miami, Jast \ ' t. ', ht.. and passen e I Japan Plums- and VLUMI3ERSpecial > . 1 brought the United States mails , pes, Texas Umbrella, ,Australiank , the There flr&t were trip 18 bags of ,the which new took s.ch of ,ornamental flowers and ,shrub} to sizes sawed to order; Also, Frnit and Vegetable Crates. Let/me quote. ' prices before Y.OUo01.; 4. trial order solicited. ,/ - al Jiours to 'distribute. It I (and soil. ,JOHN. ,ELLIS, AGENT. ' morning at :5 o'clock for Miami \ N ::MIAMI: FL.A. aOg" .tf.It COCOANUT GROVE FLA. : passengers; : 14 of,whom were the ---: .__ __ ---------- r--- ',{ of the |N"or\segian ship Matil A:1: ' go to,X'W York to the consul church next, Candy Pall of House.keeper Club. Ii: :: STURGIS, : - ; Key West Equator-Democrat. I The member' !* oft -House-keepers' 12th Street, . Mrs.-lW. C-I>. McKae, of .>r Julia land D.interests Tuttle. club fashioned are1 going candy to pull have and a it regular.good time'old Miani 1 .Salml ei f'yaml llat'nessShop; Passenger Near De 7i'I : r Georgia, who has been ' ) is_expected. The admission will. only published bj .. , j month this Fine Harness Work a specialty . city visiting lie 10c, so come :down to the Grove. " : H not correct :. All repairing;: Neatly Done * Lummu' will return to her truth is, she has and /bring your best girl. Thursday .. r Ids ; 3OI1prll7-11-bf' Sept for,Price List for New WorkN morrow. Julia all the lots she evening the 9th inst, at seven o'clock "-' sister wf our Jolly contractor, . '; at the club house., I I ) Avenue" E and GEORGE B. BARKER. . HcCrimniou who accompanied . .. " She still hobs / 1 i' > + Jy McRae while, has Mere enjoyed'that sile.herself has 80) rest I of A>e- / '' New po to ic s",. W tchn aker and Jewelers ' had any idea, The postoftfce, at Modelo, named \ " the persuasion'of' her many I it Fort Dal/ Dania, is'now, in fir t-class running or- PcsTOFFica BUILDING, MIAMI,FLA. ' will not. to-morrow, I , return ( Obntinueio Miami embraces a tract der. J. P. PauUeii makes a most courteous Repairing prompt.ly..aptl (carefully attended)o. All work guaranteed.NovBtfif . : presence brighten-fieweeks I longer.z ,; the Hotel ; and efficient postmaster. One of ,A full 1 ne',of spectacles and eye, ,glaaaea always on hand "IJII, .M"" ''' a number of very :..his patrons tells) us that if any letter l' I J. "\JOfiluion o"f= ey West Avenue\ D, be4 should not be called for within 43 '. .rteveral days34,thq J f&,thi8. the r ver. I I hours after its arrival' ,the very con- CORELJUSLivery ._.._ was registered_ !'. 1l.el sciencious postmaster travels all, over .>a, is'engage, :fi6be-ggss i nryi l of Miami i are the settlement to find the,,party for E.'A. Waddelbjsyj partner.. the org niza-, whom it ,is intended. Of course I he and Sale Stable Johnson In hiS West They met Tues- - ;heyt: cannot be expected to do this indefinitely merit. Mr.Jonnsgtf Jalito,owns >lson's furniture ',but he seems willing to do so , Y term with 'MJjNd 'hi'w" are I vry prom- until his postofflce I Win good running I Addition Jusf3sorth of the or fourteen order and until he makes the acquainance .llth street ,near Avenue D, _Miami. q -; Joffii on cafi5efaere consult .the/+charter roll, ; of all of his p:itron*. Horaefl and Mutes to let and for sale.' , partner .anjfinspect the real for;{ I leader. Mr.:., A new po! tofti I which tbfjfcwn: Jointly, and ' years, expert t at, Halland, called Hallan- '... '"not: ,least, to take I a look at our ,Mr.land' Idner i i4 with is the then, I dale master with,. J. :'L.\ Halland" as post- Carriage Teams, .. Buggy Tr I/ Work Teams I 1. 44: W. A. Bawls of Tallahassee Mr. >I oran sec \ . ' 30npr97-ly-gs ,I" I I'D : .v Chemist, was in the city : Wef hope .the 'c . He came for the purpose of' young men the 1'\1'I.\ I. Franklin C. Bash ,, '/l Near' Brady''I / ic8go, who* has been.stoppingat samples of fertilizers for an ) deserve and that . law i the Jlo"terMiami for the past two / ,' /l' Grocery der the present a tax of 25 y equipped I 'I , : weeks, informs, us that work has already is ' ton , <.. imposed onevery ton I , izer i in ir. been started on his v house.whicl! .StreetNOW :, 9ld ] the State. ) U1'll'12th ) | J'I: was made very is, being constructed on the lot he pur-i! I . also a 'very prominenV I \ I tician.." He was chairman of night; by the ar- phased\ south'of'' Cocoanut Grove,1 justnorth . ocratic State<< oentrai Caicago. The of the property of Captain J.-J. I : -" ing, the last campaign. lieu s : of.Mrs. Dr. S* Haden. C OPEN ] 'i pleasant gentleman and has pleasant lady, I .Mr. Bush is'a professional: pianist , .' swarm/ friends througl out.the / Miss' Fae i Fow- and L being a young man, does not- uf'ffef. Res' :t't"aUF''an"\ 't'G it' home-table board by tbe / A. r wler.' from ,that 'cranky or crotchety :: week or month.. ' W. L.Joyner the efficient pleasant,i\people+iql 81tywith! which! many professional \ i and service lin- /f at Adam Corel 1's livery ;' Doctor jis over- musicians are afflefted, which, qualitiesare : ,' Prices Moderate. ' i leaves on ,the excursion, As an evidence usually looked upon in a 'charitable . \ : B. DOItT: N/CI.A.TwfT, 'I visit his parents at M rje. // '', fellowship1, he way as the "eccentricities"" of_ gen- 3apr87-tf.i I .tdQEO. ' tbe first.vacaion he has Gad si Ne laof Chas. II. !iU,. What we mean to (say w that " k:! ti ing to,Miami:,about a year. .ago. moaning and I )took 'Mi Bush, when asked to delight a few ' 1' acareful, ,obliging and cotlrteo of fri ${ on.a'l' I n'ds by,hitting the piano in Fredk. S.; Morse - :' er:and has earned riot only. : ./; In addition to/'. thtIiotel Miami casino with'"his 'marvellous .. ; 'will of the community but ;' ilY, the following, ,. ,skill, ,.he,1bes_not contract his ' T t. dence- '.and esteem of bis ... //.the trip):, A. II. brpw i'and fee.-e. t them with a look, of REAL ESTATEMiami { The METROPOLIS trusts be may : 1. A. Rawls A. P contempt and, rad4refu3al.c! as so many / . : f :most enjoyable;time,and tell, 1 ,, and, E C. F. star musicianaarg want to ,do undersin''lar i i ' i : ple' all about marvelous : enjoyed tl etripjolly1 ''', ,, r which be Is so well pleased. / I the Doctor }y he has, been extremely agreeable , We;call special$ attention to tl ., I and\ kind in this connection and has ' { display.advertisement! of John firm of M I ,given his friends j'several\ impromptutreats FOR' LANDS, OF *----q'1 / ' .f 't Miami. .'}fr. Ellis has" develo'..'.! and is alwajs willing, : '''toobtife.n . "t [large;' nursery' on the bank, J has and a contra His, conduct is ,truly: appreciated ,Florida East Coast Railway Co.' \ > ' a co lamll He knows just what l : in-the DOlj and it is unnecessary to say Florida: Coast Lin "'Canal and Trans. Co., re,needed'and suitable In':this that!he is making many warm friends e has a vast number,of ,n I ur readers office;a,no ple 'who will not offers fail to ip{I show future their when appreciation opportunity -- 1-17-al. Boston apd FloridaAth, tic Coast Land. Co. emon, grapefruit and ; of local pat of his kindness and give evidence - Uo 'a' variety off\ of the esteem In which they hold : speak as they d6 him friend. as a ' on inspect the PU11It'UflEI can trees / ! Tj + pleasant call.* Mid Busb, is not) only; a,, splendid and know just'what ' .ng you ; is this'way. \ Mr]+ pian -t. but a gentleman in_ every r? ing when you deal//. with .1 + : sant'\fellow any- sense\of the word, and his location at ... e commend him to,'our out Cocoanut Grove is.'dec. ded acquisi '\: 1m trial'order':and we i 1i be paid'u pulled! for a tion.southwest. ', .... f Cheap! !Cheap.Cheap! ![ ! valuefor; ted , 01 ,tn get full your pri . had : 'i, ; t r we \, Notice for Publication.LA _, . 4 1 Thae |i .1 great,water;; tower, or: ? and,mad ar : ' _J An ? 1D FFlctAT; GAtE9v I } Furniture < Come and Dot omplete ? orn men ; the MEJKOPOLI: 1: August LL"SJA..t, seI.somf on easy payments. , . ing has been placed, ground, #Jts in North Caro ins; + . e and jthe .entire; 'stracturef : : ,1 his own address. named, OtlCft 1t1.: .hereby has tiled glven1 notice that Of this hf,Intention folIo ng.tomake'flbal I t: \ N_ see me in the ,new; ..store on,: .. r IJ i : \ p Inked. lilt a huge_ pe period Henci proof 1n supWti: 0 his claim,and ': 12tli "Street..t ,A tube]'130 feet'long and 20teet + "a very pleasan tha1:'sad proof' will ,be made before W. u : ... V 8: 'omID1 'at r '" ' Feather ( Miami ter;!and is a'landmark: w see, the state\ 'Ilontr " Fla..on Jltember 27,1397 11z: amen 1.Bubel EDWIN, NELSONIr ; :ceen, :verb plainfy IItom Gape or any otbei of Lemo City, na.,. bomt-'tead .22s5s, for the , "'. :te miles away, a \'bSl ; Mrs. So-andrsb one-fourth,of Section.. 35, :Township .,.,.pa, siug/down the coast.,' It]; I at our sanctum .1f 52. Soutb\\ Range 41,East.He I "' I ,, names the-following/ witnesses(o prove his : : : : as iaj r first-class .iR' t us ten,you can'setm ntiniioli9 residence. upon abd-! cultivation I t.r I'gz , , tr the top ofthe'tower' is ., ' bas : | paid said Jan ?.ytz: I . nd%but it:takes a pretty .. The :MrreoV-j- Eugene Lee,of Lemon City,FlaEdward Distilled Water, : Orders Promptly Filled 'to limb np the ladder'and, ; ,few \ willing to receive' J.Douthit Lemon C tjr,\Fla."RobertjsL .. \ : _ '.don' + from.its top without a v ; several hundreds bf, II Stephen N.,Douthit Anarchs,of,of Lemon Lemon City C1,1F1a.Fla. ,.' (, !., Miami, l Ice Co., S. N., Gladwin' Mang'r.tIaor ,. . L 'fctnIt '. -. 't y\ ;" Itle1seJlt2i! J. ILBAKCO.BegUter.. , -tf-bf i. i I ', 1y . , I -V . -,_ I.\ .. , i .. . . , "i ,,' I \ ,. I .'1 \ I t 1 .If..'..' ',- \j srs. l )< " : ', ; ,.1. .': \\r ''; 1\ d .1. ,k'\.",\,I .1'\' ': "" :, ,.. t .,. \ F' :' 'J ":\,.\!: 1 - ..''i R Contact Us | Permissions | Preferences | Technical Aspects | Statistics | Internal | Privacy Policy © 2004 - 2010 University of Florida George A. Smathers Libraries.All rights reserved. Acceptable Use, Copyright, and Disclaimer Statement Last updated October 10, 2010 - - mvs
http://ufdc.ufl.edu/UF00076100/00573
CC-MAIN-2017-34
refinedweb
24,189
78.85
Functor-Applicative-Monad Proposal From HaskellWiki Latest revision as of 21:47, 8 July 2014 very end). This article was updated to describe the current, and very likely to succeed, Haskell 2014 Applicative => Monad proposal (AMP). Some relevant links: - Initial text of the Haskell 2014 AMP - AMP mailing list discussion - Phase one: ticket #8004 [edit] 1 . [edit] 2.1 = return (<*>) = ap - [edit] 3 Discussion and consequences [edit] 3.1 It's the right thing to do™ Math. You've all heard this one, it's good and compelling so I don't need to spell it out. [edit].) [edit] [edit].(<*>) [edit]liftM With the new hierarchy, the answer would always be "use the least restrictive one". [edit] 4 Applying the AMP to GHC and then Haskell in practice Proposed is a gradual introduction of the AMP in three phases: [edit] 4.1 Done: [edit] 4.2 Current stage:. [edit]. [edit] 5 Previous proposals - Early 2011: GHC ticket – changes similar to this proposal, but closed as "not GHC, but Haskell". See here for the associated discussion. - The Other Prelude
http://www.haskell.org/haskellwiki/index.php?title=Functor-Applicative-Monad_Proposal&diff=58553&oldid=56324
CC-MAIN-2014-41
refinedweb
178
66.94
A strongly typed property access. From the Page Type Builder project Joel Abrahamsson has done a superb job with the project and is continually working on it. I’ve earlier blogged a little about the project in my Create an EPiServer site from scratch series, but not done a proper walk-through. New page type Creating a new page type is very easy. You create a new class, inherit from TypedPageData, and add the [PageType] attribute to the class declaration (living inside the PageTypeBuilder namespace). You have properties for setting the different page type settings. - AvailableInEditMode – bool (default true) - AvailablePageTypes – Type[] - DefaultArchiveToPageID – int (default -1) - DefaultChildSortOrder – FilterSortOrder - DefaultFrameID – int - DefaultPageName – string - DefaultSortIndex – int (default -1) - DefaultStartPublishOffsetMinutes – int - DefaultStopPublishOffsetMinutes – int - DefaultVisibleInMenu – bool (default true) - Description – string - Filename – string - Name – string - SortOrder – string (default 100) Example For a nice overview of how these properties map to the UI in EPiServer admin mode see: How the PageTypeAttribute’s Properties Map to EPiServer CMS’ Admin Adding properties You add properties to a page type by adding new public virtual properties to the class with the [PageTypeProperty] attribute. You have properties for setting the various EPiServer property settings. - ClearAllLongStringSettings – bool - DefaultValue – string - DefaultValueType – DefaultValueType - DisplayInEditMode – bool (default true) - EditCaption – string - HelpText – string - LongStringSettings – EditorToolOption - Required – bool - Searchable – bool - SortOrder – int - Tab – Type - Type – Type - UniqueValuePerLanguage – bool Example This will add a new property named SecondaryBody of type PropertyXhtmlString (XHTML string (>255)), with all editor options available, except for font. Use ^ for not available, or just add all the options you like with | between. Only DynamicContent and ToggleHtml will now be available for editors. UniqueValuePerLanguage = false When setting UniqueValuePerLanguage to false, and using the auto get setter property (like above), you’ll get null values returned on properties in other languages than the master language. To fix this you can use the GetPropertyValue extension method. You should now get the proper value in all languages, not just in the master language. Tabs To create a new tab, create a new class and inherit from Tab (PageTypeBuilder.Tab). You now need to implement three abstract properties - Name – string - RequiredAccess – AccessLevel - SortIndex – int Example You can now add properties to this tab by setting the PageTypeProperty’s Tab property. Dynamic properties At the moment you cannot create dynamic properties with Page TypeBuilder. You can however access them. As you’ll see when going through EPiServer public templates with Page Type Builder code, I’ve added the dynamic properties to a base class that the other page types inherit from. That way all page types have access to the dynamic properties. Also be sure to read: Working with Dynamic Properties and Page Type Builder. Accessing properties in templates One of the great things about the Page Type Builder is that you not get strongly typed access to your properties. Web forms (.aspx) Inherit from the generic TemplatePage (living inside the PageTypeBuilder.UI namespace), where the type is set to the page type this template is for. When typing CurrentPage. you’ll get access to all the public properties that Document exposes. CurrentPage.SecondaryBody for instance. User controls (.ascx) Inherit from the generic UserControlBase (living inside the PageTypeBuilder.UI namespace), where the type is set to the page type this user control is for. If the user control is used by multiple page types, simply find a common class to set as the type (a base class). Same as with web forms, you’ll get access the the properties that BasePageData exposes. EPiServer public templates with Page Type Builder I’ve started updating the EPiServer public templates to use Page Type Builder. This is not a complete conversion, but merely a nice starting place for you to see how I’ve structured my files and how the code looks when used with an existing project. Other resources - EPiServer CMS Page Type Builder project home – you’ll also find a nice up-to-date list of links to additional resources there. Related Posts: - Part 6: Creating the XForm page – Create an EPiServer site from scratch - Part 5: Creating the search page – Create an EPiServer site from scratch - Part 7: Creating the Sitemap page – Create an EPiServer site from scratch - Strongly typed access to your page data objects inside ItemTemplate - EPiServer filter – part 2: create your own filter Martin S. says:Post Author January 15, 2010 at 15:46 Great reference. Bookmarked! Joel Abrahamsson says:Post Author January 15, 2010 at 18:36 Great article Frederik! I’ve been planning to rewrite public templates to use PTB for quite some time now but have never gotten around to it. Daniel Berg says:Post Author January 16, 2010 at 11:52 Super! Thanks, Fredrik! Andrey says:Post Author November 4, 2010 at 10:38 Hi. Thanks for this really nice article it helped a lot! But there is one problem that I can’t solve. I’m using EpiServer 6 with PageTypeBuilder 1.3. When I set following properties: ClearAllLongStringSettings = true, LongStringSettings = (EditorToolOption.Bold|EditorToolOption.Underline|EditorToolOption.Italic|EditorToolOption.InsertUrl) It has no affect on TyniMce. Editor still has all the options for formatting the text. Am I missing something? How to solve it? Thanks in advance. Frederik Vig says:Post Author November 4, 2010 at 11:09 Hi Andrey, ClearAllLongStringSettings and LongStringSettings only work when using the old, built in, WYSIWYG editor (used in previous versions of EPiServer CMS). EPiServer uses the new settings functionality that came with EPiServer CMS 6 for TinyMCE. Page Type Builder version 1.3 does not support that yet. Frederik Andrey says:Post Author November 4, 2010 at 11:32 Not the best news Thanks.
http://www.frederikvig.com/2010/01/a-developers-guide-to-pagetypebuilder/
CC-MAIN-2017-17
refinedweb
938
54.63
Unity and Facebook are now in a Relationship … and it’s Awesome! The Unity Web Player is the best way to get games into players’ hands, and currently installed on over 200M computers. Facebook is a great way to get players playing and connecting with each other. A close collaboration between Unity and Facebook had the potential to bring happiness and joy to gamers all over the world, young or old, casual or hardcore, so we got together with Facebook and made magic happen. After a road trip so epic that we’re optioning the story to Hollywood, the result was a Facebook Unity package (coming soon to an Asset Store near you) and Unity 4.1.2, with two major improvements already completed. Both of these projects simplify the development and deployment of Unity games to Facebook, while also making it easier for your players to game on Facebook. Whenever a gamer wants to play a Unity game, they have to download and install the Web Player. We’re committed to making it easier and faster for anyone to download and play Unity games. Facebook is currently deploying a new Web Player install flow to help ease new players to Unity games through the download and install process, and we’re happy to report that this has significantly boosted the number of users installing the Web Player and enjoying Unity games on Facebook. To simplify the lives of game developers, Unity and Facebook jointly studied the development of immersive, high-quality games and collaborated on improving the Unity workflow. As a result, Facebook will soon release a new, free package to the Unity Asset Store, which wraps the Facebook API into a nice, easy-to-use C# SDK.. Friend Smash, a test game where you smash your Facebook friends In order to deliver this enhanced Facebook integration, we also developed some tools that will be useful for everyone, whether you’re writing a Facebook game or not. These will be available in the 4.1.2 release of Unity. First, we added a new type of UI, a Modal Window. Modal Windows always appear on top of all other content. This allows you to make sure that the user doesn’t miss any critical information or UX flows. Another key feature of these new windows are that any input to them is only captured by the modal window. This makes them a secure way for plugin developers to capture input from the player without having to expose potentially sensitive data to a 3rd party. Unity 4.1.2 also features the Chain of Trust. This new system allows a hosting web page to send a secret key to the Unity Web Player which will only be readable by a specific assembly. In order to access this secured information, assemblies must be signed. Only signed, authentic assemblies whose credentials match those specified by the hosting webpage are permitted to read the secret key, allowing the hosting site to securely extend its trust into the Unity run time. You can find more information on the Chain of Trust system here. So what does all this new stuff used in the new Facebook Unity package mean to you? It means that you can integrate Facebook’s awesome social experience into your game easier. It also means that you can keep your players immersed in your game while you do it. If a player is running your game in full screen mode, the native Facebook UI allows you to keep them full screen so they don’t feel like they are leaving the game. We’ll have more information soon, so stay posted here and on Unity’s Facebook page. Entradas relacionadas 61 ComentariosSubscribirse a los comentarios Ya no se aceptan más comentarios. DJjunio 15, 2013 a las 2:36 pm Sweet weblog! I located it while browsing on Yahoo News. Do you might have any suggestions on how to get listed in Yahoo News? I’ve been trying for a although but I never seem to get there! Thank you Video Bokep Indonesiajunio 15, 2013 a las 5:31 am You actually make it seem so easy together with your presentation however I to find this topic to be really one thing that I feel I might by no means understand. It kind of feels too complicated and very huge for me. I’m looking forward for your next submit, I’ll attempt to get the hold of it! Laurentjunio 13, 2013 a las 6:59 pm I will second that. Thanks! PrwCjunio 11, 2013 a las 5:04 am It’s 4.1.5 Now. ETA?, Thanks اس ام اس عاشقانه جدیدmayo 30, 2013 a las 8:44 am Thank you for every other informative web site. The place else may I am getting that kind of information written in such an ideal manner? I’ve a undertaking that I’m simply now operating on, and I’ve been on the look out for such information. Chiltonmayo 30, 2013 a las 7:59 am When will this magic be available? How To Make Money With YouTubemayo 29, 2013 a las 1:16 pm You know consequently significantly on the subject of that theme, taught me to be on their own believe it from many various facets. Their including women and men are usually not fascinated except it’s something to achieve using Pixie lott! Your very own products superb. On a regular basis take care of that! Sean Lloyd-Boothmayo 28, 2013 a las 11:53 am .” I agree. Nicolás Quintierimayo 26, 2013 a las 2:36 pm ETA = Estimated Time of Arrival tai game onlinemayo 24, 2013 a las 10:14 am what’s ETA? thanks ! receive smsmayo 20, 2013 a las 11:29 pm. Kronarmayo 15, 2013 a las 8:03 am When will this be available? Vaporware? vacationmayo 14, 2013 a las 9:00 pm It’s perfect time to make some plans for the longer term and it is time to be happy. I’ve read this put up and if I may just I want to suggest you few interesting issues or suggestions. Perhaps you can write subsequent articles relating to this article. I desire to read more things about it! Adam Evanichmayo 14, 2013 a las 5:39 pm Thanks for the effort writing this, really helped me :) , , does anybody knows this site works? (: dịch vụ chuyển nhà trọn góimayo 14, 2013 a las 8:44 am Magnificent points altogether, you simply gained a new reader. What might you suggest about your publish that you made a few days in the past? Any sure? Laurentmayo 13, 2013 a las 8:47 am It’s been a while, still no release, ETA? the1plummiemayo 7, 2013 a las 6:23 pm what’s ETA? I used to be suggested this website by way of my cousin. I am no longer sure whether this put up is written by means of him as no one else know such precise about my trouble. You’re incredible! Thank you! Kronarabril 29, 2013 a las 11:11 am Wheres the beef? I have 4.1.2f and I don’t see any of this. I like Unity as much as the next guy but it sure would be nice if they spent some time fixing some of the bugs in the app before adding new features. Eugene Joabril 26, 2013 a las 5:41 pm umm i have unity 4.1.2f and I’m still not seeing this. Any news? Sandolkakosabril 24, 2013 a las 2:03 am The text says that the Facebook Feature would be released in version 4.1.2, but has not yet been released. There is a new forecast to be released? datingabril 24, 2013 a las 1:54 am Fantastic items from you, man. I have take into accout your stuff prior to and you’re just too fantastic. I really like what you have obtained right here, really like what you’re stating and the best way in which you say it. You make it entertaining and you continue to take care of to keep it wise. I can not wait to learn much more from you. That is actually a great site. MSFXabril 24, 2013 a las 1:27 am Is there an ETA for this? Could really do with it for a project i’m taking on in the next few days… was hoping it would be out by now =D diese440abril 22, 2013 a las 7:00 am Looks great ! JASHAN CHITTESH :”HTML5 will be mature enough for Unity games and when that day comes, I’m pretty sure we will get an HTML5 build target [..] ” and WebGL… Indyabril 21, 2013 a las 3:12 pm If you intend to open to casual gamers, so maybe you finally allow for usage of WebPlayer if some doesn’t have CPU with SSE2. It’s ridiculous you want be so pro but still have this strange limitation. Andyabril 14, 2013 a las 9:01 pm Working with computers totally warps standard English… The last sentence should read: ‘And I do dislike’… but I am modifying a now GUI to use some icons I spent a long time making… Andyabril 14, 2013 a las 8:57 pm Hey, Well, I will say that in a friend’s and my tests of running Unity builds in the WebPlayer target that we consistently with multiple builds and different test settings got an average of 10FPS faster in Chrome vs Windows Internet Explorer 10 for Windows 8 x64. Now I guess you’ve probably cheated and used NaCL optimization in the Chrome WebPlayer target, like stripping physics code if it wasn’t used. And I do display having to practically write a chapter in a book simply to say ‘Windows Internet Explorer 10 for Windows 8 x64’… Royabril 14, 2013 a las 1:40 am So Unity 4.1.2 is out. But when is the facebook plugin coming??? polytropoiabril 4, 2013 a las 5:34 am “i thought the Flash Export would make the webplayer obsolete” – no, the unity webplayer made flash obsolete some time ago. Unity’s flash export is just a bit of morphine, so flash can die easy. ishabril 3, 2013 a las 9:05 am @ANGRYANT So are you telling us that the flash target is currently being worked on and we should expect feature parity with the webplayer in the near future (at least of simple things like lambdas and reflection)? PixelFrogabril 2, 2013 a las 7:31 am Looks great :) Will this asset compatible with Unity 3.5? AngryAntabril 2, 2013 a las 2:43 am @LUCAS, KAYOONE: The web player sucks? Please, if you find an issue with the webplayer, do let us know. It is no secret or surprise that flash runs slower than the web player. It was never the intention for one to replace the other. Along with Native Client support, they are different ways of getting the same Unity project on the web – allowing you to optimise your offering for your target group. So why should any of them drag the others down or prevent them from moving forward? Again, if you find an issue with any of our platforms, making them suck for you, please let us know how and why so we can look into the matter. Our blog is a sub-optimal bug reporting service. Skilful2000`marzo 31, 2013 a las 10:11 pm Thats a nice story to hear. Unity Rock!!!! Keep surprising the world Kevinmarzo 30, 2013 a las 4:31 pm And when are they getting married? :P Lol, jokes. Anyway, I have been looking forward to seeing Unity with Facebook for a long time and it finally came! Jashan Chitteshmarzo 30, 2013 a las 9:48 am These are awesome news!!! It’s lovely to see the Web player get this little extra boost – but I also can’t wait to get this API available for iOS, Android – and whenever that’s available – Windows Phone 8 (and Windows Store Apps, of course ;-) ). IMHO, Facebook is so important that having the relevant APIs “built in” (or at least have an official Facebook addon on the Asset Store) totally makes sense. I hope this will be integrated well into the UnityEngine.SocialPlatforms namespace of the Unity API, will it? Regarding Flash vs. Web player: The Web player is awesome, and Flash is dieing its slow death. To me, that whole Flash build target only shows one thing: That UT can do things that would seem impossible (actually, the beta of the Flash build target was quite decent and they have released a final version of this build target a while back – I just never got to test that one because I’m not willing to spend any money on anything related to Flash ;-) ). Eventually, HTML5 will be mature enough for Unity games and when that day comes, I’m pretty sure we will get an HTML5 build target … and that will be the final nail in Flash’s coffin … and I won’t be particularly sad about that ;-) This is quite an exciting time for Unity developers :-) norvinmarzo 29, 2013 a las 4:15 pm es salvaje norvinmarzo 29, 2013 a las 4:14 pm tiene los mejores juegos Miladmarzo 28, 2013 a las 11:51 am So thanks,nice features! Stephen Hodgsonmarzo 27, 2013 a las 6:53 pm I wonder why Valve hasn’t tried to do the same with Steam. Lucasmarzo 27, 2013 a las 12:50 pm @KAYOONE – Totally agree, this is a clear sign that the development of the Flash Export is not going well and probably cancelled. I remember seeing some tech demo showing a beta of Shadowgun on facebook… almost 6 months ago now and no news… This is really sad, the Unity Web Player really sucks and there’s no ‘real’ successfull facebook game actually using it (by successfull i mean > 1.500.000 MAU + in top grossing). Was really looking forward for this… Joachim Antemarzo 27, 2013 a las 9:18 am @Daniel: “Will the SDK only be available in C#? No JavaScript?” The Facebook API can be used from JavaScript and C#. ASmarzo 27, 2013 a las 8:15 am what about standalone apps? Mohanmarzo 27, 2013 a las 6:19 am Good news for Unity3D developers like us! We recently launched our Unity3D based Cricket game in Facebook, We are very eager to wrap our game with this package in the future!!! Thanks UT! Arham Arifuddinmarzo 27, 2013 a las 3:04 am congratulations. i am so happy too, my unity game project as begin for 2013 hair extensionmarzo 27, 2013 a las 12:11 am wow,what a nice idea Kayoonemarzo 26, 2013 a las 11:10 pm The Facebook API is cool but i thought the Flash Export would make the webplayer obsolete anyway. Why still such a big emphasis on the webplayer ? Havent looked at unity in a while, is the flash export still not mature enough ? Jaccomarzo 26, 2013 a las 9:04 pm Two thoughts come to mind: 1. Unity now has a built in, natively supported method of accepting payments from customers! :O 2. Can I use this Chain Of Trust thing to secure my webplayers that are NOT being run from Facebook? If been looking for a means of doing that for ages now! FierceBlazemarzo 26, 2013 a las 5:53 pm I am so happy to hear this. Facebook is a big part of my next game project. Thanks Unity!!! Marc Schaerermarzo 26, 2013 a las 4:45 pm Very cool news Congratulations not only on the work with Facebook but also the additional new features that will serve us developers well in other situations. Christian Roymarzo 26, 2013 a las 3:55 pm I have a hard time understanding what this security measure means for us doing C#. For example, our game uses high level mono encryptions with remote bouncy castle to store sensitive data, this of course has a certain overhead, but why would I need this new trust certificate thing. Is there a way to still access the code once it has been obfuscated if we did not use external dll for our compagny API ? Or maybe its good only for third party developpers of Unity extensions ? pixnlovemarzo 26, 2013 a las 3:36 pm I will never look at another Game Engine, ever again… Coreymarzo 26, 2013 a las 2:49 pm For now, this is only for the webplayer, but the intention is to get this working on more platforms in the future. Matt Stuttard Parkermarzo 26, 2013 a las 2:43 pm Really cool, also interested how this will work on iOS/Android and for Standalone… Alex (Behold Games)marzo 26, 2013 a las 2:32 pm Behold Games is STOKED!!!! This opens up a million possibilities! Thanks Unity :) Judy Tyrermarzo 26, 2013 a las 1:50 pm While awesome, does it still have the restrictions for web players that we can’t use plugins? Both my database and my networking layer are plugins. It would be great if we had a way of accessing these and still use the web player in facebook. Glaubermarzo 26, 2013 a las 1:38 pm You guys are ruling the world! gunmarzo 26, 2013 a las 1:35 pm the sdk will be transparent to you, no matter its languaje. Bruno Xaviermarzo 26, 2013 a las 1:34 pm Official support is always better. Gratz UT! Gustavo Bmarzo 26, 2013 a las 1:31 pm When will Unity stop surprising me? Trilusionmarzo 26, 2013 a las 1:29 pm Great news. I wonder if the facebook API wrapper can be used for iOS and Android development, or is it web-player only? Danielmarzo 26, 2013 a las 1:27 pm Will the SDK only be available in C#? No JavaScript?
https://blogs.unity3d.com/es/2013/03/26/unity-and-facebook-are-now-in-a-relationship-and-its-awesome/
CC-MAIN-2019-09
refinedweb
3,003
69.01
22 August 2012 11:45 [Source: ICIS news] SINGAPORE (ICIS)--?xml:namespace> The two acetic acid plants that were shut have a combined capacity of 1m tonnes/year. Prior to the outage, the acetic acid plants were operating at around 70% of capacity, the source said. Jiangsu Sopo also operates a 500,000 tonne/year methanol unit and an etac plant with the same capacity at the site. “All the plants are shut early this morning because of a blockage at a coal pipeline after heavy rains,” the official said. The plants are expected to be down for up to three days, he said. Jiangsu Sopo’s third and smallest acetic acid
http://www.icis.com/Articles/2012/08/22/9588885/chinas-jiangsu-sopo-shuts-acetic-acid-etac-methanol-plants.html
CC-MAIN-2014-42
refinedweb
112
73.17
XNA 4.0 CTP is now released with Windows Phone 7. You have now have a great range of Software Development Platfoms. Now you will be developing a game which will run in Windows OS,Windows Phone 7,XBOX 360.One Architecture to Develop Them All(Kinda LOTR :) )Microsoft.Xna.Framework.Input.Touch;This is a new namespace added on XNA 4.0 CTP.As you well know Windows Phone has a "Touch Screen" so XNA Development Team wanted to add a namespace that can interact with itLets have a look at "Microsoft.Xna.Framework.Input.Touch"!You can add Touch Namespace in your projects reference code region by calling:using Microsoft.Xna.Framework.Input.Touch;Touch Namespace has some elements:TouchCollectionTouchLocationTouchLocationStateTouchPanelTouchPanelCapabilitiesLets have a look at them:TouchCollection: Here you can have access to the "Touched" Screens of Windows Phone. You can add a new TouchScreen value or get all the Touched Screens.TouchLocation: This is the place you can get the coordinates of the "touched" screen.TouchLocationState:These (Invalid,Moved,Pressed,Released) are the possible states on a Touch Screen. You can use them on TouchLocation Struct to query them whether they are pressed, released, moved or invalid.TouchPanel:This is the Screen of the device. You can get its current Handle, State and Capabilities of the device.TouchPanelCapabilities:Here you can get the device's capabilities such as Pressure,Connection,MaxTouchCountI will be talking more about Touch Processes when i get my Windows Phone SOLUTION EXPLORER STRUCTUREIn XNA 3.1 the Solution Explorer looked like this:But in XNA 4.0 Content Section will be aparted from the main project just like a new project added to your solution. But it will be linked in your Main Project as well:Hardware accelerated 3D API on Windows Phone 7That means yes 3D Games will be able to played in your Windows Phone 7 Mobile Device. This is a great feature which will change and shape the Game Development Industry & Market.And all you need is a Microsoft Visual Studio 2010 with XNA Game Studio 4.0.Now you can test it with your own device or an emulator.3D Games will be standard as you can understand.We already know ZUNE Device supports 3D but a support from Windows Phone is a great deal too!XBOX LIVE SupportThis is a great feature too! You can add Gamertags and 2D Avatar using GamerServices as part of the game experience which will help your game look like much more dynamic and fun.NO ZUNE in XNA 4.0!Sadly you will be able to continue develop your 3D-Supported Games in XNA 3.1 but currently there will be no ZUNE in XNA 4.0.By launching a new platform (Windows Phone 7) Microsoft XNA Development Team decided to not to include ZUNE,too inside XNA 4.0..
http://www.c-sharpcorner.com/UploadFile/iersoy/whats-new-in-xna-4-0/
CC-MAIN-2016-07
refinedweb
477
56.76
#include <wx/process.h> The... Creates an object without any associated parent (and hence no id neither) but allows specifying the flags which can have the value of wxPROCESS_DEFAULT or wxPROCESS_REDIRECT. Specifying the former value has no particular effect while using the latter one is equivalent to calling Redirect(). Activates a GUI process by bringing up its main window to the front. This is a convenient method which tries to bring this process to the users attention. Currently this is implemented in wxMSW only and simply returns false under the other platforms. Notice that this function can also return false under MSW if, for example, the process doesn't have any windows. writing.. Sets the priority of the process, between 0 (lowest) and 100 (highest). It can only be set before the process is created. The following symbolic constants can be used in addition to raw values in 0..100 range:
https://docs.wxwidgets.org/trunk/classwx_process.html
CC-MAIN-2021-49
refinedweb
151
54.93
How to use the Marketplace review task for Windows Phone 8 [ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ] Use the Marketplace review task to launch the Store or Marketplace and then display the review page for the current app. By using Launchers, you help provide a consistent user experience throughout the Windows Phone platform. For more info, see Launchers and Choosers for Windows Phone 8. Note A user must have a Microsoft account (formerly known as a Windows Live ID) to write a review. On Windows Phone Emulator, an error appears when you launch the rate and review page if there is no Microsoft account. To use the Marketplace review task Add the following statement to your code. using Microsoft.Phone.Tasks; Imports Microsoft.Phone.Tasks Add the following code to your app wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code you use to launch the task. MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask(); marketplaceReviewTask.Show(); Dim marketplaceReviewTask as MarketplaceReviewTask = new MarketplaceReviewTask() marketplaceReviewTask.Show() See Also Reference Other Resources How to use the Marketplace detail task for Windows Phone 8 How to use the Marketplace Hub task for Windows Phone 8 How to use the Marketplace search task for Windows Phone 8 How to link to Store content Windows Phone 8
https://docs.microsoft.com/en-us/previous-versions/windows/apps/hh394030(v=vs.105)
CC-MAIN-2019-09
refinedweb
240
55.74
I am new at the coding end of website building and I am struggling with how to connect a user input button so that it auto-fills with a member's name when they are logged in. I understand how to connect these fields to the database, but I would like to have them not have to type their name each time they submit. I understand there is code I can paste to make this occur, but I am not sure what it is and where exactly at the bottom of the screen to paste it. Please forgive my learning curve here... The field I want to connect is the one I have labeled 'user name', selected in the image below. Thank you! You'll nedd to add some code that FETCH data from the database and changes the value of that field. You can aslo link usernme to your usernames database that that won't populate username in the other database (picture). Hi, If you have the Users name in your database, you can try filtering the dataset by logged-in user. Liran. Hi Liran, This link no longer works, do you have an updated one? Thanks, Myles Hi Hacer, I had the same issue as well. You can link auto-fill inputs from a database and add other user input fields. Then use setFieldValue function to submit auto-fill inputs to your database. This website has an example on how to create an auto-fill form,. Good luck! Ben Hi dunno if you solved this but i used this, Member profiles contain the full names of my clients and i use this code to pull them onto their own dash board page into a text box named #longNametextbox import wixData from 'wix-data'; export function Submit_click(event) { const currentItem = $w("#MemberProfile5").getCurrentItem(); $w("#longNametextbox").text = currentItem.fullName; $w('#MemberProfile5').setFieldValue('longName', $w('#longNametextbox').text); }
https://www.wix.com/corvid/forum/community-discussion/auto-input-member-name-into-field-for-form-submission
CC-MAIN-2020-10
refinedweb
316
66.98
Hello fellow monks, I have a quick question concerning the aliasing of functions. Consider the following example: #!/usr/bin/perl -w use strict; local *basename = \&pathname; print basename('/usr/local/bin/ssh'), "\n"; sub pathname { my ($dir) = shift; my ($path, $name) = ($dir =~ /(.*)\/([^\/]*)$/); # if called as basename, return filename, otherwise return pathname +(how?) return $path; } [download] How can I get the name of the called function, so I can vary the output based on which function was called? I want the function to return the pathname if called with 'pathname', and the filename if called with 'basename'. I have been reading about function templates and closures, which seems handy in case one has many aliases; but I wonder if there is a more easy way to just get the called function name, considering I only have one alias. Thanks! A simpler technique may be just to have a base sub and then wrap the other subs around it e.g sub base { return "doing stuff" } sub foo { return base(). " in foo\n" } local *bar = sub { return base(). " in bar\n" }; foo(), bar(); __output__ doing stuff in foo doing stuff in bar [download] _________broquaint But the problem is that in the current form, all output comes from one pattern match. The base sub has to return either $a or $b, $pathname or $filename; if I use wrapping subs, I still loose the context. Unless ofcourse I add an extra parameter that specifies whether I'm interested in the pathname or the filename, but then I don't need the wrapping subs either. I could make seperate subs obviously, but then I would have to duplicate the same pattern matching, and that wouldn't be much fun training-wise, would it. ;) The base sub has to return either $a or $b, $pathname or $filename Err... no. sub do_the_match { my $dir = shift; my ($path, $name) = ($dir =~ /(.*)\/([^\/]*)$/); return ($path, $name); } [download] sub match { my $context = (caller(1))[3]; my $arg = shift; my @result = $arg =~ /$pattern/; # $context =~ /dirname/ ? $result[0] : $context =~ /basename/ ? $result[1] : ... # etc. # otherwise, return the whole result vector: @result } sub dirname { &match } sub basename { &match } # etc. [download] jdporterThe 6th Rule of Perl Club is -- There is no Rule #6. You want caller, But... Why mess with one code block with two names? Just make two subs, or see File::Spec for a better way to do this job. Update: broquaint is correct about caller not doing what you want: $ perl -e'sub foo {print( (caller 0)[3], $/)} local *bar = \&foo; bar( +)' main::foo $ perl -e'$foo = sub {print( (caller 0)[3], $/)}; local *bar = $foo; b +ar()' main::__ANON__ $ [download] After Compline,Zaxo Why mess with one code block with two names? Because both return values come from the same line of code; and just to practice my perl skills. You're right that using a module could be more handy, but I want to understand more about perl references, so I try to use some in my code. I'm more interested in explanation why it does/doesn't work, and what the alternatives in implementation are, than references to modules. ;) Thanks for the idea, though. sub x { print "Starting with X\n"; my $ret = _shared_code(@_); return "From X: $ret"; } sub y { print "Starting with Y\n"; my $ret = _shared_code(@_); return "From Y: $ret"; } sub _shared_code { # Do stuff here } [download] sub DoFoo { return do_stuff('Foo', @_) } sub DoBar { return do_stuff('Bar', @_) } sub DoBaz { return do_stuff('Baz', @_) } sub do_stuff { my ($name, ...) = @_; # Do stuff agree with the valid points that were already rasied: However, my curiosity was piqued about how to go about this, if the need did come up somehow, even though I think solution #2 would be the simplest/best answer most (all?) of the time... So I came up with this snippet using closures, as you mentioned for my $wheel (qw/basename dirname/) { no strict 'refs'; *$wheel = sub { my ($dir) = shift; my ($path, $name) = ($dir =~ m{(.*)/([^/]*)$}); if ($wheel eq 'basename') { return $name; } else { return $path; } }; } my $path = dirname('/tmp/foo/bar'); my $name = basename('/tmp/foo/bar'); print "$path/$name\n"; [download] Works for me... Update: Expunged the OPs leaning toothpicks, since I am attributing the snippet to myself ;-) Update: Or this: for my $funcname (qw/basename dirname/) { no strict 'refs'; *$funcname = sub { my ($dir) = shift; my ($path, $name) = ($dir =~ m{(.*)/([^/]*)$}); if ($funcname eq 'basename') { return $name; } else { return $path; } }; } my $path = dirname('/tmp/foo/bar'); my $name = basename('/tmp/foo/bar'); print "$path/$name\n"; [download] Nice. That's what I tried already too, but it looked very complex to me, considering what I was trying to do. Seems to me dispatching functionality with aliased sub names (like some unix commands do) is one major benefit of aliases, but it doesn't appear to be possible... which is a pity. I don't know but ... if I make an alias I expect the alias to behave exactly as the original. And not to notice I called it differently and starting to complain that it aint Larry, but Mr. Wall. If it's supposed to behave differently it should be a different subroutine. Jenda Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Rick Osborne Edit by castaway: Closed small tag in signature #!/usr/bin/perl -w use strict; sub eithername { my ($name, $dir) = @_; my %bit; @bit{qw(path base)} = $dir =~ /(.*)\/([^\/]*)$/; return $bit{$name}; } sub basename { unshift @_, 'base'; goto &eithername } sub pathname { unshift @_, 'path'; goto &eithername } print basename('/usr/local/bin/ssh'), "\n"; [download] Makeshifts last the.
http://www.perlmonks.org/?node_id=255833
CC-MAIN-2017-26
refinedweb
936
69.21
Hi Sorry to jump in late. After read the previous email. I have such assumptions, and please correct me if I'm wrong: - RocksDBStateBackend with incremental checkpoint - at least once mode - the parallelism for the stateful operator is 8 - checkpoint may take too long to complete - has fix rate input by using throttler. >From the latest email, the checkpoint size grows from start to end, and the e2e time grows also. >From my side. e2e checkpoint time depends on the e2e snapshot time of all operators. the e2e snapshot time of operator depends on the ${barrier_align_time} + ${sync-snapshot-time} + ${async-snapshot-time}. For at least once mode, you can enable debug log to track the process of barrier align time. You can find out which step is the bottleneck, and track one task to find out the reason. maybe you could try: 1. use fullsnapshot of RocksDBStateBackend(disable incremental checkpoint) and see what the e2e time of checkpoint will be -- This wants to verify whether there is too many "increment change" between checkpoints. 2. place the times on Heap and RocksDB, whether this will affect the checkpoint time -- The timer on heap will affect the sync-snapshot time 3. find out whether there is io/disk problem when snapshotting? 4. find out whether there is network problem when snapshotting? 5. does upload the state using multiple threads[1] help here [1] Best, Congxian Jeff Henrikson <jehenrik27@gmail.com> 于2020年6月21日周日 上午2:46写道: > Bhaskar, > > > Glad to know some progress. > > Yeah, some progress. Yet overnight run didn't look as good as I hoped. > > The throttling required to not crash during snapshots seems to be quite > different from the throttling required to crash not during snapshots. > So the lowest common denominator is quite a large performance penalty. > > What's worse, the rate of input that makes the snapshot performance go > from good to bad seems to change significantly as the state size grows. > Here is checkpoint history from an overnight run. > > Parameters: > > - 30 minutes minimum between snapshots > - incremental snapshot mode > - inputs throttled to 100 events per sec per input per slot, > which is around 1/4 of the unthrottled throughput > > Checkpoint history: > > ID Status Acknowledged Trigger Time Latest > Acknowledgement End to End > Duration State Size Buffered During Alignment > 12 COMPLETED 304/304 8:52:22 10:37:18 1h 44m > 55s 60.5 GB 0 B > 11 COMPLETED 304/304 6:47:03 8:22:19 1h 35m 16s > 53.3 GB 0 B > 10 COMPLETED 304/304 5:01:20 6:17:00 1h 15m 39s > 41.0 GB 0 B > 9 COMPLETED 304/304 3:47:43 4:31:19 43m 35s 34.1 GB 0 B > 8 COMPLETED 304/304 2:40:58 3:17:42 36m 43s 27.8 GB 0 B > 7 COMPLETED 304/304 1:39:15 2:10:57 31m 42s 23.1 GB 0 B > 6 COMPLETED 304/304 0:58:02 1:09:13 11m 11s 17.4 GB 0 B > 5 COMPLETED 304/304 0:23:27 0:28:01 4m 33s 14.3 GB 0 B > 4 COMPLETED 304/304 23:52:29 23:53:26 > 56s 12.7 GB 0 B > 3 COMPLETED 304/304 23:20:59 23:22:28 1m > 29s 10.8 GB 0 B > 2 COMPLETED 304/304 22:46:17 22:50:58 4m > 40s 7.40 GB 0 B > > As you can see, GB/minute varies drastically. GB/minute also varies > drastically with full checkpoint mode. > > I'm pleased that it hasn't crashed yet. Yet I'm concerned that with the > checkpoint GB/minute getting so slow, it will crash soon. > > I'm really wishing state.backend.async=false worked for > RocksDbStateBackend. > > I'm also wondering if my throttler would improve if I just connected to > the REST api to ask if any checkpoint is in progress, and then paused > inputs accordingly. Effectively state.backend.async=false via hacked > application code. > > > Where are you updating your state here? I > > couldn't find any flink managed state here. > > The only updates to state I make are through the built-in > DataStream.cogroup. A unit test (without RocksDB loaded) of the way I > use .cogroup shows exactly two ways that .cogroup calls an > implementation of AppendingState.add. I summarize those below. > > The two AppendingState subclasses invoked are HeapListState and > HeapReducingState. Neither have a support attribute on them, such as > MapState's @PublicEvolving. > > > I suggested updating the flink managed state using onTimer over an > > interval equal to the checkpoint interval. > > So the onTimer method, with interval set to the checkpoint interval. > Interesting. > > It looks like the closest subclass for my use case use would be either > KeyedCoProcessFunction. Let me see if I understand concretely the idea: > > 1) between checkpoints, read join input and write join output, by > loading any state reads from external state, but buffering all state > changes in memory in some kind of data structure. > > 2) whenever a checkpoint arrived or the memory consumed by buffered > writes gets too big, flush the writes to state. > > Is that the gist of the idea about .onTimer? > > > Jeff > > > > There are two paths from .coGroup to AppendingState.add > > path 1 of 2: .coGroup to HeapListState > > add:90, HeapListState {org.apache.flink.runtime.state.heap} > processElement:203, EvictingWindowOperator > {org.apache.flink.streaming.runtime.operators.windowing} > processElement:164, StreamOneInputProcessor > {org.apache.flink.streaming.runtime.io} > processInput:143, StreamOneInputProcessor > {org.apache.flink.streaming.runtime.io} > > > > org.apache.flink.streaming.runtime.operators.windowing.EvictingWindowOperator#processElement > > (windowAssigner is an instance of GlobalWindows) > > ); > > => > > org.apache.flink.runtime.state.heap.HeapListState#add: > @Override > public void add(V value) { > Preconditions.checkNotNull(value, "You > cannot add > null to a ListState."); > > final N namespace = currentNamespace; > > final StateTable<K, N, List<V>> map = > stateTable; > List<V> list = map.get(namespace); > > if (list == null) { > list = new ArrayList<>(); > map.put(namespace, list); > } > list.add(value); > } > > path 2 of 2: .coGroup to HeapReducingState > > add:95, HeapReducingState > {org.apache.flink.runtime.state.heap} > onElement:49, CountTrigger > {org.apache.flink.streaming.api.windowing.triggers} > onElement:898, WindowOperator$Context > {org.apache.flink.streaming.runtime.operators.windowing} > processElement:210, EvictingWindowOperator > {org.apache.flink.streaming.runtime.operators.windowing} > processElement:164, StreamOneInputProcessor > {org.apache.flink.streaming.runtime.io} > processInput:143, StreamOneInputProcessor > {org.apache.flink.streaming.runtime.io} > > ); > > triggerContext.key = key; > triggerContext.window = window; > evictorContext.key = key; > evictorContext.window = window; > > TriggerResult triggerResult = > triggerContext.onElement(element); > > => > public TriggerResult onElement(StreamRecord<IN> > element) > throws Exception { > return > trigger.onElement(element.getValue(), > element.getTimestamp(), window, this); > > => > > @Override > public TriggerResult onElement(Object element, long > timestamp, > W window, TriggerContext ctx) throws Exception { > ReducingState<Long> count = > ctx.getPartitionedState(stateDesc); > count.add(1L); > > => > > org.apache.flink.runtime.state.heap.HeapReducingState#add > @Override > public void add(V value) throws IOException { > > if (value == null) { > > > > On 6/19/20 8:22 PM, Vijay Bhaskar wrote: > > Glad to know some progress. Where are you updating your state here? I > > couldn't find any flink managed state here. > > I suggested updating the flink managed state using onTimer over an > > interval equal to the checkpoint interval. > > > > In your case since you do throttling, it helped to maintain the fixed > > rate per slot. Before the rate was sporadic. > > It's definitely an IO bottleneck. > > > > So now you can think of decoupling stateless scanning and stateful joins. > > For example you can keep a stateless scan as separate flink job and keep > > its output in some Kafka kind of store. > > > > From there you start your stateful joins. This would help focussing on > > your stateful job in much better fashion > > > > Regards > > Bhaskar > > > > > > > > > > On Sat, Jun 20, 2020 at 4:49 AM Jeff Henrikson <jehenrik27@gmail.com > > <mailto:jehenrik27@gmail.com>> wrote: > > > > Bhaskar, > > > > Based on your idea of limiting input to get better checkpoint > behavior, > > I made a ProcessFunction that constraints to a number of events per > > second per slot per input. I do need to do some stateless input > > scanning before joins. The stateless part needs to be fast and does > no > > impact snapshots. So I inserted the throttling after the input > > preprocessing but before the stateful transformations. There is a > > significant difference of snapshot throughput (often 5x or larger) > when > > I change the throttle between 200 and 300 events per second (per slot > > per input). > > > > Hope the throttling keeps being effective as I keep the job running > > longer. > > > > Odd. But likely a very effective way out of my problem. > > > > I wonder what drives it . . . Thread contention? IOPS contention? > > > > See ProcessFunction code below. > > > > Many thanks! > > > > > > Jeff > > > > > > > > import org.apache.flink.streaming.api.functions.ProcessFunction > > import org.apache.flink.util.Collector > > > > // Set eventsPerSecMax to -1 to disable the throttle > > // TODO: Actual number of events can be slightly larger > > // TODO: Remove pause correlation with system clock > > > > case class Throttler[T](eventsPerSecMax : Double) extends > > ProcessFunction[T,T] { > > var minutePrev = 0 > > var numEvents = 0 > > def minutes() = { > > val ms = System.currentTimeMillis() > > (ms / 1000 / 60).toInt > > } > > def increment() = { > > val m = minutes() > > if(m != minutePrev) { > > numEvents = 0 > > } > > numEvents += 1 > > } > > def eps() = { > > numEvents/60.0 > > } > > override def processElement(x: T, ctx: ProcessFunction[T, > > T]#Context, > > out: Collector[T]): Unit = { > > increment() > > if(eventsPerSecMax > 0 && eps() > eventsPerSecMax) { > > Thread.sleep(1000L) > > } > > out.collect(x) > > } > > } > > > > On 6/19/20 9:16 AM, Jeff Henrikson wrote: > > > Bhaskar, > > > > > > Thank you for your thoughtful points. > > > > > > > > > > > > > I have spent very little time testing with checkpoint intervals > > of under > > > 3 minutes. I frequently test with intervals of 5 minutes and of > 30 > > > minutes. I also test with checkpoint intervals such as 60 > > minutes, and > > > never (manual only). In terms of which exceptions get thrown, I > > don't > > > see much difference between 5/30/60, I don't see a lot of > difference. > > > > > > Infinity (no checkpoint internal) seems to be an interesting > value, > > > because before crashing, it seems to process around twice as much > > state > > > as with any finite checkpoint interval. The largest savepoints I > > have > > > captured have been manually triggered using the /job/:jobid/stop > > REST > > > API. I think it helps for the snapshot to be synchronous. > > > > > > One curiosity about the /job/:jobid/stop command is that from > > time of > > > the command, it often takes many minutes for the internal > > processing to > > > stop. > > > > > > Another curiosity about /job/:jobid/stop command is that sometimes > > > following a completed savepoint, the cluster goes back to running! > > > > > > > Coming to (2) > > > > > > > > What's your input data rate? > > > > > > My application involves what I will call "main" events that are > > enriched > > > by "secondary" events. While the secondary events have several > > > different input streams, data types, and join keys, I will > > estimate the > > > secondary events all together. My estimate for input rate is as > > follows: > > > > > > 50M "main" events > > > 50 secondary events for each main event, for a > > > total of around 2.5B input events > > > 8 nodes > > > 20 hours > > > > > > Combining these figures, we can estimate: > > > > > > 50000000*50/8/20/3600 = 4340 events/second/node > > > > > > I don't see how to act on your advice for (2). Maybe your idea > > is that > > > during backfill/bootstrap, I artificially throttle the inputs to > my > > > application? > > > > > > 100% of my application state is due to .cogroup, which manages a > > > HeapListState on its own. I cannot think of any controls for > > changing > > > how .cogroup handles internal state per se. I will paste below > the > > > Flink code path that .cogroup uses to update its internal state > > when it > > > runs my application. > > > > > > The only control I can think of with .cogroup that indirectly > > impacts > > > internal state is delayed triggering. > > > > > > Currently I use a trigger on every event, which I understand > > creates a > > > suboptimal number of events. I previously experimented with > delayed > > > triggering, but I did not get good results. > > > > > > Just now I tried again ContinuousProcessingTimeTrigger of 30 > > seconds, > > > with rocksdb.timer-service.factory: heap, and a 5 minute > checkpoint > > > interval. The first checkpoint failed, which has been rare when > > I use > > > all the same parameters except for triggering on every event. So > it > > > looks worse not better. > > > > > > Thanks again, > > > > > > > > > Jeff Henrikson > > > > > > > > > > > > > > > On 6/18/20 11:21 PM, Vijay Bhaskar wrote: > > >> Thanks for the reply. > > >> > > >> > > >> Coming to (2) > > >> > > >> What's your input data rate? > > >> For example you are seeing data at 100 msg/sec, For each message > if > > >> there is state changing and you are updating the state with > > RocksDB, > > >> it's going to > > >> create 100 rows in 1 second at RocksDb end, On the average if 50 > > >> records have changed each second, even if you are using RocksDB > > >> differentialstate = true, > > >> there is no use. Because everytime 50% is new rows getting > > added. So > > >> the best bet is to update records with RocksDB only once in your > > >> checkpoint interval. > > >> Suppose your checkpoint interval is 5 minutes. If you update > > RocksDB > > >> state once in 5 minutes, then the rate at which new records > > added to > > >> RocksDB will be 1 record/5min. > > >> Whereas in your original scenario, 30000 records added to > > rocksDB in 5 > > >> min. You can save 1:30000 ratio of records in addition to > RocksDB. > > >> Which will save a huge > > >> redundant size addition to RocksDB. Ultimately your state is > > driven > > >> by your checkpoint interval. From the input source you will go > > back 5 > > >> min back and read the state, similarly from RocksDB side > > >> also you can have a state update once in 5 min should work. > > Otherwise > > >> even if you add state there is no use. > > >> > > >> Regards > > >> Bhaskar > > >> > > >> Try to update your RocksDB state in an interval equal to the > > >> checkpoint interval. Otherwise in my case many times what's > > observed is > > >> state size grows unnecessarily. > > >> > > >> On Fri, Jun 19, 2020 at 12:42 AM Jeff Henrikson > > <jehenrik27@gmail.com <mailto:jehenrik27@gmail.com> > > >> <mailto:jehenrik27@gmail.com <mailto:jehenrik27@gmail.com>>> > wrote: > > >> > > >> Vijay, > > >> > > >> Thanks for your thoughts. Below are answers to your > questions. > > >> > > >> > 1. What's your checkpoint interval? > > >> > > >> I have used many different checkpoint intervals, ranging > from 5 > > >> minutes > > >> to never. I usually setMinPasueBetweenCheckpoints to the > same > > >> value as > > >> the checkpoint interval. > > >> > > >> > 2. How frequently are you updating the state into > RocksDB? > > >> > > >> My understanding is that for .cogroup: > > >> > > >> - Triggers control communication outside the operator > > >> - Evictors control cleanup of internal state > > >> - Configurations like write buffer size control the > > frequency of > > >> state change at the storage layer > > >> - There is no control for how frequently the window state > > >> updates at > > >> the layer of the RocksDB api layer. > > >> > > >> Thus, the state update whenever data is ingested. > > >> > > >> > 3. How many task managers are you using? > > >> > > >> Usually I have been running with one slot per taskmanager. > > 28GB of > > >> usable ram on each node. > > >> > > >> > 4. How much data each task manager handles while taking > the > > >> checkpoint? > > >> > > >> Funny you should ask. I would be okay with zero. > > >> > > >> The application I am replacing has a latency of 36-48 hours, > > so if I > > >> had > > >> to fully stop processing to take every snapshot > > synchronously, it > > >> might > > >> be seen as totally acceptable, especially for initial > > bootstrap. > > >> Also, > > >> the velocity of running this backfill is approximately 115x > real > > >> time on > > >> 8 nodes, so the steady-state run may not exhibit the failure > > mode in > > >> question at all. > > >> > > >> It has come as some frustration to me that, in the case of > > >> RocksDBStateBackend, the configuration key > state.backend.async > > >> effectively has no meaningful way to be false. > > >> > > >> The only way I have found in the existing code to get a > > behavior like > > >> synchronous snapshot is to POST to /jobs/<jobID>/stop with > > >> drain=false > > >> and a URL. This method of failing fast is the way that I > > discovered > > >> that I needed to increase transfer threads from the default. > > >> > > >> The reason I don't just run the whole backfill and then take > one > > >> snapshot is that even in the absence of checkpoints, a very > > similar > > >> congestion seems to take the cluster down when I am say > > 20-30% of the > > >> way through my backfill. > > >> > > >> Reloading from my largest feasible snapshot makes it > > possible to make > > >> another snapshot a bit larger before crash, but not by much. > > >> > > >> On first glance, the code change to allow > > RocksDBStateBackend into a > > >> synchronous snapshots mode looks pretty easy. Nevertheless, > > I was > > >> hoping to do the initial launch of my application without > > needing to > > >> modify the framework. > > >> > > >> Regards, > > >> > > >> > > >> Jeff Henrikson > > >> > > >> > > >> On 6/18/20 7:28 AM, Vijay Bhaskar wrote: > > >> > For me this seems to be an IO bottleneck at your task > > manager. > > >> > I have a couple of queries: > > >> > 1. What's your checkpoint interval? > > >> > 2. How frequently are you updating the state into RocksDB? > > >> > 3. How many task managers are you using? > > >> > 4. How much data each task manager handles while taking > the > > >> checkpoint? > > >> > > > >> > For points (3) and (4) , you should be very careful. I > > feel you > > >> are > > >> > stuck at this. > > >> > You try to scale vertically by increasing more CPU and > > memory for > > >> each > > >> > task manager. > > >> > If not, try to scale horizontally so that each task > > manager IO > > >> gets reduces > > >> > Apart from that check is there any bottleneck with the > file > > >> system. > > >> > > > >> > Regards > > >> > Bhaskar > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > On Thu, Jun 18, 2020 at 5:12 PM Timothy Victor > > <victtim@gmail.com <mailto:victtim@gmail.com> > > >> <mailto:victtim@gmail.com <mailto:victtim@gmail.com>> > > >> > <mailto:victtim@gmail.com <mailto:victtim@gmail.com> > > <mailto:victtim@gmail.com <mailto:victtim@gmail.com>>>> wrote: > > >> > > > >> > I had a similar problem. I ended up solving by not > > >> relying on > > >> > checkpoints for recovery and instead re-read my input > > sources > > >> (in my > > >> > case a kafka topic) from the earliest offset and > > rebuilding > > >> only the > > >> > state I need. I only need to care about the past 1 > to 2 > > >> days of > > >> > state so can afford to drop anything older. My > recovery > > >> time went > > >> > from over an hour for just the first checkpoint to > > under 10 > > >> minutes. > > >> > > > >> > Tim > > >> > > > >> > On Wed, Jun 17, 2020, 11:52 PM Yun Tang > > <myasuka@live.com <mailto:myasuka@live.com> > > >> <mailto:myasuka@live.com <mailto:myasuka@live.com>> > > >> > <mailto:myasuka@live.com <mailto:myasuka@live.com> > > <mailto:myasuka@live.com <mailto:myasuka@live.com>>>> wrote: > > >> > > > >> > Hi Jeff > > >> > > > >> > 1. "after around 50GB of state, I stop being > able to > > >> reliably > > >> > take checkpoints or savepoints. " > > >> > What is the exact reason that job cannot > complete > > >> > checkpoint? Expired before completing or > > decline by > > >> some > > >> > tasks? The former one is manly caused by high > > >> back-pressure > > >> > and the later one is mainly due to some > internal > > >> error. > > >> > 2. Have you checked what reason the remote task > > manager > > >> is lost? > > >> > If the remote task manager is not crashed, it > > might > > >> be due > > >> > to GC impact, I think you might need to check > > >> task-manager > > >> > logs and GC logs. > > >> > > > >> > Best > > >> > Yun Tang > > >> > > > >> > > > ------------------------------------------------------------------------ > > >> > *From:* Jeff Henrikson >>>> > > >> > *Sent:* Thursday, June 18, 2020 1:46 > > >> > *To:* user > >>>> > > >> > *Subject:* Trouble with large state > > >> > Hello Flink users, > > >> > > > >> > I have an application of around 10 enrichment > > joins. All > > >> events > > >> > are > > >> > read from kafka and have event timestamps. The > > joins are > > >> built > > >> > using > > >> > .cogroup, with a global window, triggering on > every 1 > > >> event, plus a > > >> > custom evictor that drops records once a newer > > record > > >> for the > > >> > same ID > > >> > has been processed. Deletes are represented by > empty > > >> events with > > >> > timestamp and ID (tombstones). That way, we can > drop > > >> records when > > >> > business logic dictates, as opposed to when a > maximum > > >> retention > > >> > has been > > >> > attained. The application runs > > RocksDBStateBackend, on > > >> > Kubernetes on > > >> > AWS with local SSDs. > > >> > > > >> > Unit tests show that the joins produce expected > > >> results. On an > > >> > 8 node > > >> > cluster, watermark output progress seems to > > indicate I > > >> should be > > >> > able to > > >> > bootstrap my state of around 500GB in around 1 > > day. I am > > >> able > > >> > to save > > >> > and restore savepoints for the first half an hour > > of run > > >> time. > > >> > > > >> > My current trouble is that after around 50GB of > > state, > > >> I stop > > >> > being able > > >> > to reliably take checkpoints or savepoints. Some > > time > > >> after > > >> > that, I > > >> > start getting a variety of failures where the > first > > >> suspicious > > >> > log event > > >> > is a generic cluster connectivity error, such as: > > >> > > > >> > 1) java.io.IOException: Connecting the > channel > > >> failed: > > >> > Connecting > > >> > to remote task manager + > > '/10.67.7.101:38955 <> > > >> <> > > >> > <>' has failed. This > > >> > might indicate that the remote task manager > has > > >> been lost. > > >> > > > >> > 2) org.apache.flink.runtime.io > > <> > > >> <>.network.netty.exception > > >> > .RemoteTransportException: Connection > > unexpectedly > > >> closed > > >> > by remote > > >> > task manager 'null'. This might indicate > > that the > > >> remote task > > >> > manager was lost. > > >> > > > >> > 3) Association with remote system > > >> > [akka.tcp://flink@10.67.6.66:34987 > > <> > > >> <> > > >> > <>] has failed, > > address is > > >> now > > >> > gated for [50] ms. Reason: [Association > > failed with > > >> > [akka.tcp://flink@10.67.6.66:34987 > > <> > > >> <> > > >> > <>]] Caused by: > > >> > [java.net <> > > <>.NoRouteToHostException: > > >> No route to host] > > >> > > > >> > I don't see any obvious out of memory errors on > the > > >> TaskManager UI. > > >> > > > >> > Adding nodes to the cluster does not seem to > > increase the > > >> maximum > > >> > savable state size. > > >> > > > >> > I could enable HA, but for the time being I have > been > > >> leaving it > > >> > out to > > >> > avoid the possibility of masking deterministic > > faults. > > >> > > > >> > Below are my configurations. > > >> > > > >> > Thanks in advance for any advice. > > >> > > > >> > Regards, > > >> > > > >> > > > >> > Jeff Henrikson > > >> > > > >> > > > >> > > > >> > Flink version: 1.10 > > >> > > > >> > Configuration set via code: > > >> > parallelism=8 > > >> > maxParallelism=64 > > >> > > setStreamTimeCharacteristic(TimeCharacteristic.EventTime) > > >> > > > >> setCheckpointingMode(CheckpointingMode.AT_LEAST_ONCE) > > >> > setTolerableCheckpointFailureNumber(1000) > > >> > setMaxConcurrentCheckpoints(1) > > >> > > > >> > > > >> > > > enableExternalizedCheckpoints(ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION) > > >> > > >> > RocksDBStateBackend > > >> > > > setPredefinedOptions(PredefinedOptions.FLASH_SSD_OPTIMIZED) > > >> > setNumberOfTransferThreads(25) > > >> > setDbStoragePath points to a local nvme SSD > > >> > > > >> > Configuration in flink-conf.yaml: > > >> > > > >> > jobmanager.rpc.address: localhost > > >> > jobmanager.rpc.port: 6123 > > >> > jobmanager.heap.size: 28000m > > >> > taskmanager.memory.process.size: 28000m > > >> > taskmanager.memory.jvm-metaspace.size: 512m > > >> > taskmanager.numberOfTaskSlots: 1 > > >> > parallelism.default: 1 > > >> > jobmanager.execution.failover-strategy: full > > >> > > > >> > cluster.evenly-spread-out-slots: false > > >> > > > >> > taskmanager.memory.network.fraction: > > 0.2 # > > >> > default 0.1 > > >> > taskmanager.memory.framework.off-heap.size: > 2GB > > >> > taskmanager.memory.task.off-heap.size: 2GB > > >> > > > taskmanager.network.memory.buffers-per-channel: 32 > > >> # default 2 > > >> > taskmanager.memory.managed.fraction: 0.4 > # > > >> docs say > > >> > default 0.1, but something seems to set 0.4 > > >> > taskmanager.memory.task.off-heap.size: > > 2048MB # > > >> > default 128M > > >> > > > >> > state.backend.fs.memory-threshold: 1048576 > > >> > state.backend.fs.write-buffer-size: 10240000 > > >> > state.backend.local-recovery: true > > >> > state.backend.rocksdb.writebuffer.size: 64MB > > >> > state.backend.rocksdb.writebuffer.count: 8 > > >> > > > state.backend.rocksdb.writebuffer.number-to-merge: 4 > > >> > > > state.backend.rocksdb.timer-service.factory: heap > > >> > state.backend.rocksdb.block.cache-size: > > 64000000 # > > >> default 8MB > > >> > state.backend.rocksdb.write-batch-size: > > 16000000 # > > >> default 2MB > > >> > > > >> > web.checkpoints.history: 250 > > >> > > > >> > > > >
http://mail-archives.apache.org/mod_mbox/flink-user/202006.mbox/%3CCAA8tFvsTHUBDAPBbOQMVaMA+nuKez-V9iBYUB+G9uMWLJndk1A@mail.gmail.com%3E
CC-MAIN-2020-29
refinedweb
3,625
59.3
I'd like to add transparency to my A5 application's menus, and am seeking a programming example or tutorial. Thanks. If you want to draw a transparent rectangle, set the color like this: float r = red; float g = green; float b = blue; float a = alpha; // 0-1, 0 = fully translucent, 1 = fully opaque ALLEGRO_COLOR color = al_map_rgba_f(r*a, g*a, b*a, a); // now draw primitives with 'color' For images it's almost the same thing, except normally you don't want to tint the image so you use: ALLEGRO_COLOR color = al_map_rgba_f(a, a, a, a); al_draw_tinted_bitmap(bitmap, color, x, y, flags); I'll play with that... Thanks for the response. r, g, b are also 0-1 BTW. I am trying ad a tint to the entire clipped airspeed window below. The test below generates a non-specific debug error: where am I going wrong? float r = .5; float g = .5; float b = .5; float a = .5; // 0-1, 0 = fully translucent, 1 = fully opaque ALLEGRO_COLOR transparent_color = al_map_rgba_f(a, a, a, a); al_draw_tinted_bitmap(airspeed_tape, transparent_color, 0, 0, 0); "non-specific"? What is the error. I get a MSVC Debug Library pop up: Debug Error! R6010-abort() has been called ABORT RETRY IGNORE Sounds to me like the bitmap is NULL. Try printing its value before drawing it. I agree, however commenting out the 6 lines of transparancy test code eliminates the error. The error is generated on the line that calles al_draw_tinted_bitmap...does the transparency funtionality require a library #include? Please bear with me: I'm a hack with little modern programming experience. The only way it could crash is if airspeed_tape is invalid. Make sure it's loaded or created correctly by checking return values from al_load_bitmap and/or al_create_bitmap (or however you're loading that bitmap.) Posting more code would help us determine the problem. I tested for the existence of the airspeed_tape bitmap, and it exists. Post more code. Is there a supporting #include required to support tinting? No. The only way it could crash is if airspeed_tape is invalid. This is a true statement with one extra condition -- there may be an error somewhere else in your code that could cause it too. Very curious. Eliminating the tinted bitmap call allows it to run just fine...AND the bitmap exists. I'll keep digging...thanks How are you determining that the bitmap "exists"? Two ways: First, I comment out only the al_draw_tinted_bitmap line, and the code runs, alters the existing bitmap, and shows it on the display. Second, I added this test: if(!airspeed_tape){ fprintf(stderr, "Failed to initialize airspeed.\n"); return -1; }When run as above, the code operates normally, and proceeds until it generates the aforementioned debug error. When I changed the test to "(airspeed_tape)" it exits on the error. (eliminating the !) I tried substituting any of the other 6 clipped bitmaps, and they all generate the debug error. There's no doubt that they exist. Should it matter that they are all sub bitmaps? I thought I'd read somewhere in the docs that tint support required an include. Ok, without seeing code I can't help anymore but I thought I'd read somewhere in the docs that tint support required an include. This doesn't really make sense. You'll understand why when you learn more about C (hint: feature support can't be turned on or off with an include, includes are used to tell the compiler it's ok to use a function named x with parameters y -- if you don't get a compile error, the include has nothing to do with it.) EDIT: Ok, problem solved. The code posted below is working, more or less. I was not properly locating objects on the underlying plane to benefit from the transparency. Thanks for the help. I'll go set up a dedicated test routine to get it working, so that if I can't figure it out I can post a short block of code. It won't do any good to post anthing now, as its a large program, and short of showing the bitmap creation lines, most is not relevant. I'll come back when I can better use your time...thanks. Here is a test which runs but does not tint: It prints a red square on the target bitmap. Note: this code loops endlessly...I use a breakpoint in the debugger to halt it to view the output. #include <allegro5/allegro.h>#include <allegro5/allegro_color.h>#include <allegro5/allegro_audio.h>#include <allegro5/allegro_acodec.h>#include <allegro5/allegro_font.h>#include <allegro5/allegro_image.h>#include <allegro5/allegro_primitives.h>#include <allegro5/allegro_ttf.h>#include <stdio.h>#include <math.h>#include "allegro5/allegro_native_dialog.h" ALLEGRO_BITMAP *airspeed_tape = NULL;ALLEGRO_COLOR color_255 = al_map_rgb(255, 255, 255);ALLEGRO_DISPLAY *display = NULL; ALLEGRO_FONT *font = NULL; int main(int argc, char **argv){ al_init(); al_init_font_addon(); al_init_ttf_addon(); al_install_keyboard(); al_init_primitives_addon(); al_init_image_addon(); display = al_create_display(1280, 800); airspeed_tape = al_create_bitmap(1280, 800); al_draw_filled_rectangle(50,50,200,200,al_map_rgb(255,0,0)); while (1==1){ float r =.5; float g =.5; float b = .5; float a = .5; ALLEGRO_COLOR transparent_color = al_map_rgba_f(a, a, a, a); al_set_target_backbuffer(display); al_draw_tinted_bitmap(airspeed_tape, transparent_color, 0, 0, 0); al_flip_display(); al_destroy_bitmap(airspeed_tape); return 0; }} If you draw a transparent image over and over without clearing the backbuffer, it'll eventually turn solid. Hmmm...returning on the first loop...and this works does it? ----------------------------------------------------Please check out my songs: Hi Dizzy. Hi Trent, how's the duck platformer coming along? I'm sorry that's off topic. (but good) Off: cool, looking forward! On: Try this in a loop; no....if it IS, exit loop and then return.
https://www.allegro.cc/forums/thread/612802/985024
CC-MAIN-2018-39
refinedweb
940
58.38
I have written a tutorial series that shows how to use model binding with ASP.NET Web Forms. You might be familiar with the model binding concept from ASP.NET MVC, but with ASP.NET 4.5, model binding is now available in Web Forms applications. Model binding makes it very easy to create and maintain data-rich web pages. A lot of the manual steps of correlating elements with data properties are performed automatically. When you use model binding with dynamic data templates, you can quickly add or revise properties in your data model and those properties are correctly rendered and processed in the web forms throughout your site. The series contains the following topics: On data-bound server controls, such as GridView, DetailsView, ListView or FormView, you specify the name of a data method for the properties: Within those methods, you use a data access technology (like Entity Framework) to perform the required data operations. In methods that update the data, you can take advantage of the TryUpdateModel method to automatically apply the bound values from the web forms to the data model. You can also use several new attributes to specify the source of a parameter value. These attributes are in the System.Web.ModelBinding namespace, and include: For example, applying the QueryString attribute to a parameter means that the value of that parameter is retrieved from a query string value with the same name. The tutorial series shows how to add data methods in a code-behind file for a web page, or in a separate class that manages the data operations for a site. Using a separate class enables you to centralize the data logic and re-use methods in multiple pages. I hope the tutorial series is useful to you, and I welcome feedback.
http://blogs.msdn.com/b/tfitzmac/archive/2013/03/26/tutorial-series-on-asp-net-model-binding-with-web-forms.aspx
CC-MAIN-2014-52
refinedweb
300
53.1
03 March 2009 14:45 [Source: ICIS news] (Releads, adds quotes and background throughout) By Andy Brice and Hilde Ovrebekk LEVERKUSEN, Germany (ICIS news)--Bayer’s fourth quarter net income after non-controlling interest rose 58% to €106m ($133m) year on year as the group's life-science businesses offset a weaker performance in the recession-hit plastics segment, the company said on Tuesday. Underlying operating profits fell by 8.8% in the fourth quarter of 2008 to €706m. Sales came in at €1.36bn, down 4.6% from €1.42bn in the fourth quarter of 2007 due to a significant decline in MaterialScience. Earnings before interest, tax, depreciation and amortisation (EBITDA) before special items from its MaterialScience business slumped to €54m from €367m in the fourth quarter of 2007, due mainly to the steep decline in volumes as a result of a sharp deterioration in the automotive, construction and furniture industries, Bayer said. Chairman of the management board Werner Wenning said the company expected a substantial drop in 2009 earnings for MaterialScience. "In the main sectors of importance for our MaterialScience business, we anticipate a very difficult year marked by a great deal of uncertainty. The high-tech materials business is heavily impacted by the global recession," said Wenning, speaking at the company’s annual results conference in ?xml:namespace> "The start to the year...has been even weaker than anticipated, and we must expect a severe drop in this subgroup's sales and earnings for 2009," he added. MaterialScience recently announced it would reduce the working hours of its German non-managerial employees by 6.7%, effective on 9 February, and cut wages and salaries accordingly for an initial nine-month period. HealthCare saw earnings advance by 18.8% to €1.10bn from €922m, EBITDA of its CropScience division improved by 2.8% to €182m from €177m, the German chemicals and pharmaceuticals company said. Wenning said the company was benefiting from its life-science businesses HealthCare and CropScience, which are less dependent on global economic development. “We expect further growth in earnings [for 2009] at HealthCare and CropScience, along with a substantial reduction in net debt,” he said. Bayer had committed to raising its research spending in 2009 to €2.9bn, the largest R&D budget in its history, Wenning said. For the full year, the company reported a 63.5% slump in net income to €1.72bn from €4.71bn in 2007. Operating profits rose 12.4% to €3.54bn, while sales increased 1.6% to €32.92bn from €32.39bn. “From an operational standpoint, 2008 was the most successful year in Bayer’s long history,” said Wenning. Bayer shares had dropped over 1.3% from Monday’s close to €36.20 at 13:30 GMT. ($1 = €0.80) For more on Bayer
http://www.icis.com/Articles/2009/03/03/9197217/bayers-q4-net-income-rises-but-weak-outlook-for-chemicals.html
CC-MAIN-2014-52
refinedweb
466
59.8
The Imlib module of Gtk-Perl (Gtk::Gdk::ImlibImage namespace). NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered. No installation instructions: this port has been deleted. The package name of this deleted port was: p5-GdkImlib p5-GdkImlib No options to configure Number of commits found: 38 - Remove SITE_PERL from *_DEPENDS - update png to 1.5.10 Remove WWW entries from unmaintained ports that return 404 or where the domain disappeared. - Kick MD5 support - Mark MAKE_JOBS_UNSAFE=yes Reported by: P6 TB - update to 1.4.1 Reviewed by: exp8 run on pointyhat Supported by: miwi - update to jpeg-8 - bump all port that indirectly depends on libjpeg and have not yet been bumped or updated Requested by: edwin - Fix fetching}. - Remove old Perl support from unmaintained ports in categories starting with letter o-z SHA256 Fix build by adding a missing BUILD_DEPENDS Report by: kris (via bento) reset MAINTAINER bit to ports@ I have no too much time to maintain. Add SIZE. Submitted by: trevor BROKEN with perl 5.8: does not compile. Add p5-GdkImlib, i'ts perl module to access imlib library. Servers and bandwidth provided byNew York Internet, SuperNews, and RootBSD 33 vulnerabilities affecting 72 ports have been reported in the past 14 days * - modified, not new All vulnerabilities
http://www.freshports.org/x11-toolkits/p5-GdkImlib/
CC-MAIN-2015-35
refinedweb
219
55.54
Welcome to the FAQ Contents - 1 What is OpenGL? - 2 Who maintains? - 3 Open Source? - 4 Where can I download? - 5 Where can I download? #2 - 6 SDK - 7 What platforms have GL? - 8 Which 3D API is better? - 9 How Does It Work On Windows? - 10 Why is my GL version only 1.4? 1.3? 1.2? - 11 glTranslate, glRotate, glScale - 12 Fixed function and modern GPUs - 13 How to render in pixel space - 14 Multi indexed rendering - 15 2 component textures - 16 Immediate mode, display lists, vertex arrays, VBO - 17 glGetString(GL_VERSION) - 18 glClear and glScissor - 19 Masking - 20 glGetError (or "How do I check for GL errors?) What is OpenGL? OpenGL stands for Open Graphics Library. It is an API for doing 3D graphics. In more specific terms, it is an API that is used to "draw triangles on your scene". In this age of GPUs, it is about talking to the GPU so that it does the job of drawing. It does not deal with file formats. It does not open bmp, png and any image format. It does not open 3d object formats like obj, max, maya. It does not do animation. It does not handle keyboard, mouse and any input devices. It does not create a window, and so on. All that stuff should be handled by an external library (GLUT is one example that is used for creating and destroying a window and handling mouse and keyboard). GL has gone through. There is an implementation of GL that is Open Source and it is called Mesa3D It doesn't have the license to call itself OpenGL, but it does follow the spec very well. Where can I download? Just like the "Open Source?" section explains, GL is not a software product. GL is a specification. Companies like nVidia and AMD/ATI use the spec to write their drivers, so OpenGL is in fact included in the drivers that they supply. For laptop owners, you need to visit the manufacturer of your laptop and download the drivers from them. Where can I download? #2 When you update your video driver, this is good enough for people who want to play games or run some application. For programmers, installing drivers will not give you a gl.h file. It will not give you opengl32.lib. Those are files that come with your compiler (on Windows, your compiler might need opengl32.lib or perhaps opengl32.a). Also, there are no updated gl.h and opengl32.lib file. These are stuck at GL 1.1 and will be forever. Read the Getting Started section to learn what you must do. Also, installing a video driver will not replace opengl32.dll. It is a system file and belongs to Windows. Only Microsoft may update it. When you install a video driver, another file will be copied to your system (nvoglv32.dll in the case of nVidia) and the registry will be modified. opengl32.dll will call into the real GL driver (nvoglv32.dll). SDK What platforms have GL? Windows : 95 and above Mac OSX : all versions Linux : this depends on the distributions. Distros meant for desktop usage come with Gnome, KDE or some windows manager and OpenGL is either supplied as Mesa (software rasterizer) or they provide proper drivers. FreeBSD : unknown. change from release versions. opengl32.dll is limited to 1.1.. The. glTranslate, glRotate, glScale Are these hardware accelerated? No, there are no known GPUs that execute this. The driver computes the matrix on the CPU and uploads it to the GPU. All the other matrix operations are done on the CPU as well : glPushMatrix, glPopMatrix, glLoadIdentity, glFrustum, glOrtho. This is the reason why these functions are considered deprecated in GL 3.0. You should have your own math library, build your own matrix, upload your matrix to the shader. A list of various libraries is at "Alternative Game Libraries".. How to render in pixel space. glClear and glScissor glScissor is one of the few functions that effect. So use a little helper function like this to check for GL errors: #include <stdio.h> #include <GL/gl.h> #include <GL/glu.h> int checkForGLErrors( const char *s ) { int errors =.
https://www.khronos.org/opengl/wiki_opengl/index.php?title=FAQ&direction=next&oldid=2089
CC-MAIN-2020-29
refinedweb
703
77.84
I created the following code to do the bubble sort and the code worked out fine. My question is why it worked... When the method is called, I assume the computer will first evaluate whether $x is equal to 0. But I haven't assigned value to $x to begin with, so what makes the computer start to run the each loop? It seems to have something to do with the fact that x is a global variable, but I am not sure how. Please suggest! def bubble_sort(arr) while $x != 0 $x = 0 arr.each_with_index do |i, j| if arr[j+1] != nil && i > arr[j+1] arr[j], arr[j+1] = arr[j+1], arr[j] $x += 1 end end end arr end p bubble_sort([4,3,78,2,0,5,100,34]) I assume you're invoking the method only once? ... The global $x doesn't exist during the first call and the search for that global variable returns nil. Hence, the first while loop evaluates $x==0 as nil == 0 which is false.
https://codedump.io/share/O6VwrcbaDu8Q/1/how-does-this-while-loop-evaluate-the-condition-to-be-true-or-false
CC-MAIN-2017-13
refinedweb
177
82.75
React Access parent component name react native get parent component react get parent style react get parent context react child component access state of parent component react react get component name react call parent function from child I want to get the parent component name inside the child component to display a error message when validating properties of that child component. I'm creating a reusable component, so anyone can use my component inside their components. When they are using my component I want to display warning messages with the name of the parent component. Is there a specific method to get parent name in react. Any kind of help would be appreciated. Children can see the context they are composed in through this._reactInternalInstance._currentElement._owner._instance.__proto__.constructor.name. Used in the following way: import React, { Component } from 'react'; class Warning extends Component { render() { return ( <div> {"WARNING: " + this._reactInternalInstance._currentElement._owner._instance.__proto__.constructor.name + " has an error."} </div> ) } } export default Warning; Do not believe this is parent child communication, it is like standing in a room and seeing from containing walls where you are.. this is not the container (parent) communicating to you (child) but rather the child being context aware. Use this how you may, however do note that it is part of reacts internal instance and subject to change (do believe it is stable enough as of today). Apologies for formmatting, on mobile. How to get parent component's name in React?, While it's not clear how you'd use this with a Promise component you mentioned in a comment, you could try this: var componentName = this.constructor. The parent component displays an HTML table of data which gets retrieved from a PHP API backend and stored in a state variable named contacts. This is the example ContactForm child component: class ContactForm extends React.Component { state = { name: '', email: '', you can get parent component from this._reactInternalFiber._debugOwner.type.name Is there a way to show the displayName of the parent ReactElement , It made it hard to get to checking the components I was interested in at that time. — React.render(<HelloMessage name="John"> <div>Hello React, how call parent React, how call parent method from child component (via slots) #16080. makenskiy opened this issue Jul 8, You shouldn't directly access You can access the parent node of a component using: this._reactInternalFiber.return.stateNode How to access value from parent method in child class in reactjs , How to access value from parent method in child class in reactjs I am not able to use props to access the date and month in child component render method. Accessing parent state in child in React. I have (e.g.) two components in React. The first, app.js, is the root component. It imports some JSON data and puts it in its state. This works fine (I can see it in the React devtools). The second, docs.js, is meant to show this JSON data. React: Communication Between Components, Understand communication between React components: Render C is actually rendered in P, P is C's Parent component and C is the child component. So the C component can access the value of name in the props class Child1 extends React.Component{sendData = => {this.props.parentCallback("Hey Popsie, How’s it going?");}, render() { //you can call function sendData whenever you'd like to send data from child component to Parent component. Refs and the DOM – React, Refs provide a way to access DOM nodes or React elements created in the render In the typical React dataflow, props are the only way that parent components this alternative approach and explicitly pass a ref as a differently named prop. 1 Answer 1. active oldest votes. 45. It probably makes the most sense to pass it as a property, but if you really need to get it programmatically, and from inside the component, you can wait for the component to mount, find its DOM node, and then look at its parent. Forwarding Refs – React, This way, components using FancyButton can get a ref to the underlying button DOM If you name the render function, DevTools will also include its name (e.g.: - I'm not sure if this is necessarily better, but I'll post it here in case it helps someone out: this._reactInternalInstance._currentElement._owner.getName() - Just for notice: if you need to access to the parent component's name, it might will work only in the development stage, where your sources ain't got uglified via code compressors (ie. WebPack). - Can this way be used in prod? Is there any risk that the property will be lost? - I wouldn't recommend using it in production as it's react's internal properties.
https://thetopsites.net/article/52169494.shtml
CC-MAIN-2021-31
refinedweb
795
54.42
AutoLISP will be definitely supported in future releases. VB was introduced to simplify Office Automation: ACAD <-> Excel/Access Both languages have advantages and disadvantages. You should take a look at both. VB seems to be more graphical and AutoLISP more logical. The object concept of VBA seems to be easier to learn, but you cannot run commands like in AutoLISP. The new VBA (>= R14.01) is extremely fast. See also [5.2] The future of AutoLISP already is Visual Lisp. For VLISP see [5.3] URL's:,, also [0.1] below. [0.1] What changed with AutoCAD 2000? The name :) No, there's much more, but you may call it Release 2000, R15 (though 15 is the version number and not the release number), A2000 or abbrevated A2K. The new Visual Lisp kernel (formerly "Vital Lisp") replaced the old xlisp-based AutoLISP kernel. What problems should you expect with Visual Lisp in R2000? (only the bad news). At I compiled a white paper. The major points are: Stricter error checking on loading, ACAD.LSP vs ACADDOC.LSP, You cannot/need not compile to ARX anymore, Incompatibilities AutoLISP - Visual LISP: Lisp functions are atoms no lists anymore, Protected symbols, Better exception handling, Pathname of the loaded VLX?, vl-export-symbol -> vl-doc-set, long acad symbol table names: EXTNAMES ActiveX automation, Variants and SAFEARRAYs, FAS4 cannot be loaded on R14. [0.2] Why cannot I create ARX anymore? With AutoCAD 2000 you cannot do that anymore as with ViLL or VLISP 4. Instead you compile to VLX (Visual Lisp Extension), which has basically the same functionality as the old Visual Lisp/Vital Lisp ARX, with the following differences: * You'll have to (load) the app. Before you had to (arxload) it. - Pro: Initialization is easier. The VLX doesn't abort completely on any error while loading. Before the whole ARX crashed with mysterious errors. - Pro: VLX are much smaller because they don't carry the whole Lisp environment, the VLRTS, along. Instead there's only one environment, VL.ARX, distributed with acad itself. So you can ship much smaller applications. - Contra: With loaded VLX there's no easy way to get the pathname of the app. Before it was possible with (arx) or (vl-exe-filename) * VLX has the option of seperate or common namespaces. With seperate ARX you had only the option of seperate namespaces (in fact completely seperate lisp environments). - Pro: This means that you can now choose the fastest and most secure compilation mode (LINK, DROP) and still keep common namespaces. (most of my apps benefit from this. I seperated my apps into one main module and several smaller ones) - Pro: ARX is only compatible per release, thus completely incompatible! VLX is new and therefore compatible only to newer releases (R16,...) but as lisp application it is by far more compatible than a ARX app. * Loaded ARX apps with (arx) return the pathname, loaded VLX apps with (vl-list-loaded-vlx) only a symbol, no path. This is a design flaw. You don't need ARX modules anymore. This is a feature, no bug. [ Usenet FAQs | Web FAQs | Documents | RFC Index ]
http://www.faqs.org/faqs/CAD/autolisp-faq/part1/section-1.html
CC-MAIN-2014-35
refinedweb
523
68.77
How can I perform a task while the mouse is pressed, stopping when the mouse is released? Created May 7, 2012 Scott StanchfieldThe following sample code creates a new thread to loop through printing numbers as long as the mouse is pressed. When you release the mouse, the worker thread is interrupted. The worker thread checks each time through the loop to see if it has been interrupted. If so, it stops. The "trick" is to create a new thread that performs the task while the normal event thread watches for the mouse release. If you perform the mouse-pressed action inside your mousePressed() method, the event handler thread is busy; it's the one actually running your code. There's no way it can process the mouseReleased() event! import java.awt.Frame; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; public class Sample { Thread worker; class Worker extends Thread { int n=0; public void run() { while(true) { System.out.println(n++); if (isInterrupted()) break; } } }; public static void main(String[] args) { new Sample().go(); } public void go() { Frame f = new Frame("Sample"); f.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { worker = new Worker(); worker.start(); } public void mouseReleased(MouseEvent e) { if (worker != null) { worker.interrupt(); worker = null; } } } ); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); }}); f.setBounds(10,10,100,100); f.setVisible(true); } }
http://www.jguru.com/faq/view.jsp?EID=703958
CC-MAIN-2017-04
refinedweb
246
61.33
I have string , which I want to split into strings of equal size(characters) lets say 4 or 5. Did some searching. Found this $aNumber = StringRegExp($string, "\d{4}", 3) This only works on numbers and not on general string. Please Help me. Thanks Posted 28 April 2012 - 02:40 PM $aNumber = StringRegExp($string, "\d{4}", 3) Posted 28 April 2012 - 02:53 PM #include <Array.au3> $sString = "1234abcd5678ghij1234abcd5678ghij" $aArray = StringRegExp($sString, ".{4}", 3) _ArrayDisplay($aArray) Posted 28 April 2012 - 02:54 PM - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Posted 28 April 2012 - 03:21 PM #include <Array.au3> Dim $aArray = _StringEqualSplit("abcdefghijklmnopqrstuvwxyz", 5) _ArrayDisplay($aArray) Func _StringEqualSplit($sString, $iNumChars) Return StringRegExp($sString, "(?s).{1," & $iNumChars & "}", 3) EndFunc Edited by czardas, 28 April 2012 - 03:27 PM. Posted 28 April 2012 - 03:25 PM Yes , I know that.Yes , I know that. kritya, Just look for any character and not just digits: #include <Array.au3> $sString = "1234abcd5678ghij1234abcd5678ghij" $aArray = StringRegExp($sString, ".{4}", 3) _ArrayDisplay($aArray) If you want to start learning more about SREs, then I recommend this site. M23 Edited by kritya, 28 April 2012 - 03:33 PM. Posted 28 April 2012 - 10:09 PM members, 0 guests, 0 anonymous users
http://www.autoitscript.com/forum/topic/140026-split-array-into-string-of-fixed-number-of-characters/
CC-MAIN-2014-49
refinedweb
212
77.33
Get the highlights in your inbox every week. Podman and user namespaces: A marriage made in heaven Podman and user namespaces: A marriage made in heaven Learn how to use Podman to run containers in separate user namespaces. opensource.com Subscribe now Podman, part of the libpod library, enables users to manage pods, containers, and container images. In my last article, I wrote about Podman as a more secure way to run containers. Here, I'll explain how to use Podman to run containers in separate user namespaces. I have always thought of user namespace, primarily developed by Red Hat's Eric Biederman, as a great feature for separating containers.). If you have a file owned by "real" root with permissions 660, and the container processes in the user namespace attempt to read it, they will be prevented from accessing it and will see the file as owned by nobody. An example Here's how that might work. First, I create a file in my system owned by root. $ sudo bash -c "echo Test > /tmp/test" $ sudo chmod 600 /tmp/test $ sudo ls -l /tmp/test -rw-------. 1 root root 5 Dec 17 16:40 /tmp/test Next, I volume-mount the file into a container running with a user namespace map 0:100000:5000. $ sudo podman run -ti -v /tmp/test:/tmp/test:Z --uidmap 0:100000:5000 fedora sh # id uid=0(root) gid=0(root) groups=0(root) # ls -l /tmp/test -rw-rw----. 1 nobody nobody 8 Nov 30 12:40 /tmp/test # cat /tmp/test cat: /tmp/test: Permission denied The --uidmap setting above tells Podman to map a range of 5000 UIDs inside the container, starting with UID 100000 outside the container (so the range is 100000-104999) to a range starting at UID 0 inside the container (so the range is 0-4999). Inside the container, if my process is running as UID 1, it is 100001 on the host Since the real UID=0 is not mapped into the container, any file owned by root will be treated as owned by nobody. Even if the process inside the container has CAP_DAC_OVERRIDE, it can't override this protection. DAC_OVERRIDE enables root processes to read/write any file on the system, even if the process was not owned by root or world readable or writable. User namespace capabilities are not the same as capabilities on the host. They are namespaced capabilities. This means my container root has capabilities only within the container—really only across the range of UIDs that were mapped into the user namespace. If a container process escaped the container, it wouldn't have any capabilities over UIDs not mapped into the user namespace, including UID=0. Even if the processes could somehow enter another container, they would not have those capabilities if the container uses a different range of UIDs. Note that SELinux and other technologies also limit what would happen if a container process broke out of the container. Using `podman top` to show user namespaces We have added features to podman top to allow you to examine the usernames of processes running inside a container and identify their real UIDs on the host. Let's start by running a sleep container using our UID mapping. $ sudo podman run --uidmap 0:100000:5000 -d fedora sleep 1000 Now run podman top: $ sudo podman top --latest user huser USER HUSER root 100000 $ ps -ef | grep sleep 100000 21821 21809 0 08:04 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 Notice podman top reports that the user process is running as root inside the container but as UID 100000 on the host (HUSER). Also the ps command confirms that the sleep process is running as UID 100000. Now let's run a second container, but this time we will choose a separate UID map starting at 200000. $ sudo podman run --uidmap 0:200000:5000 -d fedora sleep 1000 $ sudo podman top --latest user huser USER HUSER root 200000 $ ps -ef | grep sleep 100000 21821 21809 0 08:04 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 200000 23644 23632 1 08:08 ? 00:00:00 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 Notice that podman top reports the second container is running as root inside the container but as UID=200000 on the host. Also look at the ps command—it shows both sleep processes running: one as 100000 and the other as 200000. This means running the containers inside separate user namespaces gives you traditional UID separation between processes, which has been the standard security tool of Linux/Unix from the beginning. Problems with user namespaces For several years, I've advocated user namespace as the security tool everyone wants but hardly anyone has used. The reason is there hasn't been any filesystem support or a shifting file system. In containers, you want to share the base image between lots of containers. The examples above use the Fedora base image in each example. Most of the files in the Fedora image are owned by real UID=0. If I run a container on this image with the user namespace 0:100000:5000, by default it sees all of these files as owned by nobody, so we need to shift all of these UIDs to match the user namespace. For years, I've wanted a mount option to tell the kernel to remap these file UIDs to match the user namespace. Upstream kernel storage developers continue to investigate and make progress on this feature, but it is a difficult problem new image. Think of this as the fedora:0:100000:5000 image. When Podman runs another container on the image with the same UID mappings, it uses the "pre-chowned" image. When I run the second container on 0:200000:5000, containers/storage creates a second image, let's call it fedora:0:200000:5000. Note if you are doing a podman build or podman commit and push the newly created image to a container registry, Podman will use container/storage to reverse the shift and push the image with all files chowned back to real UID=0. This can cause a real slowdown in creating containers in new UID mappings since the chown can be slow depending on the number of files in the image. Also, on a normal OverlayFS, every file in the image gets copied up. The normal Fedora image can take up to 30 seconds to finish the chown and start the container. Luckily, the Red Hat kernel storage team, primarily Vivek Goyal and Miklos Szeredi, added a new feature to OverlayFS in kernel 4.19. The feature is called metadata only copy-up. If you mount an overlay filesystem with metacopy=on as a mount option, it will not copy up the contents of the lower layers when you change file attributes; the kernel creates new inodes that include the attributes with references pointing at the lower-level data. It will still copy up the contents if the content changes. This functionality is available in the Red Hat Enterprise Linux 8 Beta, if you want to try it out. This means container chowning can happen in a couple of seconds, and you won't double the storage space for each container. This makes running containers with tools like Podman in separate user namespaces viable, greatly increasing the security of the system. Going forward I want to add a new flag, like --userns=auto, to Podman that will tell it to automatically pick a unique user namespace for each container you run. This is similar to the way SELinux works with separate multi-category security (MCS) labels. If you set the environment variable PODMAN_USERNS=auto, you won't even need to set the flag. Podman is finally allowing users to run containers in separate user namespaces. Tools like Buildah and CRI-O will also be able to take advantage of user namespaces. For CRI-O, however, Kubernetes needs to understand which user namespace will run the container engine, and the upstream is working on that. In my next article, I will explain how to run Podman as non-root in a user namespace.
https://opensource.com/article/18/12/podman-and-user-namespaces
CC-MAIN-2021-43
refinedweb
1,384
59.03
Implementation status: implemented Synopsis #include <time.h> char *asctime(const struct tm *timeptr); char *asctime_r(const struct tm *timeptr, char *buf); Description The asctime function converts the broken-down time in the structure pointed to by timeptr into a string in the form: Thu Mar 26 13:03:52 2020\n\0 The asctime_r() function converts the broken-down time in the structure pointed to by timeptr into a string (of the same form as that returned by asctime(), and with the same undefined behavior when input or output is out of range) that is placed in the user-supplied buffer pointed to by buf (which contains at least 26 bytes) and then return buf. Arguments: timeptr - a pointer to a structure with the broken-down time. buf - a buffer to save the resulting string.). Return value Upon successful completion, the asctime() function returns a pointer to the string. If the function is unsuccessful, it returns NULL. Upon successful completion, asctime_r() returns a pointer to a character string containing the date and time. This string is also pointed to by the argument buf. If the function is unsuccessful, it returns NULL. Errors No errors are defined. The asctime() and asctime_r() functions may be removed in a future version.
http://phoenix-rtos.com/documentation/libphoenix/posix/asctime
CC-MAIN-2020-16
refinedweb
208
53.31
There is no doubt that React has become the developers first-choice for building rich web applications. Maybe is time for designers to climb aboard? I have spent the last 10 years designing websites. Coming from a graphic design background my early works was often Photoshop sketches. Like a lot of us, responsive design made me do more in HTML and CSS and it was wonderful. Being forced to think in systems and code made me a much better designer. Building with the real building blocks of the web was fantastic. But the need for prototyping richer interactions came rather quickly. Prototyping in code and not being able to do animations, transitions, step-by-step forms, callouts and modals just felt like an halfway run. The need for prototyping interactions I spent a lot of time hacking in JavaScript. Copying others code took me halfway there. but it was not very satisfying actually not understanding what was going on. Making the fine-tuned interactions I wanted was nearly impossible and I decided to level-up. Angular (1) seemed like the perfect choice. A lot did happen i the html which i already knew, and it felt like I got superpowers. It was nice, for a while... Taking “shortcuts” is quite easy in Angular. Using predefined directives and the go to Stack Overflow for the complicated stuff. But suddenly I realized that I actually did not knew anymore JavaScript than before. I do not blame this on Angular, it was totally my own fault. But my mission on leveling up on JavaScript had failed. So, I decided to level up again, for real . All my developers friends and colleagues pointed at React and ES6 . And O h Yes! the road have been painful. It took me around 6 months, a lot of googling and reading, late nights feeling dumb and a not a very happy wife. But was it worth it? Definitely. Learning new things is by nature painful and time consuming, but at the same time the most satisfying thing a human being can do. And luckily, I am still married. Why React is great for designers Most things I have read about the benefits of React is its performance and developer friendliness. Since I am not a developer, I belive the other smart people on this. But on thing about React is a bit understated, even tough the websites tagline says it clearly — A JavaScript library for building user interfaces . React is a great tool for building and designing user interfaces. When using React I get the same feeling as when i started to use SASS. Even tough the complexity had increased, making color systems, typography hierarchies and spacing rules was a lot easier than before. React give me the same, but this time for the whole user interface . We’re not designing pages, we’re designing systems of components. I love the thoughts behind Atomic design and the thinking about reusable design patterns. Everything is components, and a component can consist of other components making a design pattern. And React is components . Interactive components combining both presentation and interaction. In React it is not just easy to think in reusable components, you are forced to. Because this is is the core concept of React. A concept that could not fit us designers any better. Work together on the real thing Finding good ways for designers and developers to working together in a fun and creative way can be challenging. I am a strong believer in that working together in a cross-functional team with the real product is the best solution. To do this, is may time for our designer to pull up ours sleeves and dive into a real application. Even thought it may sounds terrifying, knowing a bit of React can actually make it happen. Because, while learning React and JavaScript can be quite hard, contributing into a React project is quite easy for designers knowing HTML. When a developer takes care of all thescaffolding (yes, it is daunting…) the components itself are quite easy. Specially the stateless ones, which there is most of in a React application: import React from 'react'; const Button = (props) => { // Do JavaScript stuff here if you want to. return ( <button className="button"> <span className="button-icon">:star:</span> <span className="button-text">{props.text}</span> </button> ) } export default Button; As you can see, everything that goes into the return is basically just like HTML. But it is JavaScript, that is why the JSX syntax is used. The only practically difference between HTML and JSX is that you need to write className instead of class (and a few other properties), but that is mostly it. Then you can flavor it with JavaScript if you want to or leave it to the developers. The cool thing is that you are now working on the real thing and building components together . Summary To summarize, I do not mean that every designer should learn React, not even code. But if you are already is designing in code and know a bit of JavaScript, React is definitely worth checking out. Even tough it seems a bit overwhelming at first, it is actually a quite small library. It will not let you take any shortcuts, which means that you have to learn to write your own JavaScript. But in return you get a framework specially made for building user interfaces. It will force y o u to build reusable components and design patterns in a structured and manageable way. It could even make you a better designer.
http://126kr.com/article/8sqttig13ym
CC-MAIN-2017-17
refinedweb
930
65.42
![endif]--> Reference Language | Libraries | Comparison | Changes The AVR math library, which is included in your sketch by using the line #include <math.h> // (no semicolon) includes a great number of mathematical functions. This is why you graduated from the Basic Stamp. The Atmega8 chip, which is now dated, but still supported, does not have enough memory to be able use the math.h library so you will probably need to update to an Atmega168 if you wish to use any of these functions. The full docs for math.h may be found here Someone email a small example to pbadger@verizon.net and I'll put it in here This is just a partial list - check the docs for more obscure functions double cos(double __x) // returns cosine of x in radians double fabs (double __x) // absolute value of a float double fmod (double __x, double __y) // floating point modulo double modf (double __value, double *__iptr) //breaks the argument value into integral and fractional parts double sin (double __x) // returns sine of x in radians double sqrt (double __x) returns square root of x in radians double tan (double __x) // returns tangent of x in radians double exp (double __x) // function returns the exponential value of x. double atan (double __x) // arc tangent of x double atan2 (double __y, // arc tangent of y/x double log (double __x) // natural logarithm of x double log10 (double __x) //logarithm of x to base 10. double pow (double __x, double __y) // x to power of y int isnan (double __x) // returns 1 if "not a number" int isinf (double __x) returns 1 if the argument x is positive or negative infinity double square (double __x) // square of x Corrections, suggestions, and new documentation should be posted to the Forum. The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.
http://arduino.cc/en/pmwiki.php?n=Reference/MathHeader
CC-MAIN-2014-35
refinedweb
324
53.34
Some. Settings such as page size, background color/texture and other settings are loaded dynamically. As a bonus the user can create multiple pages. In this tutorial we will be looking at the basic concepts of creating an application like this. It is advisable to keep the source code next to you while reading the tutorial because not every part is explained. Source code is available for use with FlashDevelop or with Flash CS3 Professional and higher. Note: Opening the Application Locally Please be aware that before trying to open the application from your hard disk, you will need to have it added to the "trusted locations" list specified in the Global Security Settings panel shown below. Otherwise, no access is granted to grab the images from your hard disk. This is not needed when uploaded to a website as long as the images are located on the same web server. Step 1: Setting up the XML file In case you are unfamiliar with XML, check out Dru Kepple's AS3 101: XML. Shown below is the XML data corresponding to one page filled with one image and one text field. Settings specified here apply to all pages. As you can see, creating multiple pages and adding content to them is made easy. To images you can add a title and description which is seen when hovered over with the mouse. Multi-line text be added and size and style can be customized. Every text field uses a custom font found in the .fla file. <?xml version="1.0" encoding="utf-8" ?> <data> <settings> <bg_color>0x000000</bg_color> <image_path>../images/</image_path> <viewer_width>580</viewer_width> <viewer_height>380</viewer_height> <content_width>2000</content_width> <content_height>1300</content_height> <viewer_bg_color>0xEEDEC0</viewer_bg_color> <viewer_line_color>0xC1C59C</viewer_line_color> <viewer_offset_x>10</viewer_offset_x> <viewer_offset_y>10</viewer_offset_y> </settings> <page id="0" name="Holiday in Copenhagen"> <text> <content> Hello there and welcome to the demonstration of the canvas application. Used as a subject here is my holiday to Copenhagen. anno 2010. Feel free to read the texts and sniff up the culture. </content> <size>23</size> <x>470</x> <y>50</y> </text> <image> <title>Church and lake</title> <description>The beautiful enviroment in Kastelskirken.</description> <url>Church_And_Lake.jpg</url> <scale>1</scale> <x>750</x> <y>500</y> </image> </page> </data> Step 2: The Document and Canvas Class Use the following code to set up our application. It is almost completely generated by FlashDevelop using the "AS3 Project" template. Main is the document class - which is the class first loaded when starting flash - and inside Canvas we are building our application. public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); // entry point var canvas:Canvas = new Canvas(this); } } And a simplistic version of Canvas. Note that we use a display object container as a parameter to add that extra bit of control to add/remove the Canvas. public class Canvas extends Sprite { public function Canvas(container:DisplayObjectContainer) { // Save parameter locally this.container = container; // Add to container container.addChild(this); } } Step 3: Using Bulk Loader to Load Assets In this application we are using the so called BulkLoader: an AS3 library that aims to make loading and managing complex loading requirements easier and faster. When first loading up, we use it to grab the XML file and a background image. The following code shows how to boot up the BulkLoader and add two items to the loading queue. The Complete function is called when all items are loaded. // Init bulk loader loader = new BulkLoader("Canvas"); loader.add("../background.jpg", { id:"background" } ); loader.add("../settings.xml", { id:"xmldata" } ); // Loader events loader.addEventListener(BulkLoader.COMPLETE, Complete, false , 0, true); loader.addEventListener(BulkLoader.ERROR, HandleError, false, 0, true); // Start loader loader.start(); Step 4: Saving the Loaded Assets We save the loaded assets inside the class for later use. The BulkLoader provides an easy way to grab the items we need. Just call the function corresponding to the type of object and use the object's ID string. Static variables are used to make the XML data globally available (e.g. accessing a static variable using Canvas.viewerWidth). The path variable specifies where the externally loaded images will be located. Images can only be loaded from the own webserver due to security restrictions. // Get background image g_background = (loader.getBitmap("background")).bitmapData; // Get XML data xmldata = loader.getXML("xmldata"); // Set static vars for easy access viewerWidth = int(xmldata.settings.viewer_width); viewerHeight = int(xmldata.settings.viewer_height); viewerBgColor = uint(xmldata.settings.viewer_bg_color); path = String(xmldata.settings.image_path); customFont = new customFontClass(); contentWidth = int(xmldata.settings.content_width); contentHeight = int(xmldata.settings.content_height); // Remove complete listener loader.removeEventListener(BulkLoader.COMPLETE, Complete); // Remove all data references stored in the loader loader.clear(); // Remove loader from memory loader = null; // Set up viewer InitialiseViewer(); Step 5: Introducing the Virtual Camera As you may or may not have guessed, the application uses a virtual camera to extract a portion of the canvas and show to the user. The camera applies scaling and translation to a displayobject container such that only the area under the camera is seen on the screen. The following demonstration gives you a better idea of how it works. The source code of this demonstration is also included in the archive. Let's explain this example by starting with configurating the settings. We would like the viewer region to be 305 x 230, and the content region - which are the dimensions of the flower image - should try to keep the aspect ratio of the viewer region so it does not deform too much. Our flower is 1000 x 750, which is close enough. In order to show the entire flower in the viewer region, the camera must be the same size as the flower, which is 1000 x 750. The following code sets the dimension settings. In this example they are hardcoded, but otherwise it is taken from XML. // Settings viewerWidth = 305; viewerHeight = 230; contentWidth = 1000; contentHeight = 750; Next up we create a viewer container.The option scrollRect is used to clip off anything outside a specified rectangle. This is very useful as only a portion of the canvas must be shown when zoomed in. It is a neater solution than for example putting a black border around the application. // Viewer container viewerContainer = new Sprite(); viewerContainer.scrollRect = new Rectangle(0,0, viewerWidth, viewerHeight); addChild(viewerContainer); To the viewer container we add another Sprite called viewerScroller. The function of viewerScroller is simply to act as a container for anything that must serve as content for the camera. It makes it easier to add multiple items to the content region. // Page scroller var viewerScroller:Sprite = new Sprite(); viewerContainer.addChild(viewerScroller); Add content to the viewerScroller. In this case the flower image. // Content content = new Sprite(); viewerScroller.addChild(content); var bmp:Bitmap = new image(); content.addChild(bmp); Now add the Camera class. Although we have yet to make the Camera class, its constructor will take the viewer dimensions as parameter, and the function SetTarget has the content Sprite as parameter. We position the Camera in the middle of the content and give it a first update. // Add virtual camera cam = new Camera(viewerWidth,viewerHeight); cam.SetTarget(viewerScroller); cam.x = contentWidth / 2; cam.y = contentHeight / 2; cam.Update(); With all this code in place we are able to render and manipulate the camera. Inside a Event.ENTER_FRAME loop you could run cam.Update() to refresh the camera view. It is however more efficient to only update upon a change. By changing cam.x and cam.y you can move the camera around, and by changing cam.scaleX and cam.scaleY you can change the scale. This is exactly what the keyboard keys in the example do. Step 6: Camera Class A Closer Look Here we take a look at the internals of the Camera. In the constructor function we add some graphics which are needed for the manipulation of scale of scale of the camera. We also store the viewer content dimensions locally inside the class. public function Camera(width:int,height:int,initialZoom:Number = 1) { // Sprite used to give the camera a width and height. g = new Shape(); g.graphics.drawRect(0, 0, 10, 10); g.graphics.endFill(); addChild(g); // Set dimensions of viewer rectangle tw = width; th = height; // Initial zoom this.scaleX = this.scaleY = initialZoom; } Next up, attach the camera to an object. The camera becomes the same scale as the object. public function SetTarget(target:Sprite):void { this.target = target; // adjust camera dimensions g.width = target.width; g.height = target.height; } This is the most interesting part and the engine of the camera. Scaling and translation is applied to the object attached to the camera by giving it a new transform matrix. Check out the Matrix class in the AS3 documentation for more information on the use of matrices. public function Update():void { cw = this.width; ch = this.height; tscaleX = tw / cw; tscaleY = th / ch; // put new scaling values mat.a = tscaleX; mat.d = tscaleY; // put new position (translation) values. // the camera position is made negative, because e.g. when the camera moves right, the page has to move left to accomodate. // cw and ch are added to move the page to the center of the viewing area // all positions are scaled accordingly mat.tx = (-mat.tx + cw / 2) * tscaleX; mat.ty = (-mat.ty + ch / 2) * tscaleY; target.transform.matrix = mat; } Step 7: Setting up the Viewer We return to our application. In this step we lay down the foundation for so called Page objects that contain the canvas with pictures and text. First, create a background for the whole application. The color is specified from XML. // Background var bg:Sprite = new Sprite(); bg.graphics.beginFill(xmldata.settings.bgcolor); bg.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); bg.graphics.endFill(); addChild(bg); Like in the example with the Camera and the flower, we are using pageContainer and pageScroller and Camera. This should look pretty familar. Next up is adding all the Page objects required as specified in the XML. In our example we have only created one page. Note that the Page class does not exist yet as we are creating this one the next step. pages is an array that will hold all Page references for later use. Parameters used by Page are pageScroller: the Spriteto which the Pagewill be added to p: an XML data object containing all information within a certain page (all images and text) g_background: the background texture // Add pages pages = new Array(xmldata.page.length()); for each(var p:XML in xmldata.page) { var id:int = int(p.attributes()[0]); pages[id] = new Page(pageScroller, p, g_background); } Step 8: Creating a Page Displayed below is the constructor of Page. We simply save all the parameters locally in the class for later use. public function Page(container:DisplayObjectContainer,data:XML,background:BitmapData) { this.id = id; this.container = container; this.data = data; this.background = background; this.title = String(data.attributes()[1]); } Now a bit more interesting stuff. The Load function of Page starts off by taking the background texture we loaded before and wrapping it over the canvas. To do this we need to know the size of the background image we are looping and the size of the entire canvas. Create a Sprite called g_background which functions as a graphics container. Add a solid background color to prevent lines between the bitmap images to show. var b:int = background.width; var h:int = background.height; var trueWidth:int = Canvas.contentWidth; var trueHeight:int = Canvas.contentHeight; // background layer g_background = new Sprite(); addChild(g_background); // A solid background color var bg:Sprite = new Sprite(); bg.graphics.beginFill(Canvas.viewerBgColor); bg.graphics.drawRect(0, 0, trueWidth, trueHeight); bg.graphics.endFill(); g_background.addChild(bg); Wrapping the background texture uses two loops, only vertically and one horizontally. It keeps on looping until the edge is reached. Every every tile at an even position - like (2,2), (4,2), (4,6) et cetera - is flipped around using scaleX or scaleY. This makes the texture flow over to the next one seamlessly. Checking if a number is even is done using the modulo operator (%). If the remainder of a number after deviding by 2 is zero then that number must be even. Around the edges we clip off any texture that goes outside the content dimensions as specified in trueWidth and trueHeight. It is important that the Page object stays this size as making it larger will change the aspect ratio and cause the screen to deform. // Add looped background image var i:int, j:int; while (i * b < trueWidth) { j = 0; while (j * h < trueHeight) { // new bitmap var s:Bitmap = new Bitmap(background); // position s.x = i * b; s.y = j * h; // alternate horizontal and vertical flip if (i % 2 != 0) { s.scaleX *= -1; s.x += b; } if (j % 2 != 0) { s.scaleY *= -1; s.y += h; } // clip if (i * b + b > trueWidth || j * h + h > trueHeight) { var clipw:int = Math.min(trueWidth - i * b, b); var cliph:int = Math.min(trueHeight - j * h, h); var nbd:BitmapData = new BitmapData(clipw, cliph); nbd.copyPixels(background, new Rectangle(0, 0, clipw, cliph), new Point()); s.bitmapData = nbd; if (s.scaleX == -1) s.x -= b - clipw; if (s.scaleY == -1) s.y -= h - cliph; } // add bitmap to display list g_background.addChild(s); j++; } i++; } The result of the repeating background should be something like this. Dark borders are added for clarity. Step 9: Loading Text Let's start our page-filling journey by adding text. Go through all XML entries labelled "text" and pass their data to the AddText function. texts = new Array(); for each(var text:XML in data.text) { AddText(text); } The AddText function looks like this. The first portion of the code validates the XML data. In case some fields aren't filled in it will append a standard value. QuickText is a class used to create a textfield with certain options. Finally, the text must be excluded from mouse interaction by using mouseEnabled = false and mouseChildren = false. private function AddText(text:XML):void { if (!text.font) text.font = null; if (!text.size) text.size = 12; if (!text.color) text.color = 0x000000; if (!text.bold) text.bold = 0; if (!text.italic) text.italic = 0; var qt:QuickText = new QuickText(text.x, text.y, String(text.content), Canvas.customFont, int(text.size), uint(text.color), Boolean(text.bold), Boolean(text.italic)); qt.blendMode = BlendMode.LAYER; texts.push(qt); addChild(qt); qt.mouseEnabled = false; qt.mouseChildren = false; } The following image shows all the options of the QuickText class: And the result of the new page including text: Step 10: Loading Images The first step here is to create Picture objects that will hold the XML data, the bitmap and some descriptive text. Listeners are directly applied for mouse interaction. All these Picture objects are then stored in an array for easy access later. // grab all images pictures = new Array(); for each(var image:XML in data.image) { // new picture object with information in it var picture:Picture = new Picture(image); pictures.push(picture); // add listeners to picture picture.addEventListener(MouseEvent.MOUSE_OVER, PictureMouseOver); picture.addEventListener(MouseEvent.MOUSE_OUT, PictureMouseOut); picture.addEventListener(MouseEvent.MOUSE_DOWN, PictureMouseDown); } And here is the basic version of the Picture class, just holding the XML data. Picture extends Sprite, we can already position it somewhere. The scale setting is verified before being used, because if the user omits it from the XML it will return 0. The standard value for scale is 1. public function Picture(data:XML) { title = data.title; description = data.description; url = data.url; page = data.page; x = data.x; y = data.y; if (Number(data.scale) != 0) imgscale = Number(data.scale); } Create a new BulkLoader just like the first time, but now to load batches of images. We are going to be loading 5 images at a time and displaying those when done. It will keep fetching new images until all are done. The function Complete is called at the completion of each batch. // Create bulk loader. loader = new BulkLoader("page" + id); loader.addEventListener(BulkLoader.COMPLETE, Complete, false, 0, true);<br /><br /> // set total amount of pictures totalPictures = pictures.length; // grab the first 5 pictures or the total amount of pictures if there are less. i = 0; while (i < Math.min(totalPictures,5)) { loader.add(String(Canvas.path + pictures[i].url), { id: "img" + i } ); i++; } // Start loader loader.start(); Step 11: Loading Images (Continued) In this step we're putting the loaded data inside Picture objects. The items property of the loader holds all objects that have been loaded in. Loop over all those objects and check whether they are an image. Each Bitmap is given to the corresponding Picture object and the Picture is added to the canvas. We also delete the loaded image from the loader items list to prevent conflicts with a later batch of loaded images. // Image batch loaded. save the data to individual Picture objects. i = amountPicturesLoaded; for each(var item:LoadingItem in loader.items) { if (item.isImage()) { pictures[i].SetImage(loader.getBitmap(item.id)); loader.remove(item.id); AddPicture(pictures[i]); i++; amountPicturesLoaded++; } } And a closer look at the SetImage function of Picture. public function SetImage(ob:Bitmap):void { // if no image data is loaded, show nothing if (ob == null) return; // save the data inside the class img = ob; // show image addChild(img); // scale img.scaleX = img.scaleY = imgscale; } And adding a picture to the canvas is as easy as calling addChild. private function AddPicture(pict:Picture):void { addChild(pict); } The result now becomes: Step 12: Adding the Page Adding something to the camera view is done by adding a child to the viewerScroller container. We've added the viewerScroller to each Page object as a parameter so that we can add it as a child by calling the Show() function of Page. public function Show():void { container.addChild(this); } Return to the Canvas class and call the Load() and Show() functions when we'd like to a show the user a page. In case the Page is already loaded, Load() will return directly so no unnecessary actions are done. The current Page we are showing is saved in the class as page. This reference will be important for page interaction. private function ShowPage(nr:int):void { // hide old page if (page) page.Hide(); // set new page page = pages[nr]; page.Load(); page.Show(); } Step 13: Zoom Modes Now that we've created our page with images and text, it's necessary to scale it so it will fit inside our viewer region. We are using the public static variables zoom and magnifyStep for this purpose. magnifyStep is an array holding all the different scale values of the camera and zoom is the current position of magnifyStep the camera is scaled to. To know which scaling value is needed to fit the content inside the viewer we need to know the ratio between the content and viewer regions. To account for wrong aspect ratios we take the minimal ratio between width and heights as follows: // Set magnify steplist magnifyStepList[0] = Math.min(viewerWidth / contentWidth, viewerHeight / contentHeight); We'd like to zoom in when clicking on the canvas. Add a mouse event to the hitfield of Page. The hitfield is basically just the graphics in the background of Page and because it is a Sprite we can put mouse interaction on it. page.hitField.addEventListener(MouseEvent.MOUSE_DOWN, MouseZoomIn); Upon a mouse click we would like the camera to scale down to the position zoom in the magnifyStepList and move to the point on the canvas that we clicked. Remember from the example that as the camera becomes smaller (scales down), the zoom on the canvas becomes larger. This is why we decrease the integer zoom by the value one. Getting the mouse position we clicked on the canvas is easy by using page.mouseX and page.mouseY. Flash automatically converts the numbers so that it appears local - meaning that if the page is for example 2000 px scaled down by 50% and you click halfway, it returns 1000 px, even though the mouse position on scale coordinates is a lot smaller. private function MouseZoomIn(e:MouseEvent):void { var pt:Point; if (!cam.bZooming && zoom > 0) { // Zoom in one step zoom--; // New camera point. Correct bounds. pt = new Point(page.mouseX, page.mouseY); CameraBounds(pt); cam.Zoom(pt.x, pt.y, magnifyStepList[zoom]); } } Step 14: Correcting Camera Position To keep the area of the camera inside the canvas we will need to correct the position within bounds of the camera. Looking at the camera example again for a demonstration of this. The camera is centered around itself so the position horizontally for example will need to stay within 0 + camera half-width and contentWidth - camera half-width. A reliable way to calculate the width of the camera when zoomed in is contentWidth/2 * magnifyStepList[zoom], because the camera in its initial unzoomed condition has the size contentWidth (same size as the canvas). private function CameraBounds(pt:Point):void { // horizontally if (pt.x < contentWidth/2 * magnifyStepList[zoom]) pt.x = contentWidth/2 * magnifyStepList[zoom]; else if (pt.x > contentWidth - contentWidth/2 * magnifyStepList[zoom]) pt.x = contentWidth - contentWidth/2 * magnifyStepList[zoom]; // vertically if (pt.y < contentHeight/2 * magnifyStepList[zoom]) pt.y = contentHeight/2 * magnifyStepList[zoom]; else if (pt.y > contentHeight - contentHeight/2 * magnifyStepList[zoom]) pt.y = contentHeight - contentHeight/2 * magnifyStepList[zoom]; } Shown in the image below is the camera and the canvas, zoomed in one time. The red lines show the borders that the camera can not cross and must stay within. Step 15: Making the Zoom Work Zooming is performed by adding scale to the camera. We are using the Tweener class and the "easyOutQuint" transition to make this happen in a smooth way. bZooming is a variable used to see if the camera is already zooming or not. You cannot zoom on the page again while it is still busy scaling up or down. At each update of the camera the function Update is called, which performs the scaling on the content. public function Zoom(newx:int, newy:int, newscale:Number):void { bZooming = true; Tweener.addTween(this, { time:2, x:newx, y:newy, transition:"easeOutQuint", scaleX:newscale, scaleY:newscale, onComplete: function():void { bZooming = false; }, onUpdate: Update }); } Step 16: A Closer Look at Pictures Remember that we added MouseEvent listeners to all the pictures inside the page. What we'd like to do is zoom in on a picture when one is clicked on and make sure it fits within the viewer region well. Images smaller than the actual viewer region must not be scaled beyond their resolution. private function PictureMouseDown(e:MouseEvent):void { var newScale:Number; var screenRatio:Number = Canvas.viewerWidth / Canvas.viewerHeight; var imgW:Number = Math.max(e.target.width * 1.05, Canvas.viewerWidth); var imgH:Number = Math.max(e.target.height * 1.05, Canvas.viewerHeight); var imgRatio:Number = e.target.img.width / e.target.img.height // Calculate image scaling if (imgRatio < 1) newScale = imgH / Canvas.contentHeight; else newScale = imgW / Canvas.contentWidth; Canvas.cam.Zoom(e.target.x + e.target.width/2, e.target.y + e.target.height/2, newScale); Canvas.cam.bLocked = true; PictureMouseDisable(); } The basic concept here is that the aspect ratio of an image must first be determined. If the width of an image is higher than the height then imgRatio < 1 will hold true and vice-versa if the height is larger than the width. We will always scale to the largest part of an image, meaning that if the image is for example 200x400px, we will treat the image like a 400x400 square. Another addition here is that we scale the image with 1.05 first, meaning the image becomes 5% larger. This way the image does not touch the sides when zoomed in. To calculate the scale of an image in comparison to the content size we divide it by the height or width of the content. Call the Zoom function of the camera and move to the middle of the picture we're focussing on and apply the new scale that we've calculated. Here is the image zooming process shown in action. Notice how the camera is kept within the bounds of the page, and how the entire image including description fits inside the screen perfectly. Step 17: Scrolling the Page If you hadn't noticed, when zoomed in on a page you can move the mouse cursor to the edges of the screen to scroll around and view more of the page. The code shown below may look a little bizarre to you; it is something I've written a while ago for a RTS style game engine and have been re-using it ever since for anything that needs scrolling. Basic principles here is that you check where the mouse position is, and in case it moves without a certain range around the sizes ( mouse_scroll_areax_reduced and mouse_scroll_areay_reduced) then it will start moving to one side at a rate proportionate to how far you are inside that range. When the mouse cursor is not inside the range it will put a drag on the scrolling to slow it down eventually. // Get the amount of scolling needed based on the mouse position mx = viewerContainer.mouseX; my = viewerContainer.mouseY; if (mx < mouse_scroll_areax && mx > 0) { scrollAmountX = ((((mx - mouse_scroll_areax) / mouse_scroll_areax_reduced) * mouse_scroll_factor) + .5) << 0; } else if ((viewerContainer.width - mx) < mouse_scroll_areax && mx < viewerContainer.width) { scrollAmountX = (((1 - (viewerContainer.width - mx) / mouse_scroll_areax_reduced) * mouse_scroll_factor) + .5) << 0; } if (my < mouse_scroll_areay && my > 0) { scrollAmountY = ((((my - mouse_scroll_areay) / mouse_scroll_areay_reduced) * mouse_scroll_factor) + .5) << 0; } else if ((viewerContainer.height - my) < mouse_scroll_areay && my < viewerContainer.height) { scrollAmountY = (((1 - (viewerContainer.height - my) / mouse_scroll_areay_reduced) * mouse_scroll_factor) + .5) << 0; } // Put drag on the scroll, so it does not keep on moving forever and slows down smoothly. scollAmountX *= .95; scrollAmountY *= .95; // Update camera position cam.x += int(scrollAmountX); cam.y += int(scrollAmountY); // Make sure the camera is within bounds var pt:Point = new Point(cam.x, cam.y); CameraBounds(pt); cam.x = pt.x; cam.y = pt.y; // Update the camera view cam.Update(); Shown below is the area where mouse interaction for scrolling occurs. Remember that it can only happen when zoomed in. Conclusion I believe this sums up all the learning goals I set out for this tutorial. Unfortunately, not everything shown in the application could be discussed because of the scope of the tutorial, but I hope you managed to learn the basics about XML data, page filling and camera manipulation. Thanks for reading! Envato Tuts+ tutorials are translated into other languages by our community members—you can be involved too!Translate this post
https://code.tutsplus.com/tutorials/zoom-into-your-own-canvas-of-content--active-6954
CC-MAIN-2018-05
refinedweb
4,444
59.5
On Thu, Mar 25, 2004 at 04:22:32PM -0800, Andrew Morton wrote:> Keith Owens <kaos@sgi.com> wrote:> >> > FWIW, lkcd (crash dump) treats hugetlb pages as normal kernel pages and> > dumps them, which is pointless and wastes a lot of time. To avoid> > dumping these pages in lkcd, I had to add a PG_hugetlb flag. lkcd runsThis should already be fixed in recent versions of lkcd. It uses alittle bit of trickery to avoid an extra page flag -- hugetlb pages are detected as "in use" as well as reserved, unlike other reserved pages which helps identify them./* to track all used (compound + zero order) pages */#define PageInuse(p) (PageCompound(p) || page_count(p))..static inline int kernel_page(struct page *p){ /* Need to exclude hugetlb pages. Clue: reserved but inuse */ return (PageReserved(p) && !PageInuse(p)) || (!PageLRU(p) && PageInuse(p));}RegardsSuparna> > at the page level, not mm or vma, so VM_hugetlb was not available. In> > set_hugetlb_mem_size()> > > > for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {> > SetPageReserved(map);> > SetPageHugetlb(map);> > map++;> > }> > > > In dump_base.c, I changed kernel_page(), referenced_page() and> > unreferenced_page() to test for PageHugetlb() before PageReserved().> > That makes sense.> > > Since you are looking at identifying hugetlb pages, could any other> > code benefit from a PG_hugetlb flag?> > In the overcommit code we don't actually have the page yet. We're asking> "do we have enough memory available to honour this mmap() invokation when> it later faults in real pages".> > > > -------------------------------------------------------> This SF.Net email is sponsored by: IBM Linux Tutorials> Free Linux tutorial presented by Daniel Robbins, President and CEO of> GenToo technologies. Learn everything from fundamentals to system> administration.> _______________________________________________> Lse-tech mailing list> Lse-tech
http://lkml.org/lkml/2004/3/25/245
CC-MAIN-2015-27
refinedweb
271
65.93
Differences between C and C++ programming languages This tutorial is about the differences between C and C++ programming languages. As we know, C++ is an extended version of C, and hence it has many similarities with its parent language. The purpose of C++ was to bring in some changes that could help to overcome the disadvantages of C such as the concept of namespaces, run-time checking, no object-oriented properties, no exception handling, etc. Thus C++ is different than C in many ways. These differences have been discussed below. Differences between C and C++ The differences between C and C++ programming languages have been given in the below table. Thank you.
https://www.codespeedy.com/differences-between-c-and-cpp/
CC-MAIN-2020-45
refinedweb
112
52.9
Introduced in C++ 11, the auto keyword is a part of the “Type Inference” feature. Type Inference refers to the deduction of data-type of variables and functions at compile time. Therefore, the programmer is not obliged to specify the exact data-types and leave it to the compiler. In this article, we will go through benefits as well as mistakes made using the auto keyword. Table of Contents - 1 How does the auto keyword work? - 2 Some important uses of the auto keyword - 3 Common mistakes with the auto keyword - 4 Conclusion How does the auto keyword work? Mainly, variables and functions make use of the auto keyword for automatic deduction of the data-type. With respect to variables, the initializer determines the data-type. However, the return statement determines the returning data-type of the functions. Let us take a quick look at some of the examples. 1. Auto used with variables #include<bits/stdc++.h> using namespace std; int main(){ auto i = 15; auto it = &i; cout<<i<<endl; cout<<*it<<endl; return 1; } Output: 15 15 In the above code snippet, the auto keyword determines the data-type of the variables. For instance, i is an integer and it is a pointer to an integer. Note: The ‘auto’ keyword can be accompanied by *or &which play a part in the type inference. Even though we did not specify it, the compiler managed to find it out using the right side of the statement also called initializers. Note: A variable declared using auto must have an initializer otherwise the compiler will throw an error. 2. Auto used with functions #include<bits/stdc++.h> using namespace std; auto func(){ int x = 15; x += 10; return x; } int main(){ cout<<func()<<endl; return 1; } Output: 25 In the above code, the return statement of the func() function, helps the compiler to identify the returning type of the function. Since the function returns x, which is an integer, the compiler immediately understands that auto must be replaced by an integer. Some important uses of the auto keyword In addition to the basic usage of auto with variables, we can apply the keyword to complex situations. 1. Auto used for iterators Many complex data structures need iterators for extracting their values. A programmer can minimize the loss of time, by skipping the lengthy declaration of the iterator. vector<map<int, vector<int>>> v; ... ... for(auto it: v){ ... ... } The iterator it is initialized by the vector v during the functioning of the for loop. 2. Auto used with function parameters C++ requires the programmers to provide data-types for the parameters in the function declaration. However, this can be simplified by using the auto keyword. #include<bits/stdc++.h> using namespace std; void func(auto x, auto st){ cout<<x<<" "<<st<<endl; } int main(){ int x = 10; string st = "abcd"; func(x, st); return 1; } Output: 10 abcd The deduction of data-types happens during the function call. Consequently, the matching of variables occurs, and the compiler figures out the exact data-types for all the arguments. Common mistakes with the auto keyword Any programmer can make mistakes with the auto keyword. Therefore, some of the common mistakes are listed below. 1. Multiple declarations using auto keyword Usually, in order to save time, we might initialize multiple variables in a single statement. This method might cause problems if we use it along with the auto keyword. Below is an incorrect way of multiple declaration. auto x = 10, y = 10.0; This leads to an inconsistent deduction. Since one of them is an integer, while the other is a double value. Therefore, the following is the correct way to declare more than one variables with a single auto keyword. auto x = 10, *y = &x; At compile time, the above auto can be replaced by int, defining x as an integer and y as a pointer to an integer. 2. Similarity in integer and boolean Since boolean values can be initialized as numbers, during a code review, people can misunderstand when a variable initialized by auto is either integer or boolean. auto x = 0; The above variable x can be either an integer or a boolean value. Therefore, in this scenario auto keyword is a bad programming concept. 3. Storing values returned by functions During code revisions, a variable storing a value from a function call might cause confusion when declared using auto. That is because, the observer will need to go through the function to make out the data-type being returned. auto x = some_function(); auto y = some_class(); The above statements should be: int x = some_function(); some_class y = some_class(); The latter lines make the code easier to follow. Moreover, it might reduce any error caused by some wrong value returned. Conclusion The use of auto reduces the time spent on basic code. Therefore, the programmer can focus on the intensive part of the program. A program must always be written in a neat and clear way so that the reader can interpret it easily. Thank you for reading. Feel free to comment below for any queries or feedback.
https://www.journaldev.com/44448/auto-keyword-c-plus-plus
CC-MAIN-2021-10
refinedweb
855
55.13
07 January 2008 17:55 [Source: ICIS news] By Linda Naylor LONDON (ICIS news)--Producers are increasing polypropylene (PP) and polyethylene (PE) prices for January across Europe, as oil and naphtha apply strong cost pressure down the chain, market sources said on Monday. Producers intended to at least cover the €78/tonne ($113/tonne) ethylene and €57/tonne propylene first-quarter increases from their converters. Converters were fighting the hefty hikes targeted by some PP producers, but buyers of some grades of PE would find it difficult to avoid large increases, they agreed. “We have accepted a €50/tonne increase, with producers asking for another €20/tonne in February,” said one major European PP buyer. “They have got €40/tonne out of me and that is all they are getting, said another. “Product is not tight.” While some buyers were prepared to confirm hikes of €40-50/tonne for January PP business, sellers were still looking for more, intending to cover the €57/tonne C3 hike. Homopolymer injection PP prices were approaching the €1,300/tonne FD (free delivered) NWE (northwest ?xml:namespace> Several buyers felt that there was little room left for significantly higher prices in the PP market. They argued that product was readily available and that passing on increases downstream was increasingly difficult. 2007 had seen an almost continuous stream of price hikes for both PE and PP as oil and naphtha rose and production was curtailed. PE buyers were under more pressure to accept substantial increases, as product was often in tighter supply than PP. Linear low density polyethylene (LLDPE) was in particularly tight supply and some converters were concerned over obtaining volumes in early 2008. C4 LLDPE spot prices were high as imported volumes were reduced during the latter part of 2007, and European producers moved away from commodity grades ahead new capacity from the Markets globally were strong and Asian demand was pulling Middle East material eastwards. “It will be a very tight six months. Most European suppliers are easing out of C4 supply in anticipation of “Meanwhile the cost of transport and high oil is having an impact on everything,” he added. One buyer reported that it had been forced to abandon its usual end-month retroactive settlement of low density polyethylene (LDPE) as the account’s regular supplier refused to deliver as long as the price was not settled. “I have had to pay €70/tonne more than in December,” a company source said. Producers were not willing to confirm what they considered to be so modest an increase, and they were still aiming to cover the €78/tonne increase in first quarter ethylene and add margin which they said they had lost in the fourth quarter 2007. “They are making money while they can,” said one buyer on Monday. “Things will change when the new capacities come on stream.” “The first two quarters will be strong. There are no significant new capacities due on stream and demand is good,” said a PE producer on his expectations for 2008. “I expect imported product from new capacities to begin to have an impact in the fourth quarter of 2008. It is the third quarter that is not clear for me. It could be strong, or it may start to ease back by then.” (
http://www.icis.com/Articles/2008/01/07/9090722/europe-producers-raise-pp-pe-prices.html
CC-MAIN-2014-10
refinedweb
550
59.23
When you first run the program you are greeted by a GUI that has a picture of the sea and a saw, CSAW, so clever. When strings are submitted to the program it compares it to some value and then branches based on the comparison. If an incorrect string is submitted the program randomly selects a predefined, snarky response and displays. One of these responses just so happens to be a link to being "Reg Rolled," hilarious right? "OMG, You're SOOO Freaking Close","Try Harder - I can tell you want this", "Wow, What a great answer - but it's wrong", "You're about 10% right", "You almost got it, just add three!", "So close, maybe subtract three?", "YES! wait, no... try harder", "Wrong..", "Google \"do a barrel roll\"", "Did you see:" "Its a SAW... in the SEA.." I used two programs to decompile this program. I started off with good ole' Ilspy to see if it was possible to get the source code, rather than have to work with assembly. Unfortunately, Ilspy was only able to decompile part of the program: using System; using System.ComponentModel; using System.Drawing; using System.Reflection; using System.Resources; using System.Runtime.ExceptionServices; using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; using System.Windows.Forms; { public class Form1 : Form { private TextBox eval_ᜀ; private Button eval_ᜁ; private TextBox eval_ᜂ; private PictureBox eval_ᜃ; private Container eval_ᜄ; { try { this.eval_ᜂ(); } catch { base.Dispose(true); throw; } } Looking through the source code I saw a branch that compared the string we enter to another string but it looks like both are altered through some heavy functions including MD5. private void eval_ᜀ(object obj, EventArgs eventArgs) { string strB = null; Assembly executingAssembly = Assembly.GetExecutingAssembly(); ResourceManager resourceManager = new ResourceManager (executingAssembly.GetName().Name + ".Resources", executingAssembly); DateTime now = DateTime.Now; string arg_65_0 = this.eval_ᜀ.Text; string value = string.Format("{0}", now.Hour + 1); string text = "NeEd_MoRe_Bawlz"; this.eval_ᜀ(text, Convert.ToInt32(value), ref strB); if (string.Compare(arg_65_0.ToUpper(), strB) == 0) { this.eval_ᜂ.Text = ""; this.eval_ᜀ(this.eval_ᜀ(107)); this.eval_ᜁ(); this.eval_ᜂ.Text = string.Format(this.eval_ᜂ.Text, this.eval_ᜀ(resourceManager)); this.eval_ᜃ.Image = (Bitmap)resourceManager.GetObject("Sorry You Suck"); } else { this.eval_ᜃ.Image = (Bitmap)resourceManager.GetObject("Almost There"); this.eval_ᜀ(); }So this branch looks promising and I could easily just change it to always run since the key is not computed based on our input. However, getting the source code to work and run in visual studio is a harder path than necessary. So my next step was to use ildasm in visual studio command prompt to decompile the file and save the output to a text file. The structure for this command is: ildasm /bytes [PEfilename] /out = filename After creating the file, I opened it and searched for "Sorry You Suck" to find the area of the branch statement quickly. There is a brtrue.s (branch if true, short) just above the sorry you suck we found. This brture.s jumps right over sorry you suck to the part that shows an incorrectly entered message. So I looked at the byte representation of the line which is 0x 2D 63. 2D is the opcode for btrue.s, and I want to change it to brfalse.s (2C) so that we always proceed to sorry you suck. To do this, I launched HexEditor and searched for the 2D 63 sequence. I then changed 2D to 2C, saved the file and ran it. We are then presented with "YOU DID IT" and the key. key: 0920303251BABE89911ECEAD17FEBF30 - m4d_D0g
http://delogrand.blogspot.sk/2013/09/csaw-ctf-quals-reversing-150.html
CC-MAIN-2018-22
refinedweb
588
60.41
I am currently reading an e-book about python and its coming now to the part about widgets and stuff. I want to know if there is a website of some sort that can show and demenstrate all the different actions you can do with a widget. One in paticular i am having trouble with is clearing out an entry box. Like if the user typed something but then changed his/her mind they could click a button and then it would clear it out by deleting the text in the box. I can figure out how to add text but not how to clear the box. Any help is appreciated though a website for all widgets would help me in the future. Also, if you used to different programming styles, i am using a style like this... def close(event): sys.exit(0) button = Button(root) button.bind("<Button-1>") ... in other words, i am using "bind", for my buttons.
http://forums.devshed.com/python-programming/109412-noob-widgets-last-post.html
CC-MAIN-2017-09
refinedweb
161
81.43
Robot Framework is an open source test automation framework. It is keyword driven and therefore very suitable to describe and automate acceptance tests. In this post, we will introduce Robot Framework and dive into the basic concepts. 1. Introduction Robot Framework knows its origin at Nokia Networks, but has been open sourced since 2008. It is a framework for creating automated acceptance tests. Test scripts written with Robot Framework are keyword driven, making them very readable and understandable for everyone (assuming best practices are being used). Whether you are creating Test Cases based on Test Designs or based on User Story acceptance criteria, a Robot Framework test script will be your Test Case documentation and automated test script in one. Besides that, it is written in plain text and therefore very suitable for adding them to your version control system (like Subversion or Git). Get rid of all those tests described in Excel Workbooks! After running your test script, a test report is automatically generated, which gives you your test evidence. The official Robot Framework website contains a lot of good information and an extensive User Guide. There is an active community and each year the RoboCon conference is being held. Enough introduction, let’s see how this looks like and start exploring Robot Framework by using some examples. The sources used in this post can be found at GitHub. 2. Installation of Robot Framework Robot Framework is implemented in Python, so you will need a Python interpreter on your system. We are using Ubuntu 18.04, the instructions for other platforms can be found at the Python website. We will use the Python 3 version which is available in our Ubuntu release. You can also use Python 2, but it is recommended not to use this Python version anymore because it has reached its end of life and Robot Framework support will also end for this Python version. Elaborate installation instructions can also be found here. Verify the Python installation: $ python3 --version Python 3.6.9 Install pip in order to be able to install Python packages easily: $ sudo apt install python3-pip Verify the pip installation: $ pip3 --version pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) Install the Robot Framework library: $ pip3 install robotframework Verify the Robot Framework installation: $ robot --version Robot Framework 3.1.2 (Python 3.6.9 on linux) We are now ready for creating our first Robot Framework script. 3. Application Under Test Before getting started, we need an application which we want to test. We will make use of a small Python script which will allow us to add an employee to a CSV file, retrieve the list of employees from the CSV file and to delete the complete list. We are using a Python script, but it must be clear that any kind of application can be tested by means of Robot Framework. The employee.py script is the following: import csv import os import sys EMPLOYEE_FILE = 'employees.csv' def add_employee(first_name, last_name): with open(EMPLOYEE_FILE, 'a', newline='') as csv_file: writer = csv.writer(csv_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL) writer.writerow([first_name, last_name]) def list_employees(): employees_list = [] if os.path.exists(EMPLOYEE_FILE): with open(EMPLOYEE_FILE, newline='') as csv_file: reader = csv.reader(csv_file, delimiter=',', quotechar='"') for row in reader: employees_list.append(' '.join(row)) print(employees_list) def remove_all_employees(): if os.path.exists(EMPLOYEE_FILE): os.remove(EMPLOYEE_FILE) else: print("The file does not exist") if __name__ == '__main__': actions = {'add_employee': add_employee, 'list_employees': list_employees, 'remove_all_employees': remove_all_employees} action = sys.argv[1] args = sys.argv[2:] actions[action](*args) The application is for your information only and only for demonstration purposes. More important is how to use it. The next commands will add an employee John Doe and an employee Monty Python, the employees are retrieved, the employees are deleted (actually, the CSV file is deleted) and the employees are retrieved again, showing an empty list. $ python3 employee.py add_employee John Doe $ python3 employee.py add_employee Monty Python $ python3 employee.py list_employees ['John Doe', 'Monty Python'] $ python3 employee.py remove_all_employees $ python3 employee.py list_employees [] 4. Explore the Basics A good starting point for learning Robot Framework, is the documentation section of the Robot Framework website. In this paragraph, we will highlight some of the basics but when you want to explore more features, it is really recommended to read and learn how to use the official documentation. The user guide contains very good documentation for general usage of Robot Framework, the standard libraries which are available and some built-in tools. 4.1 Sections and Reporting In our first test, we will verify the output when we retrieve an empty list of employees. The test script contains several sections (there are more, but we will cover that later on): - Settings: used for importing libraries and for adding metadata; - Variables: used for defining variables which can be used elsewhere in the test script; - Test Cases: the actual test cases to be executed. All test cases together are contained in a Test Suite. A test script is formatted like a table. You can choose to use whitespace characters in order to separate the columns, but we prefer using a pipe. Pipes are more clear as a separator and when using whitespace, it is not always clear whether the separator is present and this can cause a lot of analysis time when a script returns errors. Let’s take a look at our first test script employee.robot (the script is located in a subdirectory test): | *** Settings *** | | Documentation | Test the employee Python script | Library | OperatingSystem | *** Variables *** | | ${APPLICATION} | python3 ../employee.py | *** Test Cases *** | | | Empty Employees List | [Documentation] | Verify the output of an empty employees list | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} list_employees | | Should Be Equal As Integers | ${rc} | 0 | | Should Be Equal | ${output} | [] The Settings section contains a documentation setting which describes the purpose of the test suite and we import the OperatingSystem library. We need this library in order to be able to invoke the Python script. A library contains several ready-made functions. In Robot Framework terms, they are called keywords. The Variables section contains one variable APPLICATION, which contains the command we need to invoke for running the Python script. The Test Cases section contains one test Empty Employees List. It also contains a documentation tag which describes the purpose of the test. In the next line, we invoke the command for retrieving the list by using the keyword Run and Return RC and Output from the OperatingSystem library. We capture the output of the command and also its return code. With the built-in keywords Should be Equal As Integers and Should Be Equal, we can verify the return code and the output. Run the test: $ robot employee.robot ============================================================================== Employee :: Test the employee Python script ============================================================================== Empty Employees List :: Verify the output of an empty employees list | PASS | ------------------------------------------------------------------------------ Employee :: Test the employee Python script | PASS | 1 critical test, 1 passed, 0 failed 1 test total, 1 passed, 0 failed ============================================================================== Output: .../MyRobotFrameworkPlanet/test/output.xml Log: .../MyRobotFrameworkPlanet/test/log.html Report: .../MyRobotFrameworkPlanet/test/report.html After running the test, we notice that the test case has passed and three files have been created. The output.xml file contains the results in XML format and can be used for processing the results into other applications. That is all you need to know for now about this output file. The report.html provides us an overview of the test results. In case of one test it might seem a bit trivial, but this is really useful when your test suite contains a lot of tests. The most important file is the log.html file. This file contains the details of the test execution. Especially when something goes wrong during the test, this file contains the detailed information for analyzing what has gone wrong but it also serves as your test evidence. 4.2 Setup and Keywords Let’s add another test and test the adding of an employee. We add the employee, verify the return code and then retrieve the list of employees to verify whether the employee is really added. | Add Employee | [Documentation] | Verify adding an employee | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} add_employee John Doe | | Should Be Equal As Integers | ${rc} | 0 | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} list_employees | | Should Be Equal As Integers | ${rc} | 0 | | Should Be Equal | ${output} | ['John Doe'] We run both tests again and both tests pass. But when we run the tests again, both tests fail. $ robot employee.robot ============================================================================== Employee :: Test the employee Python script ============================================================================== Empty Employees List :: Verify the output of an empty employees list | FAIL | ['John Doe'] != [] ------------------------------------------------------------------------------ Add Employee :: Verify adding an employee | FAIL | ['John Doe', 'John Doe'] != ['John Doe'] ------------------------------------------------------------------------------ Employee :: Test the employee Python script | FAIL | 2 critical tests, 0 passed, 2 failed 2 tests total, 0 passed, 2 failed ============================================================================== We assume in our tests that the list of employees is empty from the start on. This is not true anymore once we have ran the tests because during the tests we add an employee to the list. We do get clear messages why our tests fail. When the console output is not clear enough, just check the log.html file where more detailed information can be found of what went wrong. We can solve our failed tests by adding a Setup to the tests. In the setup we can add all the prerequisites for running our test. We need to empty the list of employees and we also have a command for doing so. This brings us to the following problem: the Setup can only contain 1 keyword and calling the command and verifying the return code requires two lines. We can solve this by creating our own keyword in the Keywords section. | *** Keywords *** | | Clear Employees List | [Documentation] | Clears the list of employees | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} remove_all_employees | | Should Be Equal As Integers | ${rc} | 0 We add the Setup to both tests and both tests execute successfully when running more than once. | Empty Employees List | [Documentation] | Verify the output of an empty employees list | | [Setup] | Clear Employees List ... | Add Employee | [Documentation] | Verify adding an employee | | [Setup] | Clear Employees List 4.3 Readability Our tests do what they have to do and they execute successfully but they are not very readable and they contain duplicate items. It would be better if we create keywords in order to improve readability and in order to have more maintainable tests. First, we create a keyword for retrieving the list of employees. We need the output of the list in our test and therefore we Return the output value, just like you would do in any other programming language. | Retrieve Employees List | [Documentation] | Return the list of employees | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} list_employees | | Should Be Equal As Integers | ${rc} | 0 | | [Return] | ${output} The Empty Employees List test case is changed as follows: | Empty Employees List | [Documentation] | Verify the output of an empty employees list | | [Setup] | Clear Employees List | | ${output} = | Retrieve Employees List | | Should Be Equal | ${output} | [] This test case looks a lot better now. We have a clear distinction between the setup of the test case and the test itself and because keywords are used, the test itself is very readable. Something similar can be done for adding an employee. The only difference here, is that we need to be able to pass Arguments to the keyword. It is possible to add arguments next to each other separated with pipes, but it is also allowed to place them on a new line. Be aware that you must use ellipsis when a new line is being used. | Add Employee | [Documentation] | Add an employee to the list of employees | | [Arguments] | ${first_name} | | ... | ${last_name} | | ${rc} | ${output} = | Run and Return RC and Output | ${APPLICATION} add_employee ${first_name} ${last_name} | | Should Be Equal As Integers | ${rc} | 0 The Add Employee test case is changed as follows: | Add Employee | [Documentation] | Verify adding an employee | | [Setup] | Clear Employees List | | Add Employee | first_name=John | last_name=Doe | | ${output} = | Retrieve Employees List | | Should Be Equal | ${output} | ['John Doe'] | | [Teardown] | Clear Employees List We also added a Teardown to this test, in the Teardown you bring the application back to its state before the test. It is often used to restore configuration settings to its original value when they have been changed during the Setup. 5. Conclusion In this post, we gave an introduction to Robot Framework for creating automated acceptance tests. It is an easy to learn, stable framework and moreover, when the test cases are set up by using best practices, they are even readable to your business users. This last remark about using best practices is very important. If you do not follow best practices, the test cases will become unreadable and unmaintainable and you will end up with spaghetti code. See also How To Write Good Test Cases and Robot Framework Do’s and Don’ts.
https://mydeveloperplanet.com/2020/05/19/automated-acceptance-testing-with-robot-framework/
CC-MAIN-2022-05
refinedweb
2,162
52.9
User Details - User Since - Aug 20 2014, 6:06 PM (326 w, 5 d) Today Switched to stringattr & AnyRegion Sat, Nov 21 LG MLIR changes This seems to be failing on some configurations , known issue? Fri, Nov 20 Fix missing : Thu, Nov 19 Swap it to be a directive & incorporate doc suggestions. Wed, Nov 18 Don't do recursive walk when finding shape fn lib in test pass. First scan, mostly looks good thanks! Switching to Operation* and moving out anon namespace. Tue, Nov 17 Mon, Nov 16 Nice Nice, only small nits. I was funnily looking at this this morning, so yay :-) (just scanned but didn't review yet, just wanted to remark as timing is perfect :-)) Sat, Nov 14 Thu, Nov 12 Wed, Nov 11 This seems to breaking clang-5 builds: Nice improvement :) Mon, Nov 9 Nice, thanks This may be related to failure in Nice, could we have a Python test too to show the benefit? Mon, Nov 2 Thanks This looks good in general, thanks Sun, Nov 1 Sat, Oct 31 Fri, Oct 30 Nice reduction Thanks Thu, Oct 29 Did one of sanitizers flag this? Wed, Oct 28 Nice, thanks Tue, Oct 27 This order won't be stable between runs though, so any test depends on the ordering would be flaky. Why not add a simple wrapper class locally where you need this? Keeps it local to where the ordering doesn't matter and avoids folks accidentally relying on it accidentally. Mon, Oct 26 Thanks! Thanks! Oct 23 2020 Thanks SGTM Is this change related to build breakage? () Could you expand the description to add the rationale? It is mostly focussed on what but I don't know why Oct 22 2020 Thanks This seems to have broken the build Oct 21 2020 Oct 20 2020 Looks good, thanks! An extra failure case for line 1189 would be nice to have. Nice, thanks Oct 19 2020 Could you please update the documentation and description of the change? Nice, thanks! Looks good - this is little bit of a big review, but I also don't have an idea of how to make it smaller easily. Given the work following on this & verification wrt existing, I feel a little bit more comfortable. Oct 16 2020 Nice, micro nit: in description add ... as when I initially read it I thought there was requirement for empty block bb1 Nice, to follow the naming convention of other utils folders here, how about mlir/utils/vscode/mlir.natvis ? (or s/vscode/vstudio/? I don't now who which is considered more general/common in folks minds :)). Nice Woops, I missed this asking for this test. Thanks Thanks! Oct 15 2020 Looks good thanks! Nice - well I think this means I can stop migrating the other OpBuilder usage as these will be migrated again :) Oct 14 2020 Looks good overall Oct 13 2020 Looks good, thanks Oct 12 2020 I think you may need to rebase this on head, seems like you were working of an old version here. Nice, thanks Oct 9 2020 Thanks Oct 8 2020 Oct 7 2020 The pre-merge differs here - if you want to appease both you'd probably need to use PRIu64 () it seems
http://reviews.llvm.org/p/jpienaar/
CC-MAIN-2020-50
refinedweb
541
76.45
This is part 18 of Categories for Programmers. Previously: It’s All About Morphisms. See the Table of Contents. In mathematics we have various ways of saying that one thing is like another. The strictest is equality. Two things are equal if there is no way to distinguish one from another. One can be substituted for the other in every imaginable context. For instance, did you notice that we used equality of morphisms every time we talked about commuting diagrams? That’s because morphisms form a set (hom-set) and set elements can be compared for equality. But equality is often too strong. There are many examples of things being the same for all intents and purposes, without actually being equal. For instance, the pair type (Bool, Char) is not strictly equal to (Char, Bool), but we understand that they contain the same information. This concept is best captured by an isomorphism between two types — a morphism that’s invertible. Since it’s a morphism, it preserves the structure; and being “iso” means that it’s part of a round trip that lands you in the same spot, no matter on which side you start. In the case of pairs, this isomorphism is called swap: swap :: (a,b) -> (b,a) swap (a,b) = (b,a) swap happens to be its own inverse. Adjunction and Unit/Counit Pair When we talk about categories being isomorphic, we express this in terms of mappings between categories, a.k.a. functors. We would like to be able to say that two categories C and D are isomorphic if there exists a functor R (“right”) from C to D, which is invertible. In other words, there exists another functor L (“left”) from D back to C which, when composed with R, is equal to the identity functor I. There are two possible compositions, R ∘ L and L ∘ R; and two possible identity functors: one in C and another in D. But here’s the tricky part: What does it mean for two functors to be equal? What do we mean by this equality: R ∘ L = ID or this one: L ∘ R = IC It would be reasonable to define functor equality in terms of equality of objects. Two functors, when acting on equal objects, should produce equal objects. But we don’t, in general, have the notion of object equality in an arbitrary category. It’s just not part of the definition. (Going deeper into this rabbit hole of “what equality really is,” we would end up in Homotopy Type Theory.) You might argue that functors are morphisms in the category of categories, so they should be equality-comparable. And indeed, as long as we are talking about small categories, where objects form a set, we can indeed use the equality of elements of a set to equality-compare objects. But, remember, Cat is really a 2-category. Hom-sets in a 2-category have additional structure — there are 2-morphisms acting between 1-morphisms. In Cat, 1-morphisms are functors, and 2-morphisms are natural transformations. So it’s more natural (can’t avoid this pun!) to consider natural isomorphisms as substitutes for equality when talking about functors. So, instead of isomorphism of categories, it makes sense to consider a more general notion of equivalence. Two categories C and D are equivalent if we can find two functors going back and forth between them, whose composition (either way) is naturally isomorphic to the identity functor. In other words, there is a two-way natural transformation between the composition R ∘ L and the identity functor ID, and another between L ∘ R and the identity functor IC. Adjunction is even weaker than equivalence, because it doesn’t require that the composition of the two functors be isomorphic to the identity functor. Instead it stipulates the existence of a one way natural transformation from ID to R∘L, and another from L∘R to IC. Here are the signatures of these two natural transformations: η :: ID -> R ∘ L ε :: L ∘ R -> IC η is called the unit, and ε the counit of the adjunction. Notice the asymmetry between these two definitions. In general, we don’t have the two remaining mappings: R ∘ L -> ID -- not necessarily IC -> L ∘ R -- not necessarily Because of this asymmetry, the functor L is called the left adjoint to the functor R, while the functor R is the right adjoint to L. (Of course, left and right make sense only if you draw your diagrams one particular way.) The compact notation for the adjunction is: L ⊣ R To better understand the adjunction, let’s analyze the unit and the counit in more detail. Let’s start with the unit. It’s a natural transformation, so it’s a family of morphisms. Given an object d in D, the component of η is a morphism between I d, which is equal to d, and (R ∘ L) d; which, in the picture, is called d': ηd :: d -> (R ∘ L) d Notice that the composition R∘L is an endofunctor in D. This equation tells us that we can pick any object d in D as our starting point, and use the round trip functor R ∘ L to pick our target object d'. Then we shoot an arrow — the morphism ηd — to our target. By the same token, the component of of the counit ε can be described as: εc :: (L ∘ R) c -> c It tells us that we can pick any object c in C as our target, and use the round trip functor L ∘ R to pick the source c' = (L ∘ R) c. Then we shoot the arrow — the morphism εc — from the source to the target. Another way of looking at unit and counit is that unit lets us introduce the composition R ∘ L anywhere we could insert an identity functor on D; and counit lets us eliminate the composition L ∘ R, replacing it with the identity on C. That leads to some “obvious” consistency conditions, which make sure that introduction followed by elimination doesn’t change anything: L = L ∘ ID -> L ∘ R ∘ L -> IC ∘ L = L R = ID ∘ R -> R ∘ L ∘ R -> R ∘ IC = R These are called triangular identities because they make the following diagrams commute: These are diagrams in the functor category: the arrows are natural transformations, and their composition is the horizontal composition of natural transformations. In components, these identities become: ε L d ∘ L η d = id L d R ε c ∘ η R c = id R c We often see unit and counit in Haskell under different names. Unit is known as return (or pure, in the definition of Applicative): return :: d -> m d and counint as extract: extract :: w c -> c Here, m is the (endo-) functor corresponding to R∘L, and w is the (endo-) functor corresponding to L∘R. As we’ll see later, they are part of the definition of a monad and a comonad, respectively. If you think of an endofunctor as a container, the unit (or return) is a polymorphic function that creates a default box around a value of arbitrary type. The counit (or extract) does the reverse: it retrieves or produces a single value from a container. We’ll see later that every pair of adjoint functors defines a monad and a comonad. Conversely, every monad or comonad may be factorized into a pair of adjoint functors — this factorization is not unique, though. In Haskell, we use monads a lot, but only rarely factorize them into pairs of adjoint functors, primarily because those functors would normally take us out of Hask. We can however define adjunctions of endofunctors in Haskell. Here’s part of the definition taken from Data.Functor.Adjunction: class (Functor f, Representable u) => Adjunction f u | f -> u, u -> f where unit :: a -> u (f a) counit :: f (u a) -> a This definition requires some explanation. First of all, it describes a multi-parameter type class — the two parameters being f and u. It establishes a relation called Adjunction between these two type constructors. Additional conditions, after the vertical bar, specify functional dependencies. For instance, f -> u means that u is determined by f (the relation between f and u is a function, here on type constructors). Conversely, u -> f means that, if we know u, then f is uniquely determined. I’ll explain in a moment why, in Haskell, we can impose the condition that the right adjoint u be a representable functor. Adjunctions and Hom-Sets There is an equivalent definition of the adjunction in terms of natural isomorphisms of hom-sets. This definition ties nicely with universal constructions we’ve been studying so far. Every time you hear the statement that there is some unique morphism, which factorizes some construction, you should think of it as a mapping of some set to a hom-set. That’s the meaning of “picking a unique morphism.” Furthermore, factorization can be often described in terms of natural transformations. Factorization involves commuting diagrams — some morphism being equal to a composition of two morphisms (factors). A natural transformation maps morphisms to commuting diagrams. So, in a universal construction, we go from a morphism to a commuting diagram, and then to a unique morphism. We end up with a mapping from morphism to morphism, or from one hom-set to another (usually in different categories). If this mapping is invertible, and if it can be naturally extended across all hom-sets, we have an adjunction. The main difference between universal constructions and adjunctions is that the latter are defined globally — for all hom-sets. For instance, using a universal construction you can define a product of two select objects, even if it doesn’t exist for any other pair of objects in that category. As we’ll see soon, if the product of any pair of objects exists in a category, it can be also defined through an adjunction. Here’s the alternative definition of the adjunction using hom-sets. As before, we have two functors L :: D->C and R :: C->D. We pick two arbitrary objects: the source object d in D, and the target object c in C. We can map the source object d to C using L. Now we have two objects in C, L d and c. They define a hom-set: C(L d, c) Similarly, we can map the target object c using R. Now we have two objects in D, d and R c. They, too, define a hom set: D(d, R c) We say that L is left adjoint to R iff there is an isomorphism of hom sets: C(L d, c) ≅ D(d, R c) that is natural both in d and c. Naturality means that the source d can be varied smoothly across D; and the target c, across C. More precisely, we have a natural transformation φ between the following two (covariant) functors from C to Set. Here’s the action of these functors on objects: c -> C(L d, c) c -> D(d, R c) The other natural transformation, ψ, acts between the following (contravariant) functors: d -> C(L d, c) d -> D(d, R c) Both natural transformations must be invertible. It’s easy to show that the two definitions of the adjunction are equivalent. For instance, let’s derive the unit transformation starting from the isomorphism of hom-sets: C(L d, c) ≅ D(d, R c) Since this isomorphism works for any object c, it must also work for c = L d: C(L d, L d) ≅ D(d, (R ∘ L) d) We know that the left hand side must contain at least one morphism, the identity. The natural transformation will map this morphism to an element of D(d, (R ∘ L) d) or, inserting the identity functor I, a morphism in: D(I d, (R ∘ L) d) We get a family of morphisms parameterized by d. They form a natural transformation between the functor I and the functor R ∘ L (the naturality condition is easy to verify). This is exactly our unit, η. Conversely, starting from the existence of the unit and co-unit, we can define the transformations between hom-sets. For instance, let’s pick an arbitrary morphism f in the hom-set C(L d, c). We want to define a φ that, acting on f, produces a morphism in D(d, R c). There isn’t really much choice. One thing we can try is to lift f using R. That will produce a morphism R f from R (L d) to R c — a morphism that’s an element of D((R ∘ L) d, R c). What we need for a component of φ, is a morphism from d to R c. That’s not a problem, since we can use a component of ηd to get from d to (R ∘ L) d. We get: φf = R f ∘ ηd The other direction is analogous, and so is the derivation of ψ. Going back to the Haskell definition of Adjunction, the natural transformations φ and ψ are replaced by polymorphic (in a and b) functions leftAdjunct and rightAdjunct, respectively. The functors L and R are called f and u: class (Functor f, Representable u) => Adjunction f u | f -> u, u -> f where leftAdjunct :: (f a -> b) -> (a -> u b) rightAdjunct :: (a -> u b) -> (f a -> b) The equivalence between the unit/ counit formulation and the leftAdjunct/ rightAdjunct formulation is witnessed by these mappings: unit = leftAdjunct id counit = rightAdjunct id leftAdjunct f = fmap f . unit rightAdjunct f = counit . fmap f It’s very instructive to follow the translation from the categorical description of the adjunction to Haskell code. I highly encourage this as an exercise. We are now ready to explain why, in Haskell, the right adjoint is automatically a representable functor. The reason for this is that, to the first approximation, we can treat the category of Haskell types as the category of sets. When the right category D is Set, the right adjoint R is a functor from C to Set. Such a functor is representable if we can find an object rep in C such that the hom-functor C(rep, _) is naturally isomorphic to R. It turns out that, if R is the right adjoint of some functor L from Set to C, such an object always exists — it’s the image of the singleton set () under L: rep = L () Indeed, the adjunction tells us that the following two hom-sets are naturally isomorphic: C(L (), c) ≅ Set((), R c) For a given c, the right hand side is the set of functions from the singleton set () to R c. We’ve seen earlier that each such function picks one element from the set R c. The set of such functions is isomorphic to the set R c. So we have: C(L (), -) ≅ R which shows that R is indeed representable. Product from Adjunction We have previously introduced several concepts using universal constructions. Many of those concepts, when defined globally, are easier to express using adjunctions. The simplest non-trivial example is that of the product. The gist of the universal construction of the product is the ability to factorize any product-like candidate through the universal product. More precisely, the product of two objects a and b is the object (a × b) (or (a, b) in the Haskell notation) equipped with two morphisms fst and snd such that, for any other candidate c equipped with two morphisms p::c->a and q::c->b, there exists a unique morphism m::c->(a, b) that factorizes p and q through fst and snd. As we’ve seen earlier, in Haskell, we can implement a factorizer that generates this morphism from the two projections: factorizer :: (c -> a) -> (c -> b) -> (c -> (a, b)) factorizer p q = \x -> (p x, q x) It’s easy to verify that the factorization conditions hold: fst . factorizer p q = p snd . factorizer p q = q We have a mapping that takes a pair of morphisms p and q and produces another morphism m = factorizer p q. How can we translate this into a mapping between two hom-sets that we need to define an adjunction? The trick is to go outside of Hask and treat the pair of morphisms as a single morphism in the product category. Let me remind you what a product category is. Take two arbitrary categories C and D. The objects in the product category C×D are pairs of objects, one from C and one from D. The morphisms are pairs of morphisms, one from C and one from D. To define a product in some category C, we should start with the product category C×C. Pairs of morphism from C are single morphisms in the product category C×C. It might be a little confusing at first that we are using a product category to define a product. These are, however, very different products. We don’t need a universal construction to define a product category. All we need is the notion of a pair of objects and a pair of morphisms. However, a pair of objects from C is not an object in C. It’s an object in a different category, C×C. We can write the pair formally as <a, b>, where a and b are objects of C. The universal construction, on the other hand, is necessary in order to define the object a×b (or (a, b) in Haskell), which is an object in the same category C. This object is supposed to represent the pair <a, b> in a way specified by the universal construction. It doesn’t always exist and, even if it exists for some, might not exist for other pairs of objects in C. Let’s now look at the factorizer as a mapping of hom-sets. The first hom-set is in the product category C×C, and the second is in C. A general morphism in C×C would be a pair of morphisms <f, g>: f :: c' -> a g :: c'' -> b with c'' potentially different from c'. But to define a product, we are interested in a special morphism in C×C, the pair p and q that share the same source object c. That’s okay: In the definition of an adjuncion, the source of the left hom-set is not an arbitrary object — it’s the result of the left functor L acting on some object from the right category. The functor that fits the bill is easy to guess — it’s the diagonal functor from C to C×C, whose action on objects is: Δ c = <c, c> The left-hand side hom-set in our adjunction should thus be: (C×C)(Δ c, <a, b>) It’s a hom-set in the product category. Its elements are pairs of morphisms that we recognize as the arguments to our factorizer: (c -> a) -> (c -> b) ... The right-hand side hom-set lives in C, and it goes between the source object c and the result of some functor R acting on the target object in C×C. That’s the functor that maps the pair <a, b> to our product object, a×b. We recognize this element of the hom-set as the result of the factorizer: ... -> (c -> (a, b)) We still don’t have a full adjunction. For that we first need our factorizer to be invertible — we are building an isomorphism between hom-sets. The inverse of the factorizer should start from a morphism m — a morphism from some object c to the product object a×b. In other words, m should be an element of: C(c, a×b) The inverse factorizer should map m to a morphism <p, q> in C×C that goes from <c, c> to <a, b>; in other words, a morphism that’s an element of: (C×C)(Δ c, <a, b>) If that mapping exists, we conclude that there exists the right adjoint to the diagonal functor. That functor defines a product. In Haskell, we can always construct the inverse of the factorizer by composing m with, respectively, fst and snd. p = fst ∘ m q = snd ∘ m To complete the proof of the equivalence of the two ways of defining a product we also need to show that the mapping between hom-sets is natural in a, b, and c. I will leave this as an exercise for the dedicated reader. To summarize what we have done: A categorical product may be defined globally as the right adjoint of the diagonal functor: (C × C)(Δ c, <a, b>) ≅ C(c, a×b) Here, a×b is the result of the action of our right adjoint functor Product on the pair <a, b>. Notice that any functor from C×C is a bifunctor, so Product is a bifunctor. In Haskell, the Product bifunctor is written simply as (,). You can apply it to two types and get their product type, for instance: (,) Int Bool ~ (Int, Bool) Exponential from Adjunction The exponential ba, or the function object a⇒b, can be defined using a universal construction. This construction, if it exists for all pairs of objects, can be seen as an adjunction. Again, the trick is to concentrate on the statement: For any other object zwith a morphismg :: z × a -> b there is a unique morphismh :: z -> (a⇒b) This statement establishes a mapping between hom-sets. In this case, we are dealing with objects in the same category, so the two adjoint functors are endofunctors. The left (endo-)functor L, when acting on object z, produces z × a. It’s a functor that corresponds to taking a product with some fixed a. The right (endo-)functor R, when acting on b produces the function object a⇒b (or ba). Again, a is fixed. The adjunction between these two functors is often written as: - × a ⊣ (-)a The mapping of hom-sets that underlies this adjunction is best seen by redrawing the diagram that we used in the universal construction. Notice that the eval morphism is nothing else but the counit of this adjunction: (a⇒b) × a -> b where: (a⇒b) × a = (L ∘ R) b I have previously mentioned that a universal construction defines a unique object, up to isomorphism. That’s why we have “the” product and “the” exponential. This property translates to adjunctions as well: if a functor has an adjoint, this adjoint is unique up to isomorphism. Challenges - Derive the naturality square for ψ, the transformation between the two (contravariant) functors: a -> C(L a, b) a -> D(a, R b) - Derive the counit εstarting from the hom-sets isomorphism in the second definition of the adjunction. - Complete the proof of equivalence of the two definitions of the adjunction. - Show that the coproduct can be defined by an adjunction. Start with the definition of the factorizer for a coproduct. - Show that the coproduct is the left adjoint of the diagonal functor. - Define the adjunction between a product and a function object in Haskell. Next: Free/Forgetful Adjunctions. Acknowledgments I’d like to thank Edward Kmett and Gershom Bazerman for checking my math and logic, and André van Meulebrouck, who has been volunteering his editing help throughout this series of posts. Follow @BartoszMilewski April 19, 2016 at 3:44 pm I was just studying adjunctions for my Category Theory class and thought of writing an e-mail to ask you about it. Came to check your website and BAM! Amazing. I appreciate your work so much and can’t wait for the remaining parts! April 23, 2016 at 6:20 am I just discovered your book and I was wondering if it is possible to translate it in an other language? In that case, what would be your terms? I didn’t see any licence on the blog… April 23, 2016 at 10:16 am I’ve seen a Russian translation of the first few installments of the book. Are we talking of a translation in the blog form? If so, feel free as long as you provide links back to the original. What language? French? April 23, 2016 at 12:11 pm The translation would be in French. I was thinking to put it on a french website where there are a lot of tutorials, mostly about IT : . Here is an example of a tutorial : . June 9, 2016 at 4:35 am Thank you so much… I have just finished reading all the chapters until now. I haven’t studied maths since I left uni, and it has been a real pleasure reading this blog. Smooth and simple. This is really valuable for me and I am sure, a lot of devs will find it very useful. Thanks again. Can’t wait for the next chapters! December 20, 2016 at 1:54 am This paragraph in the introduction is giving me some problems: “did you notice that we used equality of morphisms every time we talked about commuting diagrams? That’s because morphisms form a set (hom-set) and set elements can be compared for equality.” So, in a not locally small category, in which hom-sets are not sent, can’t we form commuting diagrams? How can we define then associativity and identity? December 20, 2016 at 11:02 am @Juan Manuel: Yes, it’s tricky! The idea is that you replace hom-sets with objects from some category. You work with a category that’s “enriched” over a base category. That base category has hom-sets, so you can form commuting diagrams in it. That way you always bottom up at sets, but you postpone it as much as possible. December 21, 2016 at 1:33 am Sets give you comparison because sets are all about membership and to answer to membership questions you need equal comparison between elements. So if you have sets of morphisms (hom-sets) you can form commuting diagrams because morphisms are comparable. If you don’t, you have hom-objects in an enriched category. Then you need to compare objects but, to do it, if this enriched category is small, you can compare the hom-sets of the hom-objects and, if they are equal, both objects are equal, aren’t they? It’s kind of definim equals on lists using equals on the elements of lists. Am I on the right track? December 21, 2016 at 9:06 am You’re on the right track, except that you never want to compare objects for equality. You formulate all laws as commutative diagrams in the base category. Have a look at my post about impoverished categories. August 29, 2017 at 6:00 pm a typo: “The main difference between universal constructions and adjunctions it that the latter are defined globally” should be “is that” ? March 20, 2018 at 1:19 am At the triangular identities: “the arrows are natural transformations, and their composition is the horizontal composition” – shouldn’t it be vertical composition? March 20, 2018 at 5:38 am Vertical composition is for natural transformation between three functors that all share the common source and the common target category. Here we compose, for instance, L after η. L stands for identity natural transformation from L to L, a functor that goes from D to C. η is a natural transformation from ID to R∘L, both going from D to D. So we go horizontally, first from D to D and then from D to C. July 9, 2018 at 8:13 pm R εc ∘ η R c = id R c ?? May be they should be η R c ∘ R ε c = id R c I think the diagrams commute have some mistake. It should be this July 9, 2018 at 10:44 pm L (R c) -> c and c -> L (R c) are not the same. εc ‘ ::(L∘R)c – > c but in Rεc ‘ :: R(L(R c)) – > R c εc ‘ :: c – >(L∘R)c July 9, 2018 at 10:53 pm R εc’ :: R (L (R c)) -> R c == R c’ -> R c == η /= id July 9, 2018 at 11:19 pm I’m sorry to write R εc’ :: R (L (R c)) -> R c == R c’ -> R c == η /= id. I am less thinking . But this is my think picture July 10, 2018 at 9:20 am I made some changes. Does it make sense now? July 10, 2018 at 12:06 pm When I learn this article,I build a example to help me to understand adjunctions (). But in my example, R ε c ∘ η R c = id R c is strange wrong! () I don’t know whether the example is right. But it is really beautiful. () July 10, 2018 at 3:45 pm Remember that ε and η have to satisfy naturality conditions. In your example, this only works when the arrows are the inverse of each other (1->2 being the inverse of 2->1, and so on). July 10, 2018 at 6:14 pm Two ε are equal and satisfy naturality conditions. For example : (L (R 1)) = 2 then ε 2 = 1 . ε is decided by L∘R . ε is always equal and don’t need inverse of each other. ε: 1 -> 3 , 2 -> 1, 3 -> 2 () July 11, 2018 at 2:03 pm Notice that ε2 is not an object, it’s a morphism. In your case, it’s a morphism from 2 to 1 (from L(R 1) to Id 1) July 17, 2018 at 12:56 am L∘η – this is horizontal composition (L∘η) ∘ (ε∘L) – this is vertical composition right? July 17, 2018 at 11:10 am Correct. I should probably clarify this in the text. Consistent with the notation I used elsewhere, the middle dot should be solid. July 27, 2018 at 3:08 am Challenge 1. Derived (similarly to φ): ψ g = ε c ∘ L g. But what does it mean ”Derive the naturality square” ? You did not do that for φ 🙂 October 27, 2018 at 10:50 am Could you please elaborate a little bit what do you mean by that? In an arbitrary category we need equality for objects in order to compose morphisms. We can compose g ∘ fiff dom(g) = cod(f), where dom(g)and cod(f)are objects. These objects might represent some mathematical constructs with a vague notion of equality, but it has to be well-defined the moment we start talking about objects in a category. We can define equality for objects in terms of their idmorphisms: ∀ a,b in category C: a = b ⇔ ∃ ida ∘ idb I guess, in general, we don’t have the notion of morphism equality in an arbitrary category though, and that’s the reason we cannot define functor equality in terms of equality of objects and morphisms. October 27, 2018 at 1:58 pm This is one of these tricky foundational questions that I tried to avoid. Strictly speaking there are two different definition of a category, depending on whether you consider one big collection of morphisms together with the source and target mappings to objects, or a separate collection of morphisms for every pair of objects (the hom-set) and a mapping between pairs of hom-sets as composition. Even if you take the first definition (which is what you’re considering), there are different ways of understanding the equality of objects. There is the definitional equality, as “literally the same object” and there is the propositional equality that requires a proof. If you have two different functors mapping the same object, you need a proof that the target objects are equal. If you want to dive deeper into this topic, here’s a good starting point: . October 29, 2018 at 9:40 am Thanks, I think I understand now what you mean. But I still struggle understanding if we need the notion of object equality for definitions of idand ∘. To me it seems like we need it in both definitions of a category that you mentioned. We just might want to relax or completely avoid the notion for other definitions, like in the case of functors equality, as it would unnecessarily inflict proving that involved objects are the same. In other words it seems like we still have the notion, even though arbitrary category for any pair of objects we cannot prove the equality. Thanks for your effort explaining the material! December 3, 2018 at 9:41 am What are adjunctive squares? Would they be helpful to show for example the commutativity found in universal construction definition of the product? I found that it’s not very obvious from the adjuction definition (for the product). December 5, 2018 at 11:25 am I have never heard the term “adjunctive squares.” December 6, 2018 at 1:07 am I found it in some papers. Something like this for product. I don’t know why it seemed clearer.
https://bartoszmilewski.com/2016/04/18/adjunctions/?share=google-plus-1
CC-MAIN-2019-18
refinedweb
5,514
60.65
On Wed, 20 Jan 2016, Andrew Cooper wrote: > On 20/01/16 10:36, Xiao Guangrong wrote: > > > > Hi, > > > > On 01/20/2016 06:15 PM, Haozhong Zhang wrote: > > > >> CCing QEMU vNVDIMM maintainer: Xiao Guangrong > >> > >>> Conceptually, an NVDIMM is just like a fast SSD which is linearly > >>> mapped > >>> into memory. I am still on the dom0 side of this fence. > >>> > >>> The real question is whether it is possible to take an NVDIMM, split it > >>> in half, give each half to two different guests (with appropriate NFIT > >>> tables) and that be sufficient for the guests to just work. > >>> > >> > >> Yes, one NVDIMM device can be split into multiple parts and assigned > >> to different guests, and QEMU is responsible to maintain virtual NFIT > >> tables for each part. > >> > >>> Either way, it needs to be a toolstack policy decision as to how to > >>> split the resource. > > > > Currently, we are using NVDIMM as a block device and a DAX-based > > filesystem > > is created upon it in Linux so that file-related accesses directly reach > > the NVDIMM device. > > > > In KVM, If the NVDIMM device need to be shared by different VMs, we can > > create multiple files on the DAX-based filesystem and assign the file to > > each VMs. In the future, we can enable namespace (partition-like) for > > PMEM > > memory and assign the namespace to each VMs (current Linux driver uses > > the > > whole PMEM as a single namespace). > > > > I think it is not a easy work to let Xen hypervisor recognize NVDIMM > > device > > and manager NVDIMM resource. > > > > Thanks! > > > > The more I see about this, the more sure I am that we want to keep it as > a block device managed by dom0. > > In the case of the DAX-based filesystem, I presume files are not > necessarily contiguous. I also presume that this is worked around by > permuting the mapping of the virtual NVDIMM such that the it appears as > a contiguous block of addresses to the guest? > > Today in Xen, Qemu already has the ability to create mappings in the > guest's address space, e.g. to map PCI device BARs. I don't see a > conceptual difference here, although the security/permission model > certainly is more complicated. I imagine that mmap'ing these /dev/pmemXX devices require root privileges, does it not? I wouldn't encourage the introduction of anything else that requires root privileges in QEMU. With QEMU running as non-root by default in 4.7, the feature will not be available unless users explicitly ask to run QEMU as root (which they shouldn't.
https://lists.xenproject.org/archives/html/xen-devel/2016-01/msg02455.html
CC-MAIN-2022-40
refinedweb
420
58.62
code has been borrowed from the Apache Xerces project. We're copying the code to20 * keep from adding a dependency on Xerces in the Geronimo kernel.21 */22 23 package org.apache.geronimo.system.configuration;24 25 import java.io.Writer ;26 import java.io.StringWriter ;27 import java.io.IOException ;28 29 30 /**31 * Extends {@link Printer} and adds support for indentation and line32 * wrapping.33 *34 * @version $Revision: 476049 $ $Date: 2006-11-16 23:35:17 -0500 (Thu, 16 Nov 2006) $35 * @author <a HREF="mailto:arkin@intalio.com">Assaf Arkin</a>36 */37 public class IndentPrinter38 extends Printer39 {40 41 42 /**43 * Holds the currently accumulating text line. This buffer will constantly44 * be reused by deleting its contents instead of reallocating it.45 */46 private StringBuffer _line;47 48 49 /**50 * Holds the currently accumulating text that follows {@link #_line}.51 * When the end of the part is identified by a call to {@link #printSpace}52 * or {@link #breakLine}, this part is added to the accumulated line.53 */54 private StringBuffer _text;55 56 57 /**58 * Counts how many white spaces come between the accumulated line and the59 * current accumulated text. Multiple spaces at the end of the a line60 * will not be printed.61 */62 private int _spaces;63 64 65 /**66 * Holds the indentation for the current line that is now accumulating in67 * memory and will be sent for printing shortly.68 */69 private int _thisIndent;70 71 72 /**73 * Holds the indentation for the next line to be printed. After this line is74 * printed, {@link #_nextIndent} is assigned to {@link #_thisIndent}.75 */76 private int _nextIndent;77 78 79 IndentPrinter( Writer writer, OutputFormat format)80 {81 super( writer, format );82 // Initialize everything for a first/second run.83 _line = new StringBuffer ( 80 );84 _text = new StringBuffer ( 20 );85 _spaces = 0;86 _thisIndent = _nextIndent = 0;87 }88 89 90 /**91 * Called by any of the DTD handlers to enter DTD mode.92 * Once entered, all output will be accumulated in a string93 * that can be printed as part of the document's DTD.94 * This method may be called any number of time but will only95 * have affect the first time it's called. To exist DTD state96 * and get the accumulated DTD, call {@link #leaveDTD}.97 */98 public void enterDTD()99 {100 // Can only enter DTD state once. Once we're out of DTD101 // state, can no longer re-enter it.102 if ( dtdWriter == null ) {103 _line.append( _text );104 _text = new StringBuffer ( 20 );105 flushLine( false );106 dtdWriter = new StringWriter ();107 docWriter = writer;108 writer = dtdWriter;109 }110 }111 112 113 /**114 * Called by the root element to leave DTD mode and if any115 * DTD parts were printer, will return a string with their116 * textual content.117 */118 public String leaveDTD()119 {120 // Only works if we're going out of DTD mode.121 if ( writer == dtdWriter ) {122 _line.append( _text );123 _text = new StringBuffer ( 20 );124 flushLine( false );125 writer = docWriter;126 return dtdWriter.toString();127 } else128 return null;129 }130 131 132 /**133 * Called to print additional text. Each time this method is called134 * it accumulates more text. When a space is printed ({@link135 * #printSpace}) all the accumulated text becomes one part and is136 * added to the accumulate line. When a line is long enough, it can137 * be broken at its text boundary.138 *139 * @param text The text to print140 */141 public void printText( String text )142 {143 _text.append( text );144 }145 146 147 public void printText( StringBuffer text )148 {149 _text.append( text );150 }151 152 153 public void printText( char ch )154 {155 _text.append( ch );156 }157 158 159 public void printText( char[] chars, int start, int length )160 {161 _text.append( chars, start, length );162 }163 164 165 /**166 * Called to print a single space between text parts that may be167 * broken into separate lines. Must not be called to print a space168 * when preserving spaces. The text accumulated so far with {@link169 * #printText} will be added to the accumulated line, and a space170 * separator will be counted. If the line accumulated so far is171 * long enough, it will be printed.172 */173 public void printSpace()174 {175 // The line consists of the text accumulated in _line,176 // followed by one or more spaces as counted by _spaces,177 // followed by more space accumulated in _text:178 // - Text is printed and accumulated into _text.179 // - A space is printed, so _text is added to _line and180 // a space is counted.181 // - More text is printed and accumulated into _text.182 // - A space is printed, the previous spaces are added183 // to _line, the _text is added to _line, and a new184 // space is counted.185 186 // If text was accumulated with printText(), then the space187 // means we have to move that text into the line and188 // start accumulating new text with printText().189 if ( _text.length() > 0 ) {190 // If the text breaks a line bounary, wrap to the next line.191 // The printed line size consists of the indentation we're going192 // to use next, the accumulated line so far, some spaces and the193 // accumulated text so far.194 if ( format.getLineWidth() > 0 &&195 _thisIndent + _line.length() + _spaces + _text.length() > format.getLineWidth() ) {196 flushLine( false );197 try {198 // Print line and new line, then zero the line contents.199 writer.write( format.getLineSeparator() );200 } catch ( IOException except ) {201 // We don't throw an exception, but hold it202 // until the end of the document.203 if ( exception == null )204 exception = except;205 }206 }207 208 // Add as many spaces as we accumulaed before.209 // At the end of this loop, _spaces is zero.210 while ( _spaces > 0 ) {211 _line.append( ' ' );212 --_spaces;213 }214 _line.append( _text );215 _text = new StringBuffer ( 20 );216 }217 // Starting a new word: accumulate the text between the line218 // and this new word; not a new word: just add another space.219 ++_spaces;220 }221 222 223 /**224 * Called to print a line consisting of the text accumulated so225 * far. This is equivalent to calling {@link #printSpace} but226 * forcing the line to print and starting a new line ({@link227 * #printSpace} will only start a new line if the current line228 * is long enough).229 */230 public void breakLine()231 {232 breakLine( false );233 }234 235 236 public void breakLine( boolean preserveSpace )237 {238 // Equivalent to calling printSpace and forcing a flushLine.239 if ( _text.length() > 0 ) {240 while ( _spaces > 0 ) {241 _line.append( ' ' );242 --_spaces;243 }244 _line.append( _text );245 _text = new StringBuffer ( 20 );246 }247 flushLine( preserveSpace );248 try {249 // Print line and new line, then zero the line contents.250 writer.write( format.getLineSeparator() );251 } catch ( IOException except ) {252 // We don't throw an exception, but hold it253 // until the end of the document.254 if ( exception == null )255 exception = except;256 }257 }258 259 260 /**261 * Flushes the line accumulated so far to the writer and get ready262 * to accumulate the next line. This method is called by {@link263 * #printText} and {@link #printSpace} when the accumulated line plus264 * accumulated text are two long to fit on a given line. At the end of265 * this method {@link #_line} is empty and {@link #_spaces} is zero.266 */267 public void flushLine( boolean preserveSpace )268 {269 int indent;270 271 if ( _line.length() > 0 ) {272 try {273 274 if ( format.getIndenting() && ! preserveSpace ) {275 // Make sure the indentation does not blow us away.276 indent = _thisIndent;277 if ( ( 2 * indent ) > format.getLineWidth() && format.getLineWidth() > 0 )278 indent = format.getLineWidth() / 2;279 // Print the indentation as spaces and set the current280 // indentation to the next expected indentation.281 while ( indent > 0 ) {282 writer.write( ' ' );283 --indent;284 }285 }286 _thisIndent = _nextIndent;287 288 // There is no need to print the spaces at the end of the line,289 // they are simply stripped and replaced with a single line290 // separator.291 _spaces = 0;292 writer.write( _line.toString() );293 294 _line = new StringBuffer ( 40 );295 } catch ( IOException except ) {296 // We don't throw an exception, but hold it297 // until the end of the document.298 if ( exception == null )299 exception = except;300 }301 }302 }303 304 305 /**306 * Flush the output stream. Must be called when done printing307 * the document, otherwise some text might be buffered.308 */309 public void flush()310 {311 if ( _line.length() > 0 || _text.length() > 0 )312 breakLine();313 try {314 writer.flush();315 } catch ( IOException except ) {316 // We don't throw an exception, but hold it317 // until the end of the document.318 if ( exception == null )319 exception = except;320 }321 }322 323 324 /**325 * Increment the indentation for the next line.326 */327 public void indent()328 {329 _nextIndent += format.getIndent();330 }331 332 333 /**334 * Decrement the indentation for the next line.335 */336 public void unindent()337 {338 _nextIndent -= format.getIndent();339 if ( _nextIndent < 0 )340 _nextIndent = 0;341 // If there is no current line and we're de-identing then342 // this indentation level is actually the next level.343 if ( ( _line.length() + _spaces + _text.length() ) == 0 )344 _thisIndent = _nextIndent;345 }346 347 348 public int getNextIndent()349 {350 return _nextIndent;351 }352 353 354 public void setNextIndent( int indent )355 {356 _nextIndent = indent;357 }358 359 360 public void setThisIndent( int indent )361 {362 _thisIndent = indent;363 }364 365 366 }367 Java API By Example, From Geeks To Geeks. | Our Blog | Conditions of Use | About Us_ |
http://kickjava.com/src/org/apache/geronimo/system/configuration/IndentPrinter.java.htm
CC-MAIN-2018-05
refinedweb
1,571
64.91
This article demonstrates how to upload an EML file into a Microsoft .NET MailMessage. This supercedes other work I have written on this. I had trouble with the other method not decoding the message's HTML body properly and was looking for an alternative when I found Peter Huber's article "POP3 Email Client (.NET 2.0)". I discovered that with a little modification, his RxMailMessage and Pop3MimeClient classes will also read EML files. I contacted him and told him that I would be changing some of his code and updating my article and he was obligated to that idea. Pop3MimeClient was also renamed to MimeReader since its purpose does not necessarily have anything to do with Pop3. MailMessage RxMailMessage Pop3MimeClient MimeReader My intent was to have an SMTP service I could send messages to that would process those messages. The recipient email name was an identifier but it was difficult to predict what it might be. The host name was the server. Sending to id@server.com would create an EML file in the SMTP services Drop area (for Microsoft SMTP, usually c:\inetpub\mailroot\drop). I could then pull off all the mail recipients (To, CC and BCC) and process the body message as needed. To use Pop3, I would have had to log in to each Pop3 account or use a Pop3 catch-all account. I was willing to go this route until I found out that Microsoft was going to remove the Pop3 Server from all Microsoft Server platforms after Windows Server 2003. It also seemed a little silly to use Pop3 if I could just find a way to read the EML files directly. Then I found Peter's article. Let's keep this simple. I'm sure you all know how to get file paths from a directory so I won't bother showing that. It's just a simple matter of creating a MimeReader and using it to get the an RxMailMessage object by specifying the EML path. MimeReader mime = new MimeReader(); // this class processes the .EML mime content // this get's the MailMessage into Peter's RxMailMessage class // which is derived from the MS MailMessage class RxMailMessage mm = mime.GetEmail(sEmlPath); I had to look through the MailMessage AlternateViews to find the message body in some cases: MailMessage AlternateViews private string GetPlainText(RxMailMessage mm) { // check for plain text in body if (!mm.IsBodyHtml && !string.IsNullOrEmpty(mm.Body)) return mm.Body; string sText = string.Empty; foreach (AlternateView av in mm.AlternateViews) { // check for plain text if (string.Compare(av.ContentType.MediaType, "text/plain", true) == 0) continue;// return StreamToString(av.ContentStream); // check for HTML text if (string.Compare(av.ContentType.MediaType, "text/html", true) == 0) sText = StreamToString(av.ContentStream); } // HTML is our only hope if (sText == string.Empty && mm.IsBodyHtml && !string.IsNullOrEmpty(mm.Body)) sText = mm.Body; if (sText == string.Empty) return string.Empty; // need to convert the HTML to plaintext return PgUtil.StripHTML(sText); } private static string StreamToString(Stream stream) { string sText = string.Empty; using (StreamReader sr = new StreamReader(stream)) { sText = sr.ReadToEnd(); stream.Seek(0, SeekOrigin.Begin); // leave the stream the way we found it stream.Close(); } return sText; } Some parts of Peter's original Pop3MimeClient (a.k.a. MimeReader) just didn't seem to work for me, in particular, the setting of content-disposition header field in ProcessHeaderField and the ConvertToMailAddress method. MimeReader ProcessHeaderField ConvertToMailAddress This supercedes the original Easily retrieve email information from .EML files article I had written. This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) using System; using System.IO; using HLIB.MailFormats; public class Sample { public Sample() { } public void UploadFiles() { while (true) { foreach (string sFile in Directory.GetFiles(Program.sMailDrop)) { Warning 1 'System.Net.Mail.MailMessage.ReplyTo' is obsolete: '"ReplyTo is obsoleted for this type. Please use ReplyToList instead which can accept multiple addresses."' c:\Users\kpatel\Documents\Visual Studio 2010\Projects\emlIT\emlIT\MimeReader.cs 494 25 emlIT msg.Body General News Suggestion Question Bug Answer Joke Praise Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
https://www.codeproject.com/articles/76607/easily-retrieve-email-information-from-eml-files-r
CC-MAIN-2017-09
refinedweb
695
59.19
{-# LANGUAGE Trustworthy #-} -- |. module LIO.Run (LIOState(..), runLIO, tryLIO, evalLIO, privInit) where import safe Control.Exception import safe Data.IORef import safe LIO.Label import LIO.TCB -- | Execute an 'LIO' action, returning its result and the final label -- state as a pair. Note that it returns a pair whether or not the -- 'LIO' action throws an exception. Forcing the result value will -- re-throw the exception, but the label state will always be valid. -- -- See also 'evalLIO'. runLIO :: LIO l a -> LIOState l -> IO (a, LIOState l) runLIO (LIOTCB m) s0 = do sp <- newIORef s0 a <- m sp `catch` \e -> return $ throw $ makeCatchable e s1 <- readIORef sp return (a, s1) -- | A variant of 'runLIO' that returns results in 'Right' and -- exceptions in 'Left', much like the standard library 'try' -- function. tryLIO :: LIO l a -> LIOState l -> IO (Either SomeException a, LIOState l) tryLIO lio s0 = runLIO lio s0 >>= tryit where tryit (a, s) = do ea <- try (evaluate a) return (ea, s) -- |. evalLIO :: LIO l a -> LIOState l -> IO a evalLIO lio s = do (a, _) <- runLIO lio s return $! a -- |". privInit :: (SpeaksFor p) => p -> IO (Priv p) privInit p | isPriv p = fail "privInit called on Priv object" | otherwise = return $ PrivTCB p
http://hackage.haskell.org/package/lio-0.11.2.0/docs/src/LIO-Run.html
CC-MAIN-2016-36
refinedweb
200
71.95
25 November 2010 06:51 [Source: ICIS news] By Bohan Loh SINGAPORE (ICIS)--Asian paraxylene (PX) prices are expected to remain buoyant on the back of continued buying interest from downstream purified terephthalic acid (PTA) makers, market sources said on Thursday. “There are still end-users’ interest in securing cargoes for the January delivery month around the $1,260-1,270/tonne (€945-953/tonne) CFR (cost & freight) Taiwan and or China Main Port (CMP),” said a China-based trader. End-users based in ?xml:namespace> They added that they planned to secure the molecule through the spot market. Asian PX prices have been on a firm uptrend since July, but suddenly surged in mid-October to touch $1,365-1,375/tonne CFR Taiwan and or CMP by early-November. The uptrend comes on the back of a series of unscheduled maintenance at China-based makers and a force majeure declaration by Aromatics Oman. Prices subsequently eased to around $1,275-1,285/tonne CFR Taiwan and or CMP on Thursday afternoon after Aromatics Oman restarted its Sohar-based 800,000 tonne/year PX unit on 19-20 November. “Sentiment hasn’t been as bullish as before, but market fundamentals remain solid for PX prices to continue trading at the current level,” a northeast Asian trader said. “Moreover, margins remain great for PTA makers,” the trader said. “They shouldn’t have any problems paying for PX for such levels.” With PTA prices hovering around $1,150-1,160/tonne CFR CMP, market players estimated that PTA producers were enjoying a profit margin of around $180-190/tonne. With the upcoming settlement of the December PX Asia Contract Price (ACP) on 30 November, some market players are also expecting a select group of northeast Asian-based traders to begin bidding up the spot market in hopes of a higher ACP settlement. The monthly ACP benchmark is negotiated separately from prevailing spot prices among three producers and five buyers. The three producers are JX Nippon Oil and Energy, Idemitsu Kosan and ExxonMobil. The five buyers are Mitsui Chemicals, Mitsubishi Chemicals, China American Petrochemical, Oriental Petrochemical Taiwan Corp and BP. However, current spot prices and market sentiment inevitably influences the level at which the ACP is concluded, according to market sources. JX Nippon Oil and Energy has proposed a December ACP of $1,320/tonne CFR Asia, while both Idemitsu Kosan and ExxonMobil nominated a contract price of $1,350/tonne CFR Asia. The nominated prices represent a $100-130/tonne increase from the November ACP of $1,220/tonne CFR Asia. ($1 = €0.75) For more on PX and PTA.
http://www.icis.com/Articles/2010/11/25/9413688/asian-px-to-stay-firm-on-continued-buying-interest-sources.html
CC-MAIN-2013-20
refinedweb
439
50.46
I want to read from file descriptors from async coroutines. I currently use `loop.add_reader(fd, callback)` and `loop.remove_reader(fd)` It works, but IMO using callbacks feels completely alien in the middle of a coroutine. I suggest adding new APIs to handle this. e.g.: - asyncio.select(fd, mode) - asyncio.read(fd, num) - asyncio.write(fd, str) (It would be nice to support all kinds of IO operations, but these are certainly the most important) Using the current APIs, the async implementation of read() looks like this: async def async_read(fd. n): loop = asyncio.get_event_loop() future = asyncio.Future() def ready(): future.set_result(os.read(fd, n)) loop.remove_reader(fd) loop.add_reader(fd, ready) return future
https://bugs.python.org/msg259438
CC-MAIN-2021-49
refinedweb
116
64.17
Note: New timeline windows, Clean up of tranform, New python stuff(space handler). ***International disabled. I couldn't get it to work*** Done with MSVC 7 and scons for windows GCC 3.4.5 with scons for linux, 2.3.5 glibc ----------------------- Relevant feature: -bugfixes -UI cleanup work: Proportional edit button, some other editmode buttons. -added load font support to Text3d submodule -Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb. -Added: new Pivot option, "Around active object". -lots of new python goodies, even more control on blender. -Animated UI for TimeLine "Play" Commit: -ton Log: Bug fix #2507 While doing a viewmove/rotate, the queue was not emptied nor read... so after a while the entire queue gets full, not registering a modifier key-release anymore. Fixed Reported error confirmed in windows and OSX. Log: UI cleanup work; Proportional edit: - Proportional mode added to header as button/menu. Including new option to have only connected geometry influenced. - Added icons for proportional & proportional modes - Make proportional edit data part of Scene, so all gets saved. The Global flag G_PROPORTIONAL was removed - Made sure #defines get used properly, also tweaked order for proportional so it starts with regular 'smooth' by default. - Use ALT+O in editmode to switch to new proportional 'connected' mode Other UI stuff: - in EditMode, the layer buttons get hidden... the amount of icons in 3d header grows to fast. - made less ugly icons for the Manipulators. Still can be better. - Added alpha-filter for pre-processing Icon-image, giving nicer display of icon-antialising on dark or bright backdrops - disabled Manipulators when in editmode, and current layers don't show the edited data. - Added the value used to define Normal size (editmode draw) in Scene too, so it gets saved. Log: Bugfix #2506 Sky type "Paper" didn't give proper dx/dy texture frequencey in OSA render. Remainder of render recoding of last january. -theeth Log: Mirror function reuses new Transform (basicly calls the split off ElementResize function on the data). Updated the menus to work with that too. Of course, this doesn't work in object mode right now, because resize I haven't fixed negative resize (yet). Again, this would have easily benefited of a stand alone init and post Transform functions. When I have time... -ton Log: Another big cleanup, thanks to transform recode. Could do this stage because Martin recoded the Mirror(). - removed old globals like 'tottrans' or 'centre' or 'centroid' as used by old transform - removed a lot of code from editobject.c - moved all transform related code to transform_conversions.c (Note for Martin; sorry that's a mess... it now has all the weird functions for finding posemode dependencies... thats for the depgraph phase to remove) Log: On click-release for Manipulator handles, without moving mouse, it will stick to transform() until another mouse press (or ESC etc) -pidhash Log: added load font support to Text3d submodule -stiv Log: print a msg about which Python version we are using before the evil "'import site' failed" msg appears. -ton Log: Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb. Main change is that it's an own Space type now, not part of the Audio window... the audio window should restrict to own options. This way functionality is nicely separated. Since it's the first time I added a new space (since long!) I've made an extensive tutorial as well. You can find that here: ... 557.0.html Notes for using timewindow; - Add time markers with MKey - CTRL+M gives option to name Marker - Markers cannot be moved yet... - Pageup-Pagedown keys moves current frame to next-prev Marker - Xkey removes Markers - If an object has Ipos or an Action, it draws key lines - CTRL+Pageup-Pagedown moves current frame to next-prev Key - Press S or E to set start/end frame for playback Notes about the implementation in Tuhopuu: - Add new Marker now selects new, deselects others - Selecting Marker didn't work like elsewhere in Blender, on click it should deselect all, except the indicated Marker. Not when holding SHIFT of course - Not exported functions are static now - Removed unused defines (MARKER_NONE NEXT_AVAIL) - Drawing order was confusing, doing too many matrix calls - Removed not needed scrollbar, added new function to draw time values. (Has advantage the MMB scroll works not confusing on a scrollbar) - Added proper support for 'frame mapping' - The string button (name Marker) had a bug (checked str[64] while str was only 64 long) - String button itself didn't allow "OK on enter" - Made frame buttons in header larger, the arrows overlapped - Removed support for negative frame values, that won't work so simple! Log: Two little issues for Timeline window; - Using Arrowkeys to change frames didn't give proper redraw - Option "Record" now tied to the User-preset "Auto key insert". It is no user preset anymore even, I thought to leave a button in the User- presets for the time being though... Log: Finetuning Timeline; - Added Ckey for 'center view around current frame'. - Completed View pulldown menu with remainder of options. - prevented negative scaled views when start > end frame Log: Bug fix #2414 Quat XYZW was mixed up in NKey panel for Armature... now OK. Log: Bug fix #2515 Bumped up ipo limit for material "normal" mapping to 25.0 max. Log: Bug fix #2512 When joining Meshes, with the active on having TFaces, and other Meshes not, the new TFaces were created but not initialized. Log: Fix for crash in Mesh EditMode "Join triangles" (JKEY). Found & code provided by Campbell Barton, thanks mate! Note; this tool gives quickly bad results... also errors printed in the give_quad_verts call. Who likes to attack this! -jesterking Log: * integrate bFTGL with Scons * add some ENV = os.environ's here and there (help those who have msvc toolkit installed) Note for OSX users: check from your config.opts the correct info for the precompiled ftgl lib is used. -ton Log: Commit of 2 weeks ago to correctly find normals for extrusion had a typo... started loop with "->last" instead of "->first". This caused old faces that should be deleted on extrude to remain there. Thanks Jean-Luc for finding it! Log: Added two UI level warnings on using Softbody; - On leaving editmode, it deleted the Baked result automatically. Since that's an invisible and destructive ction, I've inserted an "OK?" menu here for it. - Particle Deflectors themselves cannot be a Softbody (or viceversa). Added a LABEL button to denote this when a user tries to set that. Log: Patch from Tom Musgrove to bypass extrude popup on singular selections... Implementation had some issues though, since: a) Blender has no stats available that tells amount of selected edges b) Bypassing the popup should be 100% accurate b) Once you do that, the popup should actually only show possible choices as well. So! I've added a G.totedge and G.totedgesel, also being printed in the info header. Using this variable the extrude popups could be limited too. Also: made 'normal alignment' for edge-only selections work when the normal wasn't pointing OK. Now it aligns the Z axis with the edge itself Exact algorithm for choosing a 'normal' and 'plane' still is weak. Log: Fix for negative scaling & Mirror menu in Object mode (CTRL+M) Hope Martin likes this simple hack. Also; added flag in constraint to denote whether its local or not. That way its possible to: - prevent local scale and rotate on multiple objects to change own position - draw constraint lines cleaner Log: Added: new Pivot option, "Around active object". Works nice quick to rotate a group of Objects around a defined center, without hassle with the 3d cursor. Especially for the 3D Manipulator. In EditMode/PoseMode this option falls back to "Centroid", as does the "Individual centers" option already. Log: UI goodies & cleanup - TimeLine: Marker grabbing works now. Use GKEY or select+drag, as usual Holding CTRL will step with 1 second (corrected for ntsc dudes yes!) Also added this in header pulldown - Time values and Time grid draw fixed for Seconds display. It used to draw steps of 2/5/10/20/50/100 etc. frames. Now does steps in seconds. Again corrected for "Frames/Sec" value. - "Frames/Sec" button redraws TimeLine, Secquencer, etc - Bug fixed in editing Theme for TimeLine (was editing Image Select...) - Added Grid color to Theme choices for Ipo, TimeLine, Sequencer, NLA, Action, Sound. Was missing! Log: Another Transform todo: correct Undo names for using Transform. Martin; I've added calls like: BIF_TransformSetUndo("Add Duplicate"); In advance of calling transform itself, to indicate that this is the string name to be used for Undo, and also has to be done on ESC. To make that possible I had to add a memset() to zero the global struct TransInfo. Nicely done with if(Trans.mode==TRANS_INIT) Not sure how this relates to setting constraints in advance... I always found it tricky to work a non-initalized global struct. Log: Timline goodies; - Mkey while ALT+A inserts markers. Note for Matt; You forgot to check for 'val'. The delay in tuho I brought back to max 1 frame. Delays are common in realtime gfx apps, the picture you see is old, and its possible you press a key while next frame is already drawing, and then it has to increase the frame value still... - RMB escapes from anim playback - on activate object, Timeline redraws too - Added keyline drawing for Material Ipos. The CTRL+Page keys work with it. Softbody: - Renamed buttons to call "Spring constant" now "Stiff(ness)" and the "Friction" became "Damping". Log: Bug fix #2528 Transform on "ipo keys" gave crash on ESC, due to non initialized pointer. (Martin; that idea to not calloc new data... grumble!) Note; that's another Margarita for Randall, at the Figueroa pool. -ianwill Log: BPython: - Made Blender.event var (previously only used by script links) hold ascii value -- where it applies -- of current event during events callback registered with Draw.Register(gui, events, button_events). Useful for gui scripts like Campbell's Python console. No problem using this var to hold the value, since in gui scripts it was not used (always None). - Updated Window and Window.Theme with new theme vars and the Time space. - Script links: -- Added "Render" event for script links (runs twice, second time as "PostEvent", for clean-up actions). Now FrameChanged links don't run when a single pic is rendered. -- Added "Enable Script Links" button in the script buttons tab. Now this bit gets saved in .blends along with the rest of G.f, so users can define per .blend if they are on or off by default. "blender -y" also disables all slinks as happened before with OnLoad ones only. -- Other small changes in the script buttons tab: When a link is added (button "new"), it becomes the active one for the window, no need to press a button to reach it. Also, a pupmenu showing all available texts is shown when "new" is pressed, so users can choose a text w/o having to type. Cancel the popup to leave the string button empty (link exists, but has no script assigned). A pulldown would be better UI-wise, but it's kinda weird to show both scripts and normal texts (Blender doesn't differentiate them) in a script links pulldown. With a popup we can show only texts ending in ".py" (not done in this commit, need opinions) and if the script has no or another extension, case of many in old and current .blend's, there's still the string box for writing its name. -- Implemented Ton's space handler script links: Right now only for the 3d View, but it's trivial to add for others. There are two types: EVENT, to receive 3d View events from a chosen window and DRAW, to draw on the window. Ton's idea was to give scripts a controlled way to integrate better within Blender. Here's how it works: - scripts must have a proper header, like: # SPACEHANDLER.VIEW3D.EVENT and then they are shown in 3d View's View menu, "Space Handler Scripts" submenu. Check (mark, click on it) a script to make it active. EVENT handlers should consult the Blender.event var to get the current event, which can be compared with values from the Draw module: import Blender from Blender import Draw evt = Blender.event if evt == Draw.AKEY: print "a" elif evt == Draw.LEFTMOUSE: print "left mouse button" else: return # ignore, pass event back to Blender Blender.event = None # tell Blender not to process itself the event DRAW handlers are free to draw to their owner 3D View. OpenGL attributes and modelview and projection matrices are pushed before running the handler and poped when it finishes. To communicate between EVENT and DRAW handler scripts we have the Blender.Registry module, as always. Still need to code some nice example, which should also serve to test properly space handlers. Simple tests went fine. - doc updates about the additions. ======= Note: the UI part of the space handlers and script links is of course open for changes, I just tried to make it understandable. Probably we won't use the scriptlinks icon for "None Available" (check 3d View -> View -> Space Handler Scripts), though it hints at what space handlers are. The tooltips may not be accepted either, since other menus don't use them. Opinions welcomed. -eeshlo Log: bugfix #2494: parented linked data lamps made the export crash. fix for two bugs reported by Diego Pino, an endian issue with vertex colors, and the plugin code didn't export multiple colorbands correctly. Updated the ortho camera export code for the new Blender ortho camera model. -ton Log: New buttons image, with fix for slightly offset icons in top row. -theeth Log: Fixed rotating, didn't take parent into account properly (hmmm, I'm sure this worked before). That was bug #2516: ... group_id=9 Also turned back some changes Ton did to drawing object constraint lines. Explained the why in a longish comment. -eeshlo Log: Forgot part of the vertexcolor endian fix in xml export code. Fixed an as of yet unreported bug, linked data objects which have materials linked to object instead of data have to be exported as normal, they cannot be instanciated, otherwise they will all share the same material. -theeth Log: Found some time do sanitize the big Transform call: - Splited off the event treatment into a fonction of its own - Splited off the initialisation phase into a function of its own (will have to do it for the manipulator function too) Calling transform now works like this: initTransform(mode, context) - possible post init calls, constraints mostly Transform() - eventually, the postTransform function, so that Transform is just a simple big loop which could in the end just be tied in the blender event system instead. - Added a state variable in TransInfo to replace the ret_val local variable. Possible values are: TRANS_RUNNING, TRANS_CANCEL, TRANS_CONFIRM - Tied MMB and the hotkey select for constraint together, so selecting an axis with MMB and pressing the axis key after that goes to local mode on that axis. Much less confusing. -ton Log: Animated UI for TimeLine "Play" Using the Play button in timeline, now uses an event-driven system to update the animation system and signal windows to redraw. Meaning the full UI remains responsive! Check the new Pulldown "Playback" to set which windows you like to see updated. Same settings is used for LMB 'dragging' frames in Timeline. Implementation notes; - the Icon for 'Pause' (or stop) has to be made yet, I commit this from my laptop... all was coded during a 2 x 5 hour train ride to germany - the anim playback system (ALT+A too) now uses correct "frames per second" as maximum speed. Buttons can be found in 3 places in the UI, also added it as pulldown item - The system works with 'screen handlers', which has been coded with using Python (networked) events or verse in mind too. A doc on that will follow. - the buttons code has been made 'resistant' to animated UIs too, preventing flashing of hilites. - All subloops (like transform) stop playback, with exception of MMB view manipulations. As extra; found tweak to make Textured AA fonts draw without distortion. Looks perfect here on laptop now (like Pixmap fonts) and is 20x faster. Log: Correct "Pause" icon for timeline header. Log: Removed frontbuffer updating in FileWindow. Not only fixes annoyances on graphics cards (ATIs mostly) but solves drawing errors of hilites while scrolling. Especially apparant in 'animated UI mode'. Log: Another update on FTGL texture fonts drawing. Added the same floor() trick to precisely align the glyphs to pixel coordinates as used in the Pixmap version. It now looks fully identical here. -jiri Log: - it was imposible to select one of two markers laying at the same frame ... this problem is solved now. Drawing of markers is little bit hackish, because it is neccessary to draw unselected markers at the first time (unselected marker can't hide selected marker ... visual information about selection would be lost) --------------- A new build is available
https://www.blender.org/forum/viewtopic.php?p=38918
CC-MAIN-2020-24
refinedweb
2,868
65.01
Dramatiq cron with APScheduler Here’s a quick way you can combine Dramatiq and APScheduler to automatically schedule tasks to execute at certain times. Install Dramatiq and APScheduler using pipenv: pipenv install dramatiq apscheduler Next, declare a task and decorate it with @cron. We’ll define the cron function afterwards. In a module called tasks.py, add the following code: import dramatiq from cron import cron from datetime import datetime @cron("* * * * *") # Run once a minute @dramatiq.actor def print_current_datetime(): print(datetime.now()) Then define the decorator in cron.py: import importlib from apscheduler.triggers.cron import CronTrigger JOBS = [] def cron(crontab): """Wrap a Dramatiq actor in a cron schedule. """ trigger = CronTrigger.from_crontab(crontab) def decorator(actor): module_path = actor.fn.__module__ func_name = actor.fn.__name__ JOBS.append((trigger, module_path, func_name)) return actor return decorator JOBS is where the job definitions are stored. When we run the scheduler from the command line, we’ll iterate over this list and register jobs based on entries made here. cron just builds a cron trigger and adds a job definition to JOBS. Now that we have all the components in place, we just need a way to run a scheduler from the command line. In a file called run_cron.py add the following: import cron import logging import signal import sys import tasks # imported for its side-effects from apscheduler.schedulers.blocking import BlockingScheduler logging.basicConfig( format="[%(asctime)s] [PID %(process)d] [%(threadName)s] [%(name)s] [%(levelname)s] %(message)s", level=logging.DEBUG, ) # Pika is a bit noisy w/ Debug logging so we have to up its level. logging.getLogger("pika").setLevel(logging.WARNING) def main(): scheduler = BlockingScheduler() for trigger, module_path, func_name in cron.JOBS: job_path = f"{module_path}:{func_name}.send" job_name = f"{module_path}.{func_name}" scheduler.add_job(job_path, trigger=trigger, name=job_name) def shutdown(signum, frame): scheduler.shutdown() signal.signal(signal.SIGINT, shutdown) signal.signal(signal.SIGTERM, shutdown) scheduler.start() return 0 if __name__ == "__main__": sys.exit(main()) Here we set up logging, instantiate a blocking scheduler and register all the jobs that were declared in tasks.py – which is why we import it in the first place, if we didn’t, then the code that registers the jobs would never run. Finally, we add a signal handler to shut down the scheduler whenever the process receives a SIGINT or a SIGTERM. Run rabbitmq-server then python run_cron.py and dramatiq tasks in a separate terminal and you’re done! You should see your workers print the current time once a minute.
https://defn.io/2018/01/11/dramatiq-cron/
CC-MAIN-2019-35
refinedweb
416
52.26
I have to write a program that computes a close enough value for the half-life of carbon-14 using comparison of floating point numbers. The while loop should be controlled by a comparison of half of the initial amount and the computed amount remaining. I'm confused as to how to get the number of years because my while loop becomes infinite and I dont know how to stop it. The value should be around 5000 years. Thanks for any help, I really appreciate it! Code Java: public class Lab321 { public static void main(String[] args) { final double EPSILON = 1.0E-7; final double DECAY = 1.14E-4; double initialAmount = 2.0E-5; double computedAmount = initialAmount - (DECAY / 100) * initialAmount; int year = 0; while (Math.abs(computedAmount - 1.0E-5) > EPSILON) { year++; double amountRemaining = initialAmount - (DECAY / 100) * initialAmount; System.out.println(amountRemaining); } System.out.println("The approximate value for the half life of carbon-14 is " + year + " years."); } }
http://www.javaprogrammingforums.com/%20loops-control-statements/7622-my-while-loop-has-run-into-infinite-loop-printingthethread.html
CC-MAIN-2015-40
refinedweb
158
58.79
I have just started learning C#. Please help me out... Hello and welcome to Daniweb.... Pls provide more information... what are you wanting to do??? There are a lot of places to read on c# including microsoft who include examples with most of the methods in c#.. What are you trying to make and what problem are you having? what is the diff. bet new and override during inheritance? If u can send me some tutorials on c# or some books then it would be better for me to understand the concepts. Google is your friend. Search for free c# ebooks, tutorials, read the beginning of them, one will feel more right than the rest, go through that. You havent said what you're trying to achieve other than c#.. Help you out to do what exactly? trainee and need to understand and work on Web Application using ASP.NET Ok, so search in google for asp.net tutorials. When you have a specific question people will be more able to help you Thanks!!!! what is boxing and unboxing techniques? i read it but i didn't understand it properly? i wrote this code but don't know what is happening.... using System; /// <summary> /// Summary description for Class1 struct point { public point(int x, int y) { this.x = x; this.y = y; } public override string ToString() { return (String.Format("{0},{1}", x, y)); } public int x; public int y; } class ex9 { public static void Main() { point start = new point(5, 5); Console.WriteLine("start:{0}", start); } } output: start:5,5 Ok, I assume you understand some of it, as you wrote it, what part dont you understand, we can try and
https://www.daniweb.com/programming/software-development/threads/155376/help-me
CC-MAIN-2016-50
refinedweb
281
77.64
Hi there, I started working with monogame and monogame.extended in the last week and I'm in love. Working on a little top down RPG and I've finally come to the point where I need to start s̶l̶a̶p̶p̶i̶n̶g̶ ̶t̶o̶g̶e̶t̶h̶e̶r carefully implementing the interface. Reading through the discussions here and here, it seems like it's been a real adventure in terms of putting together a system. Nearly two years on at this point and here I am, late to the party as usual. So monogame community, which do you recommend? The extended GUI or NuclexGUI? Appreciate any input, thanks! I'm having a look at NuclexGui at the moment. It seems really solid but some of the example code doesn't seem to match up with what I got from Nuget. Here's what I mean:This example code says on line 106 Style = "label-title" and looking at the actual class for GuiLabelControl, it's clearly there on line 20. Style = "label-title" The definition from the nuget reference is as follows: namespace MonoGame.Extended.NuclexGui.Controls { public class GuiLabelControl : GuiControl { public string Text; public GuiLabelControl(); public GuiLabelControl(string text); } } As you can see in my code, there is no definition for Style. I'm not sure how big of a difference this makes, but inconsistencies always scare me Just thought I'd mention it, while I'm testing things out. Okay, I think I'm going to drop Nuclex. Gonna give the other one a try. Okay, after much testing and soul searching, I've found the perfect solution. It's called GeonBit.UI and it's very impressive. For anyone that comes across this thread in the future, take a look here. It's just so simple and easy to implement. Threw this together in a few hours, totally dynamic and single line of code to add more keybinding options. Great to know you found a solution that works for you mate. The story behind Nuclex GUI is that we ported it from an old XNA project to get some sort of GUI solution into MonoGame.Extended. Meanwhile, I've been working on our own GUI system for quite some time. It's quite a big job creating a really solid GUI system. I work on it every so often and make some progress each time but there's still some work to call it "complete". There's quite a number of GUI solutions out there but in my experience none of them are perfect. For now it's really a matter of finding what works best for you. I'm currently in the process of choosing a GUI framework (or making my own). And I've now spent 1h each with both Extended.GUI and Geonbit UI. I'm now gonna spend more time with Extended.GUI simply because I like the source code better. Being a C# software developer I feel like the GUI components makes more sense to me (dock- and stackpanels), and the source is much cleaner than Geonbit. My only fear is that Extended.GUI isn't as complete as Geonbit... but in that case I can probably just extend the framework myself. Completing Extended.GUI is on my to-do list but it's definitely not on the top of my to-do list. In other words, you're welcome to use it as-is but don't wait around for it to be finished. That said, if you do decide to use it you've got a lot of flexibility to do what you want with it. If you want to contribute to our project you can do that or you can simply take the code and use it in your project as you see fit.
http://community.monogame.net/t/extended-gui-or-extended-nuclexgui/10589/7
CC-MAIN-2019-13
refinedweb
642
74.29
why ejb components are invisible components.justify that ejb components are invisible: EJB - EJB EJB Why ejbActivate() and ejbPassivate() methods are dummy methods in Stateless session bean Hi friend, As the name implies...:// Thanks ejb vs hibernate - EJB ejb vs hibernate 1>>> If we have ejb entity bean why we need hibernate? 2>>> Is hibernate distributed EJB, Enterprise java bean- Why EJB (Enterprise Java Beans)? Why EJB (Enterprise Java Beans)? Enterprise Java Beans or EJB..., Enterprise Edition (J2EE) platform. EJB technology enables rapid and simplified Difference between EJB 2 and EJB 3 - EJB in EJB lifecycle. 3) Why do we have Remote and Home interfaces in EJB 2.x...Difference between EJB 2 and EJB 3 I know we dont implement home and remote interfaces. 1)Do we have ejb-jar.xml in EJB 3.0 EntityBean - EJB EntityBean In ejb3.0 does not have entity beans why how it persist... with storing and retrieving of application data, can now be programmed with Java Persistence API starting from EJB 3.0. Read for more information first entity bean example in eclipse europa - EJB : http... to create simple ejb3.0 application in eclipse .And also how to create entity bean ejb what is the best book to study ejb with examples in weblogic with (netbeans or eclipse) Please visit the following link: EJB Books business objects in any J2EE application. Professional EJB shows how... concepts, showing you both the good and bad in building real-world EJB... EJB Books   ejb Enterprise JavaBeans (EJB): An Overview or any other server. An EJB application server accepts the connections in order... in the EJB containers that encapsulates the business logic of an application... tutorials at Rose India Why EJB (Enterprise Java Beans)? Introduction to : Thanks ejb - EJB ejb - EJB ejb plz send me the process of running a cmp with a web application send me an example EJB - EJB: Why spring? Why spring? Why do we need to learn Spring? and where can we use it thanks Why NSMutableDictionary Why NSMutableDictionary Why NSMutableDictionary is used for? NSMutableDictionary inherits from NSDictionary class, which is used to manage mutable associations of keys and values. Actually, NSMutableDictionary Hibernate - EJB hibernate ejb hibernatepersistence jar Need to know about hibernate ejb hibernatepersistence jar tutorials - EJB ejb tutorial for beginners free Can anyone give me the reference of EJB tutorials for beginners question - EJB EJB Query language reserved words What is the ejb query language reserved words   Introduction To Enterprise Java Bean(EJB). WebLogic 6.0 Tutorial. component-based distributed application using the java language. EJB... Enterprise Java beans(EJB) compliant application servers. Prerequisites... Java Beans (EJB)? Application why this can't why this can't import java.util.*; class Dash{ public static void main(String args[]){ int x0=100; int[] x1=new int[3]; int[][] x2=new int[3][3]; int[][][] x3=new int[3][3][3 j2ee - EJB j2ee when we given a request for ejb cointainer how the container calls the we requested method call Why this is not working...? Why this is not working...? import java.util.*; public class Family { int size_of_family=0; public Person[] members=new Person[size_of_family]; Person d = new Person(); public Family (int size_of_family){ members = new java - EJB java hi friends, i am creating one file, i want to store this file in my working directory.how can i get real path or working directory path in ejb? regards, srinivas Swing EJB would work with EJB application server...Swing EJB Hi everyone !!! I tried to find wether EJB architecture can operate with swing, because I am trying to make application which would work why jre in jdk why jre in jdk why jre in jdk EJB Container or EJB Server EJB Container or EJB Server An EJB container is nothing but the program that runs on the server and implements the EJB specifications. EJB container provides special type Why it called Struts? Why it called Struts? Why it called Struts why the php is open source? why the php is open source? why the php is open source why using static keyword why using static keyword why using static keyword Why is super.super.method(); not allowed in Java? Why is super.super.method(); not allowed in Java? Why is super.super.method(); not allowed in Java use of ejb 3.0 use of ejb 3.0 what is use of ejb 3.0 why not float main? why not float main? why should the main be int or void?why cant it be float or char? why int main()?why not float main()?or char main NullPointerException - EJB ] at java.lang.Thread.run(Thread.java:595) PLEASE HELP..... I am new to ejb and jboss Why Ajax for web? Why Ajax for web? Hi, Why Ajax is so important in web applications development? Thanks Why "<![CDATA[ ]]>" CDATA tag. Why tag. . Why do we use this tag and what is the name of this tag Java is an opensource program or not? why??? Java is an opensource program or not? why??? Java is an open source program or not.. why Why Java as a programming Language? ; Now, Java is also known as a powerful application framework for building next... Why Java as a programming Language? Why Java as a programming Language? Java is a general why get method is used? why get method is used? why get method is used in 60% commercial application while using post is more secure3 - stateless - EJB EJB stateless session bean Hi, I am looking for an example of EJB 3.0 stateless session bean
http://www.roseindia.net/tutorialhelp/comment/65081
CC-MAIN-2014-10
refinedweb
927
68.26
Another temperature project, this time we will use a TMP102 to an LCD keypad shield arduino and lcd keypad shield and TMP102 layout Parts List Code This is from the Arduino site with a few tweaks #include "Wire.h" #include <LiquidCrystal.h> #define TMP102_I2C_ADDRESS 72 /* This is the I2C address for our chip. This value is correct if you tie the ADD0 pin to ground. See the datasheet for some other values. */ //setup for the LCD keypad shield LiquidCrystal lcd(8, 9, 4, 5, 6, 7); void setup() { Wire.begin(); // start the I2C library Serial.begin(115200); //Start serial communication at 115200 baud lcd.begin(16,2); //line 1 - temperature lcd.setCursor(0,0); lcd.print("TMP102 test"); } void loop() { getTemp102(); delay(1000); //wait 5 seconds before printing our next set of readings. } void getTemp102() { byte firstbyte, secondbyte; //these are the bytes we read from the TMP102 temperature registers int val; float convertedtemp; float correctedtemp; Wire.beginTransmission(TMP102_I2C_ADDRESS); //Say hi to the sensor. Wire.write(0x00); Wire.endTransmission(); Wire.requestFrom(TMP102_I2C_ADDRESS, 2); Wire.endTransmission(); firstbyte = (Wire.read()); secondbyte = (Wire.read()); /*The first byte contains the most significant bits, and the second the less significant */ val = firstbyte; if ((firstbyte & 0x80) > 0) { val |= 0x0F00; } val <<= 4; val |= (secondbyte >> 4); convertedtemp = val*0.0625; correctedtemp = convertedtemp - 5; lcd.setCursor(0,0); //display readings on lcd lcd.setCursor(0,1); lcd.print("Temp: "); lcd.print(correctedtemp); lcd.print(" c"); } Link
http://www.arduinoprojects.net/temperature-projects/arduino-temperature-project-with-a-tmp102.php
CC-MAIN-2019-22
refinedweb
236
60.92
0 Literally, I have been asked this question ""The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, … ; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms – i.e., Fib[n] = Fib[n – 1] + Fib[n – 2]. Using this information, write a C++ program that calculates the nth number in a Fibonacci sequence, where the user enters n in the program interactively. For example, if n = 6, the program should display the value 8." I have code that works for giving me an answer; #include <stdio.h> #include <iostream> using namespace std; int main () { int N; unsigned long long Fib(int N); cout<<"Enter your value: "; cin>>N; if (N<1) { cout<<"Please chose another value"; cin>>N; } else { { unsigned long long u = 0, v = 1, t; for(int i=2; i<=N; i++) { t = u + v; u = v; v = t; cout<<t<<"is your answer"; } return v; } } However, I am looking to find a way to display only one term...When it gives the answers it displays the entire sequence, when really I want only the Nth value (as in the question above). Any help on how to do it would be great. Thanks :)
https://www.daniweb.com/programming/software-development/threads/449162/c-fibonacci-sequence-largest-value
CC-MAIN-2017-04
refinedweb
208
72.6
file management. Thoughtful and effective directory hierarchies help users locate content with ease. Consistent and expressive file nomenclatures give users the ability to discern the nature of a file's content at a glance. Unfortunately, there are many things that even the most expressive file name can't convey. In some cases, there is just too much information, most of which doesn't warrant inclusion in a concise file name. Many unique file formats now include embedded meta-data mechanisms that provide users with a way to 'tag' files. With a specialized tag editor, users can easily associate a title, artist and album with a specific MP3 file, for instance. Wouldn't it be nice to be able to associate arbitrary tag data with any kind file or directory? With extended attributes, you can.Extended attributes are essentially name/value pairs that can be assigned to any file or directory. This powerful file system meta-data feature, when intelligently used, can facilitate tremendously efficient file management. The goal of this example-driven overview is to illustrate the power of extended attributes and demonstrate potential uses. You will need a basic understanding of awk and bash to appreciate the significance of some of the examples, but even users without a lot of command line experience will be able to understand the commands and figure out how to use them. By the time you finish reading this article, you will be able to take advantage of the coolest file system feature to be implemented since the symbolic link. Getting Started The first step is configuration. In days of yore, intrepid users had to patch their kernel to get support for extended attributes. Lucky for you, the feature is now a standard part of the 2.4 and 2.6 kernels, and it is widely supported by most major distributions and almost all the prominent file systems. In most cases, it is just a matter of enabling the feature. If you are fortunate enough to be using an XFS file system, the feature is already enabled and you can skip the rest of this section. If you are using ext2, ext3 or reiser, you will have to add the user_xattr flag to the drive's entry in your/etc/fstab file and remount the partition. The updated entry should vaguely resemble this: /dev/hda1 / ext3 defaults,noatime,user_xattr 0 1 After you have altered your fstab file, you can either reboot your computer, or remount the partition like so: mount -o remount,user_xattr / Now you need to install the commands and the associated library. An 'attr' package is available for many distributions, and source code is available from the SGI web site. That's all there is to it. Now that everything is configured properly, it's time to learn some new commands. The Commands Manipulation of extended attributes can be done with three commands: setfattr, getfattr, and attr. This article does not cover the attr command, which exists solely for the sake of IRIX compatibility. As you can guess, the setfattr command sets attributes, and the getfattr command retrieves them. To start with, we will add an attribute named 'testing', with a value of 'this is a test', to a file called 'test-1.txt': setfattr -n user.testing -v "this is a test" test-1.txt The '-n' parameter specifies the name of the attribute. Period-delimited attribute namespaces are used to reduce naming conflicts. All attributes explicitly added by users must be in the 'user' namespace, which is why the attribute in the example is named 'user.testing'. For serious employment of this feature, more elaborate namespaces are advisable. The '-v' parameter specifies the value of the attribute. Note that the value is enclosed in quotation marks because the string includes spaces. Now we will use the getfattr command to retrieve the 'testing' attribute: getfattr -n user.testing test-1.txt this will cause the following output: # file: test-1.txt user.testing="this is a test" If you just want it to display the value of the attribute, you can use the '--only-values' parameter: getfattr --only-values -n user.testing test-1.txt The setfattr command is also used for removing attributes. To get rid of our 'testing' attribute, all I have to do is: setfattr -x user.testing test-1.txt Unfortunately, not all programs and file systems support extended attributes. If you copy the files to a different file system or manipulate the files with a utility that doesn't support the feature, the attributes will disappear. If you want to preserve the attributes, you can use the '--dump' parameter of the getfattr command to generate a complete listing of all the attributes and values associated with the target: getfattr --dump * > data_file When you move the files back to a file system that supports extended attributes, you can restore the attribute data to the files by using the '--restore' parameter of the setfattr command: setfattr --restore=data_file There are a few other options and parameters that are not covered in this article. For more information, you can refer to the man pages. A Few (Relatively) Simple Examples As a journalist, I write a lot of articles. The number of files in ~/doc/technical/articles has steadily grown, and it occurs to me that it will soon become difficult to manage. I can use extended attributes to simplify the task. First, lets think about the kind of attributes it might be helpful to associate with articles. There are a few in particular that come to mind: title, date of publication, and publication venue. There are many other attributes that I could add, but I want to keep it simple, and I want to avoid assigning attributes for things like word count that I can easily ascertain with other simple commands. Now let's think about namespace issues. In order to prevent my attribute names from conflicting with attributes added in the future by other programs, I will put all my attributes in the 'user.article' namespace. Now I will manually set the individual attributes for all of my articles. Here is an example: setfattr -n user.article.title -v "Innovations in Window Management" article-commentary-wm_innovations.txt It is also possible to add an attribute to multiple files at once. To demonstrate this, I will add an article.author tag to all my article files: setfattr -n user.article.author -v "Ryan Paul" *.txt Now I'll show you how to use the attributes for filtering and file management. Let's start by trying to list all of the files with articles that I have written for Newsforge. The format for the getfattr command is kind of unusual, so we have to use awk to extract the relevant data. The getfattr output looks something like this: # file: article-commentary-wm_innovations.txt user.article.venue="newsforge" # file: article-comparison-xml_authoring_tools.txt user.article.venue="newsforge" If we treat each '# file: ' entry as an awk record, and each line of that record as an awk field, we should be able to get what we want by grabbing the first field of every record that contains '="newsforge"': getfattr -n user.article.venue *.txt | awk 'BEGIN {RS="# file: "; FS="\n"}/="newsforge"/ {print $1}' To simplify matters, we can abstract this into a bash function: ea_query() { a=$1; v=$2 shift 3 getfattr -n $a $* | awk "BEGIN { RS=\"# file: \" FS=\"\n\" }/=\"$v\"/ { print \$1 }" } Which we can use to perform arbitrary queries. The following command-line call: ea_query user.article.venue newsforge *.txt will list all the.txt files for which 'newsforge' is the value associated with the 'user.article.venue' attribute. Now let's try using the queries for some simple file management. If I want to copy all the files containing articles written for newsforge into a 'newsforge_articles' directory, I can do this: cp `ea_query user.article.venue newsforge *.txt` newsforge_articles What if I want to make a tarball containing all articles I wrote for newsforge that are longer than 1200 words? To find out which articles are longer than 1200 words, I use an old trick: I filter 'wc -w' through awk and output the names of all the files that fulfill a greater-than comparison. I can use the output of that as the input for the query, and I can use the output of the query as the input for tar: tar -czf long_newsforge_articles.tgz $(ea_query user.article.venue newsforge $(wc -w *.txt | awk '/\.txt/ {if ($1 > 1200) print $2 }')) A useful variation on the above example might involve compressing newsforge articles containing a specific word or phrase. You can do that by using grep rather than wc and awk. Once you have put together a few handy bash functions or shell scripts for attribute manipulation, you should be able to integrate extended attribute queries into your repertoire of file management techniques with relative ease. An Arcane Example For the benefit of system administrators and ambitious readers, I will now present a more sophisticated command-line example. I am going to show how I list, in order by publication date, the title and filename of every review I have written for Newsforge that has been published since November of 2004, is longer than 1000 words, and contains the word "Linux". For this example, you will need ruby, and Aredridel's excellent xattr module ( ). I have included line breaks to increase the readability of the example: ruby -r xattr -e ' pubdate = proc {|f| Time.gm(*f.get_attr("article.date.published").spli}" }' I start by defining a 'pubdate' function that will convert my "date.published" attribute string into a ruby 'Time' instance. Then, I use the 'Dir[]' class method to generate a list of all files in the current directory that match the "*review*.txt" glob. I filter that list of files through a 'find_all' block that performs the necessary checks, and then I pass the results to a 'sort' block that performs publication date comparisons using the 'pubdate' function. Finally, I send the title and name of each file to stdout in a concluding 'each' block. Note that I use the '-r xattr' parameter to include Aredridel's module. Ruby lends itself well to command line administrative work. You can use variations of the above example for a wide variety of file and system management tasks in native Ruby, or you can output file names, and pipe the result to other shell commands. If you have some programming experience, you can use the xattr lib to make elaborate scripts and utilities that can manipulate extended attributes. For those who prefer Python for application development, pyxattr is available here. Conclusion Whenever I learn a new command or a new command line trick, I celebrate by putting it to good use. I've given you a good start. Now it's your turn. Find a creative way to use extended attributes, and demonstrate your command line prowess by leaving a comment with a few examples, or by sharing your experiences.
https://www.linux.com/news/cli-magic-use-extended-attributes-better-file-management
CC-MAIN-2018-47
refinedweb
1,840
53.71
When a Django application is “installed” using the syncdb admin command, some additional artifacts are usually created: ContentType objects and permissions for each model class in your app. So, if you want to completely “uninstall” an app from a Django project, you have to not only manually remove the database tables, you also have to manually remove these related artifacts. While the existence of these “orphaned” objects does not seem harmful, I like to keep my database as cruft-free as possible. A straightforward process for cleanly removing a Django app from a project is as follows: 1. Write “drop table” statements for the app to a file (assuming the working directory is the Django project directory): $ ./manage.py sqlclear appname > drop_appname_tables.sql 2. Remove the app from the INSTALLED_APPS list in the Django project settings module. 3. From the Django project root URLconf remove the explicit import of the app admin module, if present, and any associated url patterns. 4. Restart the web server or WSGI daemon and confirm that Django is not broken. 🙂 5. Drop the database tables (assuming MySQL backend and Django db name “django”): $ mysql -p django < drop_appname_tables.sql 6. Clean up the app content type and permission artifacts: $ ./manage.py shell >>> from django.contrib.contenttypes.models import ContentType >>> for ct in ContentType.objects.filter(app_label=appname): ... ct.delete() ... >>> Because Django deletes related objects by default, deleting the ContentType objects will also remove the related django.contrib.auth.models.Permission objects (and the many-to-many associations with users and groups). Here’s a custom admin command I have used to perform the content types cleanup: from django.contrib.contenttypes.models import ContentType from django.core.management.base import LabelCommand class Command(LabelCommand): help = 'Removes legacy content types and related objects for an app that is no longer installed.' args = '<app_label app_label ...>' label = 'app_label' def handle_label(self, label, **options): cts = ContentType.objects.filter(app_label=label) try: # Django 1.2+ out = self.stdout except AttributeError: # Django < 1.2 fallback import sys out = sys.stdout if len(cts): out.write('Deleting content types for app_label "%s" ...\n' % label) for ct in cts: out.write('Deleting %r and related objects ...\n' % ct) ct.delete() else: out.write('No content types found for app_label "%s".\n' % label) Note that the app_label is not necessarily the same as the string used in INSTALLED_APPS. #1 by JeremyT on September 23, 2010 - 4:12 pm Nice. I’ve been manually dropping tables, didn’t even think to look for a better way 🙂 #2 by Lacrymology on March 30, 2012 - 1:17 pm Thanks. Just one thing, you could write that as simply `ContentType.objects.filter(app_label=appname).delete()`
https://fragmentsofcode.wordpress.com/2010/09/21/cleanly-removing-a-django-app/
CC-MAIN-2017-17
refinedweb
445
51.65
<URL: > Advertising > [book - Tue Aug 26 00:12:38 2008]: > > > [EMAIL PROTECTED] - Mon Aug 25 20:42:24 2008]: > > > > 2008/8/25 Madeline Book: > > > Or the prefix my_ could be changed, perhaps to fc_ or > > > similar (there are unfortunately many freeciv support > > > functions that start with my_ :(). > > > > I would vote for 'fc_' -prefix. It's not necessary to replace all > > 'my_' -functions with 'fc_' -functions now, but over time we should > > go that way. > > > > Or maybe also just two letter 'fc' is too likely to cause namespace > > conflicts... 'fciv' is not good as this is Freeciv, not FreeCiv. > > Possibly, though I can't think of any libraries that freeciv > would use that would use the "fc_" prefix. And there are > already fc_calloc/malloc that use this convention. Attached > patch changes all my_ prefixes in netinf.h to use fc_ and > updates all occurences of those functions. Committed to S2_2 (r15174) and trunk (r15175). ---------------------------------------------------------------------- 常にあって終わらない音楽を楽々聞いている。 _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org
https://www.mail-archive.com/freeciv-dev@gna.org/msg05709.html
CC-MAIN-2018-22
refinedweb
163
83.15
Well, HaXe can use pre-compiled code, since maybe more then a year ago I guess... It doesn't use SWC, but ans SWF as an input is OK. Probably Niel can elaborate on that, or correct me if I'm wrong. HaXe has a way to deal with AS3 global functions (for example you could've exposed them through Lib class), I don't think it would be particularly difficult to add a compiler macros to handle the declaration of such functions too, when working particularly on AS3 target. I never found any practical use case that justified the use of internal or custom namespaces except for some side effects, like, for example, providing access to a function if the code asking for the access is authorized to do it. Which was still a nice, but useless trick. I could never be confident whether to use protected or private because I really view them as the same thing. I really think that separation of these two added more complication, where it wasn't actually needed. I see the absence of E4X as a good thing, it has proved to be both very difficult for understanding and inefficient, especially as implemented in ASC/MXMLC. It is both difficult for the user to write, for the compiler to optimize and for the editor to highlight it properly. Besides, the instances of framework code using E4X can be counted on the fingers of one hand, so it's not really an issue. In my opinion, the framework in any case requires a very fundamental rewrite. The way things were done wasn't good, but no one took the courage to change that because of number of promises Adobe had to keep to the people who used the framework. Why not use MXMLC? - obviously, Adobe aren't going to support it, unless for maybe critical fixes, so if you are going to support it, you are quite on your own with that. MXMLC, as a program, suffers from all kinds of architecture errors and this is probably the reason Adobe decided to not to fix it, but develop something new. When I used Metaas, I used it because me and my friend where trying to do something like real-time code-behind generation for MXML files. I.e. we were working on a plugin for FlashDevelop that would compile MXML files as you edit them and, if you wanted to, you could switch to see the source produced by MXMLC. While doing this, I got acquainted with MXMLC source code more closely, and, honestly, it's a mess... After some time of trying to do what we wanted with MXMLC, we decided to patch Metaas to do the codegeneration, because it seemed to be easier and much more generic! We actually succeeded to a degree the prototype was working :) But then we got both frustrated about MXML as a concept and never touched that thing again. Best. wvxvw
http://mail-archives.apache.org/mod_mbox/incubator-flex-dev/201202.mbox/%3CCAJQBtgkHkvQYRGX01aWunww1jAHGntuE5e+mak9EJJ1sxHhs+A@mail.gmail.com%3E
CC-MAIN-2014-15
refinedweb
495
65.15
#include <stdio.h> #include <stdlib.h> #include <conio.h> typedef struct { char p_name[10]; int age; } records; int main (void) { FILE *fp; fp=fopen("test.bin", "wb"); printf("Enter a name: \n"); scanf("%s", &records.p_name); printf("Enter an age: \n"); scanf("%d", &records.age); fwrite(p_name, sizeof(p_name),1,fp); fwrite(age, sizeof(age), sizeof(age),1,fp); } 3 replies to this topic #1 Posted 13 November 2011 - 10:15 AM I still am trying to find out how to do this! i've written a simple code but it doesn't seem to build. PePe===> BLACKSPADE EMPIRE<===PePe #2 Posted 13 November 2011 - 11:23 AM fwrite(p_name, sizeof(p_name),1,fp); fwrite(age, sizeof(age), sizeof(age),1,fp); How you are gonna access p_name and age directly? And the first statement got 4 arguments for the function while the second have 5. ---------- Post added at 12:23 AM ---------- Previous post was at 12:01 AM ---------- fwrite size_t fwrite ( const void * ptr, size_t size, size_t count, FILE * stream ); Parameters ptr Pointer to the array of elements to be written. size Size in bytes of each element to be written. count Number of elements, each one with a size of size bytes. stream Pointer to a FILE object that specifies an output stream. Return Value The total number of elements successfully written is returned as a size_t object, which is an integral data type. If this number differs from the count parameter, it indicates an error. If I edit your code, #include <stdio.h> #include <stdlib.h> #include <conio.h> struct record{ char p_name[10]; int age; }; int main() { struct record rec; FILE *fp; fp=fopen("test.bin", "wb"); printf("Enter a name: \n"); scanf("%s", &rec.p_name); printf("Enter an age: \n"); scanf("%d", &rec.age); fwrite(rec.p_name, 1, sizeof(rec.p_name),fp); fwrite(rec.age, sizeof(int), sizeof(rec.age),fp); fclose(fp); } Hope this Helps! I think i'm able to write a code for printing "Hello, World!". Proud of that! #3 Posted 13 November 2011 - 04:24 PM typedef struct A{ ... } B;This is just a shortcut so you don't have to type struct for each instance. You haven't created an actual object to use it. //instead of typing struct A object; // you can say B object; A conclusion is where you got tired of thinking. #define class struct // All is public. #4 Posted 15 November 2011 - 03:03 PM A declaration: struct date{ int day; int month; int year; };The above declares a structure, date, with three fields. With the above declaration we could declare variables of type struct date like this: struct date dob; // hold data for a give date of birthWe can now access the different field of date. dob.day // would access the day field dob.month //would access the month field. etcYou cannot access a date field by directly using the field name. You need to use the member operator, period(.). Perfection of means and confusion of ends seem to characterize our age. Albert Einstein :confused: 1 user(s) are reading this topic 0 members, 1 guests, 0 anonymous users
http://forum.codecall.net/topic/66713-writing-a-structure-into-a-file/
crawl-003
refinedweb
524
76.62
Refer to for more Haskell help GHCI Shortcuts - : - Means “type of” - :? - Help menu - :load (l) - Load program - :module (m) - Return to ghci from module. Unload module - :set/unset - Command for changing settings. +m allows mutiline commands, +t prints type after evaluation - :type (t) - Shows type of expression - :kind (k) - Shows the kind of type, and can also print normalised type Perks of Haskell - Strong- Does not compile with errors. Does not coerce to correct, but it does infer - Static- Knows the value of each type. Don’t need to declare like Java. No duck typing or replacement - Inferred- Compiler can deduce a Type without the user declaring it Overview - Polymorphic- A value is polymorphic if more than one type can have it - Ad hoc- Ad hoc is given separate definition for type. Think of the infix + operator: it does different things - Parametric- Value behave the same way regardless of type. Type can be used in different contexts - Type Erasure- Haskell does not care about type when running an program, it only cares at compilation. This increases speed - Currying- Every function has one parameter. Multi-function arguments are expressed as one argument functions. They are split or stepped through - Partial application binds these arguments. Think of each arrow in function signatures as a new function - Avoid using Partial Functions (such as head, tail, init). These do not cover all possible values, such as an empty list, and can crash. Use total functions with pattern matching to cover all possible inputs - Higher Order Functions- Functions that abstract away common patterns, such as map, filter, fold - Map- Do something over a list (even functions!) - Filter- Keep something, with a predicate or test, from a list, and throw the rest away - Fold- Combine lists via an operator. Use when traversing a list - *Catamorphism- Cata means down. Destructing data and reducing structure - Fold justreplaces the cons constructor in lists - Foldr adds the accumulator to the final element. Foldl adds the accumulator to the head* - Scan- Flike Fold, but shows intermediate (initial) values. I.e shows progress - Predicate- Functions that tell if something is true. Found in list comprehension - Record Syntax- Use curly braces for fata types instead of placeholders. E.g. Person { First :: String, Second :: String} - Lambda Expression (anonymous function)- Binds inputs or arguments to expressions e.g. (\x -> x + 1) - Computes function until reaching the bottom - Bottom- Refers to the computation that does not result in a value. Cannot be simplified further. Another word for reducible expression. - @ Match ( At Match)- Pattern match a value and use it with one symbol (similar to a mixin) - ETA Reduction- Remove vsrisbles thst are repeated on both sides of the equals sign - Function Composition ( . )= Chain functions from the right to the left - Funtion Application ( $) - Replace parentheses that edn to the right. However, don’t make huge composition chains, use let bindings as labels Recursion Rules - Consider the type of the function - Determine the base or edge case along with the edge goal. Usually a empty list - Determine arguments. List all alternate possibilities to the goal. E.g. if not an empty list, a list with something - Consider the recursion or the repeated steps. What should repeat? Usually the same function - Ensure these actions move towards the goal. Don’t waste actions Definitions - Accumulator- Like recursion, but start to end rather than end to start - Arity- The number of arguments a function or constructor takes - Pragma- The language extension “comment” at the top of a program file Patterns - If, Then, Else- - Case- Case {expression} of {pattern} -> result - Pattern Match - Guards- See if a value is true or false. Remember not to use “=” - Where/Let Bindings- let {parameter} in {binding} -> let is local and where is global - : - Prepend to list - !! x - get x index from list Algebraic Data Types data BookInfo = Book Int String | Unknown - A data declaration, how datatypes are defined - data- creates or defines a new Type constructor or data type data Sex = Male | Femaleis an instance of constructor - BookInfo- Type constructor, type name for datatype BookInfo - Book- value or data constructor - Int and String- Components, arguments, field, parameter Unknown- Second value or data constructor "String" :: String - Type Signature- line of code that defines the type of a value, expression, or function (++) :: [a] -> [a] -> [a] - ‘a’ is the type variable. It is polymorphic. It doesn’t have to be the same literal value, only the same type. Type FirstName = String - type- keyword that introduces type synonyms. New on left, existing on right - new type- Allows one value or data constructor with one field Give functions type synonms to convey more information Class class where type - Make own Type class without using ‘deriving’ - Deriving- Type classes are tacked on to give ability (similar to an alias) - Instance- Begins declaration of type-class instance Instance __ __ where-> what type do you declare for the new instance. Where shows the functions Scope - Haskell is lexically or location-base scoped - Scope is the entire function, not just what is to the right of the equals. But func is outside, while let is inside Data Types - Strings, or lists of Chars, are not efficient for storing data. Use Text instead with Data.Text: import qualified Data.Text as T - Similar functions between to the two, except for (++). Use mconcat or <> to concatenate - Data.Text.IO can work with IO with Text. Abstract Algebra and Category Theory - Monoid- mappendor <>is a way to combine two elements of the same type with an operator and an identity element (think fold). The structures are combined. Basically, Monoid lets you write more generic functions, such as replacing ++with <>to work on Monoids as well as Strings. Can also use mconcatand mempty. <>is a Semigroup method that combines instances of the same type without requiring an element. Sum 5 <> Sum 6 <> Sum 10 = Sum {getSum = 21} - Functors are a class of types that map a function over each element of a data structure, not only those limited to lists with map. The structure is unchanged, but the values within it may change. Exposes fmap, with an infix as <$>. This is similar to function application ($)but with the mapped function f. fmap (+3) Just 1 = Just 4 - Applicatives are monoidal functors that lift a structured function over a structured value. pureinserts a value into a structure. Can take any number of elements, purefor one argument and <*>for two or more. These arguments may also have effects, such as having the possibility of failure or different ways to succeed. Nothinghandles missing values well, because you do not have to check for null using conditionals or use exception handling. fmap f x = pure f <*> x fmap (*) (Just 3) <*> (Just 2) = Just 15 pure (*) <*> (Just 3) <*> (Just 2) = Just 15 (*) <$> (Just 5) <*> (Just 3) = Just 15 - Monad is an applicative type that uses return(another name for pure) and the bindfunction >>=to evaluate a structured expression, then combine the results to return a structured function. It helps the user not have to worry about failure at any step. Can use a doblock to bind functions to values then apply a function to the result. structuredSquare x = if x == 2 then Just 4 else Nothing Just 2 >>= structuredSquare = Just 4 Just 1 >>= structuredSquare = Nothing - Functions with M appended to them (mapM) are used for IO Actions with the normal ability of the function. ST (State Transformers) return the function ouput as well as the changed state. - Reader is a way of stringing functions together when all those functions are awaiting one input from a shared envi- ronment. I/O and Working with State main :: IO ()is a empty tuple, and main is similar type to Maybe. They are both ‘nothing’. - main is not a function, because it does not return a value. It is an IO Action–a function which does not either returns no value, takes no input, or returns different value for same input. - putStrLn is also an IO Action, because it does not return a value. - A difference with Maybe and IO is what can go wrong. Maybe can only be Just or Nothing. But with IO, the ‘nothings’ are endless. So Maybe can be used outside IO, but main is contained within IO. Reading and Writing Files - System.IO lets you work with files - Open and close files with handler hClose. Write with hPutStrLn. Check for end of file for dynamic IO with HisEOF. - openFile has read and write mode. But use readFile and appendFile instead. Misc liftA== liftM== fmap liftA2== zipWith(broader than only lists) - Newtypes must have the same underlying representation as the type they wrap as the newtype wrapper disappears at compile time. So the function contained in the newtype must be isomorphic to the type it wraps. That is, there must be a way to go from the newtype to the thing it wraps and back again without losing information. - A parser combinator is a higher-order function that takes parsers as input and returns a new parser as output. You may remember our brief discussion of combinators way back in the lambda calculus chapter. Combinators are expressions with no free variables - Free varaiable is a variable that is not bound. For example in a lambda expression, \x -> x y, y is a free variable. - In the sequencing operator (>>), the value gets thrown away but the effect gets passed. Compare this to bind (>>=), which passes the value - parseString takes three values: the char you are looking for (and this can be chained with >>and looks like char 'a'or string "abc"), memptyas the empty list, and a string to search - Alternative typeclass has <|>, which is like an either or thing, some (which is one or more), and more (which is zero or more) Language Extensions - OverLoadedStrings: ghc text.hs -XOverloadedStringsor {-# LANGUAGE <Extension Name> #-}. Can use Strings with Text - ViewPatterns: Pattern matching - TemplateHaskell: Metaprogramming - DuplicateRecordFields: Can usse same field name with different types for record Syntax - NoImplicitPrelude: Use custom rather than default Prelude
https://jamesanaipakos.com/2016-10-03-Master-Haskell-Notes
CC-MAIN-2018-17
refinedweb
1,658
62.07
Controls the behaviour of vtol_extract_topology. More... #include <vtol_extract_topology.h> Controls the behaviour of vtol_extract_topology. Definition at line 45 of file vtol_extract_topology.h. Construct with the default values for the parameters. The constructor does not take parameters by design. Use the explicit set_* functions to set the parameters you wish to change. This will make code more robust against changes to the code and parameter set, because we don't have a bunch of unnamed arguments to change or worry about. Definition at line 70 of file vtol_extract_topology.h. Definition at line 59 of file vtol_extract_topology.h. The number of pixels used in smoothing. The edgel curves will be smoothed by fitting a line at each edgel point to the num_for_smooth neighbouring edgel points and projecting onto that line. A value of 0 means no smoothing will occur. Default: 0 (no smoothing) Definition at line 56 of file vtol_extract_topology.h.
http://public.kitware.com/vxl/doc/release/contrib/gel/vtol/html/structvtol__extract__topology__params.html
crawl-003
refinedweb
149
51.85
This document contains a list of issues regarding the DOM Level 3 XPath specification Last Call period. All comments or issues regarding the specification or this document must be reported to www-dom@w3.org (public archives) before May 1, 2002. Description: At least, I would like to have the wording changed on the description of the result argument. It currently reads: "The result specifies a specific XPathResult which may be reused and returned by this method. If this is specified as null or the implementation cannot reuse the specified result, a new XPathResult will be constructed and returned.". This is clearly the intent of the group that no implementation should be required to reuse the result. The specification has been modified to now say "does not" of "cannot", eliminating any suggestion that the implementation is required to try to reuse the result. Description: Hoping that another person who also commented on this method was going to benchmark any difference in performance between reusing a result set and passing null consistently. My instinct is that any performance gain is negligible. No changes Description:. Added: In future versions of the XPath specification, the definition of a namespace node may be changed incompatibly, in which case incompatible changes to field values may be required to implement versions beyond XPath 1.0. Description: The specification does not say what methods such as getNodeName() and getNodeValue() will return, when applied to a namespace node. I would expect them to return the name and string-value of the node as defined in XPath, but since that is not true of other node types, I might be wrong. (issue #2) The DOM group states that "All attributes of Node not described in this section have a null or false value." But, states that "The string-value of a namespace node is the namespace URI that is being bound to the namespace prefix". There seems to be a mismatch with the specifications? The values were clearly specified as null. NodeValue is now specified to return the string value of the XPath namespace node. Also, localName returns the prefix, just the same as prefix. NodeName now returns "#namespace" because there was no other consistent value since localName and prefix are redundant and might be null. We added: "nodeValue is the same as namespaceURI." Description: It might help if the specification spelled out exactly how the set of namespace nodes for an element are derived from information accessible through other DOM interfaces. The different ways namespace information can be represented in DOM (through attributes representing namespace declarations, through namespace URIs on the element and attribute nodes, etc) is a constant source of difficulty. It should also be made explicit that xmlns: attributes will *not* be exposed as attribute nodes through the XPath interface. (issue #3) Added: The set of in-scope namespaces of an element is the default xml namespace combined with the contributions of namespace attributes of the current and all ancester elements. In addition to explicit namespace attributes, any element has an implicit declaration of it's. Added: XPath 1.0 does not make available the namespace attributes of an element. The DOM implementation of XPath 1.0 using these defined interfaces never directly returns Attr nodes of namespace attributes, but returned Element nodes still contain them. Description: The interface provides only limited ability to set the XPath static and dynamic context. It provides no capabilities to create variables or extension functions, and no way of setting the context position or size. For the typical end-user of the interface, this is not a problem. However, it means that an implementor wishing to provide an XPath engine that is suitable for use, for example, by an XSLT processor, will need to provide additional interfaces, and these will vary from one implementation to another, which will make it more difficult to write an XSLT engine that can work with any DOM implementation. (issue #1.b) This request would add too much complexity and we'd like to this module as simple as possible. Description:? (issue #1.a) 4 concrete proposals: Philippe and Ray and Ray (2) and Ray (3). Changed parameters and returns in API to use Object instead of XPathResult. This permits XPath 2.0 to easily extend this API with a new result object and request types that better represent sequences and other differences between XPath 1.0 and XPath 2.0 results. The working group will also submit a note to W3C demonstrating how easy it is to extend the API for XPath 2.0 and giving XPath 2.0 experimenters a common starting point (see the last proposal). Description: Only two codes are defined for XPathException: invalid expression error, and type error. I couldn't find any definition of these codes. For example, which one should the (incorrect) expression "count(3)" return? No changes specifically related to these error codes, since the definitions are clearly there in the appropriate place and describe the conditions under which the errors are returned, and already also mentioned the calling of extension functions. Since the description of the error code already refers to conformance, the planned addition of a more-formal conformance section will further improve the understanding of these errors. Description: The specification says nothing about the use of the XPath id() function. Does this mean it is always guaranteed to work? (issue #4) The specification conformance section now says that the id function produces results consistent with the getElementById function. Description: XPath says that it is the job of the host specification to define conformance rules. Where are the conformance rules? For example, is an implementation conformant if it extends the vocabulary of functions that can be called within an XPath expression? (issue #5) The specification will now have a conformance section that deals with these things. Description: Except when there is need for that extra bit of range, it seems undesirable to make integer arguments or writable attributes that are not enumerations "unsigned". It doesn't matter in Java or JavaScript, since neither supports the concept of unsigned numbers. It does, however, make implementations in other language either fail differently or incorrectly succeed, since C and C++ will transparently convert a negative signed number into a large positive number. XPathResult.snapshotItem(index) XPathResult.snapshotLength not really necessary since it is read-only, but for consistency NodeList in Core is already using "unsigned". We haven't heard of any problem with this, therefore we don't think it is necessary to change the draft. Description: Does the resolver argument, from createExpression() and evaluate() methods of the XPathEvaluator interface,. The resolver argument , from createExpression() and evaluate() methods of the XpathEvaluator interface, includes the XML namespace - agree. Passing in a NULL will raise a NAMESPACE_ERR. Description: The description of XPathResult.ANY_UNORDERED_NODE_TYPE. Changed from may to might. Description: In the definition of the XPathNamespace interface, there are a few things that are strange for people used to dealing with XPath namespace nodes. The description of XPath namespace nodes says: "The element is the parent of each of these namespace nodes..." which implies that the parentNode attribute of XPathNamespace should return the ownerElement (although it would be consistent with the Attr interface, and the Infoset, not to do this). The DOM Level 3 XPath module is following the infoset data model and must be consistent with attribute nodes, therefore, in DOM, the parent of a namespace node is not it's DOM ownerElement. If it were, the DOM rules related to inserting and removing nodes in a hierarchy would break. In DOM and XML infoset, a node does not have a parent that it is not a child of. The direction of XPath to be incompatible in this way should not lead to DOM being incompatible with itself. See also [Issue a3] for compatibility with future versions of XPath. Description:. The current proposal is in fact consistent with the Infoset 1.0 data model. prefix and namespace name are both used in the Infoset and both mapped the same way they are in Element and Attribute information item/Interfaces. We don't see any reason to use a different name when the Infoset does not. Description: It seems to me that a very common usage of XPathEvaluator will be to: Create an XPathNSResolver for a given context node Evaluate an expression, passing the resolver just created, against the same context node Since the same object that implements createNSResolver implements evaluate, couldn't we save users a bit of trouble by simplifying this common case? An alternative signature of evaluate that takes no 'resolver' parameter. The implementation creates an XPathNSResolver internally based on the 'contextNode' parameter.. Already can do this with the XPathEvaluator. Reject their proposal. Using the context node as a namespace resolver is not considered as an important use case to distinguish in this way. Given that it is possible to use it that way by using createNSResolver(contextNode), we don't think it is necessary to change the current draft. Description:. Wording was added in the description of createNSResolver: : The similarity and overlap between XPathException and DOMException would appear to be problematic. If a caller in a loosely-typed binding received an exception, it would be difficult to distinguish between the exceptions. The overlap in symbolic names that I've noticed are: ASException.TYPE_ERR == 2, XPathException.TYPE_ERR == 2 The overlap of code values would seem to be totally avoidable, there is not a shortage of distinct integer values and it should be very easy just to assign, for example, XPathException.TYPE_ERR = 102, so that it will never be misinterpreted as a DOMException.DOMSTRING_SIZE_ERR. Agreed. Description: One (minor) qualm we have is the treatment of (general) entities (which are a DOM-node type, but not an XPath node-type). While it is clear that (a) entity-nodes raise an error if returned (on top level) of a nodeset (b) entity-nodes don't raise an error if "encapsulated" in some returned node. it is unclear what should happen when the evaluation of an XPath Expression encounters an entity-node. Does this raise an error or is it expanded?: One (minor) qualm we have is the treatment of (general) cdata (which are a DOM-node type, but not an XPath node-type). While it is clear that (a) cdata-nodes raise an error if returned (on top level) of a nodeset (b) cdata-nodes don't raise an error if "encapsulated" in some returned node. it is unclear what should happen when the evaluation of an XPath Expression encounters an cdata-node. Does this raise an error or is it expanded? In the infoset, there is no node for textual information. There are only character information items. Both the Text node and the CDATA section node of DOM can be seen as a container of character information items. The lack of difference between the two is emphasized by the fact that the CDATA section node derives from the text node. There is no "expansion" involved. They are both virtually-identical containers of character information items. The mapping contained in the spec between DOM text nodes and XPath text nodes makes it clear that the two are treated interchangeably, and when more than one occur in a row, it is no different from other situations where multiple DOM text nodes represent a single XPath text node. Description: In Section 1.2 (Mapping DOM to XPath) it may be beneficial to add a small paragraph on entity-nodes (raise an exception whenever they're encountered by an XPath expression).: The description of result-types may be improved. In particular, a uniform wording may be used for the snapshot semantics of nodetypes "ANY_UNORDERED_NODE_TYPE", ""FIRST_ORDERED_NODE_TYPE", "ORDERED_NODE_SNAPSHOT_TYPE", "UNORDERED_NODE_SNAPSHOT_TYPE", and all simple node types. The description seems appropriate, and it was suggested by the originator that the issue be closed. Description: The "is expected" language in XPathEvaluator is overly vague as to what one can expect from a DOM Implementation that returns true for hasFeature("XPath", "3.0"). If this returns true, can one definitely cast the Document interface to an XPathEvaluator? (We have heard some non-exact information that this may be being fixed already). The wording was clarified, according to the suggestion: ." Description: Description states "this adapter works by calling the method named lookupNamespacePrefix on Node". This appears to be a typo and should probably be the method named "lookupNamespaceURI". More importantly, this would appear to conflict with previously stated requirement that only DOM Level 2 Core need to be implemented since lookupNamespaceURI is a Level 3 core method. Additionally there appears to be no formal requirement for the nodeResolver that is passed in to be from the same implementation of DOM so it could theoretically even be from a Level 1 DOM. Either a formal requirement for Level 3 DOM needs to be required here or the specification should only hint that "lookupNamespaceURI" can be used in the event that the nodeResolver implements Level 3. If a formal requirement is made, then createNSResolver probably needs to be able to throw an Exception in the event that the requirement is not met. The wording was changed according to the suggestion: : In the description of XPathExpression.evaluate(), WRONG_DOCUMENT_ERR, "not supported by the XPathExpression that created this XPathExpression" should probably be "not supported by the XPathEvaluator that created this XPathExpression". The error was corrected. Description: If a snapshot result type is requested, how is an empty nodeset represented? As snapshotLength being 0? As snapshotItem(0) returning null? Both? There is no need for specific wording. Any place in the DOM APIs that a null is not explicitly permitted as an input or a return, it is forbidden. There is no precedent in DOM for representing an empty list as a null, or any reason to expect that an empty list is an exception to the rule of receiving back a list that has a count of the number of entries, which is also the same way lists work throughout the DOM specification. Description: The spec says that an invalid index returns null, yet an index value that is greater than the snapshotLength is always a usage error. Consider throwing an exception for the usage error cases. There is clear precedence in the DOM APIs for returning null instead of an exception. If the programmer is not paying attention to the bounds of the list, either one will cause an exception. Description: If an interation type is requested, how is an empty nodeset represented? By iterateNext() returning null on the first call? There is no need for specific wording. Any place in the DOM APIs that a null is not explicitly permitted as an input or a return, it is forbidden. There is no precedent in DOM for representing an empty iterator as a null, or any reason to expect that an empty iterator is an exception to the rule of receiving back an iterator that returns null on the first iteration, which is also the same way iterators work throughout the DOM specification. Description: None of the functions that return strings in the XPath spec can return null. Nevertheless, the DOM 3 XPath spec should make it clear whether stringValue may ever be null, particularly for those of us who plan to include extensions to the function suite. There is no need for specific wording. Any place in the DOM APIs that a null is not explicitly permitted as an input or a return, it is forbidden. XPath 1.0 says an object of a type other than the four basic types is converted to a string in a way that is dependent on that type. A string is defined as 0 or more characters, and null is not part of it. Description: Can XPathEvaluator.createExpression or XPathEvaluator.createNSResolver return null? If so, under what circumstances? If they can't, please make this explicit in the spec. There is no need for specific wording. Any place in the DOM APIs that a null is not explicitly permitted as an input or a return, it is forbidden. None of the other factories within the specification mention that null is not a valid return. Adding it in one place or several places only raises doubt about the meaning of the specification in all places where it is not permitted but would have to be documented to be consistent. Description: The specification of XPathEvaluator.createNSResolver seems to suggest that XPathNSResolver implementations must always be bound to some Node, i.e., that they must always work by calling lookupNamespaceURI on some Node. However, Issue XPath-6 seems to hint that users can alternatively create XPathNSResolver implementations from wholecloth, or from whatever they want, include Nodes. Which is it, MUST be bound to a Node, or users can create any resolver implementation they want and createNSResolver is just a convenience function? This is properly stated in the description of the interface. "The XPathNSResolver interface permit prefix strings in the expression to be properly bound to namespaceURI strings. XPathEvaluator can construct an implementation of XPathNSResolver from a node, or the interface may be implemented by any application." Description: What is intended by the fact that, for XPathExpression, the XPathNSResolver is specified at XPathExpression creation time, rather than at XPathExpression.evaluate time? We can come up with good reasons to have it either way. Does this suggest that an NSResolver is essential for precomputing an expression (not true in the Xalan-C implementation)? Is it merely convenient to have at precomputation time, or mandatory? Is it intended to be used and discarded by the time the createExpression function returns, or is it kept in the XPathExpression object for later use? This also touches on previously raised issues about whether the NSResolver must be from the same Document as the XPathEvaluator that creates the expression. requirement that XPathEvaluator.createExpression should raise an INVALID_EXPRESSION_ERR if the expression is not legal makes it necessary to test the expression syntax immediately. However, to optimize performance it would be fine to be able to postpone this test when an expression is in fact evaluated by the XPATHExpression.evaluate function. So I suggest to modify XPathEvaluator as follows: Remove the INVALID_EXPRESSION_ERR from createExpression Introduce a new function prepare with boolean result. It returns 'true' if the expression is valid, and 'false' otherwise. It may also be used to trigger the calculation of an internal XPath syntax tree (implementation dependant). Add an INVALID_EXPRESSION_ERR to the XPathExpression.evaluate function. use of XPathResultType in the XPATHExpression.evaluate function does not allow maximum optimization in many use cases. For example if an applications wants to use the result of an XPATHExpression.evaluate call in a way that it is not interested in a particular node set, e.g. when it wants to find out whether there is any data at all, it needs only XPath results of type ANY_UNORDERED_NODE_TYPE, BOOLEAN_TYPE, NUMBER_TYPE and STRING_TYPE. Hence, the ANY_TYPE constant is too rough, because the evaluation may then return for example an ORDERED_NODE_SNAPSHOT_TYPE result which is much harder to calculate. Fortunately, there exists a simple solution: The ANY_TYPE constant should be removed from XPathResultType and the 'type' parameter of the XPATHExpression.evaluate method should be replaced by a 'requestTypes' property which is a set of XPathResultType constants. The evaluated method may then choose to return one of the requested XPathResultTypes and raise a TYPE_ERR if the result cannot be converted to any of the specified types.. Description: The XPath 1.0 spec defines numbers according to IEEE 754. I am not sure whether it is sufficient to fullfil this requirement by simply stating that the numberValue is of type 'double'. Would it not be necessary to use a special IEEE754Number type? Added text to require the binding to specify further conversion if double does not match IEEE in a particular native binding. Description: The XPath 1.0 spec defines a 'string-value' for every node type. It would be useful to add an XPathStringValue property to every Node which allows easy access to a Node's XPath string-value (since 'string-value' is not equivalent to 'textContent'). It could be useful, but there are presently sufficient other methods for obtaining similar results, either requesting a single result as text, using wholeText on a text node, or by calling textContent on an element. It will not be added at this time. Description: Issue XPath-25: "Should there be a reset method on the result in case someone wants to iterate the result multiple times?" It would at least be good to have a 'hasItems' and a 'lookAhead' function to allow simple procedure calls like: while not myXPathResult.hasItems do myXPathResult:= RequestAnotherXPathResult; SomeCalculation(myXPathResult); or if myXPathResult.lookAhead.NodeValue = 'foo' then SomeExtraCalculation(myXPathResult); SomeCalculation(myXPathResult); Each of these use cases is served better using a snapshot than an iterator. Description: The architecture of the XPathResult interface is that of _simulated_ independent interfaces. This becomes obvious on the frequent use of TYPE_ERR exceptions when trying to access its properties. Applications which want to further process XPathResults will have to use hard coded type checking by evaluating the resultType property. This is in particular not elegant when an application uses a library of subroutines to further process a specific type of XPathResult. In this, as I guess, not too seldom use case the subroutine must usualy perform the type checking at run-time at the beginning of the subroutine, in order to test whether it was triggert with the correct type of XPathResult. Therefore, it would be much better for this cases to have different kinds of XPathResult interfaces. Then type checkings could be performed on design time and code debugging would be easier, because type conflicts could instantly be discovered. A hierarchy of XPathResult interfaces could look like this: A. Abstract interfaces: interface XPathResult { readonly attribute short resultType; }; interface XPathSingleNodeResult: TdomXPathResult { readonly attribute Node singleNodeValue; }; interface XPathIteratorResult : XPathResult { readonly attribute boolean invalidIteratorState; readonly attribute integer iteratorLength; Node iterateNext(); }; interface XPathSnapshotResult : XPathResult { readonly attribute integer snapshotLength; Node snapshotItem(in integer index); }; B. Concrete Interfaces: interface XPathBooleanResult : XPathResult { readonly attribute boolean booleanValue; }; interface XPathNumberResult : XPathResult { readonly attribute double numberValue; }; interface XPathStringResult : XPathResult { readonly attribute DOMString stringValue; }; interface XPathAnyUnorderedNodeResult : XPathSingleNodeResult; interface XPathFirstOrderedNodeResult : XPathSingleNodeResult; interface XPathOrderedNodeIteratorResult : XPathIteratorResult; interface XPathUnorderedNodeIteratorResult : XPathIteratorResult; interface XPathOrderedNodeSnapshotResult : XPathSnapshotResult; interface XPathUnorderedNodeSnapshotResult : XPathSnapshotResult; This approach of multiple returned object types was considered several times and rejected by the working group in favor of the present design which uses a single return object to implement all current result types. Last update: $Date: 2003/03/26 16:32:54 $
http://www.w3.org/2002/03/DOM-Level-3-XPath-issues/all.html
CC-MAIN-2017-22
refinedweb
3,757
53.71
I am working on a program where you have to give change in coins. The program already gives the change amount, I'm just trying to figure out how to give the change in coins. This is what i have so far: Code java: /** A cash register totals up sales and computes change due. */ package classes; public class CashRegister { // add two attributes (variables) purchase and payment private double purchase; private double payment; /** Constructor that constructs a cash register with no money in it. */ public CashRegister() { //initialize the purchase and payment to 0.0 double purchase = 0.0; double payment = 0.0; } /** Records the sale of an item. @param amount the price of the item */ public void recordPurchase(double amount) { //add the amount of purchase to purchase purchase = purchase + amount; } /** Enters the payment received from the customer; should be called once for each coin type. @param coinCount the number of coins @param coinType the type of the coins in the payment */ public void enterPayment(int coinCount, Coin coinType) { //calculate the payment payment = payment+ coinCount * coinType.getValue(); } /** Computes the change due and resets the machine for the next customer. @return the change due to the customer */ public double giveChange() { double.
http://www.javaprogrammingforums.com/%20whats-wrong-my-code/7070-trying-give-coins-change-printingthethread.html
CC-MAIN-2015-48
refinedweb
198
63.8
FORTRAN has progress since its inception at IBM in 1957. It now sports object oriented programming and parallel programming features. FORTRAN started out as IBM's' Mathematical Formula Translating System. It was designed by a team led by John Backus and targeted computationally intensive applications from physics to weather prediction. Initially programming die hards thought that optimum performance required coding in assembler. C and C++ may be the programming language of choice today but FORTRAN remains popular in high performance computing (HPC) applications. The latest FORTRAN compilers and standard might change your mind about whether FORTRAN is a historical artifact or an effective tool. FORTRAN is almost as old as I am and I encountered if at FORTRAN IV when punch cards, GOTO's and line numbers still existed. I still remember the three-way, arithmetic IF statement that ended with three line numbers for less than, equal and greater than results. Files were referenced by numbers and FORMAT and DATA statements were sprinkled throughout a card deck. Related Articles In my distant past I wrote a FORTRAN development system in BASIC because the only computer we had access to ran BASIC and we really wanted to try FORTRAN. The BASIC system had a remote terminal with paper tape while the FORTRAN system was only available via punch cards that were shipped out daily. Imagine a two day debug turn around. The initial version of FORTRAN had only 32 statements. This included the FREQUENCY statement that was a hint to the new "optimizing" compilers to improved IF statement performance. It was a precursor to C's pragma statement. The IF statement mapped to the IBM 704 branch instruction. This is comparable to C/C++ auto-increment/decrement support that matched features in the hardware at the time. FORTRAN has progressed significantly since then. There have been numerous FORTRAN versions and specifications including: - FORTRAN - FORTRAN II - FORTRAN III - FORTRAN 1401 - FORTRAN IV - FORTRAN 66 - FORTRAN 77 - ANSI X3J3/90.4 - FORTRAN 90 - ISO/IEC standard 1539:1991 - FORTRAN 95 - FORTRAN 2003 - FORTRAN 2008 - ISO/IEC 1539-1:2010 Along the way things like three-way, arithmetic IF statement gave way to the more contemporary IF/THEN/ELSE/END IF construct. Recursion is now supported. Initially recursion was not an option. That actually made my job easier when I put together that FORTRAN simulator. Looping was improved as have data types. There is even support now for object oriented programming. Variable length strings were not added until FORTRAN 95. Dynamic memory allocation showed up in Fortran 90 along with pointers. Programmers got a taste for modules, operater overloading, structures and structre looping constructs. A portable specification for numerical precision kept FORTRAN at the forefront of numerical calculation. Identifier lenths were increased to 31 characters and input was now free form. Initially, FORTRAN punch cards were laid out with in 80 columns with leading line numbers. Many will remember terminal screens that were 24 lines of 80 characters. Many features were deleted in FORTRAN 90 including ASSIGN/GOTO Still, FORTRAN was often playing catch up with other emerging languages including C. FORTRAN 2003 was a major revision. It provided interoperability with C and included object-oriented programming support (Fig. 1) such as type extension, inheritance, polymorphism and abstract data types. Subroutines could now be polymorphic based on their argument types like Ada and C++. type shape integer :: color logical :: filled integer :: x integer :: y end type shape type, EXTENDS ( shape ) :: rectangle integer :: length integer :: width end type rectangle type, EXTENDS ( rectangle ) :: weighted_rectangle integer :: weight end type weighted_rectangle subroutine sample ( sh ) class(shape), intent(in) :: sh select type (sh) class is (rectangle) stop 'We have a rectangle' class is (weighted_rectangle) stop 'We have a weighted_rectangle' class default stop 'We have something else' end select end subroutine sample Figure 1. FORTRAN 2003 added object class definitions with inheritance IEEE floating point support was now standard. The VOLATILE attribute was added along with a range of data manipulation enhancements. Asynchronous file transfer and stream support brought FORTRAN into the new millenium. FORTRAN 2008 was approved in 2010. Compared to FORTRAN 2003, it is a minor upgrade. Objects can now be declared within a BLOCK construct and storage layout can be forced with the CONTIGUOUS attribute. Recursive allocatable objects means that FORTRAN can now handle arbitrary linked structures. It addresses issues such as deep copying and memory leaks. It adds submodules (Fig. 2) and support for Coarray Fortran (CAF). Submodules are very handy in large applications and for sharing code. module points type :: point real :: x,y end type point interface real function point_dist (a,b) import :: point type(point), intent(in) :: a,b end function point_dist end interface end module points submodule (points) points_a contains real function point_dist (a,b) type(point), intent(in) :: a,b point_dist = sqrt((a%x-b%x)**2+(a%y-b%y)**2) end function point_dist end submodule points_a Figure 2. Submodule example from "The new features of Fortran 2008" by John Reid, JKR Associates, UK CAF programs can be replicated and executed asynchronously. The FORTRAN array syntax has been extended to handle coarrays. Compared to very early versions of FORTRAN, FORTRAN 2008 looks like a completely different language and it is. On the other hand, it has many familiar or similar constructs and syntax found in C++ and Ada. FORTRAN 2008 will probably not be used by the average embedded developer or an iPhone and Android app developer. On the other hand, it will be used by everyone from physicists to those crafting military applications.
http://electronicdesign.com/compilers/whats-difference-between-fortran-now-and-then
CC-MAIN-2014-42
refinedweb
925
55.74
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2005 OSGi Blueprint XML file defining the CXF JAX-WS beans. Because the file is in the OSGI-INF/blueprint directory inside our JAR, it will be automatically activated as soon as the artifact is installed. The root element for any OSGi Blueprint file is 'blueprint' - you also see the namespace definitions for the Blueprint and the CXF Core and JAX-WS namespaces. --> <blueprint xmlns="" xmlns: <!-- Adding a <cxf:bus/> definition to the Blueprint XML file is optional: it is only required if you want to specify some additional configuration for the CXF Bus instance used by the service endpoints defined in this XML file. --> <cxf:bus> <!-- In this example, we're enabling the logging feature. This will ensure that both the inbound and outbound XML message are being logged for every web service invocation. --> <cxf:features> <cxf:logging/> </cxf:features> </cxf:bus> <!-- Finally, we're configuring the actual JAX-WS endpoint, referring to our web service implementation class and the URI address we want to assign to our service. The address is relative to the CXF servlet URI, with the default configuration in place, this endpoint will be available at ''. --> <jaxws:endpoint </jaxws:endpoint> </blueprint>
http://grepcode.com/file/repo1.maven.org$maven2@io.fabric8.jube.images.fabric8$quickstart-karaf-cxf-soap@2.0.46@OSGI-INF$blueprint$blueprint.xml
CC-MAIN-2016-50
refinedweb
204
54.42
Word and Excel - A Wor(l)d Apart Technically, the same smart document can apply to both Word and Excel. In practice, if you want your smart-doc to actually DO something, chance are half your code will be hacked and kludged to work for both. For example: - The XML model is different for the two applications. - To get Smart Document controls to respond to the entire document in Word, you'll use the element <My schema namespace>#actionPertainsToEntireSchema. In Excel, you'll bind to. Needless to say, this is not documented anywhere. - Assuming we've accepted the fact that an ActiveX control bound to one of these generic elements in entirely inaccessible from code (Here, about 80% of the way down. Running a search for “pertains“ should do it), we still can't use the same code for Word and Excel even for standard elements: XML elements in word are of type Microsoft.Office.Interop.Word.XMLNode. Excel's XML model is different, and uses element-mapping to cells or ranges. Even if we do get a node, to get the Smart Tag Action from it we'll use Microsoft.Office.Interop.Word.SmartTag, while Excel has Microsoft.Office.Interop.Excel.SmartTag. Similar? Very. Compatible? Not necessarily. In short - if you gotta support both Word and Excel, I would suggest having two different Smart Document solutions. It would seem like the less elegant solution, but when you start seeing every function broken up into huge, distinct if/else blocks, you can tell that something's just not right.
https://weblogs.asp.net/avnerk/112162
CC-MAIN-2019-22
refinedweb
259
53.21
In this chapter we'll cover obtaining and installing Python on your system for Windows, Ubuntu Linux, and macOS. We'll also write our first basic Python code and become a acquainted with the essentials Python programming culture, such as the Zen of Python, while never forgetting the comical origins of the name of the language. There are two major versions of the Python language, Python 2 which is the widely deployed legacy language and Python 3 which is the present and future of the language. Much Python code will work without modification between the last version of Python 2 (which is Python 2.7 ()) and recent versions of Python 3, such as Python 3.5 (). However, there are some key differences between the major versions, and in a strict sense the languages are incompatible. We'll be using Python 3.5 for this book, but we'll point out key differences with Python 2 as we go. It's also very likely that, this being a book on Python fundamentals, everything we present will apply to future versions of Python 3, so don't be afraid to try those as they become available. Before we can start programming in Python we need to get hold of a Python environment. Python is a highly portable language and is available on all major operating systems. You will be able to work through this book on Windows, Mac or Linux, and the only major section where we diverge into platform specifics is coming right up — as we install Python 3. As we cover the three platforms, feel free to skip over the sections which aren’t relevant for you. The following are the steps to be performed for Windows platform: For Windows you need to visit the official Python website, and then head to the Downloadspage by clicking the link on the left. For Windows you should choose one of the MSI installers depending on whether you're running on a 32- or 64-bit platform. Download and run the installer. In the installer, decide whether you only want to install Python for yourself, or for all users of your machine. Choose a location for the Python distribution. The default will be in C:\Python35in the root of the C:drive. We don't recommended installing Python into Program Files because the virtualized file store used to isolate applications from each other in Windows Vista and later can interfere with easily installing third-party Python packages. On the Customize Pythonpage of the wizard we recommend keeping the defaults, which use less than 40 MB of space. In addition to installing the Python runtime and standard library, the installer will register various file types, such as *.pyfiles, with the Python interpreter. Once Python has been installed, you'll need to add Python to your system PATHenvironment variable. To do this, from the Control Panel choose System and Security, then System. Another way to get here easily is to hold down your Windows key and press the Break key on your keyboard. Using the task pane on the left choose Advanced System Settingsto open the Advancedtab of the System Propertiesdialog. Click Environment variablesto open the child dialog. If you have Administrator privileges you should be able to add the paths C:\Python35and C:\Python35\Scriptsto the semicolon separated list of entries associated with the PATHsystem variable. If not, you should be able to create, or append to, a PATHvariable specific to your user containing the same value. Now open a new console window — either Powershell or cmd will work fine — and verify that you can run python from the command line: > python Python 3.5.0 (v3.5.0:374f501f4567, Sep 13 2015, 02:27:37) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> Welcome to Python! The triple arrow prompt shows you that Python is waiting for your input. At this point you might want to skip forward whilst we show how to install Python on Mac and Linux. For macOS you need to visit the official Python website at. Head to the Downloadpage by clicking the link on the left. On the Downloadpage, find the macOS installer matching your version of macOS and click the link to download it. A DMG Disk Image file downloads, which you open from your Downloads stack or from the Finder. In the Finder window that opens you will see the file Python.mpkgmultipackage installer file. Use the "secondary" click actionto open the context menu for that file. From that menu, select Open. On some versions of macOS you will now be told that the file is from an unidentified developer. Press the Openbutton on this dialog to continue with the installation. You are now in the Python installer program. Follow the directions, clicking through the wizard. There is no need to customize the install, and you should keep the standard settings. When it's available, click the Installbutton to install Python. You may be asked for your password to authorize the installation. Once the installation completes click Closeto close the installer. Now that Python 3 is installed, open a terminal window and verify that you can run Python 3 from the command line: > python Python 3.5.0 (default, Nov 3 2015, 13:17:02) [GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> Welcome to Python! The triple arrow prompt shows that Python is waiting for your input. To install Python on Linux you will want to use your system's package manager. We'll show how to install Python on a recent version of Ubuntu, but the process is very similar on most other modern Linux distributions. On Ubuntu, first start the Ubuntu Software Center. This can usually be run by clicking on it's icon in the launcher. Alternatively, you can run it from the dashboard by searching on Ubuntu Software Center and clicking the selection. Once you're in the software center, enter the search term python 3.5 in the search bar in the upper right-hand corner and press return. One of the results you'll get will say Python (v3.5) with Python Interpreter (v3.5) in smaller type beneath it. Select this entry and click the Installbutton that appears. You may need to enter your password to install the software at this point. You should now see a progress indicator appear, which will disappear when installation is complete. Open a terminal (using Ctrl+Alt+T) and verify that you can run Python 3.5 from the command line: $ python3.5 Python 3.5.0+ (default, Oct 11 2015, 09:05:38) [GCC 5.2.1 20151010] on linux Type "help", "copyright", "credits" or "license" for more information. >>> Welcome to Python! The triple arrow prompt shows you that Python is waiting for your input. Now that Python is installed and running, you can immediately start using it. This is a good way to get to know the language, as well as a useful tool for experimentation and quick testing during normal development. This Python command line environment is a Read-Eval-Print-Loop. Python will READ whatever input we type in, EVALuate it, PRINT the result and then LOOP back to the beginning. You'll often hear it referred to simply as the "REPL". When started, the REPL will print some information about the version of Python you're running, and then it will give you a triple-arrow prompt. This prompt tells you that Python is waiting for you to type something. Within an interactive Python session you can enter fragments of Python programs and see instant results. Let's start with some simple arithmetic: >>> 2 + 2 4 >>> 6 * 7 42 As you can see, Python reads our input, evaluates it, prints the result, and loops around to do the same again. We can assign to variables in the REPL: >>> x = 5 Print their contents simply by typing their name: >>> x 5 Refer to them in expressions: >>> 3 * x 15 Within the REPL you can use the special underscore variable to refer to the most recently printed value, this being one of very few obscure shortcuts in Python: >>> _ 15 Or you can use the special underscore variable in an expression: >>> _ * 2 30 Note Remember that this useful trick only works at the REPL; the underscore doesn't have any special behavior in Python scripts or programs. Notice that not all statements have a return value. When we assigned 5 to x there was no return value, only the side-effect of bringing the variable x into being. Other statements have more visible side-effects. Try the following command: >>> print('Hello, Python') Hello, Python You’ll see that Python immediately evaluates and executes this command, printing the string Hello, Python and returning you to another prompt. It's important to understand that the response here is not the result of the expression evaluated and displayed by the REPL, but is a side-effect of the print() function. As an aside, print is one of the biggest differences between Python 2 and Python 3. In Python 3, the parentheses are required, whereas is Python 2 they were not. This is because in Python 3, print() is a function call. More on functions later. At this point, we should show you how to exit the REPL and get back to your system shell prompt. We do this by sending the end-of-file control character to Python, although unfortunately the means of sending this character varies across platforms. If you're on Mac or Linux, press Ctrl+D to exit. If you regularly switch between platforms and you accidentally press Ctrl+ Z on a Unix-a-like system, you will inadvertently suspend the Python interpreter and return to your operating system shell. To reactivate Python by making it a foreground process again, simply run the fg command: $ fg Now press Enter and couple of times to get the triple arrow Python prompt back: >>> Start your Python 3 interpreter: > python If on Windows or: $ python3 On Mac or Linux. The control flow structures of Python, such as for-loops, while-loops, and if-statements, are all introduced by statements which are terminated by a colon, indicating that the body of the construct is to follow. For example, for-loops require a body, so if you enter: >>> for i in range(5): ... Python will present you with a prompt of three dots to request that you provide the body. One distinctive (and sometimes controversial) aspect of Python is that leading whitespace is syntactically significant. What this means is that Python uses indentation levels, rather the braces used by other languages, to demarcate code blocks.By convention, contemporary Python code is indented by four spaces for each level. So when Python present us with the three dot prompt, we provide those four spaces and a statement to form the body of the loop: ... x = i * 10 Our loop body will contain a second statement, so after pressing Return at the next three dot prompt we'll enter another four spaces followed by a call to the built-in print() function: ... print(x) To terminate our block, we must enter a blank line into the REPL: ... With the block complete, Python executes the pending code, printing out the multiples of 10 less than 50: 0 10 20 30 40 Looking at at screenful of Python code, we can see how the indentation clearly matches — and in fact must match — the structure of the program which is as follows: Figure 1.1: Whitespaces in the code Even if we replace the code by gray lines, the structure of the program is clear as shown in the following image: Figure 2.2 : Replaced code with grey lines Each statement terminated by a colon starts a new line and introduces an additional level of indentation, which continues until a dedent restores the indentation to a previous level. Each level of indent is typically four spaces, although we'll cover the rules in more detail in a moment. Python's approach to significant whitespace has three great advantages: - It forces developers to use a single level of indentation in a code-block. This is generally considered good practice in any language because it makes code much more readable. - Code with significant whitespace doesn't need to be cluttered with unnecessary braces, and you never need to have code-standard debates about where the braces should go. All code-blocks in Python code are easily identifiable and everyone writes them the same way. - Significant whitespace requires that a consistent interpretation must be given to the structure of the code by the author, the Python runtime system and future maintainers who need to read the code. As a result you can never have code that contains a block from Python's point of view, but which doesn't look like it contains a block from a cursory human perspective. The rules for Python indentation can seem complex, but they are quite straightforward in practice: The whitespace you use can be either spaces or tabs. The general consensus is that spaces are preferable to tabs, and four spaces has become a standard in the Python community. One essential rule is NEVER to mix spaces and tabs. The Python interpreter will complain, and your colleagues will hunt you down. You are allowed to use different amounts of indentation at different times if you wish. The essential rule is that consecutive lines of code at the same indentation level are considered to be part of the same code block. There are some exceptions to these rules, but they almost always have to do with improving code readability in other ways, for example by breaking up necessarily long statements over multiple lines. This rigorous approach to code formatting is Programming as Guido intended it or, perhaps more appropriately, as Guido indented it! A philosophy of placing a high value on code qualities such as readability gets to the very heart of Python culture, something we'll take a short break to explore now. Many programming languages are at the center of a cultural movement. They have their own communities, values, practices, and philosophy, and Python is no exception. The development of the Python language itself is managed through a series of documents called Python Enhancement Proposals, or PEPs. One of the PEPs, called PEP 8, explains how you should format your code, and we follow its guidelines throughout this book. For example, it is PEP 8 which recommends that we use four spaces for indentation in new Python code. Another of these PEPs, called PEP 20 is called “The Zen of Python”. It refers to 20 aphorisms describing the guiding principles of Python, only 19 of which have been written down. Conveniently, the Zen of Python is never further away than the nearest Python interpreter, as it can always be accessed from the REPL by typing: >>>! Throughout this book we'll be highlighting particular nuggets of wisdom from the Zen of Python in moments of zen to understand how they apply to what we have learned. As we've just introduced Python significant indentation, this is a good time for our first moment of zen: Figure 1.1: Moment of zen In time, you'll come to appreciate Python's significant whitespace for the elegance it brings to your code, and the ease with which you can read other's. As mentioned earlier, Python comes with an extensive standard library, an aspect of Python that is often referred to as batteries included. The standard library is structured as modules, a topic we'll discuss in depth later. What's important at this stage is to know that you gain access to standard library modules by using the import keyword. The basic form of importing a module is simply the import keyword followed by a space and the name of the module. For example, lets see how we can use the standard library's math module to compute square roots. At the triple-arrow prompt we type the following command: >>> import math Since import is a statement which doesn't return a value, Python doesn't print anything if the import succeeds, and we're immediately returned to the prompt. We can access the contents of the imported module by using the name of the module, followed by a dot, followed by the name of the attribute in the module that you need. Like many object oriented languages the dot operator is used to drill down into object structures. Being expert Pythonistas, we have inside knowledge that the math module contains a function called sqrt(). Let's try to use the following command: >>> math.sqrt(81) 9.0 But how can we find out what other functions are available in the math module? The REPL has a special function help() which can retrieve any embedded documentation from objects for which documentation has been provided, such as standard library modules. To get help, simply type help at the prompt: >>> help Type help() for interactive help, or help(object) for help about object. We'll leave you to explore the first form — for interactive help — in your own time. Here we'll go for the second option and pass the math module as the object for which we want help: >>>) Return the arc cosine (measured in radians) of x. You can use the space-bar to page through the help, and if you're on Mac or Linux use the arrow keys to scroll up and down. Browsing through the functions, you'll can see that there's a math function, factorial, for computing factorials. Press Q to exit the help browser, and return us to the Python REPL. Now practice using help() to request specific help on the factorial function: >>> help(math.factorial) Help on built-in function factorial in module math: factorial(...) factorial(x) -> Integral Find x!. Raise a ValueError if x is negative or non-integral. Press Q to return to the REPL. Let's use factorial() a bit. The function accepts an integer argument and return an integer value: >>> math.factorial(5) 120 >>> math.factorial(6) 720 Notice how we need to qualify the function name with the module namespace. This is generally good practice, as it makes it abundantly clear where the function is coming from. That said, it can result in code that is excessively verbose. Let's use factorials to compute how many ways there are to draw three fruit from a set of five fruit using some math we learned in school: >>> n = 5 >>> k = 3 >>> math.factorial(n) / (math.factorial(k) * math.factorial(n - k)) 10.0 This simple expression is quite verbose with all those references to the math module. The Python import statement has an alternative form that allows us to bring a specific function from a module into the current namespace by using the from keyword: >>> from math import factorial >>> factorial(n) / (factorial(k) * factorial(n - k)) 10.0 This is a good improvement, but is still a little long-winded for such a simple expression. A third form of the import statement allows us to rename the imported function. This can be useful for reasons of readability, or to avoid a namespace clash. Useful as it is, though, we recommend that this feature be used infrequently and judiciously: >>> from math import factorial as fac >>> fac(n) / (fac(k) * fac(n - k)) 10.0 Remember that when we used factorial() alone it returned an integer. But our more complex expression above for calculating combinations is producing a floating point number. This is because we've used /, Python's floating-point division operator. Since we know our operation will only ever return integral results, we can improve our expression by using //, Python’s integer division operator: >>> from math import factorial as fac >>> fac(n) // (fac(k) * fac(n - k)) 10 What's notable is that many other programming languages would fail on the above expression for even moderate values of n. In most programming languages, regular garden variety signed integers can only store values less than {ParseError: KaTeX parse error: Expected 'EOF', got '}' at position 1: }̲2\times10^{31}}: >>> 2**31 - 1 2147483647 However, factorials grow so fast that the largest factorial you can fit into a 32-bit signed integer is 12! since 13! is too large: >>> fac(13) 6227020800 In most widely used programming languages you would need either more complex code or more sophisticated mathematics merely to compute how many ways there are to draw 3 fruits from a set of 13!. Python encounters no such problems and can compute with arbitrarily large integers, limited only by the memory in your computer. To demonstrate this further, let's try the larger problem of computing how many different pairs of fruit we can pick from 100 different fruits (assuming we can lay our hands on so many fruit!): >>> n = 100 >>> k = 2 >>> fac(n) // (fac(k) * fac(n - k)) 4950 Just to emphasize how large the size of the first term of that expression is, calculate 100! on it's own: >>> fac number is vastly larger even than the number of atoms in the known universe, with an awful lot of digits. If, like us, you're curious to know exactly how many digits, we can convert our integer to a text string and count the number of characters in it like this: >>> len(str(fac(n))) 158 That's definitely a lot of digits. And a lot of fruit. It also starts to show how Python's different data types — in this case, integers, floating point numbers, and text strings — work together in natural ways. In the next section we'll build on this experience and look at integers, strings, and other built-in types in more detail. Python comes with a number of built-in datatypes. These include primitive scalar types like integers as well as collection types like dictionaries. These built-in types are powerful enough to be used alone for many programming needs, and they can be used as building blocks for creating more complex data types. The basic built-in scalar types we'll look at are: int— signed, unlimited precision integers float— IEEE 754 floating-point numbers None— a special, singular null value bool— true/ falseboolean values For now we'll just be looking at their basic details, showing their literal forms and how to create them. We've already seen Python integers in action quite a lot. Python integers are signed and have, for all practical purposes, unlimited precision. This means that there is no pre-defined limit to the magnitude of the values they can hold. Integer literals in Python are typically specified in decimal: >>> 10 10 They may also be specified in binary with a 0b prefix: >>> 0b10 2 There may also be a octal, with a 0o prefix: >>> 0o10 8 If its a hexadecimal we use the 0x prefix: >>> 0x10 16 We can also construct integers by a call to the int constructor which can convert from other numeric types, such as floats, to integers: >>> int(3.5) 3 Note that, when using the int constructor, the rounding is always towards zero: >>> int(-3.5) -3 >>> int(3.5) 3 We can also convert strings to integers as follows: >>> int("496") 496 Be aware, though, that Python will throw an exception (much more on those later!) if the string doesn't represent an integer. You can even supply an optional number base when converting from a string. For example, to convert from base 3 simply pass 3 as the second argument to the constructor: >>> int("10000", 3) 81 Floating point numbers are supported in Python by the float type. Python floats are implemented as IEEE-754 double-precision floating point numbers with 53 bits of binary precision. This is equivalent to between 15 and 16 significant digits in decimal. Any literal number containing a decimal point is interpreted by Python as a float: 3.125 Scientific notation can be used, so for large numbers — such as {ParseError: KaTeX\ parse error: Expected 'EOF', got '}' at position 1: }̲3\times10^8{/}, the approximate speed of light in metres per second — we can write: >>> 3e8 300000000.0 and for small numbers like Planck's constant {ParseError: KaTeX parse error:\ Expected 'EOF', got '}' at position 1: }̲1.616\times10^} we can enter: >>> 1.616e-35 1.616e-35 Notice how Python automatically switches the display representation to the most readable form. As for integers, we can convert to floats from other numeric or string types using the float constructor. For example, the constructor can accept an int: >>> float(7) 7.0 The float constructor can also accept a string as follows: >>> float("1.618") 1.618 By passing certain strings to the float constructor, we can create the special floating point value NaN (short for Not aNumber) and also positive and negative infinity: >>> float("nan") nan >>> float("inf") inf >>> float("-inf") -inf Python has a special null value called None, spelled with a capital N. None is frequently used to represent the absence of a value. The Python REPL never prints None results, so typing None into the REPL has no effect: >>> None >>> The null value None can be bound to variable names just like any other object: >>> a = None and we can test whether an object is None by using Python's is operator: >>> a is None True We can see here that the response is True, which brings us conveniently on to the bool type. The bool type represents logical states and plays an important role in several of Python's control flow structures, as we'll see shortly. As you would expect there are two bool values, True and False, both spelled with initial capitals: >>> True True >>> False False There is also a bool constructor which can be used to convert from other types to bool. Let's look at how it works. For ints, zero is considered falsey and all other values truthy: >>> bool(0) False >>> bool(42) True >>> bool(-1) True We see the same behavior with floats where only zero is considered falsey: >>> bool(0.0) False >>> bool(0.207) True >>> bool(-1.117) True >>> bool(float("NaN")) True When converting from collections, such as strings or lists, only empty collections are treated as falsey. When converting from lists — which we'll look at shortly — we see that only the empty list (shown here in it's literal form of []) evaluates to False: >>> bool([]) False >>> bool([1, 5, 9]) True Similarly, with strings only the empty string, "", evaluates to False when passed to bool: >>> bool("") False >>> bool("Spam") True In particular, you cannot use the bool constructor to convert from string representations of True and False: >>> bool("False") True Since the string False is not empty, it will evaluate to True. These conversions to bool are important because they are widely used in Python if-statements and while-loops which accept bool values in their condition. Boolean values are commonly produced by Python’s relational operators which can be used for comparing objects. Two of the most widely used relational operators are Python's equality and inequality tests, which actually test for equivalence or inequivalence of values. That is, two objects are equivalent if one could use used in place of the other. We'll learn more about the notion of object equivalence later in the book. For now, we'll compare simple integers. Let's start by assigning — or binding — a value to a variable g: >>> g = 20 We test for equality with == as shown in the following command: >>> g == 20 True >>> g == 13 False For inequality we use !=: >>> g != 20 False >>> g != 13 True We can also compare the order of quantities using the rich comparison operators. Use < to determine if the first argument is less than the second: >>> g < 30 True Likewise, use > to determine if the first is greater than the second: >>> g > 30 False You can test less-than or equal-to with <=: >>> g <= 20 True We can use the greater-than or equal-to with >= ,shown as follows: >>> g >= 20 True If you have experience with relational operators from other languages, then Python's operators are probably not surprising at all. Just remember that these operators are comparing equivalence, not identity, a distinction we'll cover in detail in coming chapters. Now that we've examined some basic built-in types, let's look at two important control flow structures which depend on conversions to the bool type: if-statements and while-loops. Conditional statements allow us to branch execution based on the value of an expression. The form of the statement is the if keyword, followed by an expression, terminated by a colon to introduce a new block. Let's try this at the REPL: >>> if True: Remembering to indent four spaces within the block, we add some code to be executed if the condition is True, followed by a blank line to terminate the block: ... print("It's true!") ... It's true! At this point the block will execute, because self-evidently the condition is True. Conversely, if the condition is False, the code in the block does not execute: >>> if False: ... print("It's true!") ... >>> The expression used with the if-statement will be converted to a bool just as if the bool() constructor had been used, so: >>> if bool("eggs"): ... print("Yes please!") ... Yes please! If the value is exactly equivalent to something, we then use the if command as follows: >>> if "eggs": ... print("Yes please!") ... Yes please! Thanks to this useful shorthand, explicit conversion to bool using the bool constructor is rarely used in Python. The if-statement supports an optional else clause which goes in a block introduced by the else keyword (followed by a colon) which is indented to the same level as the if keyword. Let's start by creating (but not finishing) an if-block: >>> h = 42 >>> if h > 50: ... print("Greater than 50") To start the else block in this case, we just omit the indentation after the three dots: ... else: ... print("50 or smaller") ... 50 or smaller For multiple conditions you might be tempted to do something like this: >>> if h > 50: ... print("Greater than 50") ... else: ... if h < 20: ... print("Less than 20") ... else: ... print("Between 20 and 50") ... Between 20 and 50 Whenever you find yourself with an else-block containing a nested if statement, like this, you should consider using Python's elif keyword which is a combined else-if. As the Zen of Python reminds us, Flat is better than nested: >>> if h > 50: ... print("Greater than 50") ... elif h < 20: ... print("Less than 20") ... else: ... print("Between 20 and 50") ... Between 20 and 50 This version is altogether easier to read. Python has two types of loop: for-loops and while-loops. We've already briefly encountered for-loops back when we introduced significant whitespace, and we'll return to them soon, but right now we'll cover while-loops. The While-loops in Python are introduced by the while keyword, which is followed by a boolean expression. As with the condition for if-statements, the expression is implicitly converted to a boolean value as if it has been passed to the bool() constructor. The while statement is terminated by a colon because it introduces a new block. Let's write a loop at the REPL which counts down from five to one. We'll initialize a counter variable called c to five, and keep looping until we reach zero. Another new language feature here is the use of an augmented-assignment operator, -=, to subtract one from the value of the counter on each iteration. Similar augmented assignment operators exist for the other basic math operations such as addition and multiplication: >>> c = 5 >>> while c != 0: ... print(c) ... c -= 1 ... 5 4 3 2 1 Because the condition — or predicate — will be implicitly converted to bool, just as if a call to the bool() constructor were present, we could replace the above code with the following version: >>> c = 5 >>> while c: ... print(c) ... c -= 1 ... 5 4 3 2 1 This works because the conversion of the integer value of c to bool results in True until we get to zero which converts to False. That said, to use this short form in this case might be described as un-Pythonic, because, referring back to the Zen of Python, explicit is better than implicit. We place higher value of the readability of the first form over the concision of the second form. The While-loops are often used in Python where an infinite loop is required. We achieve this simply by passing True as the predicate expression to the while construct: >>> while True: ... print("Looping!") ... Looping! Looping! Looping! Looping! Looping! Looping! Looping! Looping! Now you're probably wondering how we get out of this loop and regain control of our REPL! Simply press Ctrl+C: Looping! Looping! Looping! Looping! Looping! Looping!^C Traceback (most recent call last): File "<stdin>", line 2, in <module> KeyboardInterrupt >>> Python intercepts the key stroke and raises a special exception which terminates the loop. We'll be talking much more about what exceptions are, and how to use them, later in Chapter 6, Exceptions. Many programming languages support a loop construct which places the predicate test at the end of the loop rather than at the beginning. For example, C, C++, C# and Java support the do-while construct. Other languages have repeat-until loops instead or as well. This is not the case in Python, where the idiom is to use while True together with an early exit, facilitated by the break statement. The break statement jumps out of the loop — and only the innermost loop if severals loops have been nested — continuing execution immediately after the loop body. Let's look at an example of break, introducing a few other Python features along the way, and examine it line-by-line: >>> while True: ... response = input() ... if int(response) % 7 == 0: ... break ... We start with a while True: for an infinite loop. On the first statement of the while block we use the built-in input() function to request a string from the user. We assign that string to a variable called response. We now use an if-statement to test whether the value provided is divisible by seven. We convert the response string to an integer using the int() constructor and then use the modulus operator, %, to divide by seven and give the remainder. If the remainder is equal to zero, the response was divisible by seven, and we enter the body of the if-block. Within the if-block, now two levels of indentation deep, we start with eight spaces and use the break keyword. break terminates the inner-most loop — in this case the while-loop — and causes execution to jump to the first statement after the loop. Here, that statement is the end of the program. We enter a blank line at the three dots prompt to close both the if-block and the while-block. Our loop will start executing, and will pause at the call to input() waiting for us to enter a number. Let's try a few: 12 67 34 28 >>> As soon as we enter a number divisible by seven the predicate becomes True, we enter the if-block, and then we literally break out of the loop to the end of program, returning us to the REPL prompt. - Starting out with Python Obtaining and installing Python 3 Starting the Read-Eval-Print-Loop or REPL Simple arithmetic Creating variables by binding objects to names Printing with the built-in print()function Exiting the REPL with Ctrl+Z (Windows) or Ctrl+D (Unix) Being Pythonic Significant indentation PEP 8 - The Style Guide for Python Code PEP 20 - The Zen of Python Importing modules with the import statement in various forms Finding and browsing Basic types and control flow ints, floats, None, and bool, plus conversions between them Relational operators for equality and ordering tests The if-statements with else and elifblocks The while-loops with implicit conversion to bool Interrupting infinite loops with Ctrl+C Breaking out of loops with break Requesting text from the user with input() Augmented assignment operators
https://www.packtpub.com/product/the-python-apprentice/9781788293181
CC-MAIN-2022-27
refinedweb
6,101
60.55
- .11 The RESTful Rails Action Set Rails REST facilities, ultimately, are about named routes and the controller actions to which they point. The more you use RESTful Rails, the more you get to know each of the seven RESTful actions. How they work across different controllers (and different applications) is of course somewhat different. Still, perhaps because there's a finite number of them and their roles are fairly well-delineated, each of the seven tends to have fairly consistent properties and a characteristic feel to it. We're going to take a look at each of the seven actions, with examples and comments. You'll encounter all of them again, particularly in Chapter 4, Working with Controllers, but here you'll get some backstory and start to get a sense of the characteristic usage of them and issues and choices associated with them. 3.11.1 Index Typically, an index action provides a representation of a plural (or collection) resource. However, to be clear, not all resource collections are mapped to the index action. Your default index representations will usually be generic, although admittedly that has a lot to do with your application-specific needs. But in general, the index action shows the world the most neutral representation possible. A very basic index action looks like class AuctionsController < ApplicationController def index @auctions = Auction.all end end The associated view template will display information about each auction, with links to specific information about each one, and to profiles of the sellers. You'll certainly encounter situations where you want to display a representation of a collection in a restricted way. In our recurring example, users should be able to see a listing of all their bids, but may be you don't want users seeing other people's bids. There are a couple of ways to do this. One way is to test for the presence of a logged-in user and decide what to show based on that. But that's not going to work here. For one thing, the logged-in user might want to see the more public view. For another, the more dependence on server-side state we can eliminate or consolidate, the better. So let's try looking at the two bid lists, not as public and private versions of the same resource, but as different index resources. The difference can be reflected in the routing like: resources :auctions do resources :bids do get :manage, :on => :collection end end resources :bids We can now organize the bids controller in such a way that access is nicely layered, using filters only where necessary and eliminating conditional branching in the actions themselves: class BidsController < ApplicationController before_filter :check_authorization, :only => :manage def index @bids = Bid.all end def manage @bids = auction.bids end protected def auction @auction ||= Auction.find(params[:auction_id]) end def check_authorization auction.authorized?(current_user) end end There's now a clear distinction between /bids and /auctions/1/bids/manage and the role that they play in your application. On the named route side, we've now got bids_url and manage_auction_bids_url. We've thus preserved the public, stateless face of the /bids resource, and quarantined as much stateful behavior as possible into a discrete member resource, /auctions/1/bids/manage. Don't fret if this mentality doesn't come to you naturally. It's part of the REST learning curve. 3.11.2 Show The RESTful show action is the singular flavor of a resource. That generally translates to a representation of information about one object, one member of a collection. Like index, show is triggered by a GET request. A typical—one might say classic—show action looks like class AuctionController < ApplicationController def show @auction = Auction.find(params[:id]) end end You might want to differentiate between publicly available profiles, perhaps based on a different route, and the profile of the current user, which might include modification rights and perhaps different information. As with index actions, it's good to make your show actions as public as possible and offload the administrative and privileged views onto either a different controller or a different action. 3.11.3 Destroy Destroy actions are good candidates for administrative safeguarding, though of course it depends on what you're destroying. You might want something like this to protect the destroy action. class ProductsController < ApplicationController before_filter :admin_required, :only => :destroy A typical destroy action might look like def destroy product.destroy flash[:notice] = "Product deleted!" redirect_to products_url end This approach might be reflected in a simple administrative interface like %h1 Products - products.each do |p| %p= link_to p.name, product_path(p) - if current_user.admin? %p= link_to "delete", product_path(p), :method => :delete That delete link appears depending on whether current user is an admin. With Rails 3, the UJS (Unobtrusive JavaScript) API greatly simplifies the HTML emitted for a destroy action, using CSS selectors to bind JavaScript to (in this case) the "delete" link. See Chapter 12, Ajax on Rails, for much more information about how it works. DELETE submissions are dangerous. Rails wants to make them as hard as possible to trigger accidentally—for instance, by a crawler or bot sending requests to your site. So when you specify the DELETE method, JavaScript that submits a form is bound to your "delete" link, along with a rel="nofollow" attribute on the link. Since bots don't submit forms (and shouldn't follow links marked "nofollow"), this gives a layer of protection to your code. 3.11.4 New and Create As you've already seen, the new and create actions go together in RESTful Rails. A "new resource" is really just an entity waiting to be created. Accordingly, the new action customarily presents a form, and create creates a new record, based on the form input. Let's say you want a user to be able to create (that is, start) an auction. You're going to need - A new action, which will display a form - A create action, which will create a new Auction object based on the form input, and proceed to a view (show action) of that auction. The new action doesn't have to do much. In fact, it has to do nothing. Like any empty action, it can even be left out. Rails will still figure out which view to render. However, your controller will need an auction helper method, like protected def auction @auction ||= current_user.auctions.build(params[:auction]) end helper_method :auction If this technique is alien to you, don't worry. We'll describe it in detail in Section 10.1.5. A simplistic new.html.haml template might look like Listing 3.2. Listing 3.2. A New Auction Form %h1 Create a new auction = form_for auction do |f| = f.label :subject = f.text_field :subject %br = f.label :description = f.text_field :description %br = f.label :reserve = f.text_field :reserve %br = f.label :starting_bid = f.text_field :starting_bid %br = f.label :end_time = f.datetime_select :end_time %br = f.submit "Create" Once the information is filled out by a user, it's time for the main event: the create action. Unlike new, this action has something to do. def create if auction.save redirect_to auction_url(auction), :notice => "Auction created!" else render :action => "new" end end 3.11.5 Edit and Update Like new and create, the edit and update actions go together: edit provides a form, and update processes the form input. The form for editing a record appears similar to the form for creating one. (In fact, you can put much of it in a partial template and use it for both; that's left as an exercise for the reader.) The form_for method is smart enough to check whether the object you pass to it has been persisted or not. If it has, then it recognizes that you are doing an edit and specifies a PUT method on the form.
https://www.informit.com/articles/article.aspx?p=1671632&seqNum=11
CC-MAIN-2022-40
refinedweb
1,314
56.76
Recursion in Python The term Recursion can be defined as the process of defining something in terms of itself. In simple words, it is a process in which a function calls itself directly or indirectly. Advantages of using recursion - A complicated function can be split down into smaller sub-problems utilizing recursion. - Sequence creation is simpler through recursion than utilizing any nested iteration. - Recursive functions render the code look simple and effective. Disadvantages of using recursion - A lot of memory and time is taken through recursive calls which makes it expensive for use. - Recursive functions are challenging to debug. - The reasoning behind recursion can sometimes be tough to think through. Syntax: def func(): <-- | | (recursive call) | func() ---- Example 1: A Fibonacci sequence is the integer sequence of 0, 1, 1, 2, 3, 5, 8…. Python3 Fibonacci series: 0 1 1 2 3 5 8 13 21 34 Output: Fibonacci series: 0 1 1 2 3 5 8 13 21 34 Example 2: The factorial of 6 is denoted as 6! = 1*2*3*4*5*6 = 720. Python3 Factorial of number 6 = 720 What is Tail-Recursion? A unique type of recursion where the last procedure of a function is a recursive call. The recursion may be automated away by performing the request in the current stack frame and returning the output instead of generating a new stack frame. The tail-recursion may be optimized by the compiler which makes it better than non-tail recursive functions. Is it possible to optimize a program by making use of a tail-recursive function instead of non-tail recursive function? Considering the function given below in order to calculate the factorial of n, we can observe that the function looks like a tail-recursive at first but it is a non-tail-recursive function. If we observe closely, we can see that the value returned by Recur_facto(n-1) is used in Recur_facto(n), so the call to Recur_facto(n-1) is not the last thing done by Recur_facto(n). Python3 720 We can write the given function Recur_facto as a tail-recursive function. The idea is to use one more argument and in the second argument, we accommodate the value of the factorial. When n reaches 0, return the final value of the factorial of the desired number. Python3 720
https://www.geeksforgeeks.org/recursion-in-python/?ref=lbp
CC-MAIN-2022-40
refinedweb
388
52.8
SPOJ From HaskellWiki Latest revision as of 03:03, 28 September 2009 SPOJ (Sphere Online Judge) is an automated programming contest website. It has a large problem set archive, and accepts solutions in many languages, including Haskell. Solving the problems can be a interesting way to learn Haskell. Revealing answers to questions is generally frowned upon as it enables cheating, but giving example solutions to a few of the simpler questions is OK as it encourages newcomers to get started on SPOJ. This page covers techniques for dealing with problems efficiently. It accumulates some earned wisdom about writing Haskell programs which overcome some of the technical obstacles in SPOJ. These are not spoilers, hopefully, but useful tips in general about auxiliary issues. [edit]. [edit] [edit] 3 I/O [edit]. [edit] 3.2 Span and Break The span and break functions available from ByteString can be used to parse the occasional non-numeric value in input. For example, the following code skips a line: import qualified Data.ByteString.Char8 as SS -- ... skipLine cs = snd $ SS.span (== '\n') cs' where (_, cs') = SS.break (== '\n') cs The nice part about span and break is that when it is found in the form span (== c) for all characters c, it is optimized down to a simple memchr. [edit] [edit] 3.4 Enormous Input: Solutions to INTEST INTEST description: the first line of input contains two numbers: n and k. The input then consists of n lines of numbers. The output of the program should be the count of the numbers which are divisible by k. Solution 0: Use System.IO getContents with [Char]/String - is very slow. import qualified Data.List as DLi main :: IO () main = do (w1:w2:ws) <- words `fmap` getContents -- all IO in one go let n = readInt w1 k = readInt w2 print $ DLi.foldl' (f1 k) 0 $ map readInt $ take n ws where f1 :: Int -> Int -> Int -> Int f1 k acc ti | mod ti k == 0 = acc+1 | otherwise = acc readInt :: String -> Int readInt = read Solution 1: A straightforward ByteString solution which achieves a reasonable time. import qualified Data.ByteString.Lazy.Char8 as BS main :: IO () main = do (l:ls) <- BS.lines `fmap` BS.getContents -- all IO in one go let [n,k] = map readInt (BS.split ' ' l) print . length . filter ((== 0) . (`mod` k) . readInt) $ take n ls readInt :: BS.ByteString -> Int readInt x = case BS.readInt x of Just (i,_) -> i Nothing -> error "Unparsable Int"') [edit] 4. [edit] 4.. - Don't do runST $ do .... It doesn't work (at the moment). The reasons are obscure, having to do with unification and higher-rank polymorphism. Do runST (do ...)instead.') [edit] 4. [edit] 4.3 Unsafe Array Access There are two lower-level array access functions which can help yousqueeze out a bit more performance: when you feel it is safe. The first difference is that the normal array functions check array-bounds before doing anything. You can crash your program using the unsafe ones, if you access an index out-of-bounds. The second difference is that the unsafe functions do not perform any Index-arithmetic. They expect to be handed an array index that has already been converted into a zero-based, flat system. If you already use zero-based flat arrays, great. Otherwise, you may have to do a small bit of arithmetic first. [edit]
https://wiki.haskell.org/index.php?title=SPOJ&diff=30316&oldid=30221
CC-MAIN-2016-40
refinedweb
559
67.35
This article was originally posted as “C# Security: Bypassing a Login Form using SQL Injection” on 5th January 2014 at Programmer’s Ranch. The article is based on ASP .NET Web Forms and ADO .NET, and the code example was originally written using Visual Studio Express for Web 2013 and SQL Server 2012 Express. This updated version removes references to particular software versions, adds syntax highlighting, and includes other simple edits where necessary. In this article, we’re going to learn about SQL injection. We’ll use it to bypass a login form on a website, and you’ll see just how easy it is. Despite its simplicity, this article is going to be a little bit long – because we’ll need to set up a simple login form with a database that we can then use to try out the SQL injection. Naturally, you should never try out these types of attacks on someone else’s website; so when you want to learn something in practice, set up a vulnerable system of your own. To demonstrate SQL injection, we’re going to be using ASP .NET (for the web form) and SQL Server (for the database). However, SQL injection is not tied to any technology in particular, so you could, for example, use PHP and MySQL instead. You are expected to know a little something about databases (SQL) and websites, although rest assured that there’s nothing complicated in this article. Setting up the database In order to create and set up our database, we’ll need to use SQL Server Management Studio. Launch it, and from the Object Explorer on the left, right click on the Databases node, and click on “New Database…”. Enter a name for your database (I’m using “sqlinjection”) and click OK. You should now be able to right click on the newly created database and select “New Query”. This brings up a text editor where you can enter and run queries against the database. Enter the following script into this editor: create table users ( id int not null primary key identity(1,1), username varchar(50) not null, password varchar(50) not null ); …and press F5 to execute it: You should now have your users table with an id field as well as the username and password. Now, replace the script with the following: insert into users(username, password) values('hankmarvin', 'theshadows'); Press F5 to insert a new row where the username is “hankmarvin” and the password is “theshadows”. The id column should be filled automatically since we are using an IDENTITY on that column. Note that in this case we’re storing a password as cleartext for simplicity, but this is never a good idea – see my article “Securing Passwords by Salting and Hashing” if you don’t know why. Creating the login form In Visual Studio, go on File -> New Website… and create a new project of type ASP .NET Empty Web Site: Next, right click on the project in Solution Explorer, and select Add -> Add New Item…, and then pick Web Form from the list of templates. Leave the name as Default.aspx. Set up the markup in Default.aspx so that it looks like this: <%@ Page <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> Username: <asp:TextBox </div> <div> Password: <asp:TextBox </div> <div> <asp:Button </div> <div> <asp:Label </div> </form> </body> </html> It’s not wonderful HTML, and not exactly pretty, but it’s the simple login form that we need. You can see the result by pressing F5 to launch the project in your web browser: Next, go into your webpage’s codebehind file (that would be Default.aspx.cs). Add the following statement near the top: using System.Data.SqlClient; Add the following event handler that actually takes care of the logic for logging in (your actual connection string may vary depending on how you installed SQL Server – see this if you run into issues):)) { int result = (int)command.ExecuteScalar(); if (result > 0) resultField.Text = "Login successful."; else resultField.Text = "Login failed! Go away!"; } } } catch(Exception ex) { resultField.Text = ex.Message; } } SQL Injection You can now press F5 and test out the login form. If you enter the correct credentials, which are “hankmarvin” for username and “theshadows” as the password, then you should see the message “Login successful.” just below the form. For any other input, the login will fail. It should be pretty evident that the code in loginButton_Click is constructing dynamic SQL based on the credentials provided. So for the correct credentials, this would build the SQL string: select count(*) from users where username = 'hankmarvin' and password = 'theshadows' The weakness in this is that we can write whatever we want into the username and password fields, and they’ll be included in the SQL query. Let’s see what happens when we use the following input in the password field: ' OR 1=1 -- Using this, we are logged in just fine: Oops! What just happened here? If we take a look at the dynamic SQL that is being constructed, it becomes clear: select count(*) from users where username = '' and password = '' OR 1=1 --' The stuff we entered in the password field is closing off the SQL string (with the apostrophe at the beginning) and is adding a condition that will always be true (1=1). A comment (–) at the end gets rid of the remaining SQL, in this case a closing apostrophe. The query’s WHERE clause can now be read as follows: ((username = '') AND (password = '')) OR 1=1 Well, it turns out that 1=1 is always true, so the query ends up returning every row in the database. The count is greater than zero, and so the login is successful, even though we didn’t actually provide valid credentials. Prepared Statements The correct way to fight SQL injection is to use prepared statements. This means that the event handler changes as follows:)) { command.Parameters.Add(new SqlParameter("@username", username)); command.Parameters.Add(new SqlParameter("@password", password)); int result = (int)command.ExecuteScalar(); if (result > 0) resultField.Text = "Login successful."; else resultField.Text = "Login failed! Go away!"; } } } catch(Exception ex) { resultField.Text = ex.Message; } } Instead of building dynamic SQL, we insert named placeholders, such as @username, to stand in for parameters in the query. We then provide these values via the SqlCommand‘s Parameters property, where the values are paired up with the corresponding parameter names. Since these parameters are strongly typed, things like escaping apostrophes in strings are handled automatically, and so users can’t inject SQL via input fields. In fact, if you try the same SQL injection attack as above, you’ll see that it doesn’t work any more: Summary As we have seen in this article, SQL injection is a really simple technique that can be used to breach security in vulnerable websites and applications. Bypassing login forms is only one of many things you can do with SQL injection, which is so dangerous that it has topped the OWASP Top 10 Risks for years. To protect against SQL injection, use prepared statements to provide strongly-typed parameters in your SQL queries, and avoid dynamic SQL built directly by concatenating strings.
https://gigi.nullneuron.net/gigilabs/tag/asp-net-web-forms/
CC-MAIN-2021-31
refinedweb
1,208
60.65
i have split a string by space ,done some operation and now how to properly order them for sending a mail in java or jsp - JSP-Servlet i have split a string by space ,done some operation and now how to properly... a string by space and collected some special charactor in that and done some... that is not properly ordered i.e see the following ///I typed a matter like this in a text GJTester - Java Unit Testing Tool GJTester - Java Unit Testing Tool GJTester, a general Java testing tool, accomplishes the unit, regression and contract testing of your Java programsSP-Servlet servlets hi, can anybody help me as what exactly to be done to for compilation,execution of servlets. i also want to know the software required in this execution request processing in servlets request processing in servlets how request processing is done in servlets and jsp Please visit the following links: JSP Tutorials Servlet Tutorials Here, you will find several examples of processing request servlets execution - JSP-Servlet servlets execution the xml file is web.xml file in which the servlet name,servlet class,mapping etc which has to be done. What u want...:// Thanks. Amardeep java servlets with database interaction java servlets with database interaction hai friends i am doing a web application in that i have a registration page, after successfully registered... i have done if you want i can send sample code. mycode import java.io. JTable values are not gettiing properly Not get ans properly code not working properly Why are my variables not dividing properly? Why are my variables not dividing properly? Why are my variables not dividing properly Servlets servlets the iPhone Applications Testing iPhone Applications Testing Developing..., which develop Apple's, own apps have a separate testing unit, but small and medium enterprises hire a testing firm to test their product GUI testing/software testing - Java Beginners GUI testing/software testing how to create a GUI testing/software testing module in java Running and testing application Running And Testing Application The complete database driven application with testing is given below You can test your application many way like using Mock... of Junit and then write the test case. To know more about the action testing click output not coming properly - JSP-Servlet output not coming properly I am not getting the output properly when i had written my code like below: Add Employee Details for( j=0;j<11;j++) { out.println("Department code Keyboard Done button in iphone Keyboard Done button in iphone hii,, how can i set a function on press keyboard done button. hello, For making keyboard Done button press :- import keyboard displacement by adding this line #define kOFFSET Struts validation not work properly - Struts Introduction to Java Servlets Introduction to Java Servlets Java Servlets are server side Java programs that require... associated information required for creating and executing Java Servlets online test project on java using servlets and jsp online test project on java using servlets and jsp as i am doing online test project on java using jsp and servlets ,,,the problem is in the code... ...,both buttons works properly .....,so i want a solution for placing the two... to return the uikeyboard on done button click. Do not forget to call < junit testing - JUNIT junit testing How to perform a testing in JUnit? Hi,Could you please explain me in detail "junit testing on stack". What is stack and how do you want to test?Please let's know, I will try to provide Installation, Configuration and running Servlets Installation, Configuration and running Servlets  ... to install a WebServer, configure it and finally run servlets using this server...). This Server supports Java Servlets 2.5 and Java Server Pages (JSPs) 2.1 specifications jsp -servlets jsp -servlets i have servlets s1 in this servlets i have created emplooyee object, other servlets is s2, then how can we find employee information in s2 servlets Testing - IDE Questions struts 2 testing Mobile Software Testing Services, Mobile Application Software Testing Service RoseIndia ; padding-bottom:9px; } Mobile Software Testing Services Now... a mobile software-testing firm to stress testing their mobile software. Roseindia... is offering a complete mobile testing solutions for all major brands of mobile. We Open Source Testing Tools in Java Open Source Testing Tools in Java In this page we are discussing about the different Open Source Testing Tools available in Java. JUnit JUnit is a regression testing framework written by Erich Gamma and Kent Beck. It is used Using MYSQL Database with JSP & Servlets. Using MYSQL Database with JSP & Servlets. MYSQL... machine. Testing the installation is complete. Issue Building and Testing Struts Hibernate Plugin Application Building and Testing Struts Hibernate Plugin Application... and packaging will done by ant tool. To compile and create war file for deployment, open...;C:\Struts-Hibernate-Integration\dist" directory. Deploying and testing
http://www.roseindia.net/tutorialhelp/comment/93842
CC-MAIN-2014-10
refinedweb
812
52.19
Odoo Help Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps: CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc. Set default value in object of many2one field Hello all, I have created many2one field for category in my object. Based on my object value, I want to set default value for 'type' field of Category. Can anybody help me how to do it? Thanks Define default Method Code def _get_default_category(self, cr, uid, context=None): res = self.pool.get('model.category').search(cr, uid, [('name','=',categroy_name)], context=context) return return res and res[0] or False _defaults = { 'category_id':_get_default_category, } This is not what I want exactly, Your method will give category_id by default based on function. But I want to set type of model.category based on active object(e.g. test.test). so you can try on_change function based on the change object(test.test) field value model.category value set in the on change method on change method will be called while I enter some value in some field. If I directly create record, and then create category from test.test default type should come. Is it possible to do ? For example: Create product, then create Contract from product form, by default employee should come as Administrator. About This Community Odoo Training Center Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
https://www.odoo.com/forum/help-1/question/set-default-value-in-object-of-many2one-field-39425
CC-MAIN-2017-13
refinedweb
245
59.09
. You need only the collection and inherit from the System.Collections.IList. See the next XML sample code: <?xml version="1.0" encoding="utf-8" ?> <XFGDocument Name="Sample XmlGui" NameSpaces="System.Drawing,System.Windows.Forms, customNamespace,Fireball.XmlGui.Graphics" CodeBehind="formsample.fxg.cs"> <References> <Assembly Name="System.dll" /> <Assembly Name="System.Drawing.dll" /> <Assembly Name="System.Windows.Forms.dll" /> </References> > </XFGDocument> The root element is XFGDocument. On this tag you need to set its name and the NameSpaces attribute to all namespaces you need to use from XML each separated by a , (comma). You can also specify the code-behind file with the attribute CodeBehind. In this example, the first child tag of the document needs to be a form. In this example, I use the class declared on the code-behind file. MyForm is a class that inherits from System.Windows.Forms.Form. Next, the source code of the code-behind file: using System; using System.Drawing; using System.Windows.Forms; namespace customNamespace { public class MyForm : Form { static MyForm MyFormIstance; public MyForm() { MyFormIstance = this; } public static void OpenClick(object sender,EventArgs e) { WebBrowser br = (WebBrowser)MyFormIstance.Controls.Find("browser1", true)[0]; br.Navigate(""); } } } The source code is very short and simple, and you don't need to be a guru for creating a GUI with this library ;). On the XML code, if you need to set a property, you can do it as an attribute. For the moment, that is all. If you have any questions about the library, don't hesitate to contact me. I plan to write more about this library in future. At the moment, my time is dedicated to the development of the library, and other works ;) Note: for running the sample, go on the sample bin/debug directory and execute the run.bat file. General News Question Answer Joke Rant Admin
http://www.codeproject.com/KB/cs/fireball_xmlgui.aspx
crawl-002
refinedweb
307
51.55
i'm getting "file not found exception" when i used i'm getting "file not found exception" when i used a driver "org.postgresql.Driver". how to include this driver in Eclipse platform? how to check element in the database how to check element in the database not worked it didn't worked !!! and raised many exceptions. thank u really a very good code simple and clear thank u somuch Retrieving Tables from a Database this is is really a helpful one con.close() out of while loop con.close(); } Should be out of while loop Retrieving Tables from a Database code Retrieving Data from a Database Hi is there any way we can extract some of the data from mysql database and send as an image to mobile phones. Do we have to write program in j2me...also the j2me uses bluetooth for two mobile phones to talk Java file not found exception Java file not found exception This section illustrates you the concept of file... by a code. When a file with the specified pathname does not exist, file not found... of file not found exception. Output: java.io.FileNotFoundException Getting Stated with JDBC and then developed a simple JDBC Application. We used MySQL database to run...Getting Stated with JDBC In this Getting Started with JDBC tutorial, we.... In this tutorial we will use MySQL database and Connector/J JDBC driver. Let's get jdbc mysql - JDBC jdbc mysql import java.sql.*; public class AllTableName...=DriverManager.getConnection("jdbc:mysql://localhost:3306/ram","root","root...("No any table in the database"); } } catch (Exception e ResultSetMetaData - JDBC !"); Connection con = null; String url = "jdbc:mysql://localhost:3306... in Database!"); Connection con = null; String url = "jdbc:mysql...(); } } } For more information on JDBC-Mysql visit to : jdbc - JDBC management so i need how i can connect the pgm to database by using jdbc... at Thanks Hi, You..."); Read at Thanks JDBC - JDBC JDBC JDBC driver class not found:com.mysql.jdbc.Driver..... Am getting an error like this...... i have added the jar files for mysql inside...:// Thanks creating jdbc sql statements - JDBC creating jdbc sql statements I had written the following program and when i compile it it is giving some errors...can u give the reason... is second...but why i'm not getting output Update - JDBC in the 'quantity' column when I enter 5, the value should now be 15. The code below is what I used to update normally. It works. Please assist me. Thanks...:// Thanks
http://roseindia.net/tutorialhelp/allcomments/2869
CC-MAIN-2014-35
refinedweb
418
67.45
Are you wishing to know the keycodes for these buttions? If so... import com.nokia.mid.ui.FullCanvas; FullCanvas.KEY_SOFTKEY1 FullCanvas.KEY_SOFTKEY2 FullCanvas.KEY_SOFTKEY3 HTH Type: Posts; User: JohnnyC1969; Keyword(s): Are you wishing to know the keycodes for these buttions? If so... import com.nokia.mid.ui.FullCanvas; FullCanvas.KEY_SOFTKEY1 FullCanvas.KEY_SOFTKEY2 FullCanvas.KEY_SOFTKEY3 HTH What phone are you trying it on? 6600? From the 6600 known issues: Softkey buttons are passed when using a FullCanvas ;) As your 'standard' Canvas will have a gap at the bottom, sounds like you need to use Commands and CommandAction(), this will put softkey... Personally I'd use the FullCanvas rather than the standard canvas. The value of FullCanvas.KEY_SOFTKEY1 is -6, whether or not that would be passed to the keyPressed & keyReleased methods I don't... As long as it doesn't use any SonyEricsson specific classes, then yes, in theory it should work. keyCode == FullCanvas.KEY_SOFTKEY1 Hello Ady ;) It's not just the lack of support, but the sheer number of firmware bugs is absolutely appalling. This is a common problem across ALL phones though. Out of all the manufactures,... My array is initialised only once, and well before any code begins to read from it :) Cheers, but I'm puzzled as it's a static final array - it should never *sometimes* fail to get it's length. I have a 'private static final in array' - *sometimes* I get a null pointer exception when getting the length of this array (length = myArray.length) in my drawing routine. Whilst this exception... You might want to try on: Use their 'Knowledge & Support' link, then onto 'Tech Support' then. You have to register first though - it's... Can't be done :( More info needed. How are 'your contacts' attempting to put the JAD/JAR onto the handset? Infrared? Bluetooth? Uploading to a server then via WAP? Have they even extracted the JAD/JAR from... Try using: try { Display.getDisplay( gameThread.cMidlet ).vibrate( time ); } catch( Exception e ) {} You may also want to check your profile settings on the handset. Does the 6600... All Nokia handsets I've tried do this. You get a showNotify as soon as you accept or reject the call. *most* Nokia handsets mute the sound for you (like the 7210 etc). Even the 6600 with... Greetings all :) I'd like to know if it's at all possible for a MIDP1 Java MIDlet to actually save images (.png or .jpg) to the handset? Not within the RMS data, but to save an actual file onto... Hi Alex, Thanks for the reply. I didn't know that startApp() is called by most phones when an app is resumed. Unfortunately this isn't the problem as my code (amazingly) caters for this - my... This is what happens: Game running, incoming call received, game pauses fine, but when returning to game after the call - the game exits and returns to the phones menu - at this point you can't... You have no control over the red key quitting your application. Greetings, I have a problem displaying some foreign (German, French, Spanish & Italian) characters. I am using Graphics.drawString and the system font, but I am getting bugs back from the... Anyone????? Does getKeyName return the string in the language of the phone? For example: getKeyName( Canvas.RIGHT ) would return the string "Recht" I was under the assumption that it did, I'm sure I saw... Bump :) C'mon, someone must have an idea. I have a problem that I keep getting a 'Memory Full' error message when exiting my game. I've tried it on a 6600 with s/w version 3.42.1 and it's... Oh, I should also say that when the sound is still returned as SOUND_PLAYING (when it sounds like it's finished) - this only happens on a real 7210, it's fine on the emulator. I'm having a right barrel of laughs trying to detect when a sound (FORMAT_TONE) has finished playing. I use priorities for my sounds, but I get no sounds playing for several seconds after playing...
http://developer.nokia.com/Community/Discussion/search.php?s=773484663c48b0cc7d6278df8600de26&searchid=1843560
CC-MAIN-2013-48
refinedweb
682
75.3
#include <ManagedNetwork.h> Definition at line 127 of file ManagedNetwork.h. This Event will be signaled after the Status field is updated by the MNP. The type of Event must be EFI_NOTIFY_SIGNAL. The Task Priority Level (TPL) of Event must be lower than or equal to TPL_CALLBACK. Definition at line 134 of file ManagedNetwork.h. The status that is returned to the caller at the end of the operation to indicate whether this operation completed successfully. Definition at line 139 of file ManagedNetwork.h. When this token is used for receiving, RxData is a pointer to the EFI_MANAGED_NETWORK_RECEIVE_DATA. Definition at line 144 of file ManagedNetwork.h. When this token is used for transmitting, TxData is a pointer to the EFI_MANAGED_NETWORK_TRANSMIT_DATA. Definition at line 148 of file ManagedNetwork.h.
http://dox.ipxe.org/structEFI__MANAGED__NETWORK__COMPLETION__TOKEN.html
CC-MAIN-2018-47
refinedweb
128
51.75