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 |
|---|---|---|---|---|---|
Need urgent help with this....please
I have an export dmp file which I have to import into a clean database. I have created a new d/b. How should I do it ? Do I need any special precautions, consideration or anything ?
Also. I have another dmp from a specific user. This user's default tablespace was system. This dmp file has to be imported into this new d/b with all the objects going into the new tablespace that I will create.
Can someone please help me with this....
Thanks
you can do all of this fairly easily.
basically you just need to import the .dmp file into your database. just look at the IMPORT docs to create your parameter file and command lines.
on the second import, you can specify what tablespace you want the import to go into.
- Magnus
i know of no way to tell the import which tablespace to import into, if this is what the previous poster indended to say.
if i understand your task at hand, you will have to have the default tablespace of the importing-to set to the desired tablespace. set up the user to have no ability to write to system (which no user but sys or system should have). set up the user with quota granted to the new tablespace(s). if you grant resource, be sure to revoke unlimited tablespace from the user. (this may vary in versions other than 8i--check with session privs).
import to the new user. if you want indexes in another tablespace, choose indexes=n on import. then create an index build file with imp indexfile=filename and edit the tablespace clause. then run the script.
there are some threads in this forum explaining this sort of activity in great detail.
Consideration before import:
- Script CATALOG.SQL has been run once on ur new database to prepare the database for the import
- Import user session and the import database use the same character set
- Character set in the export file is the same as the import user session
- Import version is the same or higher than the export version
While for the import command, that would depend on what kind of export performed, you can get the command and parameters details from the Oracle Import documentation.
Hope this help.
Thanks for all the suggestions.
Here is what I ended up doing.
I created a new database using the DB confi asst and stored the results into a bat file and all the corresponding sql scripts.
I then went ahead and executed the bat file to create a d/b.
Then with the following command I imported the full dmp of the d/b.
imp system/password full=y file=fullexp.dmp ignore=y log=fullimp.log
I then created a new user and assigned him a specific def t/s and granted him unlimited quota on it.
with the foll imp command I imported the second dump into this user.
D:\Ora8i3\bin>imp system/manager log=scott.log file=scott.dmp tables=old fromuser=scott touser=nscott
So from all this here is a set of new question that I am still not sure of:
1) In the process of creating a new d/b was it necessary to have run all those sql scripts ?
if not then
2) What is the min number of scripts I should have run that would have created a functioning d/b with just the bare bones - absolute min - just enough for me to import the full dump. May be this question justfies it's own thread.
3) It seems that the pre requisite for a userlevel import is that the receiving schema/user must exist. True or false.
4)However at the full import level it will create all the users, roles, grants etc...However where will it store these user's objects. Should their tablespaces be precreated and how would I know from the dmp what tablespaces were assigned to these users in the d/b where this dmp was generated?
Thanks
Mayse
Forum Rules | http://www.dbasupport.com/forums/showthread.php?11749-Importing-a-full-export-dmp-file-URGENT&p=46540&mode=linear | CC-MAIN-2017-30 | refinedweb | 682 | 74.49 |
Plack::Middleware::Assets - Concatenate and minify JavaScript and CSS files
version 1.0.0
#.
By default files are prepended with
/* filename */\n before being concatenated.
Set this to false to disable these comments.
If set to a string containing a
%s it will be passed to
sprintf with the file name.
separator => "# %s\n"
Files to concatenate.
A coderef that can process/transform the content.
The current content will be passed in as
$_[0] and also available via
$_ for convenience.
This will be called before it is minified (if
minify is enabled).
Value to indicate whether to minify or not. Defaults to
1. This can also be a coderef which works the same as "filter".
Type of the asset. Predefined types include
css and
js. Additional types can be implemented by creating a new class in the
Plack::Middleware::Assets::Type namespace. See the "SYNOPSIS" for an example.
An attempt to guess the correct value is made from the file extensions but this can be set explicitly if you are using non-standard file extensions.
Time in seconds from now (i.e.
time) until the resource expires.
File extension that is appended to the asset's URI.
Moritz Onken
This software is Copyright (c) 2013 by Moritz Onken.
This is free software, licensed under:
The (three-clause) BSD License | http://search.cpan.org/~perler/Plack-Middleware-Assets-1.0.0/lib/Plack/Middleware/Assets.pm | CC-MAIN-2018-17 | refinedweb | 221 | 69.89 |
Question :
I’m trying to parse the result of a HEAD request done using the Python Requests library, but can’t seem to access the response content.
According to the docs, I should be able to access the content from requests.Response.text. This works fine for me on GET requests, but returns None on HEAD requests.
GET request (works)
import requests response = requests.get(url) content = response.text
content =
<html>...</html>
HEAD request (no content)
import requests response = requests.head(url) content = response.text
content =
None
EDIT
OK I’ve quickly realized form the answers that the HEAD request is not supposed to return content- only headers. But does that mean that, to access things found IN the
<head> tag of a page, like
<link> and
<meta> tags, that one must GET the whole document?
Answer #1:
By definition, the responses to HEAD requests do not contain a message-body.
Send a GET request if you want to, well, get a response body. Send a HEAD request iff you are only interested in the response status code and headers.
HTTP transfers arbitrary content; the HTTP term header is completely unrelated to an HTML
<head>. However, HTTP can be advised to download only a part of the document. If you know the length of the HTML
<head> code (or an upper boundary therefor), you can include an HTTP Range header in your request that advises the remote server to only return a certain number of bytes. If the remote server supports HTTP ranges, it will then serve the reduced answer.
Answer #2:
A HEAD doesn’t have any content! Try
response.headers – that’s probably where the action is. An HTTP HEAD request doesn’t get the
<head> element of the HTML response you would get from a GET request. I think that’s your mistake.
Answer #3:
HEAD responses have no body. They only return HTTP headers, the same you would get using a GET request. | https://discuss.dizzycoding.com/getting-head-content-with-python-requests/ | CC-MAIN-2022-33 | refinedweb | 327 | 66.33 |
Recently I was working on a project in which Java-XML binding was to be used. A J2EE web application had to be built based on user access data. This web application serves as the single point of entrance of an intranet portal to 20-25 different Oracle webforms applications served from 3 different application servers and connecting to five different databases, depending on the database access privileges of the user. This portal seems a rather akward solution, but from the users point of view there is only one web page from which to choose the applications. Connecting to the right application server or database is kept transparent from the user.
The access privileges data could not be stored inside a database because some users may connect only to some of all databases and there is no minimum common denominator database. Further, if that single database holding the user access tables would be down while the other databases are up and running, users would be unable to work on the running databases because the access privileges were not available. A backup database holding the access tables or deploy a small (open source) (in memory) database on the application server? To akward, no experience, who would administer it? We did’t go there.
A viable solution would be to store the access privileges into a file (flat text file, properties file or XML file) and store the file on the application server that serves the web application. Thus we would simply circumvent the problem of backing up databases. Further, because the access privileges data is nested: one user can access more than one database, the access file hold more than one user, an XML file favours the flat file and properties file. The application systems that the user may access is stored inside the database. So, it is perfectly possible that user ‘X’ can access application A, B and C on the production database, and only to application C and D on the test database.
To summarise the process-flow: a user connects to the portal web application where an earlier set cookie will reveil his identity together with the last connected database to the web application, His/her identity will be compared/checked to the access privileges stored in the XML file, after a positive authorisation a connection is made to the database instance and a list of applications accessable to the user is returned into a web page. Finally the user selects the application system to work in. If the user wants to switch to another database, he/she can do so using a login page on the portal site where after the proces of retrieving the authorized applications for that user on the new database repeats.
Java-centric or XML-centric?
This brings me to the main part of this blog, the Java-XML binding. The building of the web application is beyond the scope of this blog. If you are interested only in the results and conclusion, jump to Table 1.
Before you start picking the same good old binder you used in your previous project from the shelf, you should ask yourself the following question: Is the application I am about to build Java-centric or is it XML-centric? Having read a fair amount of documentation on several Java-XML-binders (the JiXB docs are most clear on this subject) this seems to be the key in making a consice disission on what binders not to use. The application being build here is an example of an XML-centric application. This application is to be build to handle the contents of the (persistent) user access data in the XML document, not the other way around. An example of an Java-centric application would be a Java-application that already generates output to documents, reports or logging-output serialized as flat files, html pages, paper, etc. Exending such an application to generate also XML output would require a Java-centric approach, because you do not want to rebuild/change your classes to generate the XML, rather the XML output is steered/controled by the existing classes.
I will not elaborate on the theory behind XML-Java binding. Sun has provided excellent documentation explaining all in’s and out’s of XML to Java binding. In short, the XML-centric approach lets you use an XML Schema Definition to map elements and attributes inside a XML instance document to Java objects. If you like you could also create these java classes from scratch yourself, but I think that generally would take longer than create an XSD and run a source code generator on it. Having done that you can read as many XML documents as you want and translate (unmarshal) them to Java instances. Also you can serialize (i.e. write to file) Java instances to XML documents (marshalling). Most Java-centric approaches I have come across do not support, or have only partial support for XSD mapping. Instead, mapping Java to XML and vice versa is established via a proprietary mapping XML file. Examples of this approach are Castor and JiXB.
Requirements
After having established the fact that my application is XML-centric, all Java-centric binders out there can be ignored. First, we will be binding the elements inside the XML document to Java objects. Second, the application must be able to query the content (select database(s) privileged where user = ‘X’) inside the XML document. Finally, the application must be able to administer the XML document, that is, changes must be written to the XML file, Simultaneous write-access of the file is not expected (low administration action) because there is one one administrator and the list of users and databases is fairly static. Thus, file locking and concurency is not likely to occur.
Comparing the binders
There are several implementations and open source projects that provide in binding the contents in an XML file to Java objects. I had no real experience in a specific implementation. Because it would be too much to try them all, I picked the tree best known binders, i.e. with largest user base: Sun’s JAXB, Apache’s XMLBeans and Castor by Exolab. The user base is measured by performing a Google-search on the binder implementation and counting the total number of hits returned (divided by 1000: hence, kilo-hits). Towards the end of the test I discovered that Oracle’s XDK10g has also implemented binding. They implement JAXB as binder in combination with their xmlparserv2. This binder is not included in the test. An article describing binding using the XDK is found here.
Tests are performed using JDeveloper 9.0.5 (build 1618) as IDE with JVM 1.4.2_05 (Sun) on SuSE 9.1 Linux. During the test I found out that JDeveloper 9.0.4 (shipped with Oracle Developer Suite 10g) with JVM 1.4.2_03 on WindowsXP gave errors (NullPointerException) while starting the JVM. I tested the ease of generating source code from an XML Schema Definition file (Figure 2 or 3 for testing support of namespaces) and I tested the ease of invoking the generated classes/interfaces into own code, that is, reading (query) an XML document (Figure 1); appending new gebruikers and databases to the XML document and writing the result to an XML file. Use of namespaces in de schema definition file is conveniant because it will allow the same element names as Java classes to be used. For instance element
gebruiker will map to Gebruiker. If namespaces can not be used, an alternative class name must be chosen: element gebruiker vs. GebruikerType.
Table 1 summarises the binders I have compared. I have added some good and less good features and my impression (1=low, 5=high). Table 2 summarises my remarks. In my oppinion, XMLBeans is favourite because of its rich and easy to understand API and the fact that I got it working immediately, without having to edit configuration files. JAXB is my least favorite because of its vast size (5.3Mb of jar files) and the amount of generated classes which has a bad impact on the performance. I think I would prefer Castor whenever I have to serialize existing Java instances into XML.
Table 1: Binder implementations compared
Table 2: Remarks
Figure 1: user access for 3 users, file toegang.xml
<?xml version='1.0' encoding='UTF-8'?><br /><toegang xmlns=""><br /> <gebruiker><br /> <naam>scott</naam><br /> <database><br /> <dbnaam>ontw1</dbnaam><br /> <dbnaam>proda</dbnaam><br /> </database><br /> </gebruiker><br /> <gebruiker><br /> <naam>jones</naam><br /> <database><br /> <dbnaam>ontw1</dbnaam><br /> <dbnaam>test1</dbnaam><br /> <dbnaam>accep</dbnaam><br /> </database><br /> </gebruiker><br /> <gebruiker><br /> <naam>koyak</naam><br /> <database><br /> <dbnaam>ontw1</dbnaam><br /> <dbnaam>test1</dbnaam><br /> </database><br /> </gebruiker><br /></toegang>
The namespace is added because in the XSD (figures 2 and 3) the elementFormDefault is set to qualified.
Figure 2: XML Schema defining binding for toegang.xml,>
This Schema will generate the following classes/interfaces:
Toegang, Gebruiker, Database and a Document level class/interface.
Figure 3: XML Schema defining binding for toegang.xml,><br />
This Schema will generate the following classes/interfaces:
ToegangType, GebruikerType, DatabaseType and a Document-level
class/interface.
Hi, is it possible to dynamically java classes from an XSD file using XMLBeans rather than using SCOMP? Thanks
Apparrently to day is security day (many security discussions today), and now you post is popping up in the “a lot of readings today” list. So i can’t ignore this sign
Question: didn’t you introduce a security problem by storing the username/password/database xml file on the webserver, which most of the time is in the DMZ…?
The following links point to some very interesting articles about XML-binding and comparing different binder frame-works.
Data binding, Part 1: Code generation approaches — JAXB and more
Data binding, Part 2: Performance
Hea man, your Date is off. Anyway it’s April 04,2005 so I have no idea how number 8 is dated 08/1/2005. It’s nice to know some people
are going in the right direction. Clearly Document/Literal not wrapped is the way to go. To bad most developers and architects have no
idea what the hell they are REALLY doing when they creat RPCencoded WS and find themselves maintaing disparate XSD’s instead of disparate OS’s.
Dear commenters,
Based on your comments I’ve added some text to my post. The work from Kirill is a good one. He has compared more binding frameworks. You will see in his results that the centricity makes a difference: a more XML-centric framework seems slower and consumes more memory than a Java-centric framework.
You are welcome to see a more complete coverage of the current frameworks (including JiBX, Javolution, XStream and Zeus) at
You should really really take a look at JiBX. We used it on a project last year and the performance blew everything else we tried away. It’s also not particularly difficult to learn.
If I had anything at all negative to say about it it would be that you are better off if you can do some tailoring of the XML format to suit what JiBX parses easily. Some XML we encountered did not fit smoothly to its model. But that was fairly strange XML too.
For easy parsing of arbitrary XML nothing beat Digester. But we tried to pair it with Betwixt to go back the other way (i.e. Java to XML) and we were sorely disappointed in Betwixt.
We also tried Castor but were unimpressed either in the ease of use, flexibility, or performance areas.
Hi,
have you looked at XStream?
Cheers,
Alex.
Hi Harm
as far as I understand, Toplink allows you to Map any Java Class to an XML document, therefore it does not dictate the “java model” , which in my opinion is very nice!
Hi Leon,
The Toplink binder uses JAXB as does Oracle’s XDK. I would not be too suprized if they use the same base classes. Because JAXB is used I wonder if the vast amount of classes (seen in the screenshot of JAXB in table 1), is also generated by the Oracle binders. In that case both Oracle binders are, in my opinion, not the most optimal binders, but only an extra test can sort that out.
Great piece Harm, well done!
Very useful indeed.
By the way, did you also happen to get a look at the easy to use Commons Digester? Or is that outdated already? Oh well, it probably is too limited for what you tried to do here.
Cheers, Jasper
Very good summary!
Allthough it is only available in a developers preview you might also want to check out Toplinks Object to XML mapping support,
see this earlier post | http://technology.amis.nl/2005/01/05/java-xml-binders-compared/ | CC-MAIN-2014-15 | refinedweb | 2,146 | 53 |
Object-Oriented is a programming paradigm that follows the concept of classes and objects in place of functions and logic. It is also known as the fancy way of coding that organizes the code in a way that increases the code readability and maintainability. OOP concept is an important topic in programming and helps to build reusable modules for a variety of tasks in Data Science.
This is often a pre-requisite while building Deep learning models using various libraries such as Pytorch where the base model is reused to add custom layers. Let’s explore what this concept teaches and how to apply this in practical use cases.
What is the OOP concept?
Consider a smartphone that can be of any brand, but they’re a variety of common things among all of them. All have screens, speakers, buttons and on the software level, almost all of them are android powered. Now consider a case where every company is making their software from scratch, even the kernel which controls most of the hardware components.
This would become a tedious and expensive process, therefore, increasing the price of the devices. What if there is an abstract or generalized model that can be changed over time by any manufacturer according to their requirements? This concept tries to capture this class-based method where the code is structured in classes with different accessor methods.
What are Classes and Objects?
Classes are the blueprints of what has to be implemented. If we consider our previous example, we can have functionalities to call a person, receive calls, messages, play music, or do some other stuff.
All these things are common for every smartphone, their internal working is also similar and they can be considered as a class of smartphone functions or a class. Objects can be defined as all the smartphone brands that will use this common implementation in their products with modifications.
There can be multiple instances of this base class, and every instance can hold a different state of values without interfering with other objects. In Python, a class can be declared by using the reserved keyword class. Further, __init__ constructor is used to initialize the class variables.
class Company:
def __init__ (self):
self.name = ‘upGrad’
def display_name (self):
print(f”Company name is: {self.name}”)
cm = Company()
cm.display_name()
Also read: Python Developer Salary in India
Different Pillars of OOP
Now that we are familiar with the basic building blocks of this paradigm, let’s look at some of the most important features/characteristics of this concept:
Encapsulation
This states that methods (or functions) of the class and the data associated with it are encapsulated or protected from accidental or external access. This means that attributes that are defined in private or protected scope are not accessible outside the class.
There is a concern for Python that there is no concept of private variables in this language, so the attributes are accessible outside the class.
There is a way to recognize private attributes by using a double underscore at the beginning of the declaration and if you try to access this outside the class via the object of the same, you will be prompted with AttributeError because Python applies name mangling whenever it detects a private variable. This doesn’t give any security to your attributes because they are still accessible.
Inheritance
As the word suggests, it is taking a portion of an existing class called a parent class to a new class called a child class with little or no changes. We can connect this to our example in this way that all smartphone brands inherit a generic phone class that will help them perform basic functions, plus they can add their extra codes to enhance the user experience according to their needs. In Python, inheriting a class is done by:
class A:
some content
class B(A):
content of the derived class
There is another concept related to inheritance called function overriding. Suppose the camera function of the generic smartphone is not so good, and the manufacturer has a better solution for this. They can directly override this function by defining it again in the child class and apply the changes over there.
Abstraction
It defines the blueprint or an interface to the subclasses implementations. It means some methods are defined in the base class which is not fully implemented and only an abstract view is defined. It can help in tracking the various features of the module and sub-modules to be created.
For instance, some smartphones support NFC (near field connectivity) and this functionality can be defined in the base class and its implementation can be coded in the child class of the resultant phone. In this way, the abstract base class can provide the overall view of the module and subsequent implementations. Here is an example:
class Phone:
def camera(self):
pass
def NFC(self):
pass
class Xyz(Phone):
def NFC(self):
return True
Polymorphism
If we go by the root meaning, it means multiple forms of the same thing. Polymorphism defines the functions based on the number or types of arguments passed. For instance, the length function in Python can take any type of iterable or object and returns the integer length.
This can also be quoted as function overloading but here is a catch in the Python language. We cannot define the same name functions with different arguments and if done, then it considers only the last entry.
Practical Use Cases of OOP
We have seen what this concept is all about and what features it offers. Have a look at some examples where you can apply this concept:
Jinja Templating: If you have some experience with Python’s Flask framework which handles the routes and the server-side, this templating helps in handling this data on the front-end. Generally, a base HTML file is created which is then inherited by all the pages to have the same layout throughout the website.
Kivy Applications: This is a library that allows you to build cross-platform (android and IOS) GUI-based python applications and here most of the programming is based on the OOP concept.
ORM: Object-relational Mappers offers a way to define the relational databases in application code using any language. For instance, in Django, you can define different types of models using classes for different types of users.
Conclusion
In this article, we discussed what is OOP concept, it’s building blocks (classes and objects), different pillars, and highlighted some examples where this paradigm is adopted. There are numerous places where this method of programming is considered due to better code management, collaboration, and providing abstract functionalities to other programs dependent on this.. | https://www.upgrad.com/blog/oops-in-python/ | CC-MAIN-2021-04 | refinedweb | 1,122 | 58.11 |
- )
Great effort is made by you to get the snap shots of each page from godaddy.com. A very helpfull information.
Wow what a great info. I will keep coming to this site. TQ
thank you
this was amazingly helpful…i have been looking for help for days and i couldn't find any clear way to do this. thank you so much for understanding that not everyone speaks web-talk! you say that after these steps are done, you can play around with themes. but HOW?
Great question. Going to write another post on this topic soon. Stay tuned
and thanks for the note…
Great info, just walked through it all and got it done no prob! Thanks so much.
Now, i've got an egsisting blog on wordpres how to I import that into godaddy without losing any content, etc. and not affecting my google rankings/traffic?
Lastly, I need to install a custom theme.
Thanks in advance!
MIGRATING From WordPress.com = > Other Hosting with wordpress.org software
1) In your wordpress.com account, go to your Admin => Export and export your
blog. It will give you a file to save and make sure you keep track where you
put it!
2) In your new host wordpress blog go to your Admin => Import and chose to
import the “WordPress” blog. Point the import process to your file from Step
1 and import! Voila!
3) As for files and images, don't delete your wordpress.com blog and they
will still be accessible without having to change anything!
Taken from Trent <> @ WordPress.com
forum<>
This will affect your google rankings and traffic since your site, although
the same, is hosted at a new location. Google will need to re-crawl your
site and index it.
You can also download custom themes from within the admin panel.
Just what I was hunting for.. THANKS!!!
I registered the Domain name in the site i got the Free Blog like WordPress
When it comes to blog hosting, I am not sure i would choose GoDaddy. They are fun… but i don't think they are as efficient as blogspot. I admit i never tried their hosting, but i have many friends complaining about their speed, options etc.
I finally decided on the domain name and now I really need to learn how to build my own site. Thanks to your tutorial I think that WordPress is a good idea. I must check and see if GoDaddy has the domain I want. Thanks again!
I finally decided on the domain name and now I really need to learn how to build my own site. Thanks to your tutorial I think that WordPress is a good idea. I must check and see if GoDaddy has the domain I want. Thanks again!
I've been digging around for info on this topic. These were the simplest instructions. Thank you so much!
Image via CrunchBase Lately, people have been asking me about websites and internet businesses in general.
Thank you for this step by step tips on how to create a website using godaddy hosting.
I really need to learn how to build my own site. Thanks to your tutorial I think that WordPress is a good idea. I must check and see if GoDaddy has the domain I want. Thanks again!
Thank you for sharing this step by step guide. This is really useful.
WordPress really fits for GoDaddy 🙂 I can say that GoDaddy is next to Hostgator in terms of service and support because they are always there also to answer your issues about the system that a user avail. This step by step guide is really useful and important especially on those who want to have a website on their own.
Sonia Trevor
Marketing Consultant of Naples Web Hosting Services
Wow! Simply amazing step by step guide I appreciate it sharing this to us.
I really appreciate your step by step guide.
I have my own website. In the “fishing” section I want to be able to have users comment and share info on the different articles that will be written(many different topics). I don’t know if disqus is what I need to use or wordpress. I have disqus now, but I can’t figure out how customize it to only bring comments up about certain topics. I am so new to this, any help would tickle me silly. checktheplace.com
thanks, Chubby
I’m confused about the difference between installing into the root directory or a subfolder. If my website is going to be an online store with links to my ebay store, wanting my domain name to rank high in SEO, which is the best way to install? | http://danreich.com/build-a-custom-website-with-wordpress-and-godaddy/?replytocom=430 | CC-MAIN-2021-10 | refinedweb | 789 | 83.66 |
30 May 2012 07:48 [Source: ICIS news]
SINGAPORE (ICIS)--Vietnamese ethanol producer Tung Lam is planning to switch to produce the anhydrous grade at its 60,000 tonne/year unit in Dong Nai province sometime next month, a company source said on Wednesday.
The producer is currently making hydrous, or B-grade, ethanol and is running its plant at around 70-80% capacity, according to the source.
“We are running our operations at below 100% capacity because of a shortage of feedstock cassava in ?xml:namespace>
Tung Lam has around 3,000-4,000 tonnes of hydrous material in its inventory, | http://www.icis.com/Articles/2012/05/30/9565226/vietnams-tung-lam-to-switch-to-anhydrous-ethanol-in-june.html | CC-MAIN-2014-35 | refinedweb | 102 | 56.59 |
Hi I'm making a program which takes arguments at command line for a specific website and filename and then saves the html code for you.
I have that working fine but I'd like to strip the HTML tags as well so it only saves the text of a webpage, I understand that won't work perfectly but I can't get it to work at all!
Need to put in something like this but I'm unsure where
Code:if (c == '<' || c == '>') { in_tag = (c == '<') ? 1 : 0;
Here's my full program
Code:#include <curl/curl.h>#include <stdio.h> size_t write_data(void *ptr, size_t size, size_t nmeb, void *stream) { return fwrite(ptr, size, nmeb, stream); } int main(int argc, char *argv[]) { //checks there is the required amount of arguments if (argc == 3) { char *getcwd(char *buf, size_t size); char cwd[1024]; int confirm; printf("Saving website \"%s\".\n", argv[1]); printf("To file %s\n\n", argv[2]); //request save file confirmation from user printf("Are these details correct? (1 = Yes, 0 = No)\n\n"); scanf("%d", &confirm); if (confirm == 1) { //tells the user where the file has been saved if (getcwd(cwd, sizeof (cwd)) != NULL) fprintf(stdout, "Document saved in: \"%s\"\n\n", cwd); //opens file for writing (doesn't need to exist) FILE * file = (FILE *) fopen(argv[2], "w+"); if (!file) { perror("File Open:"); exit(0); } CURL *handle = curl_easy_init(); //collecting the html from command line specified argument curl_easy_setopt(handle, CURLOPT_URL, argv[1]); curl_easy_setopt(handle, CURLOPT_WRITEFUNCTION, write_data); curl_easy_setopt(handle, CURLOPT_WRITEDATA, file); curl_easy_perform(handle); curl_easy_cleanup(handle); }//user chooses not to save else if (confirm == 0) { printf("File not saved\n"); return 0; }//invalid input by user else { printf("Incorrect input\n"); return 0; } } else { //showing correct usage of command line argument printf("Correct usage:\n\n \"./gethtml filename.txt\"\n\n"); return (0); } }
That doesn't include an attempt at stripping the HTML as I've been trying all day and I'm clueless right now
Any help much appreciatedAny help much appreciated | http://cboard.cprogramming.com/c-programming/146588-strip-html-code-save-file.html | CC-MAIN-2014-35 | refinedweb | 335 | 51.62 |
Note that the LED has 3 connector points:
1. GND – which will be connected to the ground pin on the Arduino. Remember to share grounds in case of using external power supply.
2. VCC – power supply pin, in our case we will be using the 5V from the Arduino
NOTE: the power consumption of this type of LED are about 50 milliamp when in full brightness on all colors, so if using more than 4 LED you might want to consider an external power supply not to exhaust the Arduino power regulator (limited at 200ma on uno for example).
3. DI – data in, this connector will be plugged into one of the Arduino digital pins, in our case pin 3.
In the LED strips there are direction for connection. You will notice either DI and DO, which is DATA IN and DATA OUT. The DI will be connected to the Arduino and the DO will be connected to the DI of the next LED in line.
After connecting the LED to the Arduino we will need to install the library. In order to do it, open the Arduino IDE, click on “Sketch” in the menu, then from the “Include library” sub menu, choose the “Manage libraries…”. In the search box type “fastled” there will be only one result, click on it and click on the “install” button. And we are good to go. Let’s turn on the light.
Let’s first test that we got everything in place by running the library blink example, go to “File” – “Examples” and then scroll till you see the “FastLED” sub menu and choose “blink” out of the list.
CODE:
#include "FastLED.h" // How many leds in your strip? #define NUM_LEDS 8 // For led chips like Neopixels, which have a data line, ground, and power, you just // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN #define DATA_PIN 3 #define CLOCK_PIN 13 // Define the array of leds CRGB leds[NUM_LEDS]; void setup() { // Uncomment/edit one of the following lines for your leds arrangement. // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS); FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); // FastLED.addLeds<APA104, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS); // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS); // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS); // FastLED.addLeds<P9813, RGB>(leds, NUM_LEDS); // FastLED.addLeds<APA102, RGB>(leds, NUM_LEDS); // FastLED.addLeds<DOTSTAR, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); //() { // Turn the LED on, then pause leds[0] = CRGB::Red; FastLED.show(); delay(500); // Now turn the LED off, then pause leds[0] = CRGB::Black; FastLED.show(); delay(500); }
EXPLANATION:
1. With this line we include the library to this sketch #include “FastLED.h”
2. This line defines the number of LED that are connected, in this sketch will only be using one LED, so you can just leave it as is. #define NUM_LEDS 1
3. The following 2 lines define the data and clock pins. In our case we only need to set the data pin, since the type of IC in the neopixel family do not have clock pin.
#define DATA_PIN 3 & //#define CLOCK_PIN 13
4. Now we create the led object array. So we can refer to it in the rest of the code. CRGB leds[NUM_LEDS];
5. In the setup section you will find a lot of commented out lines with the same format, just different Type of IC, we will be using the uncommented one – the NEOPIXEL. FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
6. Within the loop we do 2 operation on the led[0] which is the FIRST led in the array of LED(s) in case we have more than one connected we first set its color to “Red”
leds[0] = CRGB::Red;
7. Then we set the actual led output by calling the show() command. The reason for this 2 commands method is to allow us to make changes in more than one LED before we actually apply thus changed to the strip itself – FastLED.show();
8. After delaying for 500 milliseconds we do the same thing just this time with the color Black, which in return turn the led off. leds[0] = CRGB::Black; & FastLED.show();
9. Then we delay for another 500 milliseconds and the loop gets repeated, and we got a led that is blinking in red.
10. The list of available colors by name can be found at the top of this page.
Now this was all fun and games, but we are now juts blinking one LED this is not we are here today. Now let’s control the entire strip of LED. For this example, I connected a strip of 8 LED. The following code will change the color of each led to a random color and set it to the strip every 50 milliseconds.
CODE:
// include library #include<FastLED.h> //define number of LED and pin #define NUM_LEDS 8 #define DATA_PIN 3 // create the ld object array CRGB leds[NUM_LEDS]; // define 3 byte for the random color byte r, g, b; void setup() { // init the LED object FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); // set random seed randomSeed(analogRead(0)); } void loop() { // loop over the NUM_LEDS for (int cur = 0; cur < NUM_LEDS; cur++) { // chose random value for the r/g/b r = random(0, 255); g = random(0, 255); b = random(0, 255); //set the value to the led leds[cur] = CRGB (r, g, b); } // set the colors set into the phisical LED FastLED.show(); // delay 50 millis FastLED.delay(50); }
EXPLANATION:
Same as in the previous example, we include the library, set the number of LED(s) and the pin the LED(s) are connected to and initiate it in the setup. But this time we create random color, we loop over the amount of LED using the NUM_LEDS variable with in the loop. We then set random number between 0 to 255, and then using the CRGB command we set it to the led with in the array.
1. for (int cur = 0; cur < NUM_LEDS; cur++) {
// chose random value for the r/g/b
r = random(0, 255);
g = random(0, 255);
b = random(0, 255);
2. //set the value to the led – leds[cur] = CRGB (r, g, b);}
3. And the we apply it to the LED(s) by calling the show() command FastLED.show();
4. The FastLED library comes with a DELAY function as well, it’s not needed with Uno since the arduino has its own built-in function, but in case you are using a system with no delay function, this can be handy feature to have FastLED. delay(50);
5. Now this give you a nice overview of the use of addressable LED, now all you need is to think what you want to do with it?
6. This library has many very cool build-in functions for creating movement, calculating value of RGB, HUE and so on. If you want to explore it here are 2 great links :
Please note that there is a limitation to the library and its memory, since all the data has to be buffered in memory of the board, you are limited on the amount of LED you can control. For example, with the Uno, and it depends on the rest of your sketch memory use, you can run up to about 500 LED.
WATCH VIDEO DEMO BELOW:
Hope this tutorial helped you get started on RGB LED strip and I believe you will have fun playing with these. Happy making 🙂
- DIY bubble machine using Arduino - June 28, 2018
- Make any surface touch sensitive with MPR121 and Arduino - June 6, 2018
- Programming addressable RGB LED strip with Arduino - May 29, 2018 | http://www.gadgetronicx.com/addressable-rgb-led-strip-arduino/ | CC-MAIN-2018-34 | refinedweb | 1,378 | 72.46 |
Find minimum number of deletions to make a string palindrome
Reading time: 25 minutes | Coding time: 10 minutes
If we are given a string say S, we have to find out the minimum number of characters to be deleted to make the string a palindrome. A palindrome is a string which is the same if traverse from both from left to right and right to left.
This can be done in O(N2) time with the help of Dynamic Programming approach of Longest Palindromic Subsequence.
Some examples of palindrome are: madam, refer, Malayalam etc.
Example Strings
Input : ABBABBD Output: 2
Beacause if the first A and last D are removed then the resulting string will be BBABB which is a palindrome.
Input : NITIN Output: 0
Beacuse it's already a palindrome no need to delete any no.of charcters further.
Algorithm Explanation
There are mutiple ways to do this task but the optimzed way would be by finding the longest palindrome subsequence that can be formed from the give string and subtracting it from the the original will give us the no of characters to be deleted to make the string a palindrome.
The longest palindrome subsequence can be found using a Dynamic Programming approach in O(N2) time. You should go through this article at OpenGenus to understand the approach. This is fundamental.
- First, we read the string from the user.
- Second, we find the longest palindrome that can be formed for the string and iterate through all the substrings possible with the given string and chech if they form a palindrome or not and then find the maximum length possible with it.
- Strings of lenght one are already a plaindrome, and some given strings are as whole a plaindrome already in such cases the output will be zero.
- Third, subtract this longest possible palindrome's length from the original string length which is our required output.
Time Complexity of this Algorithm is : O(n2)
Example
Consider the String
OPENGENUS
Next steps,
- First we find the length of the given string, so in this case it's nine(9)
- Now we find the length of longest palindromic sequence possible with the string
- So, now we iterate through the characters of the string with comparing the characters in the beginning of the string with the characters starting from the end of the string. By taking two loops we start comapring the first and last set of charcaters. The outer loop starting from the beginning and the inner loop from the end.
- So for "OPENGENUS" we will get a length of three(3) as the maximum length possible palindromes will be ENE, NGN, NEN, EGE.
- Now subtract this from the total length of the string.(9-3=6) will be the minimum no.of characters to be deleted to form a palindrome.
Code in Python
Following is the implementation of the above approach in Python:
# Gives the length of the longest palindromic subsequence in string 'str' def lps(str): n = len(str) # Create a table to store results of subproblems L = [[0 for x in range(n)]for y in range(n)] # Strings of length 1 are palindrome of length 1 for i in range(n): L[i][i] = 1 # Build the table. #Note that the lower diagonal values of table are useless #and not filled in the process. #c1 is length of substring for cl in range( 2, n+1): for i in range(n - cl + 1): j = i + cl - 1 if (str[i] == str[j] and cl == 2): L[i][j] = 2 elif (str[i] == str[j]): L[i][j] = L[i + 1][j - 1] + 2 else: L[i][j] = max(L[i][j - 1],L[i + 1][j]) # length of longest palindromic subsequence is found return L[0][n - 1] # function to calculate minimum number of deletions def minimumNumberOfDeletions( str): n = len(str) # Find longest palindromic subsequence l = lps(str) # Subtract it from the original length of the string return (n - l) if __name__ == "__main__": str=input("Enter the String: ") print( "Minimum number of deletions required = " , minimumNumberOfDeletions(str))
Input
Enter the String: OPENGENUS Minimum number of deletions = 6
Thoughts
Though the computation with palindromes may not seem usefulo but in real life, they could be used for some compression algorithms and other cases with repetitive data.
Palindromes are also used in DNA for marking and permitting cutting. They are used to change one dimensional chain into 2 or 3 dimensional structure,there are studies about biological sequence compression algorithms, that use this property.
Code in C++
Following is the implementation in C++:
#include <bits/stdc++.h> //includes all required header files using namespace std; // Returns the length of the longest palindromic subsequence in 'str' int lps(string str) { int n = str.size(); // Create a table to store results of subproblems int L[n][n]; // Strings of length 1 are palindrome of length 1 for (int i = 0; i < n; i++) L[i][i] = 0; for (int cl=2; cl<=n; cl++) { for (int i=0; i<n-cl+1; i++) { int j = i+cl-1; if (str[i] == str[j]) L[i][j] = L[i+1][j-1]; else L[i][j] = min(L[i][j-1], L[i+1][j]) + 1; } } // length of longest palindrome return L[0][n-1]; } // function to calculate least number of deletions int minimumNumberOfDeletions(string str) { int n = str.size(); // Find longest palindromic subsequence int len = lps(str); return len; } int main() { string str = "opengenus"; cout << "\nMinimum number of deletions required = " << minimumNumberOfDeletions(str); return 0; }
References
With this, you have the complete idea of this problem. Enjoy. | https://iq.opengenus.org/minimum-deletions-to-make-string-palindrome/ | CC-MAIN-2020-24 | refinedweb | 935 | 60.69 |
function_trace 1.0
Hierarchical trace of function/method call arguments and return values
Function_trace is a simple debugging library, inspired by similar libs in Common Lisp and Clojure. It captures function call arguments and return values, and prints them in a nested fashion so you can easily see which function is being called by which other function, what arguments it was called with, and what its return value was.
Usage
Trace blocks of code with the trace_on context manager. It accepts one positional argument, a list of modules and classes to be traced. When a class is traced, that includes all the methods defined in that class, but not inherited methods. When a module is traced, that includes all the functions in that module, but does not include any class methods defined in that module (you must specify the class separately).
By default, the trace output is printed to stdout. You can modify this behavior by replacing function_trace.tracer with a function that does whatever you like with the trace. The tracer function should have the signature (f, *args, **kwargs) which is the function to trace, and the arguments to call the function with. It should call the function with the args at some point. Note it is preferable to catch any exceptions thrown by f, log them and re-raise the exception.
Options
- include_hidden if set to True, also trace functions whose name starts with _. Note, the __repr__ function will never be traced.
-.
Examples
from function_trace import trace_on with trace_on([Class1, module1, Class2, module2], include_hidden=True, depths={module1.check_thing: 1, module2.unimportant_thing: 0 Class1.silly_thing: 0}): module1.function1("arg1", "arg2", option=True) x = new Class1() x.method1(arg1, arg2)
Output
- module1.function1("arg1", "arg2", option=True) | - module1.function2("arg2") | | - module1.check_thing() | | -> True | -> "myresult" -> "myresult" - Class1.x(<Class1 object at 0xdeadbeef>, "arg1val", "arg2val") | - module2.function1("arg2val") | -> "foo" | - Class2.y(<Class2 object at 0xabcd0001>, "arg1val") | -> BadInputException("You can't call y with 'arg1val'!") -> BadInputException("You can't call y with 'arg1val'!")
- Methods will show the first argument self. By default, arguments and return values are printed using repr, so if you want to see something more informative than <Class1 object at 0xdeadbeef>, you can define __repr__ on Class1 to print whatever you like (probably the values of various fields of that object).
- By default, exceptions that are raised by a function are printed as its return value. This makes it possible to see an exception propagating down the stack. It is currently not possible to distinguish between a function call that returns an exception object, and one that raises that exception object (but functions that intentionally return Exceptions are rare anyway).
- Author: Jeff Weiss
- Keywords: trace debugging
- License: PSF
- Package Index Owner: weissjeffm
- DOAP record: function_trace-1.0.xml | https://pypi.python.org/pypi/function_trace/1.0 | CC-MAIN-2016-44 | refinedweb | 459 | 57.98 |
Creating Your First Gem
You see gems everywhere in the Ruby world. They are the backbone of just about every Ruby app out there. I’ll admit that I was a bit intimidated the first time I tried to create a gem, but I soon found out that it’s dead simple. In this blog series I will start by covering the basics of creating a gem from scratch, and then move on to more advanced topics including gem generation tools and Rails Engines. First things first, for all you Ruby newbies out there: What is a gem? Simply put, it is packaged Ruby code. At the bare minimum, a gem includes a Ruby file and a gemspec. The gemspec (gem specification) describes the gem and is used by the RubyGems package manager to install the gem.
RubyGems
The RubyGems package manager can download and install gems to your system and allows you to use the gems in other Ruby programs. Ruby 1.9 comes with RubyGems installed by default. If you are using a version prior to Ruby 1.9, you can download RubyGems here. To use RubyGems in a pre Ruby 1.9 app, you will need add this line
in your app:
require 'rubygems'
Ruby 1.9 does not need this line, since RubyGems is included in the language.
Gem Specification
As I mentioned before, the gem specification describes the gem. Let’s take a look at a basic gemspec file:
Gem::Specification.new do |s| s.name = %q{my_gem} s.version = "0.0.1" s.date = %q{2011-09-29} s.summary = %q{my_gem is an awesome gem} s.files = [ "Gemfile", "Rakefile", "VERSION", "lib/my_gem.rb" ] s.require_paths = ["lib"] end
The gemspec is a fairly simple file that describes various aspects of your gem. I am only listing the required attributes and the files in the example gemspec above. The first 4 attributes are self-explanatory. The “files” attribute lists all of the files that are included in the gem. The “require_paths” attribute specifies the directory that contains the Ruby files that should be loaded with the gem. For a complete list of the attributes that can be used in the gemspec, go here.
That is about as academic as I can get without falling asleep, so let’s cut to the chase and get to the good stuff.
Creating a Gem From Scratch
1. Create the basic file structure of the gem:
Fire up your shell and create the directories that will be needed in your gem:
$ mkdir awesome_gem $ cd awesome_gem $ mkdir lib
That’s it! You need a root directory for your gem and a lib directory to hold your Ruby file.
2. Create the gemspec
We will use the template from the previous section for our gemspec file. Create a file named “awesome_gem.gemspec” in your gem’s root directory. Then add some code to make a valid gemspec:
Gem::Specification.new do |s| s.name = %q{awesome_gem} s.version = "0.0.0" s.date = %q{2011-09-29} s.summary = %q{awesome_gem is the best} s.files = [ "lib/awesome_gem.rb" ] s.require_paths = ["lib"] end
This file contains the standard required attributes for a gemspec and shows that we have one file inside the “lib” directory. The file “awesome_gem.rb” in the lib directory is the main file that will be used to hold the Ruby code in this gem.
3. Add some code
To keep things simple, we will use only one Ruby file in this gem: /lib/awesome_gem.rb
You will see this type of structure in most gems you come across. The root file inside “lib” will usually match the name of the gem. In this case “awesome_gem” and “/lib/awesome_gem.rb”.
Go ahead and create this file and add the following code to it:
module AwesomeGem class WhoIs def self.awesome? puts "YOU ARE AWESOME!!" end end end
This is not exactly code that will change the world, but at least the “awesome?” method will boost your self-esteem! This gem will allow you to use the class method “awesome?” from WhoIs in other Ruby programs. As I mentioned in the first section, RubyGems will install the gem in your app and give you access to the classes in your gem.
4. Generate the gem file
Now that you have some awesome code, you will want to create a gem so you can use this awesome code in another Ruby program. Rubygems has a command line interface that allows you to create a gem. Fire off this command inside the root directory of your gem:
$ gem build awesome_gem.gemspec
This command will build the gem and output a gem file that will include the version number in the file name. Since the gemspec contains a version attribute with a value of “0.0.0”, the gem file will be named awesome_gem-0.0.0. You should see the following output and some warnings about missing attributes:
Successfully built RubyGem Name: awesome_gem Version: 0.0.0 File: awesome_gem-0.0.0.gem
But you don’t care about warnings, because you are living on the edge and you are “awesome”. So you decide to move on and install this gem on your system. Notice that the gem file was created in your current directory.
5. Install the gem
Now that you have a gem file, you can use RubyGems to install the gem on your computer. Typically you install gems from external sources, but you are not restricted to that. If you have access to the gem file, you can install it locally by specifying the location of the gem file that will be installed. Here is the command to install awesome_gem.gem locally:
$ gem install awesome_gem.gemspec
You should get the following output:
Successfully installed awesome_gem-0.0.0 1 gem installed Installing ri documentation for awesome_gem-0.0.0... Installing RDoc documentation for awesome_gem-0.0.0...
Ah Yeah! You just created a gem! The gem is now installed on your system and ready to be used in another Ruby program.
6. Add The Gem to Another Ruby Program
Create a new Ruby file that will be used to test out our gem. Let’s call it “be_awesome.rb”. You can create this file anywhere on your system and then add the following code so we can use the “awesome?” class method from our gem. You just have to require ‘awesome_gem’ and RubyGems will be able to find the gem and make the class available to your program. Then you just call the class method from your namespaced class. Here is the code:
require 'awesome_gem' AwesomeGem::WhoIs.awesome?
Now you can run the Ruby program and test out your newly created gem and see how awesome you are. Fire it up via the command line:
$ ruby be_awesome.rb
You should see the following output in your shell:
YOUR ARE AWESOME!
Congratulations, you just used your new gem in a program! I don’t think I would put that one on github and brag about it, but hey.. you still learned how to create a gem from scratch and use it in another program. Now you can move on to bigger and better things.
Conclusion
While this tutorial was fairly simple and only covered the basics of creating a gem, I think it is still very important information for those that are new to gem development. The basics will give you a good foundation for more advanced topics. I use Jeweler to create gems and while it is a great productivity tool, I feel that diving into generation tools before you create a gem from scratch can be harmful. You need to understand how to build a gem in the simplest form before you can understand the what is behind the code that a generation tool like Jeweler can give you. While I recommend building a gem from scratch when you are first learning gem development, I see absolutely no reason why you should not use a generator after you understand the basics. Generators are a huge time-saver since they give you a good skeleton to start with. The next blog post in this series will cover more advanced topics related to gem development, as well as a primer to using generation tools to give you a starting point for your gems. Later installments will explain how you develop gems for Ruby on Rails.
Stay tuned….
- Ernest Shulikovski
- geronimo
- Neeti
- Microspino
- Dominik Honnef
- Brooke Kuhlmann
- Tsegas
- Иван Бишевац
- Jack Zelig
- Odair Silva
- Faiz
- Andy R.
- dingzhihu
- Sachin Gevariya
- Suchitra Edussuriya-Essl
- Harikrishna Kanta
- Harikrishna Kanta
- Harikrishna Kanta | http://www.sitepoint.com/creating-your-first-gem/ | CC-MAIN-2015-06 | refinedweb | 1,439 | 74.49 |
This week we had our “Connect();” developer event in New York. We made a ton of announcements. You’ll find a bunch on Soma’s blog, the Visual Studio blog, the Visual Studio ALM blog and in the release notes.
At the highest level, we announced:
- Visual Studio and Team Foundation Server 2013 Update 4 are available. Release notes…
- The first public preview of Visual Studio 2015 and .NET 2015 are available. Release notes…
- The .NET Framework is going open source and cross platform
- A free Visual Studio Community 2013 – a new edition of Visual Studio that combines everything in all the Express products and adds extensibility support. Learn more…
- A bunch of new improvements to Visual Studio Online
I also previewed some features that will be coming to VS Online & TFS in the not too distant future.
We did *not* release a preview of TFS 2015 today – not because we aren’t working on it but rather because we’ve found that shipping these capabilities to VS Online is by far the fastest way to provide you with a preview of what is coming in TFS 2015 and for you to provide us with rapid feedback to impact our development plans. We will release a preview version of TFS 2015 in the coming months.
As usual, I’ll focus here more on the ALM news and let others focus on the broader Visual Studio news. What I’ve written here is, by no means, everything we’ve done – there’s just too much to detail it all. One of our big areas of focus is on improving the DevOps workflow. The first several items below are related.
Release management service preview
We added a release management capability to TFS over a year ago and I’ve been getting increasingly ardent requests for us to bring release management to VS Online as well. I’m happy to say that we have now done just that. As of today, release management is available on VS Online. You just need Visual Studio 2013 Update 4 or later (Premium, Ultimate or Test Professional) for the release management client UI to configure your release pipelines.
The current preview only supports releases targeting Azure environments. In the next few months we’ll add support for releasing to other environments (like on-prem).
Cloud Deployment Projects
To round out a compelling deployment and release management solution, we’ve also added some new features to help you provision infrastructure and deploy your app. The core of this is a new feature in Visual Studio called Cloud Deployment Projects, shipping in the Azure SDK 2.5 (it works with VS 2013 & 2015). Cloud Deployments Projects enable you to describe both the topology and the configuration of your application with an Azure Resource Manager Template and a PowerShell/DSC script. With these, you can reliably and repeatably provision infrastructure for your app and install it. Cloud Deployment Projects help you to organize all of this.
To manage all of the deployments of your application, we’ve added an Environments tab in Team Explorer that tracks all of your deployed environments and allows you to manage them. It also allows you to share environments with your team. This initial preview is focused on Azure but, in the next year, we also plan unify this with our current TFS lab management offering to provide seamless, ALM integrated infrastructure provisioning and application deployment to both public and private clouds.
We’ve also added a really nice wizard in Visual Studio that allows you to create an instant pipeline in the Release Management service for Visual Studio Online based on the same infrastructure and configuration as code artifacts in your Cloud Deployment Projects. This can then be customized with the release management client, such as to specify approval workflows or other orchestration steps.
Application Insights
Of course, if you really want to complete the DevOps loop, you also need a telemetry solution. Application Insights helps you ensure your application is available, performing and succeeding by providing a 360 degree view of your app. Application Insights is hosted in the Azure Preview Portal but will work for applications hosted in the cloud or on premises. There’s no particularly massive change this week in what’s available in Application Insights – it just keeps getting better every sprint. In recent sprints we’ve improved the diagnostic search experience, added support for aggregated metrics and improved the “metrics explorer” for mining your application metrics.
CodeLens on VS Online
With Visual Studio Ultimate 2013 Update 4 and later, you can now use CodeLens with Team Foundation Version Control hosted on VS Online. We added support for Git (both on-prem & hosted) in an earlier update.
Smart Unit Tests
As your release cadence increases, your ability to spend endless hours on integration testing evaporates. You have to focus on developers getting it right and, among other things, that means reliance on unit testing. To help make it easier to ensure you have great coverage on your unit tests, we’ve introduced a new tool we’re calling “Smart Unit Tests” (though I’m banking on coming up with a better name before it ships :)) that will analyze your code and generate unit tests that will give you 100% branch coverage. It’s a very cool way to make sure you are getting great coverage on your code.
Smart Unit Tests is based on work previously provided by Microsoft Research – called Pex, and is now going to be an official part of the Visual Studio 2015 product.
Git Improvements
We’ve made quite a few improvements to the Git experience. We are releasing Pull Request support in TFS 2013 Update 4. We’ve also made numerous improvements in the VS 2015 preview, including:
- New branches page with folder hierarchies based on namespaces (i.e. users/mmitrik/foo)
- show remote branches and make it easier to create local branches from remote, delete remote branches, etc
- Git history has a integrated graph view for visualizing the version graph
Agile Project Management
We’ve also added some new features to our VS Online Agile Project Management solution (they will first appear on-prem in TFS 2015).
- Bugs on the task board – We recently added the ability to have bugs (in addition to user stories/requirements) on the back log. With the most recent VS Online update, you can also have them on the kanban board and the task board.
- Better link browsing experience – We added a new work item browsing dialog to the linking experience so that you don’t have to go look up the work item number and paste it into the new link dialog – instead you can browse for work items directly.
Sneak Peak – Web based editing
One of our simplest and yet satisfying improvements is our new web based editing experience. It is most pronounced in our Welcome page experience. To remind you, you can check in markdown files into the root of your repositories and they will show up on the Welcome tab of your project home page. You’ll notice that, at the upper left of the markdown page, there is now an “Edit” button.
That will enter an edit mode on the raw markdown. You can make changes directly, switch back and forth between markdown and preview and ultimately commit your changes to the repo.
Not only do you get this in the Welcome page experience, you also get it in the source browser – you can edit, update and commit any text file directly in the web browser. You can also add new files and delete and rename existing ones. This makes quick tactical edits, from anywhere you are, easy.
And while we were messing around with previewing markdown and editing files, we went ahead and added previewing of images as well.
Sneak peek – Updated build service
I).
Of course your existing build definitions will continue to work too. This isn’t a complete list of all of the build improvements but it’s a big chunk of what we hope to have in TFS 2015 (and on VS Online well before then). Look for a VS Online preview early next year.
Sneak Peek – Code Search
It’s been pointed out to me for years that even SourceSafe had a code search capability. It was simple and wouldn’t scale (it actually downloaded all the code to the client to grep it) but it worked. We, finally, are building a code search experience for VS Online and TFS – and it’s an enterprise scale solution built on Elastic Search. It enables efficient search across all of the code on your TFS server or your VS Online account.
For instance, here I’ve searched for the word “todo” in all .js files in the project VSOnline in the repo Tfs. I see the search results and can browse the code with the matches highlighted.
This is, as I say, just a peek into the future. We hope to have a preview of the new search feature available to everyone within a few months.
Summary
We’ve made some great progress on our DevOps capabilities with a Release Management Service preview, Cloud Deployment projects, Application Insights and Smart Unit Testing. We’ve continued to improve the product across the breadth of the feature set and shown some sneak peeks at some very cool improvements coming soon. It’s very exciting to see all of this coming together.
I hope you all like it as well.
Brian
Join the conversationAdd Comment
Great to see that pex made it to visual studio. Now we can use it in production 🙂
How can we learn more about the "Updated build service"? Will this build service be open sourced?
The TFS2010 build definitions will be compatible?
We didn't migrate them to TFS2013 because of the poor logging support; our build log xml file has about 2GB and displaying it on a web page it's chocking any browser; I hope that TFS2015 will come with a better support.
Will "Smart Unit Tests" be included in Visual Studio Community Edition? please, PLEASE don't lock it away in Visual Studio Ultimate. PLEASE.
Will the new build service "provide build configuration dependencies in TFS Build"? Been suggested on Uservoice for over 2 years. visualstudio.uservoice.com/…/30925-team-foundation-server
Will the New Lab Management version with "ALM integrated infrastructure provisioning and application deployment to… private clouds" include the ability to deploy to iOS and Android emulators and real devices for cross platform device testing on Prem? We have been using Xamarin's Test Cloud and we have our own mobile test lab with 30 devices (iPads, iPhones, etc) it would be great to unify those 2 test environments and manage them via TFS Lab Management's "integrated infrastructure".
@David Pierce Yes that is part of the design.
@FDelah, we do plan to open source the build task library in the updated build system.
@DS19, We will continue to support existing build definitions – certainly 2013 ones. I'll have to check on 2010 ones.
@Naden, Smart Unit Tests won't be in community. We haven't announced what products they will be available in.
Brian
Is there anything we have to do to enable CodeLens with VSO? I updated to Update 4, but still only see the local ones only.
Brian – thanks for all the great updates.
Can you see any particular reason why the VSO CodeLens stuff wouldn't show in the editor? I'm connected to VSO, I'm using VS Ultimate 2013 w/ Update 4 and I've confirmed that everything is checked in the options for CodeLens… I get the X References CodeLens item, but nothing referring to other people having checked in code or work items or anything like that.
Thanks!
Brian, with the open sourcing of .Net Core Library…it would be great to see the open sourcing of TFS and to see the development of TFS be done in the open. Is that ever going to be possible?
Will the Smart Unit Tests feature work with Nunit? Please say yes…please say yes…MSTEST isn't best of breed anymore.
@DS19 – regarding large log support. Since the web is the primary editing/view experience in the new build system we're working hard to ensure it stays responsive regardless to the size of the build. We now have multiple levels in the feedback system – the left tree shows a high level real time progress view. the console is a buffer showing real time last 1000? lines so DOM elements and memory rolls off. Then we have a timeline breakdown view (project level) which is live and it's a virtual grid. The log view shows a minimal output log (in the browser) and then we will have the ability for detailed build (msbuild etc…) logs which can be uploaded/downloaded as zips.
We're in the process of starting to build the TFS and other services internally which will drive a better large build support into the product.
Hi Brain, I saw your talk on Connect().
Today I submitted this feedback on Azure's uservoice channel and afterwards watched your talk where you gave a hunch on the similar plans. Please take a look: feedback.azure.com/…/6709490-binaries-building-and-hosting-for-open-source-proj. Is that where Microsoft is heading? We need a CI system which is capable of testing on multiple platforms (including Mac and varied flavors of Linux). Also hosting the binaries, so it doesn't break the OSS projects' semantic versioning.
Exciting times! Thank you. 🙂
@Brian with the announcement of the cross platform build agent and the fact that build agents are no longer tied to the team project collection boundary I have to ask if the plans are to be shipping a holistic end-2-end cross platform ALM story.
Will we still need to have test controllers and test agents or will those scale out as well?
Will the deployer agents also scale out without being tied to team project collections?
And I have to ask because everything you announced yesterday was 'cross-platform' will the new test agents and deployer agents work cross platform(specifically on the mac, ios(iPad), and android)?
It's a brave new world…and having Microsoft's ALM solution have an end-2-end, works fully cross-platform is mighty compelling.
Having our dev-test labs running iPads emulators and Android Emulators would be awesome.
I'm very interested to learn about how the Microsoft Android Emulator will work with running UI Tests…will CodedUI ever be able to run on Android?
Very cool to see the direction…and I for one am ecstatic to see XAML based build definitions go the way of the dinosaurs…extinct.
Ah, I found the answer re: CodeLens
It's a limited release that you have to request access to for right now.
Here's the blog post with details on that:
blogs.msdn.com/…/codelens-in-visual-studio-online-enabled-as-a-limited-ctp.aspx
"This initial preview is focused on Azure but, in the next year, we also plan unify this with our current TFS lab management offering to provide seamless, ALM integrated infrastructure provisioning and application deployment to both public and private clouds."
When you unify this offering…will the new functionality allow us to work with the physical lab environments that we have here in our dev-test labs? We don't have Virtual Machines as we need to test USB based firmware equipment for the power grid.
cant wait for the full stack to go to production both on prem and online
Vnext; Rename team project, please, pretty please. It has been a rock in our shoe for too long
Brian – Great content from this week. We are interested in learning about the new build system and how it will work on Mac. Will we be able to have lab management based environments with mac build agents to build for iOS projects?
The the SignalR real time build log view is very very cool.
Will we have the same SignalR real time test log view for unit test and codedui test runs, will we have the same real time for for release management deployments?
@Kirstan, we haven't sorted out exactly what our lab management plans for Mac will be yet. Clearly it's something that is interesting but will take us a bit longer to form a plan.
@James, yes, I forgot that you have to request access to CodeLens on VS Online right now. See: blogs.msdn.com/…/codelens-in-visual-studio-online-enabled-as-a-limited-ctp.aspx
Brian
@Tim, see my last comment to James.
@Nigel, We don't currently have any plans to open source the totality of TFS. Our Git implementation already is open sourced and you can participate here:. We are considering open sourcing other aspects as well. We'll see how that evolves.
@adeel, @cmdkeen, Yes, that's the direction. It won't all happen at once, of course. There will also be opportunities for partners to help.
@Routi, yes, it will work with physical environments as well.
Brian
@Burt, Team Project rename is in development now.
@Victor, yes, we'd like to be able to support provisioning and deployment cross platform.
@Jeremie, That's a good question. I don't know right now. We don't have anything like that in the immediate plans for tests (outside of Visual Studio). We've got some release management/deployment status tracking ability but I don't know if it's real-time right now.
Brian
I am a one person team and use Visual Studio Online for version control. It works great. I also have a minimal need to track bugs and features, etc. The Visual Studio Online interface seems pretty cumbersome for that, though. Maybe I just don't know how to use it. I don't need all of the stuff like iterations, springs, and backlogs. I just want to create a list of bugs/new features and a way to mark them off when complete.
Would it be possible to come out with an ALM Lite solution for indy developers? Or, if that capability exists already, make it more apparent.
Also, how do I change a Task to Bug?
@RealWorldDev – can't disagree that our work item interface has some rough edges for really simple projects.
Couple of thoughts here.
We don't have a feature to let you change the type of a work item… but we will soon enough. For now you have to copy the work item to a new type. Sorry.
After turning off sprints, try using the board feature of the backlog to get a nice visualization of a "to do" list.
In general, we're making a set of investments to make the "small team/project" work management scenarios a lot more approachable. I'd love to get more feedback from you on this. Feel free to reach out to me on twitter @aaronbjork, or shoot me an email (abjork at Microsoft) and we can chat more.
Thanks.
Aaron
@Brian, @Victor – "support provisioning and deployment cross platform." Great to hear that provision and deployment will be cross platform, now please ensure that MTM 2015 is a first class cross platform testing tool (specifically the iPad and Mac). I'd appreciate seeing the data collectors (video, logging, etc) work on the Mac and iOS platforms…especially the exploratory testing. There's a big hurdle between testing on traditional PC software and testing cross platform on iOS and Android…now that it's a 'cross platform' development world…we need test tooling that ensures high quality across platforms.
Why does this release management tool not have different theme colors that match Visual Studio? The UI for release management looks bizarre. Shouldn't release management be just an extension within Visual Studio, why is it a separate tool?
Any plans to make release management more like the new build? xaml workflows are a pain to configure.
90% of the time we just want to do something simple like web deploy but with binary progression (package progression would be ever nicer) through the various environments.
The new build UI looks pretty much ideal for that as long as the binary progression feature is somehow added.
+1 on having the test execution run progress be real time using signal R. In 2013 MTM you have to keep pressing refresh to see the test run status and you don't have a live rdp session of the codedui test execution session…you have to wait for the video of the test to finish….which usually can be a couple of hours. It'd be great to see real time run status using Signal R.
Brian, I voted and commented on the the following UserVoice feature request:
visualstudio.uservoice.com/…/6563593-create-migration-tooling-for-tfs
From the announcements last week it appears that Microsoft is embracing open sourcing serveral small libraries of the dot net framework.
It would be great to hear your thoughts about how and where the TFS team will embrace open sourcing parts of TFS.
Today TFS is majority closed source and its a pity that items like team project rename haven't been able to be delivered with help from the community. I would venture if TFS was open source…at least it would be apparent about the challenges involved and more eye balls could only help deliver the feature.
With respect to migration and integration tooling…the commercial vendors and partners in this space haven't had financial success or delivered working technical solutions and so 'partnering' hasn't worked.
With regard to the TFS Integration Platform being "open source"….it's never been actively maintained and while its 'used internally' there's never been any supporting documentation or reference implementations on how to use and develop for it successfully.
It'd be great to hear your thoughts and have your leadership on the idea of open sourcing more of TFS and supporting the creation of migration tooling for TFS.
IMO Microsoft has made progress, but has clearly not turned the corner. Nadella made a good start, and these announcements with Visual Studio while good, just are not enough.
Let's keep the hate aside and forget MS's past.
The biggest problem facing MS now is the loss of mind share on the Windows platform and with developers building new software. The brightest minds are NOT programming on Microsoft platforms…where's the killer Windows WPF/.Net application?…Please name one, just one, non Microsoft-written app, anyone in your family uses on a weekly basis on windows (Office, Skpe.etc don't count I'm looking for third-party written apps).
This cannot be reversed.
Open Source products are now technically superior, the community is very, very well organized, and it is FREE.
Interesting research, frameworks, libraries, tools, and programming languages spawn on Open Source before they show up (if ever) on Windows and in the Microsoft developer tool chains.
Windows engines and Microsoft's developer tools engines have run out; though they will keep going for a while.
MS had a great run for over twenty years because the entire world ran on DOS and then Windows. That gave them enormous influence and power, power to make mistakes, fail over and over, and yet succeed.
The real challenge will be in adapting to a future in which Windows is irrelevant and Developer Tools are FREE and open source.
The long-term future of Azure, Windows Phone, Windows Desktop, Windows Server and the overpriced Visual Studio tools looks bleak to me.
Can Visual Studio and Microsoft's developer tools (TFS) survive? Yes they can and will survive…but will they thrive and be relevant?
More than likely they will be in the shadow of technically superior, open source, and FREE tools and platforms…the faster Microsoft recognizes this reality and embraces the new world order…open source, free, and platform agnostic the more relevant Microsoft will be in the years ahead.
Will VS ever support Powershell scripting or are we stuck with the less than spectacular ISE?
@jeswin Can you name one tool that is technically superior to TFS, open source, and FREE?
@Ricardo, It's a good question. I think OSS certainly will play a role with TFS. I'm open to open sourcing more of it. We have to make sure do it in a way that's going to help and not waste people's time. I think our most successful OSS engagement around TFS has been with LibGit2 where we are very active participants – though even there, the number of significant contributors is reasonably small.
As for the integration platform. That remains a conundrum for me. There was a time where we more actively maintained it and we didn't see much community engagement on it then either. It's fair to say that if it isn't actively maintained, you won't see community engagement but it's not fair to say that if it is actively maintained, you will see community engagement. It's just a messy problem that people way underestimate the complexity and often give up before investing the level of effort to really do a good job. I worry we could invest several more many years (we've already invested many) and still not get something that solves all the problems that people want solved. Right now I'm thinking we'll focus on more targeted problems people want solutions to (like import/export to the service).
I have some ideas for other ways for us to engage in the OSS community. I'm going to explore them and see if there's something real there.
Brian
@LostAtC – we are looking to do just that, if you have specific things you'd like to see along those lines (or not see) I'd love to hear from you – email me @ bmoore – you know the rest.
tweeking
Brian I went to referencesource.microsoft.com and was looking to see if the source for the (1) String resources (error messages etc.) would be included and possibly improve a specific Romanian language error message. However I found the following problem. There are no RESX files included. It's hard to reconstruct strings with correct formatting and valid meaning when the RESX files ae not included.
I was also disappointed to see that This solution will not build because it is missing crucial components such as resources, XAML files, etc. but it will be sufficient to browse the source code inside Visual Studio. If we can't build the solution it makes it really hard/impossible to work and contribute too.
@ASurchi, I'm going to ask Jay Schmelzer or someone on his team to give an official response here but a few thoughts…
1) Reference sources are designed to let you debug/understand, not build/contribute. I don't know why things are missing but it's important to understand what the goal was. The forum for contributing is on. That should have everything and be buildable – and contributable. As of yesterday, I heard they had already taken about 20 contributions.
2) I love what you are trying to do. We struggle with localization. The people who do the localizations don't always have the full context on the product or technology to choose the best wording. As we start thinking about localizing VSOnline, I've been trying to figure out how we could enable the community to help with that. I think this is an important evolution in our development processes.
Brian
@Asurchi – Brian is correct. The primary goal of reference source is understanding and debugging. We also want to enable community contributions as much as possible. It would be great if we could work with you to make contributions at github.com/…/corefx. We’re still working at getting all of the files committed there, but they will all show up. We can also look at making those same file available in reference source, for you to at least look at. Separately, you can mail us (dotnet@microsoft.com) so that we can discuss the specific issue and log it as a bug for the .NET Framework.
Brian, nice announcements from the event. Now that Microsoft is embracing open sourcing technologies. Can I ask for the following related to TFS?
1) TFS Web Access be open sourced. We've wanted to develop custom work item query components, work item controls, and build management tools in Web Access. Surely you have an internal SDK, can you please make it open source?
2) MTM – MTM action recordings…we want to be able to add asserts to our action recordings in MTM…but there's no SDK or API for MTM. Please make it open source.
Thanks!
Brian, I too am interested to know, will the new test agents and deployer agents work cross platform(specifically on the mac, ios(iPad), and android)? Cross platform testing is a pain today…and we have to use separate tools from different vendors and it'd be great to have a unified ALM tool that covers cross platform testing.
Hi Brian
Cool stuff!
I am hard at work deploying Update 4 in our environment, but have ran into a problem with by build agents. They are unable to connect and I am getting a 'TF214025: No build service host was found with the URI vstfs:///Build/ServiceHost/44. Either the URI does not exist, or EMEAMy_Build_Service_Account does not have permission to access it'. I can compare the security settings between my test TFS setup (Update 4) and my production TFS setup (Update 3) and there seems to be no differences. Has anything changed behind the scenes that require me to do other than adding the account to Project Collection Build Service Accounts? To rule out other problems I tried to add the account to the Project Collection Administrators, which solved the issue.
I have a similar issue with the 'general' TFS Service Account in a build completion plugin, which is unable to lookup a build that just finished. Same error as above.
Any help is appreciated!
@2re
I apologize for any issues you are having. We went through the changes made in Update 4 and there was nothing we can find on the server side that changed how we evaluate permissions. Given that you have an issue with another service account it feels like there could have been some sort of corruption or other issue as part of your backup and restore.
In order to evaluate further you should open a case with CSS as they will be able to work with you to capture logs and other data that would be necessary to debug the issue.
Thanks,
Chris
I have gotten a bit further with my build service account problem, but not fund a solution yet (aside from granting full collection administrator rights).
Looking at the patched server next to the unpatched shows that the permissions are the same for the group Project Collection Build Service Accounts. So far so good. However looking at the only member of this group, EMEAMy_Build_Service_Account, which is not a member of any other group, there is suddenly a difference in permissions on the two servers. Almost every permission is 'Inherited deny' except for 'Create a workspace':'Inherited allow', 'Delete team project':'Not set' and 'View collection-level information':'Inherited allow'. Clicking the 'Why?' link gives one of two answers. 1. empty list of groups that this permission is inherited from (example 'Manage build resources'). 2. 'Cannot trace permissions on this item. You may need to grant read access on a parent item.' (example 'Make requests on behalf of others').
I have tried to add a completely new user that has not been granted any permission on TFS before to the 'Project Collection Build Service Account' group. It is getting the same weird 'Inherited deny' permission.
@Chrispat: Thank you for your reply. Can you tell me who is CSS?
Found the answer do my own problem:
It seems that service accounts cannot be a Stakeholder, either by that Access Level being default or set specifically.
I have created a connect bug here: connect.microsoft.com/…/1040024
Brian, there's a great talk about how Office develops cross platform using C++ watch it here (). I've always wondered if TFS is written in C++ and is that how you deliver the team explorer everywhere edition and your cross platform build agents? As Microsoft develops primarily for cross platform products what features does TFS provide to help the build, test, and deploy processes build and validate code across platforms? Also at the end of the talk someone asks a question about what source control system is used by office and I think I caught that the system is called "source depot". If the office team is continuing to invest in source depot and your team is building TFS…why the two systems…why not base TFS on Source Depot? I googled "source depot" and read about how awesome it is…it's currently being used by both the office and xbox teams…"I could go on & on, but the point is that something Source Depot makes a developers life so much more easier." developers.slashdot.org/comments.pl and discuss.fogcreek.com/…/default.asp interested in learning more about TFS and the cross platform tooling coming with Source Depot from Microsoft.
Brian, the new build system is a giant improvement and it's great to hear you'll be open sourcing the build agent tasks.
Honestly, the new build system appears to catch up with the architecture of the guys over at team city and I hope in some ways you'll leap ahead of them…and keep them on your toes.
Removing the need for dedicated build controllers and using agent pools is a welcomed architectural decision, the ability to run the build agent on non windows platforms is also very welcomed…in the last 8 months we've had rapid adoption of container technologies such as docker (and by proxy Chef and Puppet) by our infrastructure teams so our linux footprint is growing for our web platforms.
The open sourcing of parts of .net framework appears also to be welcomed advancement…now I have 1 ask and 1 request.
First my ask, will the new architectural changing coming to TFS allow for a controller-less configuration for test agents as well?
We have a pretty extensive lab management setup with SCVMM and upgrading our test controllers/ test agents for each of the updates is a pretty large undertaking especially for saved environments….so in the new architecture having the test agent pooling and self-updating would be a welcomed architecture change.
Now to my ask:
If you are opening sourcing the build agent tasks can push to open source the agent source code itself? There are plenty of interesting agent extensions that come to mind, from extending the agents to new platforms, to extending the underlying agent around PowerShell and F#…have you taken a look at Fakes ()?
If the test agents are built on the same code architecture there are so many interesting test extensions that I can envision as well (Xamarin UITests on Android and iOS integrated into Gated Checkin Builds for one).
It feels like you guys are moving in the right direction, and it's great to see you, Brian, specifically pushing in the right direction by embracing open source (GIT is a big win) and accepting that the new world of tooling is first and foremost a cross platform development world.
Thanks for your great blog, I appreciate the time you take to actively maintain it, keep pushing and advance the future.
@CStedman, Checking on the test question. I think the answer is yes because we are sharing all of the agent management infrastructure between the two but I have to confirm.
Yes, we plan on open sourcing the agent code as well.
Brian
@CStedman, The short version of the answer I got back is that the specifics on test rigs is still being worked out. We'll know more over the next few months.
Brian
@digiowl, No, TFS is written mostly in C#. Team Explorer Everywhere is written in Java. It hosts some of our web assets (html/js) for some features (like the work item form). The cross platform build agents are Node.js. It's a bit of "the right technology for the right problem" story.
Source Depot is an internal version control system that predates TFS. It's got some good things about it and some not so good things about it. In general, the company is on a path to move off of Source Depot and onto TFS. It's been a slow path but it's accelerating. I expect everyone will be off Source Depot in the next 2-3 years.
Brian
@Brian, Thanks for the investigation. I appreciate that the engineering efforts for the new Build Agent is higher priority than the engineering effort for the test rigs. Indeed it would make sense that the build agent engineering has to happen before the test rig engineering.
From reading your blog and looking at the timing around Windows 10…there sure is a lot coming in 2015. I'm looking forward to having the new tooling and hope to see the culmination of the teams efforts across the stack.
Fingers crossed your teams can deliver a compelling upgrade to the lab management tooling with the 2015 release.
Brian is there any improvement coming to the OLAP cube / Reporting story coming in TFS 2015? VSO doesn't use SSAS and so the reporting story for TFS hasn't seen any real improvement…sure you have charts…but charts does allow for drill down reporting.
@dsymonds, Yes and no. We've just staffed a team to look at a major rev of our full blown reporting story that will work with both on prem and cloud, address many of the shortcomings of our current solution and work with the latest BI technologies. I don't have dates for delivery yet. It will likely be a few months before I've got clarity on what we'll be delivering and when.
Brian
Brian, will future versions of TFS be designed to be based on .NET Core or is TFS too big that it always require the full .NET framework?
Brian, we are looking at our 2015 roadmap for our enterprise build tooling. Can you provide some insight into the scale and sophistication behind the "Updated build service"? What's the largest internal framework/product being built with the "Updated build service". Is the "Updated build service" ready for enterprise scale with hundreds/thoughts of commits a day? Or is it focused on small agile teams? How far along is the "Updated build service" in adoption at Microsoft. Given this is a 1.0 release of the "Updated build service" what's the focus been of the work to date, and how broad and deep is the scale and scope of the "Updated build service"?
Brian good reading over here about .NET Core and the "future". With the updated build service I'm curious to learn more about if it's the future or just yet another build tool? weblogs.asp.net/…/%E2%80%9C-net-core-is-the-future%E2%80%9D-but-who%E2%80%99s-future-is-that
@Rodigo, I'm not sure I fully understand your question. I think of the new build service as the next version of the TFS/VS Online build service – a major version with tons of improvements but still, the next version. It will continue to run existing builds so you can upgrade TFS and have your builds keep working. At the same time, it also introduces a much simpler build customization approach, a new UI, and addresses a bunch of feedback/suggestions we've gotten over the years. Much of that is not "backwards compatible". That is to say you're older build definition will run on the new version but the new build definitions you create couldn't be moved to an older version of TFS and work. You can, of course, build for any version of the platform in both old and new.
Brian
How will the Microsoft ALM & DevOps story evolve with Microsoft support container technology and docker?
@John, That's a great question and I don't have a full answer yet. Clearly containerization enables some different deployment/release management workflows and I'm confident we'll enable those. Beyond that, We haven't fully figured that out yet.
Brian | https://blogs.msdn.microsoft.com/bharry/2014/11/12/news-from-connect/ | CC-MAIN-2017-09 | refinedweb | 6,824 | 62.27 |
When you read or chain a record it stays locked for update provided the read or chain doesn’t include an (n) for no lock. It will be locked until it’s updated or another row is acquired through the access path or the row is updated or unlocked. It you try to update the row when it isn’t locked you get the error message you got.
- didn’t read/chain record
- already updated recrod
- unlocked record
- never locked record
Phil
Mr. Phil, i got your hint, but i want to do the read, read previous and chain operation without record lock. because my program will access by many user simultaneously.
how can i solve this problem…
Yes, that’s excellent muti-user design
Always do the chains and reads with no lock.
Just prior to updates do a chain with lock, that is without the (n) nolock
- if the chain is successful do update.
Phil
Just prior to updates do a chain with lock, that is without the (n) nolock
Mr. Phil, i can’t get you point clearly, please give me a some examples….
Don’t know how much clearier I could be
If your program has an update or delete command
It should be preceded with a chain to acquire and lock the record to be updated
Chain ( keyfl1 : keyfld2) MyFile; // get record and lock it
//Update fields — remember that when you get the record you update
// all of it’s fields
field9 = newdata9;
field10 = newdata10;
Update MyFile;
i can’t get you point clearly
You cannot update a record without locking it first. That’s a simple fact that you have to program around.
However, you can read a record without a lock if you want to display its field values on a screen for a user (or for any other reason). The user can have the record on the screen and go out to lunch. While the values from record are being used by your program, other programs can also use the record.
Eventually, the user might either change some values or cancel the display. If cancelled, your program doesn’t need to do anything more with that record. It is free to read a different record and display it (or do whatever it’s doing with it).
But if a change needs to be made, your program must then read the same record again. This time, it must lock the record because this time it will update the record.
During the time the record values were on the screen, there was no need to lock the record. The lock only needs to be applied during the small fraction of a second before the program runs the update instruction. So your program must run a second read (with lock!) before the update.
If you think about it for a while, this raises an extra problem.
But if you really need to avoid conflicts between two users or between two programs, then you must use locking reads before your updates.
Tom
Thanks Mr. Phil and Tom,
for your brief explanation. but till now i didn’t get the solution..
C if *in05=*on C empno chain(n) emp C update emp C exfmt help1 C endif
on my screen, if user ll press the F5 function key, update ll performed.
but this code ll shown same error….
can i do any changes from my coding…
Beforfe updates and deletes chain to the record without the (N) no lock
C if *in05=*on
C empno chain emp
C if %found( emp)
C update emp
C endif
C exfmt help1
C endif
…if user ll press the F5 function key,…
Your code doesn’t show how the user presses F5.
I assume that your program CHAINs to the record and shows it to the user. The user may change some values and press F5.
This gets us to the code that you posted.
In that code you have CHAIN(N), followed by UPDATE. But you need to remove “(N)” from that CHAIN because it needs to lock the record.
The first CHAIN was only used to display the record. But that second CHAIN has to prepare for the UPDATE that follows. Use “(N)” on the first one, but not the second one.
Tom
Right but this cannot work either .. after the sucessfull chain you need to move the changed fields to the data file files then update.
changed fields to the data file fiields then update.
little typo
Right but this cannot work either ..
Yep. That’s the “extra problem” that I mentioned earlier. I figured that that would be found by the OP once the dual-CHAIN concept started to become clear.
Tom
…or more thoroughly, that’s part of the “extra problem”.
Tom
Hi Phil, i used your tips… but it doesn’t show any error.. as well as it doesn’t update..
C if *in05=*on C empno chain emp C if %found(employee) C update emp C exfmt help1 -> window name for user display C endif C endif
Use “(N)” on the first one, but not the second one.
Hi Tom, after i followed you.
C if *in05=*on C empno chain(n) emp C if %found(employee) C empno chain emp C update emp C exfmt help1 C endif C endif
it doesn’t show any error and doesn’t update..
can i do any change…. please give me any suggestion..
For this solution and also as a general good rule, the fields on the display file should not have the same names as the fields from the physical file.
As you load each row of the physical file into the display you need to populate each field of the display file from a field of the physical file.
On the update routine after you’ve chained to the physical file you need to move the fields from the display to the physical file record, then update it.
Phil
In simple words, before the update statement you have to move the screen fields to the record’s fields as Phil already told you.
C if *in05=*on C empno chain(n) emp C eval record.field = screen.field C update emp C exfmt help1 C endif
I hope it helps
YuVa
the chain should be without the (n)
Sorry
it doesn’t show any error and doesn’t update..
At this point, how many CHAINs are in your program? You show two of them in the piece of code that you posted. In this code, it looks like you should have another CHAIN somewhere else in your program that we can’t see. Your user shouldn’t press F5 until after you CHAIN to a record and display it on the screen. Where is that CHAIN?
You now show two CHAINs here. The first CHAIN should not be there. It should be somewhere else in your program before you display the screen to the user. That will be where the “(N)” would be used.
After the user sees that record and types new data, the user presses F5.
Then you can CHAIN without “(N)”, and then you can UPDATE.
But here’s where the “extra problem” comes. The second CHAIN is going to bring values from the database file back into your program. If the user changed any values in the record from the first CHAIN, the second CHAIN is going to wipe out those changes. The UPDATE will just write the data from the second CHAIN back out to the record.
The user’s changes will be lost unless you put the values from the screen into other variables in the program. (If the fields in the display file have different names from the database file, then those fields will be safe from the second CHAIN.)
So, after the second CHAIN, you need to move the values into the database record fields. Then when you UPDATE, the new values will get put out to the database file.
When you understand that part of the problem, we’ll cover the rest of the problem.
Tom
Hi Phil and Tom,
i didn’t have different field for database and display file…
just i map the database file field in display file.. so the both file (database & display) had same field only…
field name in both database and display file
EMPNO, EMPNAME, SALARY, etc, like this….
you need to move the fields from the display to the physical file record, then update it.
then, how can i move the field value…
please give a suggestion…
…how can i move the field value…
If you use the same names for the database and display files, you can’t move values between the fields because the program uses the same memory for both.
You can use the same names when you want the values to be the same in many programs. But if you read a record from the database file after reading the record from the display filewhen using the same names, the values from the display file will be lost.
So you need to use different names in an update program like the one you are writing. With different names, you move values back and forth whenever you decide is the right time.
Tom
Thanks Tom and Phil,
i got clear solution for this situation.
i changed my field name in display file.
so multiple user program must contain different field name in database file and display file.
now it ll working fine….
i got clear solution for this situation.
Not quite yet.
There is still one problem that needs to be resolved. This problem is maybe the biggest reason that many programmers do not use two CHAINs to perform one UPDATE. They will use a single CHAIN that locks the row the entire time that the user has the record on the screen.
Here’s the problem:
User #1 asks for a record, and your program CHAINs without lock and displays the record.
Then, User #2 asks for the same record, and again your program CHAINs without lock and displays the record.
The same record is now on two screens at the same time.
User #2 makes a change and presses F5. Your program CHAINs with lock and UPDATEs the record.
What does User #1 have on the screen? When User #1 presses F5, what record will be retrieved when your program does the CHAIN? And when your program does the UPDATE for User #1, what happens to the change that was made by User #2?
Does either user know that the other user made any changes?
Tom
Tom’s right about detecting changes by other users or programs.
Generally the screen fields have different names from the database fields regardless of update method. Typically when the user requests an update, the data must be validated before the file is updated.
Phil
Tom, your correct. but i don’t know how to solve this problem.
after i tried use CHAIN without lock (n).. it show same error.
Tom, your correct. but i don’t know how to solve this problem.
after i tried use CHAIN without lock (n).. it show same error.
I’m not sure what you did..solving this probelm shouldn’t have required any changes to the code only additions..
When you acquire the row the first time you need to save a copy of a field, fields or more likely the entire record as a data structure. Then when you go into the update routine and acquire the record for a second time you need to compare the orginal with the new values, if they aren’t the same, the record was changed by someone else during the time you were viewing it.
i don’t know how to solve this problem.
There are at least two ways to solve it. The first is as Phil described. Have a DS that your CHAINs load the fields into. Save a copy of the entire DS and compare it against the DS that you get with the second CHAIN. Any difference tells your program that the record has changed since the user first saw it.
The second way might be to CHAIN with lock both times. Immediately after the first CHAIN do an UPDATE that sets a flag in the record that says the record is in use. That first UPDATE will release the lock, but any other program that reads the record can test the flag to see if it is in use for updating. The record will be retrieved, but your logic will have to ensure that no changes are made until the record can be safely read.
Whatever way you decide to handle it, your program will need to do the testing and to notify the user about the problem. The user will need to choose to wait or to see the changed record or whatever.
As I mentioned earlier, this is why many programs don’t handle the situation at all. The programs use a single CHAIN with lock and leave the record locked the entire time… because it’s easier.
Tom
Adding an in-use flag to the file, presents other problems. If the user updates the record the program sets the flag off. If the user moves to another record or exits the screen the program sets the flag off. But if the user is disconnected (closes the session) the flag is left in On status and the row will be in-use forever. To correct that I put the Job# of the locking job in the “flag” field. when a program found the field populated it checked to see if that was an active job. If it wasn’t active the record was considered as available for use.
Phil
[...] 1. Pdsathiskum, Philpl1jb, TomLiotta try to solve the error when updating the PF using a RPGLE program. [...]…. | http://itknowledgeexchange.techtarget.com/itanswers/error-occurred-while-update-my-pf-using-rpgle-program/ | crawl-003 | refinedweb | 2,322 | 80.82 |
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.
How to prevent from changing discount field?
Hi all,
I need to prevent a group from changing unit price on sale order.
I have found this code, but I really do not know where to put it. On the code, "Fellow" is the group name and "permissions" is a function field.
and
'permissions': fields.function(_check_permissions, type='char', method=True, string="Permissions"),
'price': fields.float('price'),
and also this code
<field name="permissions" invisible="1"/>
<field name="price" attrs="{'readonly':[('permissions','=',True)]}"/>
Can you please help me on where to put each piece of code?
Paulo
Hi Paulo,
Please refer the sructure of the new (custome) module as like.
1) File : __openerp__.py : This file contains the simple parameters like name of module, depends etc. You can also copy this file from any other module and made change according your requirement.
2) File : __init__.py : In this file you have to write down.
import sale_order.py
3) File : sale_order.py
class sale_order_line(osv.Model)
_inherit = "sale.order.line"
_name = "sale.order.line"
_columns = {
'permissions': fields.function(_check_permissions, type='char', method=True, string="Permissions"),
'price': fields.float('price'),
}
4) File : sale_order_view.xml
<record id="inherited_view_order_form_add_permission" model="ir.ui.view">
<field name="name">sale.order.form.add.permission</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="model">sale.order</field>
<field name="arch" type="xml">
<field name="" position="before">
<field name="permissions" invisible="1" />
<field name="price" attrs="{'readonly':[('permissions','=',True)]}" />
</field>
</field>
Then after just installe your new module. Thats it.
Dear chirag, Thank you very much. I just did not understood the last part "inherit it into .xml" file. I lack of knowledge on programming principles of Odoo. Is it possible for you to send me a sample _init_.py, _openerp_.py, testmodel.py and the .xml you refer? This way will be easier for me to read the code and fully understand the flow. Thank you once again
hi, I have just updated my answer. According your need. Just give me up vote for this. Thanks.
Thank you very much chirag. You saved the day!
chirag,
Sorry but I still need your help.
Followed the instructions and created the module with the files. The odoo server is start with no errors on logfile and seems to everything ok. Just found an error when installing the module. It's a "RuntimeError: maximum recursion depth exceeded".
Part of the logfile:
Can you please help me identify this error?
Revied the code and instructions you sent and are all exactly as instructed.
Can you please help once again?
Regards
Paulo
hi, can you give me your module name ?
chirag, I found the problem. Windows added an "py" extension to the file sales_order.py. The file was named "sales_order.py.py" No I am having a different error when installing the module. The error is: "File "/home/openerp/openerp-7.0/my_addons/permissions/__init__.py", line 34, in import sale_order File "/home/openerp/openerp-7.0/my_addons/permissions/sale_order.py", line 25 class sale_order(osv.Model) ^ SyntaxError: invalid syntax " But anyway and answering to your question: - for testing purposes the module name is "permissions" (first time it was "sale_order" but changed it to permissions - folder named permissions). - on _openerp_.py the value name is "Permissions". - According to instructions, added 2 additional files. sales_order.py and sales_order_view.xml with the exact code for each one of them. Regards
ohh, I just forgot to put the ":" at the end. class sale_order(osv.Model):
Thank you chirag. I urgently need to learn python :o) Now I have another error: "NameError: name '_check_permissions' is not defined". At the top of sale_order.py I added the code "from openerp.osv import fields, osv" and the rest of the file is exactly as you sent. I am sorry chirag...
I think you are right ;). Just give four space (" ") before def _check_permissions thats it. I have also updated in my answer.
heheheh. Indent on pyhon.. I think I read about that somewhere. It worked, but now I have another error: "ValueError The class sale_order has to have a _name attribute "
I have done changes in my answer.
Thank you very much chirag. Odoo accepted the module. But I've missing something here. I can see that the field "permissions" was added to the system (Settings - Technical - Database Structure - fields), but when I create a Sale Order with a user from the group "Fellow", the price field is still editable (price_unit instead of price on the code - 'price': fields.float('price')). When I "View fields" on developer mode I can see the field there. Perhaps it must be inherit on sale order lines and not on sales order? Any idea?
hi Paulo, I have updated my answer. You are right. Today I am quite busy with R&D task so, my concentration is not here. Sorry for that.
I am sorry being disturbing you since you are busy. The code did not worked. With your last instructions the permissions field was added to Sale Order Lines sucessfully, the Fellow group exist and when I make a sale order the user is still able to change the field price_unit on sales order lines. I can see that the default field price_unit from sales module was updated with this new price_unit field which is ok, but when I access this price unit settings (database structure / fields) I do not see the Fellow group on "Groups" on its settings. Also when I try to uninstall the module I get an error that might help on identify the problem TypeError: The model "sale.order.line" specifies an unexisting parent class "sale.order.line" You may need to add a dependency on the parent class' module.
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/how-to-prevent-from-changing-discount-field-62182 | CC-MAIN-2018-13 | refinedweb | 1,006 | 69.99 |
LSF/MM 2014 and ext4 Summit Notes by Darrick Wong
By Jamesmorris-Oracle on Apr 01, 2014
This is a contributed post from Darrick Wong, storage engineer on the Oracle mainline Linux kernel team.
The following are my notes from LSF/MM 2014 and the ext4 summit, held last week in Napa Valley, CA.
- Discussed the draft DIX passthrough interface. Based on Zach Brown's suggestions last week, I rolled out a version of the patch with a statically defined io extensions struct, and Martin Petersen said he'd try porting some existing asmlib clients to use the new interface, with a few field-enlarging tweaks. For the most part nobody objected; Al Viro said he had no problems "yet" -- but I couldn't tell if he had no idea what I was talking about, or if he was on board with the API. It was also suggested that I seek the opinion of Michael Kerrisk (the manpages maintainer) about the API. As for the actual implementation, there are plenty of holes in it that I intend to fix this week. The NFS/CIFS developers I spoke to were generally happy to hear that the storage side was finally starting to happen, and that they could get to working on the net-fs side of things now. Nicholas Bellinger noted that targetcli can create DIF disks even with the fileio backend, so he suggested I play with that over scsi_debug.
- A large part of LSF was taken up with the discussion of how to handle the brave new world of weird storage devices. To recap: in the beginning, software had to deal with the mechanical aspects of a rotating disk; addressing had to be done in terms of cylinders, heads, and sectors (CHS). This made it difficult to innovate drive mechanics, as it was impossible to express things like variable zone density to existing software. SCSI eliminated this pain by abstracting a disk into a big tub of consecutive sectors, which simplified software quite a bit, though at some cost to performance. But most programs weren't trying to wring the last iota of performance out of disks and didn't care. So long as some attention was paid to data locality, disks performed adequately. Fast forward to 2014: now we have several different storage device classes: Flash, which has no seek penalty but prefers large writeouts; SMR drives with hard-disk seek penalties but requirements that all writes within a ~256MB zone be written in linear order; RAIDs, which by virtue of stripe geometries violate a few of the classic hard disk thinking; and NVMe devices which implement atomic read and write operations. Dave Chinner suggests that rather than retrofitting each filesystem to deal with each of these devices, it might be worth shoving all the block allocation and mapping operation down to a device mapper (dm) shim layer that can abstract away different types of storage, leaving FSes to manage namespace information. This suggestion is very attractive on a few levels: Benefits include the ability to emulate atomic read/writes with journalling, more flexible software-defined FTLs for flash and SMR, and improved communication with cloud storage systems -- Mike Snitzer had a session about dm-thinp and the proper way for FSes to communicate allocation hints to the underlying storage; this would certainly seem to fit the bill. I mentioned that Oracle's plans for cheap ext4 reflink would be trivial to implement with dm shims. Unfortunately, the devil is in the details -- when will we see code? For that reason, Ted Ts'o was openly skeptical.
- The postgresql developers showed up to complain about stable pages and to ask for a less heavyweight fsync() -- currently, when fsync is called, it assumes that the caller wants all dirty data written out NOW, so it writes dirty pages with WRITE_SYNC, which starves reads. For postgresql this is suboptimal since fsync is typically called by the checkpointing code, which doesn't need to be fast and doesn't care if fsync writeback is not fast. There was an interlock scheduled for Thursday afternoon, but I was unable to attend. See LWN for more detailed coverage of the postgresql (and FB) sessions.
- At the ext4 summit, we discussed a few cleanups, such as removing the use of buffer_heads and the impending removal of the ext2/3 drivers. Removing buffer_heads in the data path has the potential benefit that it'll make the transition to supporting block/sector size > page size easier, as well as reducing memory requirements (buffer heads are a heavyweight structure now). There was also the feeling that once most enterprise distros move to ext4, it will be a lot easier to remove ext3 upstream because there will be a lot more testing of the use of ext4.ko to handle ext2/3 filesystems. There was a discussion of removing ext2 as well, though that stalled on concerns that Christoph Hellwig (hch) would like to see ext2 remain as a "sample" filesystem, though Jan Kara could be heard muttering that nobody wants a bitrotten example.
- The other major new ext4 feature discussed at the ext4 summit is per-data block metadata. This got started when Lukas Czerner (lukas) proposed adding data block checksums to the filesystem. I quickly chimed in that for e2fsck it would be helpful to have per-block back references to ease reconstruction of the filesystem, at which point the group started thinking that rather than a huge static array of block data, the complexity of a b-tree with variable key size might well be worth the effort. Then again, with all the proposed filesystem/block layer changes, Ted said that he might be open to a quick v1 implementation because the block shim layer discussed in the SMR forum could very well obviate the need for a lot of ext4 features. Time will tell; Ted and I were not terribly optimistic that any of that software is coming soon. In any case, lukas went home to refine his proposal. The biggest problem is ext4's current lack of a btree implementation; this would have to be written or borrowed, and then tested. I mentioned to him that this could be the cornerstone of reimplementing a lot of ext4 features with btrees instead of static arrays, which could be a good thing if RH is willing to spend a lot of engineering time on ext4.
- Michael Halcrow, speaking at the ext4 summit, discussed implementing a lightweight encrypted filesystem subtree feature. This sounds a lot like ecryptfs, but hopefully less troublesome than the weird shim fs that is ecryptfs. For the most part he seemed to need (a) the ability to inject his code into the read/write path and some ability to store a small amount of per-inode encryption data. His use-case is Chrome OS, which apparently needs the ability for cache management programs to erase parts of a(nother) user's cache files without having the ability to access the file. The discussion concluded that it wouldn't be too difficult for him to start an initial implementation with ext4, but that much of this ought to be in the VFS layer.
-- Darrick
[Ed: see also the LWN coverage of LSF/MM] | https://blogs.oracle.com/linuxkernel/date/201404 | CC-MAIN-2015-35 | refinedweb | 1,210 | 52.83 |
Hello, Everyone!
Today we have some great news to share with you. To make a long story short, C/C++ IDE goes public as CLion!
Since the early days, JetBrains has been focused on making software development more productive and enjoyable. Having started with a simple refactoring tool for Java, we have provided support for an amazing line-up of languages and platforms: Java, .NET, Python, Ruby & Ruby on Rails, PHP, JavaScript, HTML, Objective-C and many others. Our intelligent tools are widely known for their promotion of code quality, refactorings and smart editing features.
The C and C++ languages have a history going back to the early days of programming itself. They are two of the most successful survivors from the ‘primordial soup’ of programming languages, while most of the others now lie forgotten. So here at JetBrains we were driven by the belief that we could make C/C++ developers’ lives easier with a new IDE targeting these specific languages.
We are very much looking forward to your feedback in order to help us create a tool that you will enjoy using on everyday basis. That is why this early access program exists in the first place. Please note that this build is not even a Beta yet, and we have lots of things to do before we release v1.0.
Let’s introduce you the main features included into this build:
CMake
CLion uses CMake as a project model. It takes all the project’s information (source files, compiler settings, targets description, etc.) and handles all your changes in CMake files automatically.
If you already have a CMake-based project, just open the main CMakeLists.txt file in the IDE. If not, then our simple wizard will help you create a new project by initializing CMakeLists.txt with all the necessary definitions. Every change you make in CMakeLists.txt is automatically handled by CLion (but you can also call Reload CMake Project manually). Naturally, the IDE will invoke CMake automatically while building your project, so you don’t need to do it yourself.
All CMakeCache variables and CMake errors are available within the CMake tool window inside the IDE:
Compiler and Debugger
CLion supports the GCC and Clang compilers. For debugging, CLion currently supports GDB 7.8. The debugging experience is just as you would expect: you can run your program step by step, set breakpoints, evaluate expressions, add watches, and set variable values manually during execution:
Cross-Platform Compatibility
CLion is a cross-platform IDE, so you can use it on OS X, Linux or Windows. In case of Windows, the MinGW and Cygwin tool sets can be used. In our Quick Start Guide you can find the list of tools for each platform you need to start CLion.
Note: If you are using Visual Studio for C++ development (and the Visual C++ Compiler), try our ReSharper for C++.
Languages and Standards
CLion supports various languages:
- C (C99 version)
- C++ (C++03; C++11, including lambda functions, raw string literals, variadic templates, decltype, auto and more)
- HTML (including HTML5), CSS, JavaScript, XML
- Some other languages are also available via plugins (for example, Lua)
Intelligent Features
Knowing your code through and through, CLion takes care of the routine while you focus on the important things. The intelligent features of CLion are expressly designed to boost your productivity and improve the quality of your code.
The smart editor saves your time with code completion and highlighting (including smart completion that filters the list of types, methods, and variables to match the expected type of an expression).
Efficient project navigation will help you find your way through the code:
- Full-scale search via Find Usages:
- File structure navigation
- Navigating to class/file/symbol;
- Navigating to declaration/definition/super definition/subclass:
- Navigating through the timeline (recent files, recent changes, last edit location, etc.);
- Search everywhere, and other types of search
CLion monitors your code and tries to keep it accurate and clean. It detects potential errors and problems, and suggests quick-fixes for them:
CLion offers a wide variety of reliable code refactorings, which track down and correct the affected code references automatically:
- Rename (works also for CMakeLists.txt usages):
- Extract method/variable/typedef/define/etc.
- Change signature:
- Safe delete
- Inline
Writing code can be a lot easier and quicker when you use the code generation options available in CLion:
- Generate constructor/destructor,
- Generate getters/setters
- Override/implement
- Live templates
- Surround with if-else, while, #ifdef, etc.:
Watch CLion in action:
Are you interested? Give it a try!
What’s Next?
We are planning to publish v1.0 in a couple of months. While continuing with the current features (and especially with CMake support), we hope to add LLDB and/or Google Test. If there is a particular feature that you’d love to see in CLion, please post it to our issue tracker or vote for it if it is already there. We will consider them soon after the 1.0 release as we prepare the roadmap for future releases.
If you require even more information, please visit our website. If you have any questions, feel free to ask them on the CLion Discussion Forum, on twitter and here in our blog, where you can find news, updates as well as tips and tricks on how to use the IDE efficiently. And don’t hesitate to report any problems to our support team (clion-support at jetbrains.com) or on our issue tracker.
Develop with pleasure!
The CLion Team
Great! Can’t wait to try it.
Thanks for the great news. I’ve tried the private preview already and liked it a lot.
Question: Will you provide converters for Makefile-based projects?
And I’m wondering if there will be a open-source version?
We will support other project models in future. Priority depends on the votes in tracker:
Great news! Note: your link to Resharper for C++ appears to point to an internal URL…
Thanks. Fixed. Sorry for inconvenience.
Great news!
Just built the Arch Linux package for convenient installation
The package source is managed at
Will CLion be also available as a plugin for IntelliJ IDEA like other languages?
Congrats!
We’ll consider the plugin option in future. Definitely not before the 1.0 release.
A plugin for IntelliJ along with some supporting features for Java JNI/Android NDK development would be great!
+1 Seeing how JetBrains is really making a play for Android development, adding CLion as an Ultimate plugin with NDK support would be amazing. I just tried the EAP release on Linux and it is very impressive.
+1 for Android NDK / iOS plugin for intellij. could make the ide perfect for connected mobile apps with client and server code.
+1
+1
Please
+1 Amazing C++ IDE in its early days! Very impressive.
And world badly needs a CLion for NDK.
+1 for IntelliJ IDEA plugin. I am a big fan of IntelliJ IDEA and use this single IDE for almost all the development in different language. A CLion plugin for IDEA would be great
Hi,
Does an issue exist that we can track for updates on this?
I would also hope that an Idea Ultimate plugin would be a priority for proper native programming support which is lacking.
Cheers!
Note: If necessary I would pay for an Idea plugin if it were sold separately.
Not yet.
I hope you make it an intelliJ plugin… Keep the flagship flying the colors!
+1 . I work on multilanguage projects and would love C/C++ support in IDEA as well !
Really excited about the new C/C++ IDE !
Great news!
Is here any possibility to open directory as project?
If you have a CMakeLists.txt file there – yes.
it`s so great!!
I created project from existing source, however search aren’t working properly.
Always got: “No occurrences of ‘foo_bar’ found in Project 34 usages are out of scope ‘Project and Frameworks’ Find Options… (Ctrl+Shift+F)”
What’s wrong with the search?
Do you have correct CMakeLists.txt files where all the files from the project are pointed?
What if we want to search files which are not related to the project?
I created a custom scope as well but I still cannot search properly.
Looks like it’s a bug. Could you please fill the report here, describing the case in details?
What would be the best way to get Clion working with a cross compiler for an embedded device, say the MSP430. There is a port of gcc and gdb, however a tool known as mspdebug is needed for programming and initiating debug. Is there any way to integrate this into Clion/where should I start looking.
Currently we don’t support remote debugging neither cross-compilation. We plan to implement this functionality in future:
What languages will you support in the future, then version 1.0 is released? I would like if CLion would support Python, a nice language “glue” C(++) projects.
CLion will probably have a Python plugin in future. We are considering this for now.
What else are you interested in? There is C, C++, HTML, CSS, JS, XML and Lua for now.
Oh I’d so love to see ruby support <3
The D language is very nice language. It may be used as a replacement for C and C++. There is a growing community around it. The D language has all the features to produce fast concurrent systems. The language has all the benefits you would expect of a modern language. Unfortunately there are no good IDEs for the D language. Are there any plans to develop a plugin for the D language?
This would definitely get me interested in purchasing the CLion.
We are unaware of this.
+1 for D Language support, D would be amazing with a proper IDE
D support would be really great.
Would definitely love a D version of this. Just spent an entire day trying to use various command line and IDE options to get a D environment working to no success. A good IDE from you guys would be extremely welcome
+1 for Dlang support!
+1, I’d definitely like to see D support
There is some 3rd party plugin () you can try with CLion.
Thanks for the answer!
But what are your (business) plans for CLion? If you are going to support some (or all?) major languages, why purchase Intellij IDEA? Will CLion be your “C/C++ alternative” to the “Java alternative” (Intellij IDEA)? Or are you placing CLion in between Intellij and the other IDEs for specific languages?
CLion will support C/C++ and some complimentary languages. Lua, Python, etc. – mostly via plugins. Web technologies – CSS, HTML, XSLT, JS – are already bundled to the IDE.
Is there/will there be compatibility with PyCharm? I’ve been trying to write a C++ file using but PyCharm won’t locate the headers. Xcode does however. Is this an incompatibility in PyCharm or do I need to edit the CMake file?
PyCharm is an IDE for Python. If you need a C/C++ IDE use CLion.
+1 for Python – c+python – a marriage material:)
File templates don’t seem to be working. All I see is:
File
Directory
—-
HTML File
JavaScript File
XSLT Stylesheet
—-
Edit File Templates…
When edit file templates, I see there are ones for C, C header, and so on. They don’t show in the project window context menu, tough.
If I create a new C file, I don’t get the template inserted, just an empty file.
Yes, there is no such templates for now. But we have this in plans:
I would really love to import a Visual Studio project into CLion!
You know what would be just fantastic??? If you would add a c# support plugin to clion…
I would pay big bucks for it
I’m not really sure we are planning this at all.
Would love to see that too, along with support for the Mono/Xamarin platform.
will qt framework be supported in clion?
Libraries are resolved already at some point. As for the qmake –
thanks for reply.
what about ui forms? will be some designer tool provided for that like in qtcreator?
In the 1.0 release no. We’ll consider later. Add a feature request to our tracker:
Guys! It seems very promising. I don’t really like C++, but with CLion it may change. Thanks for making programming easier and more fun.
Great news!!! But I, like many others, are still waiting for the C# IDE :P!
CLion sounds cool! Question: When I buy IntelliJ Ultimate, will I get access to CLion or its features (as a plugin), or will I have to buy it separately then?
At first CLion will be a separate IDE. After 1.0 release we’ll consider the plugin option.
+1 for making clion plugin available to ultimate users
Hi,
even if it is still a different IDE, will the IntelliJ Ultimate license be sufficient to use CLion?
No, it’s a separate product with a separate license.
How can i build all the targets in one click? My CMakeLists.txt contains a lot of targets and Ctrl+F9 only builds the first one, and I can’t find the “Build all” option.
Unfortunately now not. Vote for the issue () to increase its priority.
Hi there
will version 1 support: standart?
Not sure about this for 1.0 release. But we have C11 in our plans in tracker –. Vote it up to increase priority.
Will it be available as a plugin for Intellij?
I would love to have only one IDE that I can use for almost all languages/platforms
With 1.0 release – no. Later we’ll consider this as an option.
Support for cross-compilation/debugging would be great. I’d like to be able to configure custom (i.e. per project) toolkit (including GDB), custom GDB scripts, etc.
Currently embedded programming is somehow dominated by Eclipse CDT, time to change it! 😉
Vote for this to increase the priority of the issue:
This is cool! Will you guys support Arduino? Please Please Please!
(Or does this fall in remote run/debug request?)
Did I say please?
I think your are talking about this:
Yep. That’s it! Thanks!
Very cool, I learned C++ using Borland C and I recall the experience as “less than resharperly” in terms of joy. I’ll give this a whirl for fun, but I have a question for the team…
What is the purpose of producing a C/C++ editor? Given the fact that there are numerous editors favoritted by many. This is an honest question, I’m not being cheeky. What was the motivation and what does the future look like in regards to CLion?
We do believe that we can make C/C++ developer’s life easier providing him an IDE that can enhance his/her productivity. We see the lack of proper C/C++ IDEs and so want to use our big experience in this area for this purpose.
How this compares to AppCode.. if it’s better there’s a way to import my current projects from AppCode into Clion?
C/C++ languages support is the same in both IDEs. The difference here is that CLion is cross-platform and based on CMake project model. Supported tools will also differ in future.
I’m loving it, only downside for me is that there are no pretty printers for things like std::vector/map etc. in the debugging view.I don’t like to get entangled into implementation details just to get the information I need.
This is it:. Vote to increase the priority
I do most of my dev in Appcode but often need to port to other platforms so this is great!! I’d love it if there was some integration between the two so that I could easily maintain an Xcode and Cmake project but even doing this manually I’m happy to not need visual studio anymore! Would be great if Xcode shortcut keys could be added as an option though.
AppCode has the same C/C++ language support, but the build systems are different in AppCode and CLion. Not sure if we are going to support Xcode build system in CLion, but feel free to add a feature request to our tracker.
About Xcode keymap – it’s there. Press Ctrl+` and select switch keymap.
Thanks Anastasia, sorry for the slow reply and sorry I missed the key mapping – that’s great! I have added a feature request here:. Hopefully some other people will vote on it too.
Looks great. I have a multi-project cmake/nodejs based build system for C across
Linux/BSD/Mac/Windows/ARM (Android).
Will this support Android and iOS cross compiling? Will it integrate CPACK (NSIS/Debian/RPM)?
Valgrind support?
What is the likely cost? Will there be multiple editions? Will there be a community edition?
Thanks
Cross-compilation feature –
Valgrind feature –
Feel free to vote to increase the priority.
The cost will be around AppCode’s one. There will be typical licenses like Commercial, Personal, Classroom, Academic. There is no thoughts about community edition for now. May be later.
Link for the valgrind youtrack issue gets me a “You have no permissions to view this page” page.
Sorry for that. Please, try now –
Works now. Thanks.
CPP-548 doesn’t seem to exist. (Memory inspection) discusses Valgrind. I’m not sure how to interpret the History. Seems to imply it was implemented (?).
Heh… That will impair my desire to take it on. The IDEA licensing was winning enough for someone to actually take you up on it. I don’t give a damn HOW approachable the licensing is- if you can, at a moment’s notice yank all rights to the thing like BitKeeper did with Linus and company…you get the idea.
Yes, a company has the right to make money. I’ve been burned by Lord only knows how damn many companies that had the best thing yet only to disappear on me or not support the new platform I’d moved to. Never again.
I’ve used this tip: . But I’m still waiting an official CLion’s valgrind support.
Hi dudes. After some googling I found this following helpful alternative at StackOverflow’s answers: .
Hello,
I was hopeful about this until I read:
“Note: If you are using Visual Studio for C++ development (and the Visual C++ Compiler), try our ReSharper for C++.”
What I need is one project file and one editor, so I can build the same project on multiple platforms. This limitation means I cannot do that. I assume this limitation is because you don’t want to upset Microsoft, but that doesn’t help me as a customer.
What I meant to say is I request Microsoft compiler support.
Right now we have no plans for supporting MS Visual C++ Compiler. May consider in future.
Why not extend QtCreator ?
In windows, Visual Studio is the reference IDE, why add another IDE to the “others” list of choices ?
Doesn’t QtCreator have many features already that can be extended easily ?
We have some great experience preparing IDEs based on our IntelliJ platform. There is a lot of smart features already ready to be re-used. So from our point it’s more logical to create a separate IDE.
That is simple. They can not make money on QtCreator.
lol, IDEs…
Real men use ed.
Real men use cat
Super men use vi/vim.
i tried to create a text file and include it in cmake file and then tried to read from it in the project but with no use, i can’t read from file!?
What do you mean saying ‘read from it in project’?
i want to read from this file in my c++ code
i used all reading from file methods in c++ but with no use
So add a file to the project by pointing it in CMakeLists.txt. For example add to SOURCE_FILES macro that is used some how like add_executable(exec_name ${SOURCE_FILES}) and then you can use it in this project.
why the comments are removed ?
They are not, just hidden for pre-moderation.
that’s ok they’re appeared again.. please can you tell what’s the issue with reading from file.
Just answered, if I got you right.
That’s what i have done so far and can’t read from file till now
set(SOURCE_FILES main.cpp in.txt)
add_executable(untitled ${SOURCE_FILES})
Could you please send us a sample project to clion-support at jetbrains.com?
i have emailed( clion-support@jetbrains.com ), is that what you meant or something went wrong, cause no one has replied till now?
please can you give me the link or something i searched the site but can’t find anything
clion-support at jetbrains.com
i have emailed( clion-support@jetbrains.com ), is that what you meant or something went wrong, cause no one has replied till now?
We’ve just replied. Sorry for a small delay – there is a lot of feedback messages coming to us these days.
Besides what we’ve answered via e-mail – you can go to Run | Edit Configuration and set Working directory there to use relative paths in your code.
thank you very much.
and finally this is the best IDE ever I’ve been waiting so long
Just a bug i found:
Code:
Output:
It seems me to that anything before the scanf statement is being produced after it scans an input rather than before as it should have in the code
Another example of the scanf bug:
Code:
Output using Clion:
Output using VS:
I am loving the IDE so far, just thought would point out bugs.
Yes, unfortunately there is a problem with out/in-out buffers flushing in the IDE:
Ah ok. Thank you for your response Anastasia. I was specifically waiting for this IDE to be released so that i can immerse myself fully into C. I realize its an EAP but it does a wonderful job anyways. I will be sure to point out any more bugs that might come up! I was using MinGW environment with the integrated CMake and GDB packages incase that information is needed
how can i add another file from another directory in my current directory ??
What do mean with ‘add’? Include?
no i mean adding a file to my project directory inside the IDE
Just place it to CMakeLists.txt as source files. You’ll be warned that it’s placed outside the root directory: Some source files are located outside of CMakeLists.txt directory. You can change the project root or ignore this in future.
would it be free or have a community version ?
It will be paid with 1.0 release. May be later we’ll consider some community version but now no such plans.
Can you please explain why you refuse to make a community edition? It is very useful for opensource projects.
Open source projects can request a special free license from us. So this is not the case.
Why do you need a separate community edition for other ides then?
Each product at JetBrains is run independently and not every decision of one product effects other products. Our IDEs, though many of them are build on the same platform, are still vastly different in terms of tools included, set of languages supported and built-in options.
In addition to supporting Open Source projects with a full edition of CLion at no cost, which in essence provides more functionality to users than a hypothetical Community Edition, we also provide students with free licenses and give startups a valuable discount.
It’s great! Good job. I wonder CLion has an option to set custom cmake arguments, for example when I have a custom vairable called CUSTOM_TEST I would do the following in command line,
cmake -DCUSTOM_TEST=TRUE ..
Or similar how can I do this with CLion?
Now unfortunately you can’t pass this to cmake itself in CLion:. But you can do it through the CMakeCache. You can’t add custom variable from the IDE’s tool window (), but here is the workaround how to achieve this:.
We do hope to improve this experience in future.
Good to know you guys are working on it. There’s another feature that I would like to propose, I’ve only seen it in KDevelop.
template
class A{
public:
T i;
A(T x) : i(x) {}
};
It’s nice to know what are the template arguments that are taken by class A, in KDevelop it shows A when I hit ctrl+space at A< which imo gives out much more information.
Thanks, this sounds useful. Parameter info action should show this:
I also do this, so support would be good. However, I could work around this using environment vars.
I’m really looking forward to the version 1.0 and the integration of google test.
Clion is just great
We do hope to have it there but can’t give you a promise. But they will definitely come in some 1.x version.
Thank you
CLion IDE Introduction for Turkish users. I love this IDE. But my computer oldest :/
Also visit my blog for CLion Introduction post
Is it possible to import an existing project with GNU make model to CLion? Are only cmake projects supported?
For now – CMake only.
We plan other build systems for the future, definitely after 1.0 release –
What about slightly less known build systems. As an example I’m working on the Meson build system and one of the design goals is that it must be as easily embeddable into IDEs as possible. Everything is introspectable with straightforward JSON as described on this wiki page. Enabling basic Meson support for an IDE should not take more than a few hours and it can be used to get deep integration, such as right clicking on a failed unit test to launch it in the debugger.
You can add them to the tracker (). We can consider later.
Having trouble figuring out how to get one project to reference another.
I have one module which compiles to a shared library, has a test suite, and needs to publish certain headers for consumption (but not others). I have managed to figure out enough CMake (which I’ve never used before) to compile the shared library, though it’s hard for me to tell where it’s finding Boost (magic!).
I have another module which needs to consume the first module’s shared library and headers, compile its own code and link everything into an executable.
Are there any established patterns for such a thing? Ideally, I don’t want to turn them into a single “project” as the shared library changes infrequently, and I want for cleanliness to consider it a black box as much as possible.
Just point the libraries in CMake to link you target with. Something like:
target_link_libraries(exec_name lib_name)
And set up the include_directories if you are going to use any headers from there.
Find a lot of useful CMake variables here:.
I can’t seem to login to the issue tracker, so I’m going to post my bug here. The syntax highlighting doesn’t take into account “-include” flags. It compiles and runs just fine though. My sample case uses the std namespace from the included file, but the syntax highlighter can’t figure out anything in main.cpp.
Simple sample project here:
Thanks!
Thanks for the report. Our tracker was under maintenance in the end of last week, but now it’s ok. However I’ve filled the issue with your sample:. Feel free to comment and follow. Actually the problem is that CLion doesn’t handle your header as a file from the project.
You’re absolutely right! Hah, I hadn’t realized that in my original project that I hadn’t included the file. It’s not actually terminated by a “.h” so my “generic” project CMake file did not pick it up.
Wow, thank you so much!
Oops, I jumped the gun on that reply. Apparently CLion hadn’t finished highlighting the file.
Adding the header to the project does not fix the highlighting errors in the main.cpp file. I’m updating my github issue to include the header.
But still, thanks for the reply!
Why it’s so ugly on l!inux distibutions? O_o
I tried with JRE 6, 7, 8, 9 and OpenJRE too but the look and feel is ugly as hell.
Why?
There are some problems that exists in Java distribution with fonts rendering. May be this is the point. We are trying to improve it for now, but not finished yet.
Looks like the issue tracker does’t allow any new registration. So I posted it here.
I would like to have support for CppUTest (). It is a popular C/C++ Unit Test framework. IMHO, even better than Google Test. It is also well covered in the book “Test Driven Development for Embedded C” ().
I also happen to be the author for the CppUTest test runner for Eclipse. () Please feel free to use the code if you find it useful.
Well… or if you really don’t have any plan to support CppUTest, can I also know how I can find information to make a plugin for CLion? Thanks.
There are some plans about various Unit testing frameworks support in our tracker: (there were some maintenance works there, but now it’s working, feel free to use it). You can add you request there also.
Or of course write some plugin yourself:. Check the link for the additional information.
“New user registration is disabled. Please contact your system administrator”
I wanted to vote on the Qt project support issue to express my whish for QBS support. Unfortunatly I seem to be unable to create a new account and guests are not allowed to vote. Is this intended?
Regards and thanks for the IDE. It looks really promising.
Regards,
Erik
The tracker was under maintenance works but now it’s working, feel free to use.
Guy’s you are AWESOME!
Being an IDE-addicted, and being charmed by IDEA for Java and Groovy, I just feel smth like that, using CLion. And it mean’s C++ will be back to my life, and will not be as painful, as always!
Million thanks, keep going!
thanks!
intellij idea is the best java ide I ever used. I’m looking forward to the version 1.0 too, hope it will come soon.
Could we have multiple projects (or modules) in the same CLion window?
Not now.
Is there any plan to support multiple projects/modules? I think it is a very common use case in many software development.
What case do you mean exactly? Could you please show an example?
Here is one of the cases. We have a system in which some different types of server processes communicate with each other. Each server code is stored in a separate folder. They will have their own build configuration (Cmake or Makefile). And they can share some common libraries.
so, we will have:
servers/
server1/
server2/
lib/
commonLib1/
commonLib2/
So, can Clion support this kind of system model?
You can make some top level directory with main CMakeLists.txt file listing the add_subdirectory options (optionally, root folder can differ from the folder with the main CMakeLists.txt file). Libraries paths should be pointed in the appropriate server’s CMakeLists.txt files to link correctly.
Makefile build system is not supported yet, only CMake one.
+servers/
|—server1/
|—server2/
+lib/
|—commonLib1/
|—commonLib2/
I’d really love to be able to import vcproj files to CLion. IDE is great but we can’t yet import our huge Visual Studio projects into CLion which means we can’t switch to your product
With the second EAP build you can import project with the existing sources and IDE will help you to start with the CMake. Check it here:
Pingback: Text Editor Economics | Gruending Design
Hello,
first i want to thank you for the amazing job, you are doing(either with clion or your other IDEs). I really look forward for the final CLion version.
I have a question. I heard(read somewhere), you are using libclang “behind the scene” for code parsing and analyzing. If it is so, can i ask what version you are using? And also, is there a way to pass options to to parseTranslationUnit(if you actually use libclang). Actually what i want to know – is there a possibility to use c++14 support? (which seems to have very nice support in latest(even not latest 3.5) version of libclang)
Clang annotator is not bundled yet –. We have this in plans.
And for the C++14 follow/vote this issue –. It’s also not ready yet.
Thank you,
is there some estimated timeframe, where we can expect clang annotator to be built in? (2 months or year or so..)
No estimations for now, unfortunately.
Clion is a great C/C++ IDE, I really enjoy using it. But would you please remove this annoying message that tells me that the currently installed version of clion has expired and I should install a new one? I mean it is ok that the software informs me that there is an update, but why does it prevent me from using the old version? I installed Clion from the Arch Linux User repositories, because I don’t want to mess around with a manual install. The repositories are updated frequently, but it can take a few days/weeks until new releases are accepted or links are updated. So please don’t prevent your users from using a slightly older version of your great IDE.
Maybe this issue is related?
No, this is not about this.
This is Early Access Program free build with the limited validity period (to try and to evaluate the IDE). After release there will be a normal version.
Ahhh, ok. Thanks. Got confused by the different entries in the Arch Linux User Repositories as there are two packages clion and clion-eap. Furthermore clion is listed at the student program page (), so I thought it is an official release.
AWESOME!!!
By far the best C++ IDE 😉
Regards
Is it possible a plugin for compatibility with the C ++ Builder projects?
As the project increases files, the rad studio becomes slow to access methods/code completion.
In CLint there are several options that make programming easier compared with rad ide and it would be great if you support it.
You can just import your project to CLion and it will create a basic CMake file for you.
I am looking forward to creating chrome native apps using Nacl .C++ and HTML(take it for all web thing) are already being supported if the support is extended to specifically target nacl it will be awesome.
If I got it right from here () this is only a question of cross-compilation (which is, feel free to vote for it).
I am not able to print the statement before the scanf in Clion IDE (for Linux based)
There are some issues with the input/output streams that will probably be fixed in the next EAP. Sorry for inconvenience.
Very nice.
2 questions:
– How much will it cost?
– Will there be an option to run a build from a shell, something like clion -build “Debug”, or whatever?
1. When 1.0 is released there will be a set of options available in terms of licenses. The set and prices will be the same as for the AppCode:, that includes paid, free and discounted options.
2. Why do you need this? Of course, you can always call build cmd manually, but what’s the usecase for this? You can pass all the proper options to the CMake files and you’ll be able soon to pass the env variable and parameters to cmake cmd that CLion runs.
I have been using CLion for school, and I love it! (They try to make us use Visual Studio, but I’ll take CLion EAP over VS2013 any day!)
Tried CLion in CentOS 6.5. IDE is working correctly but can’t compile projects.
Please, review screenshot
Regards,
Eugene.
C++11 is supported since gcc 4.7 and gcc 4.4 has C++0x support. So simply remove the C++11 option in CMakeLists.txt or change to -std=c++0x
Thank you. I’ll try update qcc up actual verion manually.
And why Ctrl-C and Ctrl-V do not work?
It should be working. What keymap are you using in CLion? Check or switch in Settings | Keymap.
Changed in settings from VIM to IDE and it’s working now… A bit strange after Visual Studio tune something myself )))
It’s a Linux!
You’ve probably installed the Vim plugin and thus non-default keymap was selected.
This has a lot of potential. I’d be interested in an open source community-edition like IntelliJ has, I’d rather not use proprietary software.
CLion won’t have a community edition. At least in the nearest future. Maybe later we’ll come back to this.
Hello.
I would use CLion as well. I would buy it to work on my C++/Lua project, but why can’t I install Lua plugin? Everywhere I see information, that Lua is supported, but no Lua plugin in plugin list and “Plugin ‘Lua’ is incompatible with this installation” when I trying to install it from disk.
I encountered this issue with IDEA too, but there i was able to use previous version of IDE, that works with Lua plugin well. I can’t find where can I get previous version of CLion to work on my project. Or can i solve my trouble in any another way?
Unfortunately Lua plugin is not developed by JetBrains, it’s a 3d party plugin. So we could only suggest you to write a message to the plugin developers. We’ve already contacted them for some tickets like this:. Hope they will fix it soon.
Thank you for fast answer.
Will see.
Looking forward for a GUI builder within CLion. An amazing IDE for C++. Thanks a lot for developing this. Will be purchasing a license once the GUI builder is available.
What exact GUI build do you want?
Hi Ana,
Thanks for the quick reply.
A UI forms or Dialog based one , like the one IntelliJ IDEA has.
Is it possible to use Cinder C++ with CLion. I am not sure whether the CMake can generate a correct file for such a framework.
Best,
Ron
Currently this is out of product scope. But probably we can come back to it later. Now we have quite a lot of things with upper priority.
I have a small game project that uses SFML, box2d and other small libraries.
I already managed to make my project work on both MSVC 2012 and Xcode5. All I have to do is to commit code, add source files I would have added in the other project, and I’m good to do.
It’s pretty smooth except from weird stdafx differences, and the fact MSVC2012 doesn’t support variadic templates yet.
I’m really wondering if I would really be able benefit from clion. I mean obviously I would have to recompile SFML as SFML does not provide binaries for clion ? That’s a first problem I guess.
I also remember giving up on compiling Ogre3D on xcode, there were many dependencies, versions of the engine (repo or stable), it was very annoying and I’m not into tweaking Cmake.txt files. I guess jetbrains would not solve this.
I have not given a try to this IDE, but I’m skeptic. C++ is designed as a cross platform languages, but the fact build systems differ is a huge pain, and an IDE won’t solve this unless library maintainer provide solid cmake scripts.
Thank you for the comment and your case description.
CLion is currently supporting only CMake. But since you are using VS prj, maybe it’s worth trying ReSharper C++, this is an extension to VS.
However if you need a cross-platform case, CLion is more for you. You can find some quick CMake tutorial in our webhelp: and try to import you project into CMake via the import project functionality and then tune the dependencies manually in CMake files.
Hi,
is there something in planning to support ClearCase in C-Lion? I’m using the ClearCase plugin for IntelliJ, so it would be very helpfull to have something similar in C-Lion.
Thanks in advance,
Michael
We are currently collecting votes:. If there is a demand, we’ll bind the plugin. Feel free to leave comments and follow the ticket as well. | https://blog.jetbrains.com/clion/2014/09/clion-brand-new-ide-for-c-and-c-developers/ | CC-MAIN-2017-30 | refinedweb | 6,844 | 75.3 |
Qt Creator Code Completion
Code completion is a feature in QtCreator that helps to write program source code efficiently. Pressing Ctrl+<Space> asks the code completer to popup a small help window with suggestions which might be appropriate to type at the current cursor position in the source file.
Code completion can be configured to "jump in" automatically after typing some characters and then stopping to type.
Contents
Situations where code completion is helpful
- include filenames
- method names
- class names
- namespaces
- … (please fill up)
CamelStyleCodeCompletion
Code completion filters the popup using the CamelStyleNamePattern: typing CSNP could complete to CamelStyleNamePattern.
Magic Keys
Some keys are magic keys. Hitting these keys while the completion popup is shown uses the selected completion and types in the magic key.
- '.'
- '('
Should there be more magic keys like: '+', ':','<', … ?
Slow down of code completion
Starting with QtCreator 2.3 there seems to be a thread to fill the popup while not blocking typing during code completion analyzing. However there are still situations where code completion takes significant time. | https://wiki.qt.io/index.php?title=Qt_Creator_Code_Completion&printable=yes | CC-MAIN-2022-05 | refinedweb | 171 | 54.32 |
Building and Deploying Your First Cloudflow Application
using Scala and Akka Streams
Cloudflow is a relatively new framework that helps you build distributed streaming applications and deploy them on Kubernetes. Its powerful abstractions allow you to easily split your application into independent stream processing components, called streamlets. Streamlets can be developed using several runtimes such as Akka Streams and Flink. A streamlet can have one or more input streams, inlets, and one or more output streams, outlets. You deploy you application as a whole while Cloudflow deploys streamlets individually. Cloudflow ensures data flows between the inlets and outlets of your streamlets at runtime, through Kafka, corresponding to your Avro schemas and your pipeline definition, called a blueprint.
In this post we are going to build a simple application using the Cloudflow framework and Akka Streams. We are going to start off with a simple SBT project to setup a stream processing pipeline, run it locally and eventually deploy it to GKE using the Cloudflow CLI.
Prerequisites
First a few prerequisites.
For building and running locally:
- Scala 2.12+
- Sbt 1.2.8+
- JDK 11
For deploying to GKE:
- Kubectl
- Google Cloud SDK
- A GCP project with GKE
- jq
- Helm 2 (installer is not compatible with Helm 3 at time of writing)
Building a Cloudflow application with Akka Streams
Building a rain radar with Cloudflow
For our fictive problem domain we are going to stay in the clouds. We are going to build a simple rain radar. Let’s assume we are getting precipitation data of several locations from different sources. Based on a simple algorithm we want to determine in which cities it’s raining and which of our measurements can be classified as clutter. We could later extend this application to calculate rain intervals or even draw maps, but for the purpose of this post let’s keep things simple.
Project setup
Following the convention over configuration principle, the anatomy of a Cloudflow application roughly looks like this:
|-project
|---cloudflow-plugins.sbt # cloudflow plugin config
|-src
|---main
|-----avro
|-----blueprint
|-------blueprint.conf # pipeline definition lives here
|-----resources
|-----scala
|-build.sbt
|-target-env.sbt # docker repository config
First of all, we would need to add the
sbt-cloudflow plugin to help us package our streamlets into deployables later on. We’ll define the plugin in the file
project/cloudflow-plugins.sbt.
In line 5 of our
build.sbt we are enabling the
CloudflowAkkaStreamsApplicationPlugin, because we are only going to use the Akka Streams runtime. You can optionally add other plugins as well if you plan to also write Spark or Flink streamlets. We are going to use Akka Http Spray JSON for serialization.
Defining the data model
Now that we have our project setup we can start developing. First we will create our data model. Cloudflow encourages a schema-first approach where you describe your models using Avro specifications, placed in
src/main/avro, and the corresponding classes will be generated.
Let’s start with our top level input record which represents a precipitation measurement on a certain time for a certain location. We’ll call this model
PrecipitationData from now on. Its Avro schema looks like this:
As mentioned, our Avro schemas should be placed in
src/main/avro so we store our first schema in
src/main/avro/PrecipitationData.avsc. Our
PrecipitationData model embeds a
Location, so we have to define the schema for that as well:
This completes the data model of our input records. As for the output we have two possibilities. In our simplified model we are either dealing with
Rain or we are dealing with
Clutter. Let’s define schema’s for both:
and
Now we have both our input and output records defined. The result of te built in code generation creates the corresponding Scala classes in
target/scala-2.12/src_managed/main/compiled_avro/com/github/jeroenr/rain/radar.
Http Ingress
Now that we have our data model defined we can start creating some streamlets. Let’s start with the data ingestion part. For the purpose of this example we are going to assume that we have some job that will Http POST precipitation data to our service. Hence, we need to setup an Http Ingress streamlet which will be responsible for ingesting, validating and parsing this input into our
PrecipitationData model. Let’s also configure a single outlet so we can pipe our data to our downstream streamlets.
As you can see the code is very minimal. We are extending the abstract class
AkkaServerStreamlet, which ensures this streamlet gets an endpoint in Kubernetes.
We define an
AvroOutlet[PrecipitationData] which will output any successfully parsed incoming message to the
"out" outlet. By partitioning by city we ensure that we could potentially process multiple cities in parallel in streamlets connected to our outlet. Defining a partitioner ensures values with the same city end up in the same partition on Kafka.
Every streamlet needs to define a
StreamletShape, which configures the inlets and outlets. For our ingress we just have a single outlet (
"out") and no inlets, since we are ingesting input over Http rather than from any upstream streamlet.
The last step is to define the logic of the streamlet. For our ingress we can simply use the built-in default
HttpServiceLogic. We pass the outlet we defined above and let Cloudflow handle the rest.
Creating (un)marshallers
Our ingress needs to know how to deserialize our models. For this purpose we will define a
JsonFormat for our models using
spray-json. We’ll have to define a custom format to deal with the timestamp field, which uses the
Instant type, but we can use the built-in
jsonFormat* for the generated case classes:
Rain / Clutter Partitioner
Now that we are able to ingest
PrecipitationData and make it available in our pipeline we would like to differentiate the cases where it’s dry, raining or we are dealing with clutter. We want to feed measurements that we classify as rain to a different processor than measurements we classify as clutter. We basically want to partition our stream into a stream of
Rain and a stream of
Clutter. In case we didn’t measure any value we assume it’s dry and disregard the particular
PrecipitationData.
For this type of streamlet we are using the
AkkaStreamlet which is the fundament to build Akka Streams based streamlets. Like with our ingress streamlet we start off by defining our in- and outlets. An inlet for
PrecipitationData called
"in", an outlet called
"clutter" for
Clutter and an outlet called
"rain" for
Rain. For rain we still want to partition on city again in order to potentially parallelise the processing downstream, but for clutter we don’t really care about this and we use a simple
RoundRobinPartitioner.
Then we define the
StreamletShape again. In this case we have a single inlet and two outlets, for clutter respectively rain.
Lastly we have to implement this streamlet’s logic. Luckily, there’s a
SplitterLogic abstraction available which does exactly what we need; it splits a stream over two outlets based on Scala’s
Either. The implementation of this abstract class requires us to implement a
Flow[PrecipitationData, Either[Clutter, Rain]]. We can use
flowWithOffsetContext to acknowledge that we’ve processed a
PrecipitationData. When we successfully output this construct automatically commits the offset (checkout this explanation of offsets if you’re not sure what I’m referring to) using at-least-once semantics. The implementation of the
flow is straightforward. First, we
filter out the
PrecipitationData where it’s dry. Then, depending on whether we exceed the “rain threshold” (0.1 in this case), we
map to
Left(Clutter) or
Right(Rain).
Also here the required code is quite minimal. We can focus on implementing the business logic, rely on some very basic operators (e.g.
filter and
map) and let Cloudflow do the heavy lifting.
Rain Logger
The final piece of our pipeline are two simple logger streamlets. We have a stream of
Rain and a stream of
Clutter. In a real application you might want to store those measurements in a database, but for the purpose of this post we would like to simply print out each element on both of the streams. This “logging” functionality is pretty generic. Whether we are dealing with
Rain, with
Clutter or with any other record the implementation is really similar. Hence, it seems like a good idea to create a
LoggerStreamlet abstraction.
We base the
LoggerStreamlet on the
AkkaStreamlet once again, so that we can benefit from the Akka Streams semantics. Our streamlet has one inlet for record type
T. As long as we know that this is some type of Avro record, we know how to deal with it. We don’t have to define any outlets, because our logger is the end of our pipeline. The
StreamletShape therefore has just one inlet and no outlets.
For the logic of this streamlet we will use the
RunnableGraphStreamletLogic building block. This requires us to implement the
runnableGraph function which should define how data should flow from the source, our inlet, to the sink. This is something that the
SplitterLogic building block, which we used in the previous step, is doing under the hood. Since we have no outlets we use the parameterless
sinkWithOffsetContext overload. This ensures we still commit offsets even though we are not emitting any elements to an outlet downstream. To define the source we simply pass our inlet to the
sourceWithOffsetContext function. The
Flow in between our source and our sink would be a simple call to our logger on each element. Here, we can use the
map operator again.
Based on our
LoggerStreamlet abstraction we can create two simple implementations: a
RainLogger and a
ClutterLogger with corresponding log templates.
Wiring everything together
Wonderful, we have build all the required streamlets for our stream processing pipeline. The only thing left is to connect all inlets to outlets in a pipeline definition or blueprint, in Cloudflow terminology. This blueprint is defined in a
blueprint.conf file, which lives under the
src/main/blueprint directory as we have seen in the project structure.
First, we define all our streamlets under a short alias:
PrecipitationDataHttpIngressas http-ingress
RainClutterPartitioneras partitioner
RainLoggeras rain-logger
ClutterLoggeras clutter-logger
Secondly, we define the connections between the inlets and outlets of our streamlets. You could connect a single outlet to multiple downstream inlets, but in this case we don’t need that. Our simple pipeline looks like this:
http-ingress → partitioner → rain-logger
→ clutter-logger
This straightforward definition is enough for Cloudflow to understand how data should flow through our pipeline at runtime.
Testing our app locally
To run our app locally we can simply hit
sbt runLocal. This will first of all verify our application blueprint. It will check if all inlets and outlets are connected. If not we would get an error similar to:
So we fail early without having to find out this problem after deploying to GKE, quite cool!
Once you’re blueprint is successfully verified we are getting a message indicating all our streamlets have spun up, like:
It tells us that we are expecting precipitation data ingress on HTTP port 3001 and where we can find our log output.
Making it rain!
Great, we have our first Cloudflow application running locally. Let’s throw some data at it to see if it generates the log statements we expect.
To generate a bunch of JSON input records I used the excellent tool provided by. I used the following template:
[
'{{repeat(10, 20)}}',
{
timestamp: '{{integer(1574000000000, 1574973230815)}}',
location: {
lat: '{{floating(-90.000001, 90)}}',
lng: '{{floating(-180.000001, 180)}}',
city: '{{city()}}'
},
value: '{{floating(0, 1)}}'
}
]
The above template generates between 10 and 20 precipitation data records which I store in
precipitation-data.json. Now we can make it rain, e.g. by using
curl and
jq.
for str in $(cat precipitation-data.json | jq -c '.[]')
do
echo "Using $str"
curl -i -X POST -H "Content-Type: application/json" --data "$str"
done
You should see output similar to the one below
This means we have successfully hit our Http ingress streamlet and it was able to parse our requests. Otherwise, we would have gotten a 400 Bad Request. The pipeline output log file, which location you can find at the bottom of the output of the
sbt runLocal command (should be in a path starting with
/var/folders/ss/), should contain the log statements written by
RainLogger and
ClutterLogger. If we scroll to the end of this log file we would see output similar to the one below
Deploying Cloudflow
Now that we have verified that our new stream processing application can run fine on our local machine we can deploy it. I’ll show you how to do this for GKE.
Setting up Cloudflow on GKE
Make sure you meet the criteria for deployment to GKE mentioned in the prerequisites section. Verify that you have an active GCP configuration by running
gcloud config configurations list.
Follow these steps to setup a new GKE cluster and install Cloudflow:
- install the Cloudflow kubectl integration. Run
kubectl cloudflow versionto check whether you’ve installed it correctly.
- Clone the Cloudflow repo to your local machine and navigate to the
installerdirectory.
- Run
./create-cluster-gke.sh my-cloudflow-clusterto create the cluster
- Wait for the cluster to be deployed and fully running and responsive (this could take a while, because sometimes auto updates are triggered as well). Use the GCP console to monitor the progress.
- Run
./install-gke.sh my-cloudflow-clusterto install the cloudflow operators. These include kafka, zookeeper, flink and spark. Follow the steps of the installer, i.e. selecting storage classes of your choice for each of the stateful operators. If you are getting connection errors during the installation it probably means your cluster wasn’t fully ready yet. You can rerun the installer once it is in this case.
- Verify that you have access to the cluster by running
gcloud container clusters get-credentials my-cloudflow-clusterand
kubectl cloudflow list. The latter command should return an empty list, because we didn’t deploy our application yet.
Deploying our new Stream Processing App on GKE
Now that our environment is ready we can proceed with the deployment of our rain-radar application.
Follow the following steps to publish and deploy your application:
- Verify that you have access to GCR by running
gcloud auth configure-docker. It should say something like:
gcloud credential helpers already registered correctly..
- As we’ve seen in the project setup section you should create a file called
target-env.sbtin the root of your project (i.e. on the same level as
build.sbt). The content of that file should be:
ThisBuild / cloudflowDockerRegistry := Some("eu.gcr.io")
ThisBuild / cloudflowDockerRepository := Some("my-gke-project-123456")
- In your terminal, navigate to the root of your project and run
sbt buildAndPublish.
4. The output of the previous command tells you how to deploy your application. You just need to append
-u oauth2accessToken -p "$(gcloud auth print-access-token)" to authenticate. The full command will be something like
kubectl-cloudflow deploy eu.gcr.io/my-gke-project-123456/rain-radar:8–0bd6086 -u oauth2accessToken -p "$(gcloud auth print-access-token)".
5. Awesome! That’s really all there is to it and I didn’t have to touch a single
YAML file. Monitor the progress of the deployment using
kubectl cloudflow status rain-radar. Once fully running the output should be similar to
You can see that the deployment created a dedicated namespace with the name of our application:
rain-radar. All our streamlets are deployed as separate pods. Sweet!
If we want to scale (parts of) our application, we can simply use the
kubectl cloudflow scale command. For instance, if we want to run multiple instances of our ingress we run:
kubectl cloudflow scale rain-radar http-ingress 2. Really cool :)
Testing our deployed Cloudflow Application on GKE
Let’s repeat the test we performed on our local machine, but this time we will hit our deployed application on GKE. To do this in an easy way we set up a port forwarding and then we can run the same
curl script.
- First, we have to figure out the port of our Http ingress. We can use the
streamlet-namelabel to find it:
export INGRESS_PORT=$(kubectl -n rain-radar get po -lcom.lightbend.cloudflow/streamlet-name=http-ingress -o jsonpath="{.items[0].spec.containers[0].ports[0].containerPort}").
- Then we setup the port-forwarding by running
kubectl -n rain-radar port-forward \.
$(kubectl -n rain-radar get po -lcom.lightbend.cloudflow/streamlet-name=http-ingress -o jsonpath=”{.items[0].metadata.name}”) \
3001:$INGRESS_PORT
- Lastly, we run our curl script again:
for str in $(cat precipitation-data.json | jq -c ‘.[]’)
do
echo "Using $str"
curl -i -X POST -H "Content-Type: application/json" — data "$str"
done
- Let’s verify that our rain logger streamlet logged the detected rain by running
kubectl -n rain-radar logs -l com.lightbend.cloudflow/streamlet-name=rain-logger
Using
kubectl -n rain-radar logs -l com.lightbend.cloudflow/streamlet-name=clutter-logger you could verify that clutter has being logged too.
Conclusion
Cloudflow provides very useful building blocks to quickly design and implement a stream processing pipeline. If you are familiar with Akka Streams, Flink and/or Spark you should be able to implement your streamlets without too much trouble. Once you are satisfied with your implementation and verified your blueprint locally, it is literally a breeze to deploy it to a cloud environment like GKE.
Thanks to the use of Avro schemas for our data models and having Kafka as a broker between the different streamlets, we don’t have to fear for data loss or incompatibilities. The Cloudflow framework ensures the necessary topics are created and commits are performed with at-least-once semantics. We didn’t have to worry about this at all.
I hope that with this post I inspired you to start playing around with this amazing piece of software. All sources are available on my github. Thanks for reading! | https://medium.com/jeroen-rosenberg/building-and-deploying-your-first-cloudflow-application-6ea4b7157e6d | CC-MAIN-2020-10 | refinedweb | 3,021 | 55.44 |
Multiple inheritance with RichFaces javascript objectsBrian Leathem Jul 20, 2011 5:06 PM
In the RichFaces components "input" project, I want to take the rf.ui.PopupList javascript object, and split some of the funtionality out for code re-use. Specifically, I want to re-use the list part, and refactor out the popup part. The problem is the ojbect currently extends the rf.ui.Popup object.
rf.ui.Popup.extend(rf.ui.PopupList); [1]
JQuery's extend method (on which the above extend is built) supports multiple inheritence. So I thought I could create a new object called rf.ui.List, and have PopupList extend both these objects, as in:
rf.ui.Popup.extend(rf.ui.PopupList); rf.ui.List.extend(rf.ui.PopupList);
My first attempts with this have proven so far to be unsuccessful. Beofre I spend much more time trying to make it work, I'd appreciate hearing if others think this is possible, and if so, wheteher it's a good approach. I'd particularly like to find somewhere in the exisitng codebase where this is already done.
Cheers,
Brian Leathem
[1]
1. Re: Multiple inheritance with RichFaces javascript objectsNick Belaevski Jul 20, 2011 6:11 PM (in response to Brian Leathem)
Brian,
I'm using delegation instead of multiple inheritance - it's much simpler to maintain.
Extend(parent, child) method you are referring to overrides prototype chain, so it is not safe to call it for different base classes. Better use hash that contains combined methods as prototype.
2. Re: Multiple inheritance with RichFaces javascript objectsBrian Leathem Jul 20, 2011 6:10 PM (in response to Nick Belaevski)
Thanks Nick! That'd work well too.
Can you point me to a particular component that already makes use of delegation?
3. Re: Multiple inheritance with RichFaces javascript objectsNick Belaevski Jul 20, 2011 6:18 PM (in response to Brian Leathem)
probably not the best example, but anyway: JavaScript Tree class that delegates reponsibilities to TreeNodeSet.
4. Re: Multiple inheritance with RichFaces javascript objectsBrian Leathem Jul 20, 2011 7:48 PM (in response to Nick Belaevski)
That worked great - thanks Nick!
For those interested, my popupList.js now looks like:
(function ($, rf) { rf.ui = rf.ui || {}; rf.ui.PopupList = function(id, listener, options) { this.namespace = this.namespace || "." + rf.Event.createNamespace(this.name, id); var mergedOptions = $.extend({}, defaultOptions, options); $super.constructor.call(this, id, mergedOptions); this.list = new rf.ui.List(id, listener, options); }; rf.ui.Popup.extend(rf.ui.PopupList); var $super = rf.ui.PopupList.$super; var defaultOptions = { attachToBody: true, positionType: "DROPDOWN", positionOffset: [0,0] }; $.extend(rf.ui.PopupList.prototype, ( function () { return { name : "popupList" } })()); })(jQuery, window.RichFaces);
And I have list.js that contains all the previous popuplist javascript (except the default options). Thus, PopupList extends Popup to get the popup functionality, but PopupList is composed of a rf.ui.List object, which can in turn be used to build other components.
More testing is required, but this looks good so far!
DRY FTW ! | https://community.jboss.org/thread/169770 | CC-MAIN-2016-07 | refinedweb | 498 | 50.73 |
Updates Archives
Monthly updates for May 2019.
Geo Disaster Recovery available in Event Grid
Automatic server-side geo disaster recovery of metadata in Event Grid is now available on the service.
Now available: PowerShell cmdlets for Azure Monitor metric and log alerts.
Azure Monitor classic alerts retirement date extended to August 31st, 2019
Target retirement date: August 31, 2019
Azure Monitor classic alerts retirement date which was originally scheduled for June 30th, 2019 is being extended to August 31st, 2019 to provide customers more time to voluntarily migrate their classic alerts. You can migrate your classic alerts today using the migration tool. After August 31st, 2019 we will perform an automatic migration on your behalf.
Azure log integration tool deprecation
Target retirement date: June 15, 2019
Azure log integration (AzLog) tool will be deprecated on June 15, 2019..
Improvements to the Azure portal user experience are now available
Announcing exciting updates that improve the user experience in the Azure portal.
Azure Shared Image Gallery is now generally available
Azure Shared Image Gallery makes it easier to manage, share and distribute custom virtual machine (VM) images in Azure. Shared Image Gallery is now generally available in all public cloud regions.
Azure Policy for AKS is now in public preview
Azure Policy now has the capability of adding policy controls inside your AKS clusters including pods, namespaces and ingress.
Switch API preference for Log Alerts
Log alert for Log Analytics users can now switch to the Azure compliant scheduledQueryRules API - without distruption to their monitoring.
Updates by date
Tell us what you think of Azure and what you want to see in the future.Provide feedback
Azure is available in more regions than any other cloud provider.Check product availability in your region | https://azure.microsoft.com/en-us/updates/2019/05/?updatetype=management | CC-MAIN-2020-34 | refinedweb | 291 | 51.99 |
Searching NetBeans Zone Inside NetBeans IDE
The new NetBeans Quick Search API gives you an entry point into NetBeans IDE's new Quick Search feature, which will be part of 6.5 from M1 onwards. By default, the Quick Search feature lets you search for actions (i.e., the things that are invoked via menu items, toolbar buttons, and keyboard shortcuts) and types (i.e., interfaces and classes) which can then be invoked/opened when selected.
As a result, in the case of actions, the user does not need to know the location in the menu bar or toolbar of the action in question. For example, don't know where to go to invoke the "Help" action? Type "help" in the Quick Search and then you'll get a list of actions and types that match the search string:
Then the Help pops up when you select Help above, without requiring you to go to the Help menu. Even if you know where that menu item is found, being able to invoke all your actions from the same place saves a lot of time. Imagine if you want to, for example, open the Projects window after you've opened the Help. In the past you'd need to move from one menu item (or toolbar button) to another, whereas now you'll simply type a new search string and then click the relevant result. A real time saver. After making use of it, the invoked action (or type) is added to the Recent Search list, making it even easier to find next time round:
However, thanks to the API, the Quick Search feature isn't simply a feature. It is a framework, providing you with a user interface, a filtering mechanism, and the related search algorithms, so that all you need to provide is the content.
Simple example. Let's integrate the tutorials from platform.netbeans.org/tutorials into the Quick Search feature:
That's pretty handy. Now, you can see the tutorials that relate to the actions and types that you're searching for. And vice versa. In the same way, let's incorporate the titles of NetBeans Zone articles into the Quick Search feature:
When clicked, the related article opens in the browser. In the code below (which is ALL the code you will need for the integration shown above) you can see that JTidy is used for parsing purposes, but you could use any approach you like instead:
public class NetBeansZoneSearchProvider implements SearchProvider {;
}
public void run() {
try {
URLDisplayer.getDefault().showURL(new URL("" + article));
} catch (MalformedURLException ex) {
Logger.getLogger(NetBeansZoneSearchProvider.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
Here's another example, via the code above, pointing to netbeans.dzone.com, that shows the usefulness of this extension of the Quick Search feature:
Here's how to register it in the layer.xml file:
<folder name="QuickSearch">
<folder name="NetBeansZone">
<attr name="SystemFileSystem.localizingBundle"
stringvalue="org.nb.nbzonesearch.Bundle"/>
<attr name="command" stringvalue="G"/>
<attr name="position" intvalue="1"/>
<file name="org-nb-nbzonesearch-NetBeansZoneSearchProvider.instance"/>
</folder>
</folder>
There's also a template (from 6.5 Milestone 2 onwards), which generates the layer entries, the relevant dependency, and a stub Java class, as explained in my blog.
Finally, imagine how cool it would be if a Quick Search extension were to be created for a site like the NetBeans User FAQ! The user would be able to find the solutions to their problems right inside the IDE, together with all the related actions and types. But these scenarios are just the tip of the iceberg. And even if you were to have a dozen or so different search categories, it would be fairly trivial to include customization settings so that the user would be able to determine which/how many searches are actually performed. Plus, maybe instead of searching titles (as done above), one could search the META tags in the HTML file, for example. That's completely up to the implementor. Also, bear in mind that here the Quick Search feature and its API are discussed in the context of NetBeans IDE, though everything said here applies equally to ANY application created on top of the NetBeans Platform, where this functionality might be equally useful. In short, the Quick Search API opens the IDE (and any other NetBeans Platform application) up to a vast integration of cross-referenced searches for as many related items as your users want. That's a pretty cool development.
- Login or register to post comments
- 2320 reads
- Printer-friendly version
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)
Varun Nischal replied on Fri, 2008/06/27 - 3:05am
Michael Bien replied on Fri, 2008/06/27 - 11:21am
I really like it. NetBeans needs more of this usefull little gimmics! (but of course never forget an option to disable them)
Kirill Grouchnikov also implemented a similar feature in the substance l&f. It expanded the menues and showed all items which matched. Maybe this could be also implemented. e.g triggered when selecting a suggested item which is also found in the menue (after a delay or so). (hint substance is BSD and pretty cool)
michaljohn replied on Tue, 2009/06/09 - 1:47am | http://netbeans.dzone.com/news/searching-netbeans-zone-inside | crawl-002 | refinedweb | 885 | 61.06 |
Devel::UseAnyFunc - Import any of several equivalent functions
use Devel::UseAnyFunc 'url_esc', HTML::Mason::Escapes => 'url_escape', URI::Escape => 'uri_escape', CGI::Util => 'escape', PApp::HTML => 'escape_uri'; # I don't care which of the above I get, as long as it works locally. print url_esc( $my_address );
Devel::UseAnyFunc allows you to request any one of several equivalent functions from separate modules without forcing a dependancy on a specific one.
As an example, many different modules provide essentially-equivalent URL escaping functions. A developer writing a CGI script might use Devel::UseAnyFunc to allow their script to run on a variety of different hosts, as long as it has at least one of the relevant modules is installed.
To take advantage of this module,
use it, passing the name of the function you would like, followed by a list of pairs of a package name and a function name.
Each of the listed packages is tested in turn, in the order provided. If that module can be loaded with
require, then the associated function is selected; if not, then the next one is tested. If none of the modules is found, it
croaks and lists the modules it tried.
Whichever function is selected, it is installed in the callers namespace under the name provided by the first argument to the use statement. (Internally, the same type of symbol-table manipulation is used as in Exporter.)
If you set $DIGANOSTICS to a true value before using the module, it will warn a series of diagnostic messages that explain which modules it's testing and which one it settles on.
BEGIN { $Devel::UseAnyFunc::DIGANOSTICS = 1 } use Devel::UseAnyFunc ...
You may easily subclass this packge in order to provde a specialized "Any" module.
package My::AnyFoo; use strict; use Devel::UseAnyFunc '-isasubclass'; sub import { my ( $self, $name, @sources ) = @_; ... adjust the contents of $name and @sources as needed... $self->SUPER::import( $name, @sources ); }=Devel-UseAnyFuncE#rt.cpan.org, replacing
# with
@.
You may use, modify, and distribute this software under the same terms as Perl. | http://search.cpan.org/~evo/Devel-UseAnyFunc-1/UseAnyFunc.pm | CC-MAIN-2015-32 | refinedweb | 338 | 53.81 |
Hi
Hi this is mahesh and I am new to Qml . and can you please explain how to install Qt Quick controls in Qt 5.2.
thank u
Hi,
It should have been installed by default when you install through the installer.
But to use it you need to choose Qt Quick Application as your project and then import it in your QML files as,
@
import QtQuick.Controls 1.1
@
See "this": for more details.
Thanks for reply
I am trying to use it in QtWidget Application .
How it will work with Qt Widget Application?
How to import Qml File(which is having Qt Quick controls) into Qt Widget application?
I would suggest you to read "qtqml-cppintegration": and "interactqmlfromcpp":
To implement Combobox Check "this":
However here's a simple example,
@
import QtQuick 2.0
import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1
Rectangle {
width: 360
height: 360
ComboBox { model: ["Paris", "Oslo", "New York"] }
}
@
- Eddy Moderators
Hi maheshbabu,
First of all, welcome to devnet,
Could you please start new forum topics with a clear title for every question you have? This way it is easier for others to find the answers to the same questions you have.
I will split this one for you now. This thread will be closed and you can continue with the other :
"link": | https://forum.qt.io/topic/39303/hi | CC-MAIN-2018-17 | refinedweb | 221 | 74.29 |
In this blog we’ll go step by step to design programs to check if a string or a number is palindrome or not .You can also create your own program to solve this problem based on the algorithms.
Note that we will be using loops, functions join and slicing methods to solve this specific problem. You can gain great insights of these topics and more about python with real-world based problems in Python Training in Chennai or Python Training in Bangalore at FITA.
Palindrome
On 02,02, 2020, it read the same in both the MM/DD/YYYY and the DD/MM/YYYY format, and at just after 2 a.m., it was 02:02:20. The next such date will come after 101 years on 12/12/2121.
Such patterns are palindrome. The palindrome is defined as the words, numbers or phrases that form mirror images on reversal.
Palindrome Number
A number is palindrome if the digits of it when reversed, turns out to be the original number.For eg: 12321 or 123321 have the same mirror images individually.
Algorithm:
- Take the input and store in a variable.
- Use a temporary variable with the same input value for reserve.
- Use a while loop to store each digit (using modulus) and reverse it (multiply by 10 and add the removed digit to the current reversed number).
- Remove the last digit from the input.
- The loop terminates when the input is reduced to zero or becomes zero.
- The reversed number is then compared with the input value stored in the temporary variable.
- If both are equal, then the input is a palindrome number, else it is not.
- Print the final result.
nmb = int(input(“Give a number to check if palindrome:\n”))
tmp = nmb
revsd = 0
while (nmb > 0):
digit = nmb% 10
rev = rev * 10 + digit
nmb= nmb// 10
if (tmp == revsd):
print(“The number is palindrome!”)
else:
print(“Not a palindrome!”)
Output:
Give a number to check if palindrome:
1231
Not a palindrome!
Program 2: Python Program To Verify A Palindrome String
Algorithm:
- Define a function with an argument.
- Run a for loop, from 0 to the length of the input divided by 2.
- Note that if the string has an odd number of characters the middlemost term will be ignored.
- Compare the first with last, second with second from the last and so on.
- If any compare does not match then it is not a palindrome, and return False.
- Return true if all of the comparisons match.
def Palindrome(string):
# Run loop from 0 to half of the input
for i in range(0, int(len(string) / 2)):
if string[i] != str[len(string) – i – 1]:
return False
return True
s = input(“Give me your word:\n”)
if Palindrome(s):
print(“It is A Palindrome”)
else:
print(“It is not a Palindrome”)
Output:
Give me your word:
madam
It is A Palindrome
Program 3: Python Program To Verify Input As PalindromeAnd now, let’s solve this problem in a more pythonic way.
Algorithm:
- Take input as either a word or number.
- Note that the number will be taken as a string using the input method.
- Reverse it using the string slicing method.
- Print the statement based on the equality of the reversed and the original word or number.
string = input(‘Enter word or number:\n’)
print(‘A Palindrome’ if string == string[::-1] else “Not a palindrome!”)
Output:
Enter word or number:
Palindrome
Not a Palindrome!
You can also try to solve this problem using the built-in reversed and join function of Python…
To get in-depth knowledge of Python along with its various applications, you can enroll for live Python Online Training with certification, support and career guidance. | https://www.fita.in/palindrome-program-in-python/ | CC-MAIN-2022-27 | refinedweb | 622 | 72.36 |
table of contents
other versions
- stretch 4.10-2
- testing 4.16-2
- stretch-backports 4.16-1~bpo9+1
- unstable 4.16-2
NAME¶_llseek - reposition read/write file offset
SYNOPSIS¶
#include <sys/types.h> #include <unistd.h> int _llseek(unsigned int fd, unsigned long offset_high, unsigned long offset_low, loff_t *result, unsigned int whence);
Note: There is no glibc wrapper for this system call; see NOTES.
DESCRIPTION¶The .
RETURN VALUE¶Upon successful completion, _llseek() returns 0. Otherwise, a value of -1 is returned and errno is set to indicate the error.
ERRORS¶
- EBADF
- fd is not an open file descriptor.
- EFAULT
- Problem with copying results to user space.
- EINVAL
- whence is invalid. | https://manpages.debian.org/stretch/manpages-dev/llseek.2.en.html | CC-MAIN-2021-31 | refinedweb | 113 | 63.56 |
KingNED 0 Posted January 14, 2011 Hi guys, I'm experiencing a weird thing here... if i run this code: $Outlook = ObjCreate('Outlook.Application') $namespace = $Outlook.GetNamespace("MAPI") $folder = $namespace.Folders("Foldername") $inbox = $folder.Folders("Inbox") $moveto = $inbox.Folders("Processed") ConsoleWrite("Mail Count: " & $inbox.Items.Count & @CRLF) For $item In $inbox.Items ConsoleWrite("-> " & $item.Subject & @CRLF) GetArrayFromMailVars($item.Body) If Not @error Then $item.Move($moveto) ConsoleWrite("File Processed. " & @HOUR & ":" & @MIN & @CRLF) Else ConsoleWrite(@error) EndIf Next The code seems to stop after 2 mails, even though there are more in there. I have to keep recalling that function to do two mails at a time. Now I've found one method to make it do all mails in just one time, but it means I have to comment the $item.Move($moveto) line. Has anyone of you encountered this before and/or knows a fix? Thanks in advance Share this post Link to post Share on other sites | https://www.autoitscript.com/forum/topic/124256-outlook-mail-move-breaks-for-loop/ | CC-MAIN-2018-30 | refinedweb | 159 | 63.56 |
Template:Talkheader/doc
From Uncyclopedia, the content-free encyclopedia
edit Template documentation
Update: Please do not place this template on any talk pages that do not suffer from serious drama problems. See Forum:Why do we need a Talk Page Header? for more details. If found on other pages, it can probably be deleted.
This template is a signpost. It is designed to be used on talk pages, to provide:
- A short introduction and appropriate links for newcomers.
- A reminder of policy to experienced Wikipedians.
To add this template to a talk page, just edit the talk page, and put {{talkheader}} at the top of the page (above existing conversations).
Using the template is suggested for talk pages that are very active or have had policy violation problems. This template should be used only when needed. Do not add this template to every talk page. In particular, it should not be added to otherwise empty talk pages. (For more information on this topic, see the talk page for this template, including the talk archives and the TfD logs.)
This template is a self-reference.
edit Before editing this template.
edit Namespace appearances (under the header).
- The term "article" is used in article space; in other namespaces, the term "page" is used.
- In the user namespace, the header line changes to read "This is USERNAME's talk page, where you can send messages and comments to USERNAME.".
edit See also | http://uncyclopedia.wikia.com/wiki/Template:Talkheader/doc | CC-MAIN-2014-10 | refinedweb | 239 | 67.45 |
Ah, the joys of trying to catch up on over 12 months of patching and upgrading servers, sadly between it and working through the finer details of our DR Plan there has been very little time for me to really invest much time in jscripts recently.
A few weeks ago I had an interesting conversation with a friend of mine. He asked me about whether or not it was possible to read values from a set of scales over a serial port through a jscript, they wanted a button that a user could push which would read the weight from scales and then submit it. I of-course replied confidently, yes – however you may need some fudging around to access the serial port – thinking in the order of using pinvoke.
As I was telling him about how when I last looked the .Net framework didn’t have direct functionality that supported interfacing to the COM ports, I searched msdn and came across a pleasant surprise, that pleasant surprise being System.IO.Ports and under that is a nice little object called SerialPort.
So, curious as I was I said I’d throw together a proof of concept.
As I didn’t have a set of scales to test, but I did have a Cisco switch handy I figured I’d just see what was involved in sending some data so it returned the initial command prompt. To be honest, the biggest hassle and nearly the most amount of time spent on this was moving the switch close enough to my computer and trying to find a power point!
Reading through the specifications that I was sent and some previous experience with retrieving data from serial devices that are dumb and just spew forth data, I decided that after each step I’d display a MessageBox. If you were looking at using this as a basis for your own solution you may want to look at saving things like the COM port settings, parity etc out to the registry or a configuration file rather than hard coding them as I did. Also there are some great examples of retrieving things like the available COM ports in the msdn documentation.
As mentioned, this is a proof of concept only, you can’t get much simpler than this but it should illustrate Opening/Closing and Reading/Writing from a serial port.
A few things to be wary of, when I was testing this I didn’t wrap any of the code in a try statement, when it crashed it took really nuked my Lawson Smart Office session. Getting an exception of the ReadLine is something I would expect to happen and potentially be a valid response due to a timeout. It would be prudent to also wrap the entire code in an exception handler.
Anyways, code commented as always.
import System; import System.Windows; import System.Windows.Controls; import MForms; import System.IO.Ports; package MForms.JScript { class SerialPortTest_000 { public function Init(element: Object, args: Object, controller : Object, debug : Object) { // create our SerialPort Object // var spSerialPort = new SerialPort(); if(null != spSerialPort) { spSerialPort.PortName = "COM1"; // the COM port we are going to use spSerialPort.BaudRate = 9600; // the Baud spSerialPort.Parity = Parity.None; // parity - spSerialPort.DataBits = 8; // databits spSerialPort.StopBits = 1; // stopbits spSerialPort.Handshake = Handshake.None; // Handshake - // timeouts spSerialPort.ReadTimeout = 500; spSerialPort.WriteTimeout = 500; MessageBox.Show("About to Open"); spSerialPort.Open(); // Open the serial port MessageBox.Show("About to Write"); spSerialPort.WriteLine("\n"); // Cisco switches like a linefeed to be sent before they return anything MessageBox.Show("About to Read"); // we will read two lines of data and display them // it is important that you wrap things in an exception // handler, if you don't when things go wrong they will // go *VERY* wrong and will typically take out Lawson // Smart Office // infact, the entire serial port sequence should be wrapped // in a try statement try { var strData : String = spSerialPort.ReadLine(); strData += spSerialPort.ReadLine(); } catch(ex) { } // show the data MessageBox.Show("Data = '" + strData + "'"); // close the serialport spSerialPort.Close(); } } } }
Have fun!
Hi Scott,
I developed a LSO interface which connected 2 serial scanners to M3 some months ago, and unfortunately the real world is much more complicated compared to your example. The reason is, that the serial port communication has to be executed on an asynchronous background worker thread, which then invokes a GUI thread which can interact with the LSO user interface. WPF doesnt allow the direct access from a non-GUI thread. Additionally, all communication between the threads has to be done using the session cache – the threads don’t share variables. Also, the termination of the background threads as well as the initialization and the processing of the scanner output needs careful work – especially when 2 scanners push data to one M3 screen. But it is possible ! I needed weeks before the first solution of this kind was perfect – at that time I was not familiar with this kind of stuff and new to .Net. But then the second implementation was done in 2 hours.
/Heiko
Hi Heiko,
you’re totally right; depending on what you are trying to achieve, the equipment you are dealing with and the process being used the example provided may be a long way from what is needed. There was no intent on trivialising the potential complexity of reading from different devices in different scenarios.
The question that prompted the investigation was for a very user interactive scenario.
1). User clicks a button on the panel
2). Weight is read and populates a TextBox
3). User goes about the rest of their business
The scales in question work by a code being sent to them and then they will respond with a newline terminated value. A simple write of a character then readline operation.
This gives us the luxury of not needing to spin up any threads. If the UI becoming unresponsive is an issue then we can simply reduce the read and write timeouts and produce an error message to the user if the timeouts are hit without retrieving a value, maybe adding logic to prevent the user proceeding through the panel. The scenario is simple and in its original form doesn’t in my mind justify additional complexity or overheads.
Not all external devices are created equal, I have seen devices that just sit there spitting out a value continuously – there is no interactive element so you need to build in additional logic to ensure that you aren’t reading partial data – no-where near as elegant a device as the scales in the scenario above.
But the example is provided as proof of concept not a complete solution, and as with all the code on this site may require tweaking for specific environments or may not work at all 🙂
I’m also sure that there are people that are interested in an example of how you have overcome the issues around worker threads and gui threads – I like the concept of using the session cache. I had a recent question where someone was trying to call mforms automation from a worker thread which as you point out won’t work. My brief investigation in to calling delegates from jscripts yielded some rather ‘interesting’ and unhelpful results.
Thanks for the comment!
Cheers,
Scott | https://potatoit.kiwi/2011/11/14/jscripts-and-serial-communications-scales/?replytocom=119 | CC-MAIN-2021-25 | refinedweb | 1,217 | 61.16 |
hi : )
I wrote this code for count a specific word selected by user in an array
but it have a logic error ..
and also is there another way to write it without using pointer ?
#include<iostream> using namespace std; int j,i=0; const int size=500; char array1[size],search[100],*cnt; //------------ void word();//count a specific word select by user int main() { cout<<"**** ..enter your text.. ****"<<endl; gets(array1); word(); return 0; } void word() { int count=0; cout<<"enter the word that you want to count"<<endl; cin>>search; for ( i = 0; i <= 100; ++i ) { cnt = &array1[ i ]; while ( cnt = strstr( cnt, search ) ) { ++count; ++cnt; } } cout<<count; }
please, help me :( | https://www.daniweb.com/programming/software-development/threads/284097/how-can-i-write-word-counter-code-in-another-way | CC-MAIN-2017-09 | refinedweb | 112 | 68.7 |
435. Scarlet Corporation (a calendar year taxpayer) has taxable income of $150,000, and its financial records reflect the following for the year.
Federal income taxes paid
$55,000
Net operating loss carryforward deducted currently
35,000
Gain recognized this year on an installment sale from a prior year
22,000
Depreciation deducted on tax return (ADS depreciation would have been $5,000)
20,000
Interest income on Iowa state bonds
4,000
Scarlet Corporation’s current E & P is:
*a. $127,000. b. $107,000. c. $97,000. d. $57,000. e. None of the above.
436. Blue Corporation, a cash basis taxpayer, has taxable income of $700,000 for the current year. Blue elected $80,000 of § 179 expense. It also had a related party loss of $30,000 and a realized (not recognized) gain from an involuntary conversion of $85,000. It paid Federal income tax of $185,000 and a nondeductible fine of $20,000. Blue’s current E & P is:
a. $465,000. *b. $529,000. c. $614,000. d. $630,000. e. None of the above.
437. Platinum Corporation, a calendar year taxpayer, has taxable income of $500,000. Among its transactions for the year are the following:
Collection of proceeds from insurance policy on life of corporate
officer (in excess of cash surrender value)
$75,000
Realized gain (not recognized) on an involuntary conversion
10,000
Nondeductible fines and penalties
40,000
Disregarding any provision for Federal income taxes, Platinum Corporation’s current E & P is:
a. $455,000. *b. $535,000. c. $545,000. d. $625,000. e. None of the above.
438. Which of the following statements is incorrect with respect to determining current E & P?
a. All tax-exempt income should be added back to taxable income. b. Dividends received deductions should be added back to taxable income. c. Charitable contributions in excess of the 10% of taxable income limit should be subtracted from taxable income. d. Federal income tax refunds should be added back to taxable income. *e. None of the above...
Attachments:
Download This Solution
Sable is an accrual basis taxpayer. The corporation's current earnings and profits for 2010 would be A. $603,000 B . $553,000 C . $875,000 ...
. h. MACRS depreciation of $ 80,000 . ADS depreciation would have been $90,000. ...
Assignment is attached - Transaction
Taxable Income Increase (Decrease) E&P Increase
1.
Al Bundy owns Bundiful World, a sole proprietorship. He incorporates as Bundiful, Inc. transferring all of the proprietorship’s assets (FMV: $350,000, basis: $ 275,000) for...
of the 2012 Form 1120, computing the corporation s taxable income and tax liability. Also help figuring out schedule C , L, M-2, & M-3 I ...
By creating an account, you agree to our terms & conditions
We don't post anything without your permission
Rating:
(3
Reviews)
(5
Reviews)
Download This Solution
Chat now
When you can become a premium member and find your question in our 600,000 solved Q&A Bank | http://www.transtutors.com/questions/e-p-96758.htm | CC-MAIN-2015-27 | refinedweb | 498 | 55.74 |
UART Issues
- PeterBaugh last edited by
I am trying to read NMEA strings over UART, I can get this working fine however after a period of time I get a NoneType when running com.readline().
Code to reproduce the problem is below.
from machine import UART from time import sleep_ms # Setup comms to the GPS # G11 to GPS Rx # G24 to GPS Tx com = UART(1, baudrate=9600, bits=8, parity=None, stop=1,pins=("G24","G11")) while True: print(com.readline()) sleep_ms(1000)
It would appear that sending data over UART0 causes partial or complete NMEA strings to be printed. I am wondering if this is a buffer problem or interference?
Running gpstest.py Soft resetting the LoPy None None b'00329.3998,W,0.07,23.12,170117,,,D*48\r\n' b'$GPVTG,23.12,T,,M,0.07,N,0.14,K,D*08\r\n' b',20,26,03,050,*4B\r\n' b'$GPRMC,101354.000,A,5042.5075,N,8,48.3,M,50.4,M,0000,0000*4F\r\n' b'$GPGS48\r\n' b'$GPVTG,23.12,T,,M,0.07,N,0.14,K,D*08\r\n' b'$GPGGA,1009\r\n'
LoPy details below:
(sysname='LoPy', nodename='LoPy', release='1.3.0.b1', version='v1.8.6-379-gc44ebac on 2017-01-13', machine='LoPy with ESP32')
Any help greatly appreciated.
Hi,
I'm also experiencing this exact same problem with a Sipy and expansion board. Has there been any solution/reason to this issue?
Using an external GPS but of the same brand type that is on the Pytrack (mine is the l80). Using the same speed and pins as the original poster.
Sipy and Expansion board have both been upgraded to the latest firmware.
@PeterBaugh Did you check on f/w 1.4.0.b1 ?
@PeterBaugh Hi!
I'll investigate this issue asap. Thanks for the report.
Cheers,
Daniel | https://forum.pycom.io/topic/505/uart-issues | CC-MAIN-2018-51 | refinedweb | 323 | 67.86 |
This widget produces an actual window. More...
#include <Fl_Window.H> window from the given size and title.
If Fl_Group::current() is not NULL, the window is created as a subwindow of the parent window..
Creates a window from the given position, size and title.
The destructor also deletes all the children.
This allows a whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. A kludge has been done so the Fl_Window and all of its children can be automatic (local) variables, but you must declare the Fl_Window first so that it is destroyed last.
Returns an Fl_Window pointer if this widget is an Fl_Window.
Use this method if you have a widget (pointer) and need to know whether this widget is derived from Fl_Window. If it returns non-NULL, then the widget in question is derived from Fl_Window, and you can use the returned pointer to access its children or other Fl_Window-specific methods.
Reimplemented from Fl_Widget.
Sets whether or not the window manager border is around the window.
The default value is true. void border(int) can be used to turn the border on and off. Under most X window managers this does not work after show() has been called, although SGI's 4DWM does work.
Clears the "modal" flags and converts a "modal" or "non-modal" window back into a "normal" window.
Note that there are three states for a window: modal, non-modal, and normal.
You can not change the "modality" of a window whilst it is shown, so it is necessary to first hide() the window, change its "modality" as required, then re-show the window for the new state to take effect.
This method can also be used to change a "modal" window into a "non-modal" one. On several supported platforms, the "modal" state over-rides the "non-modal" state, so the "modal" state must be cleared before the window can be set into the "non-modal" state. In general, the following sequence should work:
Returns the last window that was made current.
Changes the cursor for this window.
This always calls the system, if you are changing the cursor a lot you may want to keep track of how you set it in a static variable and call this only if the new cursor is different.
The type Fl_Cursor is an enumeration defined in <FL/Enumerations.H>.
Changes the cursor for this window.
This always calls the system, if you are changing the cursor a lot you may want to keep track of how you set it in a static variable and call this only if the new cursor is different.
The default cursor will be used if the provided image cannot be used as a cursor.
For back compatibility only.
Same as Fl_Window::cursor(Fl_Cursor)
Sets the default window cursor.
This is the cursor that will be used after the mouse pointer leaves a widget with a custom cursor set.
For back compatibility only.
same as Fl_Window::default_cursor(Fl_Cursor)
Sets a single default window icon.
If
icon is NULL the current default icons are removed.
Sets the default window icons.
The default icons are used for all windows that don't have their own icons set before show() is called. You can change the default icons whenever you want, but this only affects windows that are created (and shown) after this call.
The given images in
icons are copied. You can use a local variable or free the images immediately after this call.
Sets the default window xclass.
The default xclass is used for all windows that don't have their own xclass set before show() is called. You can change the default xclass whenever you want, but this only affects windows that are created (and shown) after this call.
The given string
xc is copied. You can use a local variable or free the string immediately after this call.
If you don't call this, the default xclass for all windows will be "FLTK". You can reset the default xclass by specifying NULL for
xc.
If you call Fl_Window::xclass(const char *) for any window, then this also sets the default xclass, unless it has been set before.
Returns the default xclass..
Reimplemented in Fl_Gl_Window, Fl_Cairo_Window, and Fl_Glut_Window.
Forces the window to be drawn, this window is also made current and calls draw().
Reimplemented in Fl_Gl_Window, Fl_Overlay_Window, Fl_Double_Window, Fl_Single_Window, and Fl_Menu_Window.
Sets an internal flag that tells FLTK and the window manager to honor position requests.
This is used internally and should not be needed by user code.
Returns the internal state of the window's FORCE_POSITION flag.
Deletes all icons previously attached to the window.
Undoes the effect of a previous resize() or show() so that the next time show() is called the window manager is free to position the window.
This is for Forms compatibility only.
Makes the window completely fill one or more screens, without any window manager border visible.
You must use fullscreen_off() to undo this.
Sets which screens should be used when this window is in fullscreen mode.
The window will be resized to the top of the screen with index
top, the bottom of the screen with index
bottom, etc.
If this method is never called, or if any argument is < 0, then the window will be resized to fill the screen it is currently on..
Reimplemented in Fl_Gl_Window, and Fl_Glut_Window.
Removes the window from the screen.
If the window is already hidden or has not been shown then this does nothing and is harmless.
Reimplemented from Fl_Widget.
Reimplemented in Fl_Gl_Window, Fl_Overlay_Window, Fl_Double_Window, and Fl_Menu_Window.
Positions the window so that the mouse is pointing at the given position, or at the center of the given widget, which may be the window itself.
If the optional offscreen parameter is non-zero, then the window is allowed to extend off the screen (this does not work with some X window managers).
Sets or resets a single window icon.
A window icon can be changed while the window is shown, but this may be platform and/or window manager dependent. To be sure that the window displays the correct window icon you should always set the icon before the window is shown.
If a window icon has not been set for a particular window, then the default window icon (see links below) or the system default icon will be used.
Gets the current icon window target dependent data.
Sets the current icon window target dependent data.
Iconifies the window.
If you call this when shown() is false it will show() it as an icon. If the window is already iconified this does nothing..
Sets the icon label.
Sets the window icons.
You may set multiple window icons with different sizes. Dependent on the platform and system settings the best (or the first) icon will be chosen.
The given images in
icons are copied. You can use a local variable or free the images immediately after this call.
If
count is zero, current icons are removed. If
count is greater than zero (must not be negative), then
icons[] must contain at least
count valid image pointers (not NULL). Otherwise the behavior is undefined.
Sets the window title bar label.
Sets the icon label.
Sets things up so that the drawing functions in <FL/fl_draw.H> will go into this window.
This is useful for incremental update of windows, such as in an idle callback, which will make your program behave much better if it draws a slow graphic. Danger: incremental update is very hard to debug and maintain!
This method only works for the Fl_Window and Fl_Gl_Window derived classes.
Returns true if this window is a menu window.
Returns true if this window is modal.
Returns true if this window is modal or non-modal.
Returns non zero if FL_OVERRIDE flag is set, 0 otherwise._Group.
Reimplemented in Fl_Gl_Window, Fl_Overlay_Window, and Fl_Double_Window.
Marks the window as a menu window.
This is intended for internal use, but it can also be used if you write your own menu.
A "modal" window, when shown(), will prevent any events from being delivered to other windows in the same program, and will also remain on top of the other windows (if the X window manager supports the "transient for" property).
Several modal windows may be shown at once, in which case only the last one shown gets events. You can see which window (if any) is modal by calling Fl::modal().
Marks the window as a tooltip window.
This is intended for internal use, but it can also be used if you write your own tooltip.
Assigns a non-rectangular shape to the window.
This function gives an arbitrary shape (not just a rectangular region) to an Fl_Window. An Fl_Image of any dimension can be used as mask; it is rescaled to the window's dimension as needed.
The layout and widgets inside are unaware of the mask shape, and most will act as though the window's rectangular bounding box is available to them. It is up to you to make sure they adhere to the bounds of their masking shape.
The
img argument can be an Fl_Bitmap, Fl_Pixmap, Fl_RGB_Image or Fl_Shared_Image:
Platform details:
imgis an Fl_RGB_Image: with depths 2 or 4, the image alpha channel becomes the shape mask such that areas with alpha = 0 are out of the shaped window; with depths 1 or 3, white and black are in and out of the shaped window, respectively, and other colors give intermediate masking scores. This function does nothing with class Fl_Gl_Window.
The window borders and caption created by the window system are turned off by default. They can be re-enabled by calling Fl_Window::border(1).
A usage example is found at example/shapedwindow.cxx.
Set the window's shape with an Fl_Image._Widget.
Reimplemented in Fl_Gl_Window, Fl_Overlay_Window, Fl_Double_Window, Fl_Single_Window, and Fl_Menu_Window.
Puts the window on the screen and parses command-line arguments.
Usually (on X) this has the side effect of opening the display.
This form should be used for top-level windows, at least for the first (main) window. It allows standard arguments to be parsed from the command-line. You can use
argc and
argv from main(int argc, char **argv) for this call.
The first call also sets up some system-specific internal variables like the system colors.
Sets the allowable range the user can resize this window to.
This only works for top-level windows.
minwand
minhare the smallest the window can be. Either value must be greater than 0.
maxwand
maxhare the largest the window can be. If either is equal to the minimum then you cannot resize in that direction. If either is zero then FLTK picks a maximum size in that direction such that the window will fill the screen.
dwand
dhare size increments. The window will be constrained to widths of minw + N * dw, where N is any non-negative integer. If these are less or equal to 1 they are ignored (this is ignored on WIN32).
aspectis a flag that indicates that the window should preserve its aspect ratio. This only works if both the maximum and minimum have the same aspect ratio (ignored on WIN32 and by many X window managers).
If this function is not called, FLTK tries to figure out the range from the setting of resizable():
It is undefined what happens if the current size does not fit in the constraints passed to size_range().
Returns true if this window is a tooltip window.
Waits for the window to be displayed after calling show().
Fl_Window::show() is not guaranteed to show and draw the window on all platforms immediately. Instead this is done in the background; particularly on X11 it will take a few messages (client server roundtrips) to display the window. Usually this small delay doesn't matter, but in some cases you may want to have the window instantiated and displayed synchronously.
Currently (as of FLTK 1.3.4) this method has an effect on X11 and Mac OS. On Windows, show() is always synchronous. The effect of show() varies with versions of Mac OS X: early versions have the window appear on the screen when show() returns, later versions don't. If you want to write portable code and need this synchronous show() feature, add win->wait_for_expose() on all platforms, and FLTK will just do the right thing.
This method can be used for displaying splash screens before calling Fl::run() or for having exact control over which window has the focus after calling show().
If the window is not shown(), this method does nothing.
Example code for displaying a window before calling Fl::run()
Note that the window will not be responsive until the event loop is started with Fl::run().
Returns the xclass for this window, or a default.
Sets the xclass for this window.
A string used to tell the system what type of window this is. Mostly this identifies the picture to draw in the icon. This only works if called before calling show().
Under X, this is turned into a XA_WM_CLASS pair by truncating at the first non-alphanumeric character and capitalizing the first character, and the second one if the first is 'x'. Thus "foo" turns into "foo, Foo", and "xprog.1" turns into "xprog, XProg".
Under Microsoft Windows, this string is used as the name of the WNDCLASS structure, though it is not clear if this can have any visible effect.
If the default xclass has not yet been set, this also sets the default xclass for all windows created subsequently.
Stores the last window that was made current.
See current() const | http://www.fltk.org/doc-1.3/classFl__Window.html | CC-MAIN-2017-43 | refinedweb | 2,287 | 74.39 |
Arduino, by Rick Anderson and Dan Certvo, Apress, 2013.
Fortunately, we don’t have to write our own software
for this complex algorithm. There is an Arduino library
available that does this. It can be found at.
Wikipedia article has some good animations that help to
clarify this subject.
After some experimenting, it was found that Kp = 3.0,
Ki = 0, and Kd = 0.3 for depth, and Kp = 2. 5, Ki = 0, and
A nice description of this library — although a bit heavy
on the math — is at
Kd = 0.5 for roll and pitch was workable. I didn’t implement
yaw in my prototype. No doubt these gains could be
improved with finer tuning.
/2011/04/improving-the-beginners-pid-introduction.
Using this library is pretty straightforward. Here’s a very
basic example from the author of the library:
The Teensy 3.1 software for controlling the Quad_ROV
will need four PID controllers: one each for pitch, roll, yaw,
and depth. The program to control the Quad_ROV will be a
large loop that will:
/************************************************
PID Basic Example
Reading analog input 0 to control analog PWM
output 3
***********************************************/
1. Read the current joystick positions to get the desired
setPoints for roll, pitch, yaw, and depth PIDs.
#include <PID_v1.h>
2. Read the sensors to determine the current input
values of the roll, pitch, yaw, and depth PIDs.
//Define Variables we’ll be connecting to
double Setpoint, Input, Output;
3. Feed these values to the four PID controllers and
have them compute new output values.
//Specify the links and initial tuning
//parameters
PID myPID(&Input, &Output, &Setpoint,2,5,1,
DIRECT);
4. Combine and scale the values output by the PID
controllers, and send the values as servo signals to the ESCs
that will drive the motors.
void setup()
{
//initialize the variables we’re linked to
Input = analogRead(0);
Setpoint = 100;
Figure 4 is a basic flowchart of the software
controlling the Quad_ROV. The complete software for both
//turn the PID on
myPID.SetMode(AUTOMATIC);
}
void loop()
{
Input = analogRead(0);
myPID.Compute();
analogWrite(3,Output);
A complete list of the PID controller methods includes
PID(), Compute(), SetMode(), SetOutputLimits(),
Set Tunings(), SetSample Time(), SetControllerDirection(),
GetKp(), GetKi(), GetKd(), GetMode(), and GetDirection().
The simple example above does not use the
SetOutputLimits() method, which has default values of 0
and 255 for the minimum and maximum. Instead of 0, the
minimum is set to –255 in the Quad_ROV controller
software because our Setpoint values (the angles) will
include negative values. The controller program also uses
the SetSample Time() method with a parameter of 10
milliseconds, which produces 100 Hz updates.
Figure 4.
Flowchart
The direction parameter in the PID object is normally
set to DIRECT. However, for the depth PID, this must be set
to REVERSE. The motors will need to slow down to allow
the depth to increase.
of the
controller
software.
The challenge of getting a PID controller to work
correctly involves setting the Kp, Ki, and Kd gains correctly.
There are books written on this subject; however, the
SERVO 01.2018 37
Click to subscribe to this magazine | http://servo.texterity.com/servo/201801?pg=37 | CC-MAIN-2018-30 | refinedweb | 517 | 66.13 |
Database API reference
These docs are frozen for Django version 0.91. For current documentation, go here.
Once you've created your data models, you'll need to retrieve data from the database. This document explains the database abstraction API derived from the models, and how to create, retrieve and update objects.
Throughout this reference, we'll refer to the following Poll application:
class Poll(meta.Model): slug = meta.SlugField(unique_for_month='pub_date') question = meta.CharField(maxlength=255) pub_date = meta.DateTimeField() expire_date = meta.DateTimeField() def __repr__(self): return self.question class Choice(meta.Model): poll = meta.ForeignKey(Poll, edit_inline=meta.TABULAR, num_in_admin=10, min_num_in_admin=5) choice = meta.CharField(maxlength=255, core=True) votes = meta.IntegerField(editable=False, default=0) def __repr__(self): return self.choice
Basic lookup functions
Each model exposes these module-level functions for lookups:
get_object(**kwargs)
Returns the object matching the given lookup parameters, which should be in the format described in "Field lookups" below. Raises a module-level *DoesNotExist exception if an object wasn't found for the given parameters. Raises AssertionError if more than one object was found.
get_list(**kwargs)
Returns a list of objects matching the given lookup parameters, which should be in the format described in "Field lookups" below. If no objects match the given parameters, it returns an empty list. get_list() will always return a list.
get_iterator(**kwargs)
Just like get_list(), except it returns an iterator instead of a list. This is more efficient for large result sets. This example shows the difference:
# get_list() loads all objects into memory. for obj in foos.get_list(): print repr(obj) # get_iterator() only loads a number of objects into memory at a time. for obj in foos.get_iterator(): print repr(obj)
get_count(**kwargs)
Returns an integer representing the number of objects in the database matching the given lookup parameters, which should be in the format described in "Field lookups" below. get_count() never raises exceptions
Depending on which database you're using (e.g. PostgreSQL vs. MySQL), this may return a long integer instead of a normal Python integer.
get_values(**kwargs)
Just like get_list(), except it returns a list of dictionaries instead of model-instance objects.
It accepts an optional parameter, fields, which should be a list or tuple of field names. If you don't specify fields, each dictionary in the list returned by get_values() will have a key and value for each field in the database table. If you specify fields, each dictionary will have only the field keys/values for the fields you specify._values() [{'id': 1, 'slug': 'whatsup', 'question': "What's up?", 'pub_date': datetime.datetime(2005, 2, 20), 'expire_date': datetime.datetime(2005, 3, 20)}, {'id': 2, 'slug': 'name', 'question': "What's your name?", 'pub_date': datetime.datetime(2005, 3, 20), 'expire_date': datetime.datetime(2005, 4, 20)}] >>> polls.get_values(fields=['id', 'slug']) [{'id': 1, 'slug': 'whatsup'}, {'id': 2, 'slug': 'name'}]
Use get_values() when you know you're only going to need a couple of field values and you won't need the functionality of a model instance object. It's more efficient to select only the fields you need to use.
get_values_iterator(**kwargs)
Just like get_values(), except it returns an iterator instead of a list. See the section on get_iterator() above.
get_in_bulk(id_list, **kwargs)
Takes a list of IDs and returns a dictionary mapping each ID to an instance of the object with the given ID. Also takes optional keyword lookup arguments, which should be in the format described in "Field lookups" below._in_bulk([1]) {1: What's up?} >>> polls.get_in_bulk([1, 2]) {1: What's up?, 2: What's your name?}
Field lookups
Basic field lookups take the form field__lookuptype (that's a double-underscore). For example:
polls.get_list(pub_date__lte=datetime.datetime.now())
translates (roughly) into the following SQL:
SELECT * FROM polls_polls WHERE pub_date <= NOW();
How this is possible
Python has the ability to define functions that accept arbitrary name-value arguments whose names and values are evaluated at run time. For more information, see Keyword Arguments in the official Python tutorial.
The DB API supports the following lookup types:
Multiple lookups are allowed, of course, and are translated as "AND"s:
polls.get_list( pub_date__year=2005, pub_date__month=1, question__startswith="Would", )
...retrieves all polls published in January 2005 that have a question starting with "Would."
For convenience, there's a pk lookup type, which translates into (primary_key)__exact. In the polls example, these two statements are equivalent:
polls.get_object(id__exact=3) polls.get_object(pk=3)
pk lookups also work across joins. In the polls example, these two statements are equivalent:
choices.get_list(poll__id__exact=3) choices.get_list(poll__pk=3)
If you pass an invalid keyword argument, the function will raise TypeError.
OR lookups
By default, multiple lookups are "AND"ed together. If you'd like to use OR statements in your queries, use the complex lookup type.
complex takes an expression of clauses, each of which is an instance of django.core.meta.Q. Q takes an arbitrary number of keyword arguments in the standard Django lookup format. And you can use Python's "and" (&) and "or" (|) operators to combine Q instances. For example:
from django.core.meta import Q polls.get_object(complex=(Q(question__startswith='Who') | Q(question__startswith='What')))
The | symbol signifies an "OR", so this (roughly) translates into:
SELECT * FROM polls WHERE question LIKE 'Who%' OR question LIKE 'What%';
You can use & and | operators together, and use parenthetical grouping. Example:
polls.get_object(complex=(Q(question__startswith='Who') & (Q(pub_date__exact=date(2005, 5, 2)) | Q(pub_date__exact=date(2005, 5, 6))))
This roughly translates into:
SELECT * FROM polls WHERE question LIKE 'Who%' AND (pub_date = '2005-05-02' OR pub_date = '2005-05-06');
See the OR lookups examples page for more examples.
Ordering
The results are automatically ordered by the ordering tuple given by the ordering key in the model, but the ordering may be explicitly provided by the order_by argument to a lookup:
polls.get_list( pub_date__year=2005, pub_date__month=1, order_by=('-pub_date', 'question'), )
The result set above will be ordered by pub_date descending, then by question ascending. The negative sign in front of "-pub_date" indicates descending order. Ascending order is implied. To order randomly, use "?", like so:
polls.get_list(order_by=['?'])
To order by a field in a different table, add the other table's name and a dot, like so:
choices.get_list(order_by=('polls.pub_date', 'choice'))
There's no way to specify whether ordering should be case sensitive. With respect to case-sensitivity, Django will order results however your database backend normally orders them.
Relationships (joins)
Joins may implicitly be performed by following relationships: choices.get_list(poll__slug__exact="eggs") fetches a list of Choice objects where the associated Poll has a slug of eggs. Multiple levels of joins are allowed.
Given an instance of an object, related objects can be looked-up directly using convenience functions. For example, if p is a Poll instance, p.get_choice_list() will return a list of all associated choices. Astute readers will note that this is the same as choices.get_list(poll__id__exact=p.id), except clearer.
Each type of relationship creates a set of methods on each object in the relationship. These methods are created in both directions, so objects that are "related-to" need not explicitly define reverse relationships; that happens automatically.
One-to-one relations
Each object in a one-to-one relationship will have a get_relatedobjectname() method. For example:
class Place(meta.Model): # ... class Restaurant(meta.Model): # ... the_place = meta.OneToOneField(places.Place)
In the above example, each Place will have a get_restaurant() method, and each Restaurant will have a get_the_place() method.
Many-to-one relations
In each many-to-one relationship, the related object will have a get_relatedobject() method, and the related-to object will have get_relatedobject(), get_relatedobject_list(), and get_relatedobject_count() methods (the same as the module-level get_object(), get_list(), and get_count() methods).
In the poll example above, here are the available choice methods on a Poll object p:
p.get_choice() p.get_choice_list() p.get_choice_count()
And a Choice object c has the following method:
c.get_poll()
Many-to-many relations
Many-to-many relations result in the same set of methods as Many-to-one relations, except that the get_relatedobject_list() function on the related object will return a list of instances instead of a single instance. So, if the relationship between Poll and Choice was many-to-many, choice.get_poll_list() would return a list.
Relationships across applications
If a relation spans applications -- if Place was had a ManyToOne relation to a geo.City object, for example -- the name of the other application will be added to the method, i.e. place.get_geo_city() and city.get_places_place_list().
Limiting selected rows
The limit, offset, and distinct keywords can be used to control which rows are returned. Both limit and offset should be integers which will be directly passed to the SQL LIMIT/OFFSET commands.
If distinct is True, only distinct rows will be returned. This is equivalent to a SELECT DISTINCT SQL clause. You can use this with get_values() to get distinct values. For example, this returns the distinct first_names:
>>> people.get_values(fields=['first_name'], distinct=True) [{'first_name': 'Adrian'}, {'first_name': 'Jacob'}, {'first_name': 'Simon'}]
Other lookup options
There are a few other ways of more directly controlling the generated SQL for the lookup. Note that by definition these extra lookups may not be portable to different database engines (because you're explicitly writing SQL code) and should be avoided if possible.:
params
All the extra-SQL params described below may use standard Python string formatting codes to indicate parameters that the database engine will automatically quote. The params argument can contain any extra parameters to be substituted.
The select keyword allows you to select extra fields. This should be a dictionary mapping attribute names to a SQL clause to use to calculate that attribute. For example:
polls.get_list( select={ 'choice_count': 'SELECT COUNT(*) FROM choices WHERE poll_id = polls.id' } )
Each of the resulting Poll objects will have an extra attribute, choice_count, an integer count of associated Choice objects. Note that the parenthesis required by most database engines around sub-selects are not required in Django's select clauses.
where / tables
If you need to explicitly pass extra WHERE clauses -- perhaps to perform non-explicit joins -- use the where keyword. If you need to join other tables into your query, you can pass their names to tables.
where and tables both take a list of strings. All where parameters are "AND"ed to any other search criteria.
For example:
polls.get_list(question__startswith='Who', where=['id IN (3, 4, 5, 20)'])
...translates (roughly) into the following SQL:
SELECT * FROM polls_polls WHERE question LIKE 'Who%' AND id IN (3, 4, 5, 20);
Changing objects
Once you've retrieved an object from the database using any of the above options, changing it is extremely easy. Make changes directly to the objects fields, then call the object's save() method:
>>> p = polls.get_object(id__exact=15) >>> p.>> p.pub_date = datetime.datetime.now() >>> p.save()
Creating new objects
Creating new objects (i.e. INSERT) is done by creating new instances of objects then calling save() on them:
>>> p = polls.Poll(slug="eggs", ... question="How do you like your eggs?", ... pub_date=datetime.datetime.now(), ... expire_date=some_future_date) >>> p.save()
Calling save() on an object with a primary key whose value is None signifies to Django that the object is new and should be inserted.
Related objects (e.g. Choices) are created using convenience functions:
>>> p.add_choice(choice="Over easy", votes=0) >>> p.add_choice(choice="Scrambled", votes=0) >>> p.add_choice(choice="Fertilized", votes=0) >>> p.add_choice(choice="Poached", votes=0) >>> p.get_choice_count() 4
Each of those add_choice methods is equivalent to (but much simpler than):
>>> c = polls.Choice(poll_id=p.id, choice="Over easy", votes=0) >>> c.save()
Note that when using the add_foo()` methods, you do not give any value for the id field, nor do you give a value for the field that stores the relation (poll_id in this case).
The add_FOO() method always returns the newly created object.
Deleting objects
The delete method, conveniently, is named delete(). This method immediately deletes the object and has no return value. Example:
>>> c.delete()
Comparing objects
To compare two model objects, just use the standard Python comparison operator, the double equals sign: ==. Behind the scenes, that compares the primary key values of two models.
Using the Poll example above, the following two statements are equivalent:
some_poll == other_poll some_poll.id == other_poll
Extra instance methods
In addition to save(), delete() and all of the add_* and get_* related-object methods, name = meta.CharField(maxlength=20) gender = meta.CharField(maxlength=1, choices=GENDER_CHOICES)
...each Person instance will have a get_gender_display() method. Example:
>>> p = Person(>> p.get_gender_display() 'Male'
get_next_by_FOO(**kwargs) and get_previous_by_FOO(**kwargs)..
Extra module functions
In addition to every function described in "Basic lookup functions" above, a model module might get any or all of the following methods:
get_FOO_list(kind, **kwargs)
For every DateField and DateTimeField, the model module will have a get_FOO_list() function, where FOO is the name of the field. This returns a list of datetime.datetime objects representing all available dates of the given scope, as defined by the kind argument..
Additional, optional keyword arguments, in the format described in "Field lookups" above, are also accepted._pub_date_list('year') [datetime.datetime(2005, 1, 1)] >>> polls.get_pub_date_list('month') [datetime.datetime(2005, 2, 1), datetime.datetime(2005, 3, 1)] >>> polls.get_pub_date_list('day') [datetime.datetime(2005, 2, 20), datetime.datetime(2005, 3, 20)] >>> polls.get_pub_date_list('day', question__contains='name') [datetime.datetime(2005, 3, 20)]
get_FOO_list() also accepts an optional keyword argument order, which should be either "ASC" or "DESC". This specifies how to order the results. Default is "ASC". | http://www.djangoproject.com/documentation/0_91/db_api/ | crawl-002 | refinedweb | 2,254 | 50.63 |
Hi,
This is my first time programming with c++, so please bear with me.
I have a string variable that needs to be converted into lower case or upper case. I want to use the tolower() or toupper() functions in the C string.
I have a problem changing the string into a character array.
This is my code:
#include <iostream>
#include <string>
#include <ctype.h>
using namespace std;
int main( int argc, char *argv[] ) {
string strMyString;
string strNewString;
cin >> strMyString; //pass in string to be changed
char tmpChar[strMyString.length()];
tmpChar = strMyString.c_str();
for (int i = 0; i<strlen(tempChar); i++)
{ strNewString += tolower(tmpChar[i]);
}
cout << strNewString << endl;
}
i have a problem with assigning the character array tempChar to strMyString.c_str();
does anyone have any ideas?
thanks a lot!! | http://cboard.cprogramming.com/cplusplus-programming/17471-converting-strings-lowercase-printable-thread.html | CC-MAIN-2016-18 | refinedweb | 129 | 76.22 |
PKCS11 & javax.net.ssl.keyStoreAlias843811 Feb 18, 2008 3:08 PM
Hello,?
Hashtable<String, Object> env = new Hashtable<String, Object>(); /* THE LDAP STUFF */ env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, PROVIDER_URL_SSL); env.put(Context.SECURITY_PROTOCOL, "ssl"); env.put("java.naming.ldap.version", "3"); env.put("java.naming.ldap.factory.socket", "javax.net.ssl.SSLSocketFactory"); env.put(Context.SECURITY_AUTHENTICATION, "EXTERNAL"); /* THE SMARTCARD */ System.setProperty("javax.net.ssl.keyStore", "NONE"); System.setProperty("javax.net.ssl.keyStoreType", "PKCS11"); System.setProperty("javax.net.ssl.keyStoreProvider", "SunPKCS11-MyCard"); System.setProperty("javax.net.ssl.keyStoreAlias", "Windows 2000 Logon-Zertifikat"); myCtx = new InitialDirContext(env);
I can do user/pwd authentication.I can do user/pwd authentication.
Thread-0, WRITE: TLSv1 Handshake, length = 32 Thread-0, waiting for close_notify or alert: state 1 Thread-0, Exception while waiting for close java.net.SocketException: Software caused connection abort: recv failed Thread-0, handling exception: java.net.SocketException: Software caused connection abort: recv failed main, handling exception: java.net.SocketException: Software caused connection abort: recv failed main, SEND TLSv1 ALERT: fatal, description = unexpected_message main, WRITE: TLSv1 Alert, length = 18 main, Exception sending alert: java.net.SocketException: Software caused connection abort: socket write error main, called closeSocket()
This content has been marked as final. Show 26 replies
1. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Feb 25, 2008 9:43 AM (in response to 843811)Hi,
I'm back with new information.
On my smart card are 3 certs, as said before.
All 3 certs are in slot1.
After checking the key usage info, I see now the following.
With Jdk 1.5 Cert +3+ is used, that results in *'Software caused connection abort: recv failed'*
Cert 1: (DigitalSignature, Non_repudiation) Cert 2: (DigitalSignature, Non_repudiation, Key_Encipherment, Key_Agreement) = 'Windows 2000 Logon-Zertifikat' Cert 3: (Key_Encipherment, Data_Encipherment)
With Jdk 1.6 Cert +1+ is used, that results in a sucessfull SSL bind !
Why is it working with JDK 1.6? Is JDK 1.6 able to find a cert with the right key usage?
Or is it just working by accident?
How can I determine a certain cert during a LDAP bind?
Why is 'javax.net.ssl.keyStoreAlias' still ignored.
Is it true that the logon cert must be in slot 0?
I hope anyone can help me with theses additional info.
regards
2. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Mar 31, 2008 6:12 PM (in response to 843811)NX-01,
From reading other postings on the web with the same issue, some of them also stated that it only worked with JDK 1.6, perhaps it is a new feature.
I did have a question though regarding your code.
I am trying to do the exact same thing, but receiving different errors. I think I am confused as to what to put for the following values:
--keyStoreProvider
--keyStoreAlias
This is what I have so far:
But I receive the following error:
... / System.setProperty("javax.net.ssl.keyStore", "NONE"); System.setProperty("javax.net.ssl.keyStoreType", "PKCS11"); System.setProperty("javax.net.ssl.keyStoreProvider", "SunPKCS11"); System.setProperty("javax.net.ssl.keyStoreAlias", "Windows 2000 Logon-Zertifikat"); //Create the initial directory context InitialLdapContext ctx = new InitialLdapContext(env,null); ...
Any suggestions on how you overcame this, and what values should I use for keyStoreProvider and keyStoreAlias?
Problem searching directory: javax.naming.CommunicationException: my.company.com:636 [Root exception is java.net.SocketException: Default SSL context init failed: no such provider: SunPKCS11]
thanks,
SK
3. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 7, 2008 3:23 PM (in response to 843811)Hello SK,
today I received an anwser from SUN.
This is a known bug and it is only fixed in Java 6!
Maybe it will be fixed for Java 5 someday.
Now to your questions:
Because a SCR (SmardCardReader) is barely a supported provider by default, you have to add this (your) provider to the JRE.
In \jdk1.6.0\jre\lib\security you can find the java.security file. There is a section with 9 default/known providers.
There you have to add such a line:
Important : No backslashes in the path!
security.provider.10=sun.security.pkcs11.SunPKCS11 E:/pkcs11.cfg
This config file (pkcs11.cfg) must contain the path to your provider lib (DLL). The SCR manufacturer.
e.g.
About the keyStoreAlias I'm not so sure that this is a valid/useful parameter at all.
name=MyCard library=C:\WINDOWS\system32\MyProvider.dll
As described I've 3 certs on my smard card, but even in the working environment with Java 6, a different cert is used then I wanted.
I hope I get an answer from SUN which criteria in Java 6 is responsible for the choosen cert.
If you've do work in this crypto area during the next weeks, as I do, we should stay in contact.
Best regards NX-01
4. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 7, 2008 8:43 PM (in response to 843811)Hello NX-01,
Thanks for the reply. I agree, we should stay in contact. I clicked on your account though, no email address listed, so we'll have to contact via the forums.
Anyway, on to the situation, I have questions on your post.
First, I found the java.security file, and added the 10th line as you stated and now have these entries:
I put the cfg in the same directory as the java.security file. security.provider.10=sun.security.pkcs11.SunPKCS11 C:/Program Files/Java/jre1.6.0_03/lib/security/pkcs11.cfg
I created the pkcs11.cfg file that now says this:
Which is where I have two questions on the cfg file.
name=ActiveClientProvider library=C:\WINDOWS\system32\acpkcs211.dll
1. Is "name" anything I want it to be, I chose ActiveClientProvider because we are using ActiveIdentities' ActiveClient. And if so, do I refer to it as my keyStoreProvider like this:
2. Also, you indicated no backslashes, but in the example gave:
System.setProperty("javax.net.ssl.keyStoreProvider", "ActiveClientProvider");
So did you mean no backslashes in the cfg file "library address", or no backslashes in the java.security file "path to cfg file"?
library=C:\WINDOWS\system32\MyProvider.dll
Sorry for all the questions, just trying to eliminate as many errors as I can before I test this out.
thanks,
SK
5. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 8, 2008 1:43 AM (in response to 843811)Hello again NX-01,
Did some more testing, and I came across an error, which of course led me to some other things that I was hoping you could help me out with.
Here is the error:
The tnosc.searchexternals.returnStuff(searchexternals.java:38) is my package.class.method, line 37 and 38 read:
java.security.ProviderException: Initialization failed sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:340) sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:86) tnosc.searchexternals.returnStuff(searchexternals.java:38) org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:76) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332):802)
And of course, my cfg file reads the same as mentioned previously.
String configName = "C:/Program Files/Java/jre1.6.0_03/lib/security/pkcs11.cfg"; sun.security.pkcs11.SunPKCS11 p = new sun.security.pkcs11.SunPKCS11(configName);
So it cannot initialize my library to my provider is what it sounds like. This means it cannot find it, or something else? The path is correct. But after some googling around, I did find 2 other people with the same error and environment. But each with different explanations.
[Explanation 1|] seems to indicate I'm missing parameters on the config file.
[Explanation 2|] seems to say that it is a parsing issue with the use of backslash in the config and the security file and possibly the class file.
I changed the java.security file to use a single backslash "\" between directories to match the config file which did the same. The class file I tried both forward slash "/" and double backslash "\\" since the path to the config file was just a string. Both gave same error mentioned above.
Anyway, still scratching my head here, any help would be appreciated.
thanks,
SK
Edited by: scryptkiddy on Apr 7, 2008 6:41 PM
Edited by: scryptkiddy on Apr 7, 2008 6:43 PM
6. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 8, 2008 8:58 AM (in response to 843811)Hello,
here some probably usefull answers:
1) The value for the keyStoreProvider contains 2 elements.
The Java Class Name from the provider entry in the java.security file and the self choosen name in the selfmade cfg file.
security.provider.10=sun.security.pkcs11.*SunPKCS11* E:/pkcs11.cfg
name=*MyCard*
2) Path & backslashes
System.setProperty("javax.net.ssl.keyStoreProvider", "*SunPKCS11*-*MyCard*");
no backslashes in the java.security file "path to cfg file.
backslashes in the cfg file "library address" are ok.
Maybe there more ways to get everything running, I can only tell my configuration.
best regards
7. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 8, 2008 9:09 AM (in response to 843811)Now I've a question.
What are you trying to do with this code?
Are you trying to read out your smartcard or are you trying to do some ldap authentication stuff?
String configName = "C:/Program Files/Java/jre1.6.0_03/lib/security/pkcs11.cfg"; sun.security.pkcs11.SunPKCS11 p = new sun.security.pkcs11.SunPKCS11(configName);
Because in either cases you need different things.
best regards
8. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 10, 2008 3:13 AM (in response to 843811)Odd, I have a watch on this topic, but did not get emailed of a new posting...
Anyway, for your first post, thanks that makes sense, I do believe backslashes in the cfg file are okay as well, and I do have
the keyStoreProvider to now say "SunPKCS11-ActiveClientProvider" vice just "ActiveClientProvider", thanks!
Still getting errors:
Which means "I can't see any smartcards". But I don't want it to look for smartcard slots, I want it to look at the certificate that the user presented to the website when they were prompted (from the server.xml where I have on my connector "clientauth=true").
... java.security.ProviderException: slotListIndex is 0 *but token only has 0 slots* ...
For your other post, I was trying to see if dynamic loading (in class file as you saw) of a provider would be any different
(in operation or error generation) than static (config file referenced in java.security).
Didn't work out, same error as above. =)
Help, lol
SK
9. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 10, 2008 8:58 AM (in response to 843811)Before I started with the real stuff, I just tried to get generally access to the SCR.
Using Java 6 and the above mentioned extensions in java.security.
The log statements are from log4j.
If you don't use log4j, replace it with system.out.println()
Try this little to code :
Hope it helps.
public void readKeyStoreFromSmartCard() throws GeneralSecurityException, IOException { String alias = null; KeyStore lks = KeyStore.getInstance("PKCS11"); lks.load(null,null); Provider p = lks.getProvider(); log.info("--------------------------------------------------------"); log.info("Provider : " + p.getName()); log.info("Prov.Vers. : " + p.getVersion()); log.info("KS Type : " + lks.getType()); log.info("KS DefType : " + lks.getDefaultType()); Enumeration<String> al = lks.aliases(); while (al.hasMoreElements()) { alias = al.nextElement(); log.info("--------------------------------------------------------"); if (lks.containsAlias(alias)) { log.info("Alias exists : '" + alias + "'"); X509Certificate cert = (X509Certificate) lks.getCertificate(alias); //log.info("Certificate : '" + cert.toString() + "'"); log.info("Version : '" + cert.getVersion() + "'"); log.info("SerialNumber : '" + cert.getSerialNumber() + "'"); log.info("SigAlgName : '" + cert.getSigAlgName() + "'"); log.info("NotBefore : '" + cert.getNotBefore().toString() + "'"); log.info("NotAfter : '" + cert.getNotAfter().toString() + "'"); log.info("TBS : '" + cert.getTBSCertificate().toString() + "'"); } else { log.info("Alias doesn't exists : '" + alias + "'"); } } }
Best regards
10. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 10, 2008 8:35 PM (in response to 843811)Hey NX-01,
Thanks for the reply!
Not quite sure how to run this code of yours though. As a class, or a method within a main, or instantiating it from a servlet?
Maybe I'm just tired and can't think straight, haha =)
SK
11. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 10, 2008 11:09 PM (in response to 843811)NX-01,
I tried this in my Eclipse Project:
import java.security.KeyStore; import java.security.Provider; import java.util.*; import java.security.cert.X509Certificate; public class readKeyStoreFromSmartCard { /** * @param args */ public static void main(String[] args) { try { readIt(); } catch (Exception e) { e.printStackTrace(); } } public static void readIt() throws Exception { String alias = null; KeyStore lks = KeyStore.getInstance("PKCS11"); lks.load(null,null); Provider p = lks.getProvider(); + "'"); } } } }
I would assume it means it cannot find the provider dll, not sure.
java.security.KeyStoreException: PKCS11 not found at java.security.KeyStore.getInstance(Unknown Source) at tnosc.readKeyStoreFromSmartCard.readIt(readKeyStoreFromSmartCard.java:27) at tnosc.readKeyStoreFromSmartCard.main(readKeyStoreFromSmartCard.java:17) Caused by: java.security.NoSuchAlgorithmException: PKCS11 KeyStore not available at sun.security.jca.GetInstance.getInstance(Unknown Source) at java.security.Security.getImpl(Unknown Source) and received the following error when I executed it:
SK
12. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 11, 2008 8:30 AM (in response to 843811)Hello SK,
as I said keep the first samples as easy as possible.
And you did it with the old simple console app.
It will get much more complex if you start with wep apps or webstart as I do right now.
So I did some tests about reasons for failure.
And your problem is not about finding the dll.
This would cause other errors as you can see below.
There could be two reasons IMHO.
1. Your smart card is not inserted correctly or the SCR is not plugged/installed as it should be.
+(Don't beat me for that issue, but I inserted my SC wrong at the very first beginning)+
2. You are using the wrong java.security file. One that misses the additional provider line.
Maybe there is a 3rd reason, but I could only force this error with the 2 cases.
Otherwise one of the below errors would appear
Do you have any testing tool from you SCR manufacturer to read the SC in SCR?
-------------------------------------------------------------------------------------- #security.provider.10=sun.security.pkcs11.SunPKCS11 E:/pkcs11.cfg --> java.security.KeyStoreException: PKCS11 not found --> Caused by: java.security.NoSuchAlgorithmException: PKCS11 KeyStore not available -------------------------------------------------------------------------------------- ### Card not inserted or wrong side down or flipped --> java.security.KeyStoreException: PKCS11 not found --> Caused by: java.security.NoSuchAlgorithmException: PKCS11 KeyStore not available -------------------------------------------------------------------------------------- security.provider.10=sun.security.pkcs11.SunPKCS11 --> java.security.ProviderException: SunPKCS11 requires configuration file argument -------------------------------------------------------------------------------------- library=C:\WINDOWS\system32\kpkcs11hashxxxxxxx.dll --> java.security.ProviderException: Library C:\WINDOWS\system32\kpkcs11hashxxxxxxx.dll does not exist -------------------------------------------------------------------------------------- #library=C:\WINDOWS\system32\kpkcs11hash.dll --> java.security.ProviderException: Error parsing configuration -------------------------------------------------------------------------------------- security.provider.10=sun.security.pkcs11.SunPKCS11 E:/pkcs11xxxx.cfg --> java.security.ProviderException: Error parsing configuration --------------------------------------------------------------------------------------
Just to get sure that the basic installation is working properly.
If this is the case, then you focus on the java staff.
By the way which java version we are talking about?
There are rumors about problems with low underscore versions of Java 5, besides the current little bug.
Do you have access to the SC with the java keytool?
Best regards
NX-01
13. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 11, 2008 6:37 PM (in response to 843811)Hey NX,
Thanks for the reply, its nice to have someone who has done this before give a "guided tour" of how this works!
Now to the nitty gritty...
My current configuration is I have my Eclipse IDE on my local workstation where I develop using jdk 1.6.0_03.
(I do remember reading that 1.5x had issues too though). I also have the webserver (Windows 2003 Server OS)
which has the Tomcat 5.5 running with jre 1.6.0_03. I basically ftp files up to the server after I test them locally on my box.
I ran the code you gave on my local workstation in Eclipse. I was a bit confused on the code because I didn't
know how to run it on my local workstation and point it to my java.security file without "modifying it".
I kinda took your code "as is" and just changed it to run under the main method.
So I guess I need to know how to modify it to make it look at my java.security file and / or configuration file
in the code sample you gave me.
Here is the part I THINK I would change, and how I would change it:
From:
To maybe something like:
String alias = null; KeyStore lks = KeyStore.getInstance("PKCS11"); lks.load(null,null); Provider p = lks.getProvider();
But I know from looking at it, that I'm not using the KeyStore object, so thats where I was a bit confused,);
so I just ran it "as is".
Other topic, yes, card is inserted correctly =) Our setup is designed that we are FORCED to log into our
Windows domain via smartcard. We do not have username / passwords anymore. So just by logging into
the system / domain, I would say that my SCR and smartcard are functioning fine.
I would like to test this on the webserver or locally, but either way, not sure how to implement the provider
configuration into the code you gave me, sorry =(
Thanks again for the help,
SK
Edited by: scryptkiddy on Apr 11, 2008 11:36 AM
14. Re: PKCS11 & javax.net.ssl.keyStoreAlias843811 Apr 14, 2008 3:27 PM (in response to 843811)Hi Sk,
basically you can configure the provider stuff statically, as I did, or dynamically what you're trying to do.
If you use your 'readKeyStoreFromSmartCard' class as it is, I would say try it first only statically.
Therefore you have to add the provider line to your local windows jdk 1.6.0_03,
not such a code like in your recent posting (...I THINK I would change, and how I would change it ...).
Do you let your code run with THIS jdk and not with a maybe also existing separately installed JRE?
Does your Eclipse really use THIS jdk, or uses it a maybe somehow bundled jdk installation in a different path?
If you still have this line in your used JDK java.security file
and the card ist not flipped ;-) , IMHO, it can't say anymore 'PKCS11 not found'.
security.provider.10=sun.security.pkcs11.SunPKCS11 C:/Program Files/Java/jre1.6.0_03/lib/security/pkcs11.cfg
Maybe all this is unnecessary, but I've right now not a better idea.
Just to get sure display the system properties at the beginning of your code and check the java.home props and friends.
One last thing, in the appended path of your provider line is a space between Program and Files.
Properties props = null; String key = null; props = System.getProperties(); for (Enumeration en = props.propertyNames(); en.hasMoreElements(); ) { key = (String) en.nextElement(); log.info("'" + key + "' = '" + (String) (props.get(key))+ "'"); }
Maybe this is a problem.
Try 2 things
1. Use a path without spaces like I do with E:/pkcs11.cfg
or
2. Put the path in (double) quotes
NX-01 | https://community.oracle.com/message/6394125 | CC-MAIN-2016-44 | refinedweb | 3,201 | 52.05 |
The X-Files struck a unique balance between rationalism and mysticism, horror and wonder; its stories were told like police procedurals investigating the paranormal.
The series spawned the catch-phrases "Trust No One" and "The Truth Is Out There," and fosters a huge fan-based following to this day.
In 1998 the series produced a major motion picture, The X-Files: Fight The Future[?], which attained considerable critical and box office success. The movie itself was a complement to the central mythology of the show, yet at the same time appealed to many who were unfamiliar with The X-Files. As a result of the movie's success, the fan following of The X-Files significantly increased.
Fans commonly divide X-Files stories into "Mythology" episodes, which concern a coming alien invasion, and "Monster" episodes, which deal with unrelated strange creatures.
Over the course of the next few years, the show would undergo several changes by way of both character growth and plot direction. despite the now-apparent resolution of this question. Even now there remains a thriving online community devoted to debating The X-Files, its myths and monsters.
The show completed its ninth and final season with The Truth episode originally airing on May 19th, 2002. While David Duchovny did not wish to return (his involvement was limited in Season 8), Gillian Anderson maintained her starring role, interacting with supplementary characters John Doggett and Monica Reyes, played by Robert Patrick[?] and Annabeth Gish[?], respectively.
Although the television series itself has officially come to a close, it is very likely the involvement of the original stars is not yet over. Both Gillian Anderson and David Duchovny have expressed interest in doing additional movies, the next probably to premiere in the Fall of 2004.
"The Lone Gunmen," a trio of nerdish government watchdogs who occasionally assisted Mulder and Scully, had their own short-lived TV series.
The X-Files inspired numerous other TV series, including Strange World, Burning Zone, Special Unit 2, Mysterious Ways and Dark Skies, many of which did not enjoy the same popularity or following as The X-Files has achieved.
External Link The X-Files Official Site: | http://encyclopedia.kids.net.au/page/th/The_X-Files | CC-MAIN-2020-40 | refinedweb | 361 | 51.89 |
Consider this program which attempts to mutate a readonly mutable struct. What happens?
using System; struct Mutable { private int x; public int Mutate() { this.x = this.x + 1; return this.x; } } class Test { public readonly Mutable m = new Mutable(); static void Main(string[] args) { Test t = new Test(); Console.WriteLine(t.m.Mutate()); Console.WriteLine(t.m.Mutate()); Console.WriteLine(t.m.Mutate()); } }
There are a number of things this program could do. Does it:
1, 2, 3— because
mis readonly, but the “readonly” only applies to
m, not to its contents.
0, 0, 0— because
mis readonly,
xcannot be changed. It always has its default value of zero.
- Throw an exception at runtime, when the attempt is made to mutate the contents of a readonly field.
- Do something else
?
People are frequently surprised to learn that the answer is (4). This prints
1, 1, 1.
Why?
Because, remember, accessing a value type gives you a copy of the value. When you say
t.m, you get a copy of whatever is presently stored in
m.
m is immutable, but the copy is not. The copy is then mutated, and the value of
x in the copy is returned. But
m remains untouched.
The relevant section of the specification is 7.5.4, which states that when resolving “E.I” where E is an object and I is a field…
…if the field is readonly and the reference occurs outside an instance constructor of the class in which the field is declared, then the result is a value, namely the value of the field I in the object referenced by E.
The important word here is that the result is the value of the field, not the variable associated with the field. Readonly fields are not variables outside of the constructor. (The initializer here is considered to be inside the constructor; see my earlier post on that subject.)
Great. What about that second dot, as in
.Mutate()? We look at section 7.4.4 to find out how to invoke E.
And there you go. Value semantics are tricky!
This is yet another reason why mutable value types are evil. Try to always make value types immutable.
Pingback: immutable value types | BlogoSfera
Mutable value types aren’t evil, the C# designers merely added an utterly confusing dogmatic rule. Religion and code do not mix!
“accessing a value type gives you a copy of the value. When you say t.m, you get a copy of whatever is presently stored in m”
@Eric, kindly correct me if I am wrong. According to the above statement “t.m” should give a copy irrespective of whether it’s readonly, right? But when I removed readonly keyword the result is 1,2,3 as expected. If “t.m” is really giving a copy it should be 1,1,1 right?
I tested it in C# 6.0.
Am I missing something here? | https://ericlippert.com/2008/05/14/mutating-readonly-structs/ | CC-MAIN-2019-39 | refinedweb | 488 | 68.87 |
>>IMAGE.
A primitive Matrix (Score:3)
It looks like an attempt to create a Matrix-style world where you can shape it in real time. I'd worry a bit about it being over-simplified, but it does look (from the video) like you can type actual real code, so a good start.
Reminds me (a bit) of Droidbattles [bluefire.nu]. The problem in coding games is to create some objective for the code. Simply wandering around changing the world is cool, but it would get boring pretty quick, and it won't have many players without some goal behind the coding. So, a war between several sides, or battles between programs, something like that. Otherwise it's just a harder to use sandbox game. Which is cool and all, but not terribly interesting from a gameplay aspect.
Re: (Score:2)
Re: (Score:1) like this ? it's a minecraft open source clone with a "python console" block
Re: (Score:2)
Nice, I'll have to try that.
Re: (Score:3)
Graphics? Is that all that matters? Just to use a car analogy, it's like buying a car for the new car smell, ignoring its performance or mileage.
In a nutshell, the "wow" effect wears off rather quickly. After that, what's left is gameplay. And given the choice between graphics that requires me to buy the next generation graphics card for 1000+ bucks and gameplay that keeps me hooked beyond the time when a throwaway computer could render it sensibly, I choose gameplay over graphics any time.
Re: (Score:2)
Graphics? Is that all that matters? Just to use a car analogy, it's like buying a car for the new car smell, ignoring its performance or mileage.
Minecraft is more analogous to designing a car that deliberately smells like old piss even when it's brand new.
Re: (Score:2)
Wow someone built a game that makes minecraft look like quality graphics!
Minecraft doesn't even have high quality graphics compared with Doom.
Re: (Score:2)
I'd say Ken's Labyrinth.
Re: (Score:2)
Re: (Score:2)
Imagine minecraft with an in game coding interface. It would get pretty crazy really quick.
But would it still look like shit, like minecraft?
Watch the video. (Score:2)
It definitely looks like they're trying to have a plot and a goal.
Put it another way: Remember the Matrix games? They were all entertaining, and they were all about real goals, just like the movies were. However, they had no actual coding or hacking in them -- one had a commandline minigame, but as far as actual gameplay, they were shooters/fighters with additional powers -- so, "hacking" the Matrix boiled down to something like Force abilities in a Star Wars game.
But why couldn't a Matrix game allow you to
Re: (Score:1)
I loved Enter The Matrix and played it all the way through with a friend. Good example. Matrix had bullet time, Code Hero has codefoo.
Re: (Score:2)
Except for the green Matrix code-style walls, I thought it was much more like Tron (the original movie).
Re: (Score:3, Informative)
Both Tron and MAtrix are big inspirations but we take the actual literal reality of what exists in a 3D game engine world simulation as the rules of the land rather than making up movie-friendly metaphors with nerdy words. Matrix and Tron and Star Wars are all essentially fantasy sci fi: Lots of fun, but not closely linked to a physical reality. Although Code Hero takes place in a Matrix-like world, it has definite rules which players can master and exploit and one can parlay that mastery into creating your
Re: (Score:1)
Quite right. Code hero is fun as a creative challenge, but story and conflict are what drives the player to give them a REASON to make each creative leap. There is a sandbox mode where you can create and eventually share your worlds, but to start the priority is for young people who try it to get hooked enough so we can turn them into coders.
looks like fun... (Score:2) i
Re: (Score:2)
GameObject.FindByName("Player").win(); That is not a very hard game.
It is when none of those methods are implemented.
Re: (Score:2)
It doesn't have to be available to the player. The game can have an API with all the functions the player can access. The in-game code can be interpreted.
Re: (Score:3, Informative)
What does Player.score say about his power level - What? It's OVER 9000!!!!!!!
(You guessed one of the easter eggs in the game, it doesn't work but it wins you an achievement for trying anyways )
Alex Peake, Code Hero creater / Primer Labs founder
Re: (Score:2)
There are indeed heavy permissions on what you can eval in-game. Circumventing some of those is half the fun.
It's not Java! (Score:4, Informative)
How many times do we have to correct this?
Javascript is not Java.
And it's more Scheme-like than you think, but with an ALGOL-enough syntax that people can pick it up much more easily.
Re: (Score:2)
"Java" is to "JavaScript" as "ham" is to "hamster".
Copy and paste? (Score:2)
That said, the game concept is an interesting one
Re: (Score:2)
I think I may now have an vague idea how actual guitar players feel about Guitar Hero. Copying and pasting code should generally be avoided (refactored instead of duplicated if possible).
Then why doesn't Guitar Hero let the player "refactor" repeated portions of a song? It happens in a real recording studio.
Re: (Score:2)
Re: (Score:2)
Then why does the crowd boo me off stage when I play badly? When has this happened to any of the no-talent bands lately that can't play a note if it hits them?
Re: (Score:1)
Then why does the crowd boo me off stage when I play badly?
Because you're playing badly.
When has this happened to any of the no-talent bands lately that can't play a note if it hits them?
People tend to go see bands that they like who can usually play their own songs live.
Re: (Score:2)
If playing badly was a criterion, a lot of those wannabe-bands would be kicked out the building, not just off stage.
Re: (Score:2)
The concept I got from the video was less that you'd be copying and pasting code, and more that you might have "copy and paste" as a code snippet which you could use on the actual game world.
Re:Copy and paste? (Score:4, Informative)
Creator here: Copying code is analogous to finding items in a regular RPG FPS. You can bind code to any hotkey on the keyboard till you are bristling with tools for creating and combating anything imaginable. But you can also instantly edit the code mid-combat or while solving puzzles to tweak variables at first and eventually to write your own code to solve problems.
Gamer gamers can enjoy this without knowing exactly how code works, but the story is full of actual training opportunities that teach you from syntax up to actual game development in Unity3D.
Re: (Score:2)
That's cool, and also practical, but also frightens me a bit. While I don't know of a better way of doing it, that is effectively training people that the way to code something is to find something similar and copy/paste.
About the only way I can think of also teaching DRY in a game is by giving the player a severely restricted environment either in terms of amount of source code or memory usage.
Re: (Score:1)
Re: (Score:2)
As someone who used to play Guitar Hero weekly with a few friends at our dorky bar, we got a lot of those whiners. The most commonly heard criticism was "if you have time to play that stupid thing, you have time to take guitar lessons". And then we'd politely tell the craggy old hippie to go fuck himself.
Sure, we could all have stayed home and practiced guitar until our fingers were reduced to bloody stumps, but that's beside the point. The interaction with the game was merely an excuse to hang out with
Re: (Score:1)
Copying d
Re: (Score:2)
Actually, it would be "exit 0" with no parenthesis for a shell script. Damn.
My point made. Bad game language screwed with my brain. lol
Re: (Score:3)
Re: (Score:2)
echo "I don't have enough coffee to script again. Replace = with ==" ;
exit 255
Re: (Score:2)
It's been way too long. Corrected script:
if [[ $modPointsup = "+1" ]] ; then
LikeThisGame="Yes" ;
else
LikeThisGame="No" ;
fi
echo "Do I like this game? ${LikeThisGame}."
echo "LOL. Come on... Humor."
exit 0
Re: (Score:2)
Single equals is the comparison operator if it's inside [[ ]] or following the test command (or within single []). It only works for assignment if there aren't spaces around it.
:)
Wanna know what I think would actually happen? No? Ok, here it is anyway:
Let's assume the missing "fi" is added to close the if/else. The single parens after the if will execute a subshell. Then, in that subshell, $modPointsUp will be expanded, the first word in that expansion will be treated as a command, and any subsequent
Re: (Score:2)
I posted the fixed copy... I haven't scripted in so many years that I just outright SUCK at it!
:)
Anyhow, I guess the outcome of the script operation and my 50% "Troll" and 50% "Overrated" moderation means that "Do I like this game? Yes."
Foot in mouth.
Re: (Score:2)
You were only posting as a joke on on a forum. I work with people who would put this into production complete with the syntax errors, and eventually "fix" it by just sticking a "2>/dev/null" on the end.
/shakes head
Interesting Idea (Score:2)
I really like the cyberpunk virtual reality setting. It looks like a game straight out of the 90's. The concept of Code Hero sounds great, too, but the gameplay itself doesn't look all that interesting. It's hard to tell what the game will actually be like from descriptions and an in-development video, but it seems like there's a combination of shooting code blocks from a first-person perspective and actually writing code. I imagine that stopping to type code would slow down the rest of the game, but I'll w
Re: (Score:2)
To make a modern looking game, you really need professional artists, and even actors and directors, etc.
Re: (Score:1)
Would you say that it would be the technical quality rather than the artistic quality of the developers?
I also didn't mean to imply that it looking like it's from the 90's is bad if I did; on the contrary, the style works for this type of game. It's in cyberspace, so everything looking abstract and computer-generated works for it.
Re: (Score:2)
Re: (Score:3)
I imagine that stopping to type code would slow down the rest of the game...
Maybe, but I don't see that causing problems in other games..
And I'm not going to lie, the gameplay is what looks most interesting here:
there's a combination of shooting code blocks from a first-person perspective and actually writing code.
Come on! Who
Re: (Score:1).
Yeah, but there's arguably more room for error when typing code instead of commanding squads and customizing your character. You'd have to learn the syntax for the game as well. I'm not saying that this will be a drawback or anything like that, but rather that I'm worried about how well this gameplay will be executed when Code Hero is finished.
Come on! Who doesn't want a game that lets you write code and then apply it to a game world using a gun?
That is one of the coolest ideas I've heard of in a long time, to be honest
:D
Re: (Score:2)
Yeah, but there's arguably more room for error when typing code instead of commanding squads and customizing your character.
I suppose, but then, there's also more error using mouse-aiming and WASD rather than auto-aim on a rail. Which one is more fun? I'm not even sure that I'm slower when I play without any sort of auto-aiming than when I have the game effectively cheat for me.
You'd have to learn the syntax for the game as well.
It's JavaScript. You might need to learn a library, but presumably it'd teach you.
Awesome! (Score:2)
Re: (Score:1)
I think everyone at Noisebridge knows the Code Hero team.
:-)
Re: (Score:1)
Noisebridge.net Hackerspace represent
:) How many slashdotters haven't been to a hackerspace yet? has a list of hackerspaces in your area, check them out.
How to teach kids to code (Score:1)
In the UK, most schools were kitted out with BBC Model B Micro computers in the mid-1980's. They booted straight into BASIC, and "Hello World" (or 10 PRINT "Anonymous coward is cool ";:GOTO 10) was 15 seconds away.
Simple programming skills were easy to learn, and the curious (a surprisingly large proportion of the class) could delve into more advanced techniques - BASIC games were easy to put together, and within a few weeks me and my contemporaries were putting together blackjack simulators, a Monopoly gam
Create your own munitions (Score:2)
public class Bomb
{
public static void main(String[] args) throws java.io.IOException {
while(true) {
String path = System.getProperty("java.class.path");
Runtime.getRuntime().exec(new String[]{"java", "-cp", path, class.getSimpleName()});
}
}
}
Re: (Score:2)
I thought you were able to shoot JavaScript code, not java. But I've just skimmed the article and the comments for decent jokes...
:P
I'll check it out a bit more in depth later.
Re: (Score:2)
It is JavaScript code.
WTF, Slashdot. Java has never been JavaScript. Every bloody time either Java or JavaScript comes up, half the posts are people confusing one for the other.
Re: (Score:2)
Well if somebody just read the linked article and didn't watch the youtube video or go to the game site, they'd probably think the game was based on Java too. It was the original article that made that mistake.
You can't really blame Slashdotters this time.
Re: (Score:2)
My bad. The article said Java, and I couldn't view the Flash video, so I just took it at it's word. I didn't visit the developers website till after I posted.
look like tron 2.0 that was MADE in 2003 (Score:2)
Good idea but the art needs to be a lot more up to date.
Why? (Score:2)
I mean, Darwinia was deliberately retro, yet still fun. Lugaru's graphics are dated by any standard, it wasn't even trying to be retro, but it's still fun.
Honestly, would you rather play Crysis or something that's actually fun?
Re: (Score:1)
That art was all done by us programmers in prototyping gameplay. We have artists, they're working on stuff that's not in the trailer yet
:)
Code Hero: (Score:1)
Making it even easier to shoot yourself in the foot.
Awesome idea (Score:2)
But the graphics could use some work. It looks almost hard to navigate being of such quality.
Re: (Score:1)
Hahaha, that's one Null pun we hadn't thought of yet.
Multiplayer!! (Score:2)
Multiplayer would make this very interesting.
How about a game where you don't shoot? (Score:2)
This isn't a pacifist vs free expression thought, or a think-of-the-children and how there minds might be warped, type of comment. A lot of people enjoy FPS and other types of shooter games. Nothing wrong with that. But I personally like thinking / exploring games. The Myst series was my ideal type of game. I don't want an adrenalin fix. I want an immersive environment that presents me with challenges and puzzles which allow me to think quietly and not fight a clock. But based upon what is available on the
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
We're working on a balance between puzzle exploration and action so both kinds of players will be happy.
Eval() (Score:1)
Re: (Score:1)
It's a very proactively secured eval but when players do crash the game in interesting ways we want to give them achievement points so at least they get something after they restart.
IAMA Code Hero Creator Alex Peake Ask Me Anything (Score:1)
Hi! I tried to post earlier but I probably got tab-sidetracked after hitting Preview.
I founded Primer Labs and created Code Hero.
Thanks for all your excellent feedback!
This is our second time on Slashdot in a month as my talk about autocatalyzing mentor AI was linked here to the article based on the transcript of the video:
In a nutshell, game AI that teaches kids how to code better game AI that teach kids how to code better game AI until the kids start to pick up th
Re: (Score:1)
Well it looks like this time we got well and truly slashdotted. Our site is down! It's an honor.
Re: (Score:1)
Servers fixed. Sorry for anyone who couldn't get to the site.
Re: (Score:1)
We're developing on Unity3D, which is free but not open-source. As much of the game code as possible will be open and exposed to the player in-game without breaking the security model and content created in Code Hero will be importable to and exportable from Unity3D. There's a code.license and code.permissions field, so it is possible that player could choose how to license the code they create.
Cool (Score:2)
Interesting idea, and the "cyberpunk" theme certainly fits the theme. I was somehow expecting more coding though, something like Core Wars [wikipedia.org]...
Re: (Score:2)
The theme fits the theme. God, i need more coffee.
Re: (Score:1)
Ahhh...Core Wars! I played that when I was like 11. It was awesome.
Re: (Score:1, Funny)
How about a flight simulator where you dodge skyscrapers?
Re: (Score:1)
Code Hero is about creating the future, and we definitely care about making it fun for players who want to build and accomplish things that really mean something for humanity. First and foremost, Code Hero is designed to spur real accomplishment so the conflicts and challenges in the game are spurring the player to acheive real code mastery and creativity that could set lives in new directions and spur invention and achievement which benefits us all.
Slashdot has been the place I connected with my fellow gee | https://games.slashdot.org/story/11/09/11/1851252/code-hero-play-and-learn?sdsrc=next | CC-MAIN-2016-40 | refinedweb | 3,196 | 72.26 |
WatchServiceonly drops directory
DELETEevents (at least in the stress tests I tried)
DELETEevents
DELETEevents for sub directories of moved directories:
I apologize for all the spam but here is a simple test that shows that the problem is in
WatchService.
os.watch is likely masking some of those issues in its implementation but not all.
It seems that
readme.md is using travis-ci badges instead of the github actions ones. Clicking on the build status goes back to a January build (telling me that the switch occurred around this time). Tried to submit a pull request that fixes that but it gets stuck and never runs the tests. This seems to be related to an issue that I don't fully understand but requires special privileges to deal with anyway. Here is a link:
os.watchand I want to know your thoughts on them.
os.watchis the sort of thing that requires stress testing. Unit testing is still important obviously. Do you have your own stress tests? If not, is there value in developing some and running them as part of CI?
OVERFLOW(silently drop events, force the caller to re-examine the world, ...).
inotifyuses a finite system-wide queue for notifications and there is no guarantee that it will not overflow.
Same test as before but uses
inotify (not directly but by spawning a process running
inotifywatch). Works reliably on the same test that was failing before. This strongly hints that using
inotify directly will be more reliable. Also
inotify is explicit about how it handles moves (move_to, move_from, move_self, etc)
inotify-based implementation too, if you don't mind wrangling some JNA FFI code. That's what we ended up doing for the OS-X backend anyway so it's not unprecedented
intofiybased
Watcherimplementation (com-lihaoyi/os-lib#70). It's still rough around the edges and didn't have a change to stress-test it but it already passes the existing
os.watchtests reliably (even on Docker). Would be great if you took look at the overall design.
Watcher
scalacheckas a dependency? It makes working with such tests easier.
OSXand
Linuxwhen using the
WatchServiceWatcher. They are currently disabled for
OSX.
def apply(src: Path, sort: Boolean = true) = { ... } def apply(src: Path) = apply(src, true) | https://gitter.im/lihaoyi/os-lib?at=60634dd447b0403241ab91b1 | CC-MAIN-2022-05 | refinedweb | 378 | 67.55 |
Opened 12 years ago
Closed 11 years ago
#6951 closed (fixed)
edit_inline lazy translation fails in history log.
Description
When using edit_inline and object uses a lazy translation for model names and/or field names.
History will show code below instead of field names and/or the model name.
<django.utils.functional.__proxy__ object at 0x8ad760c> for <django.utils.functional.__proxy__ object at 0x8aff06c>
Example models.py, not working just showing setup of inline and ugettext_lazy use.
from django.db import models from django.utils.translation import ugettext_lazy as _ class Parent(models.Model): """ Regular object """ class Admin: pass class Inline(models.Model): """ Inline object related to parent """ parent = models.ForeignKey(Parent, edit_inline=models.STACKED) note = models.CharField(_("note"), max_length=100) class Meta: verbose_name = _("Inline item") verbose_name_plural = _("Inline Items")
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Whatever is causing this, like #6853, appears to not affect newforms-admin. That is, I can recreate this problem on trunk admin, but not on newforms-admin with the patch for #6117. So when change history is implemented in newforms-admin, it won't be subject to this problem. But it isn't quite "fixed in a branch" yet sine #6117 is still open.
failed to say which Django Revision: 7397 | https://code.djangoproject.com/ticket/6951 | CC-MAIN-2019-51 | refinedweb | 220 | 51.14 |
parser.h File Referenceserial protocol parser and commands. More...
#include <cpu/types.h>
Go to the source code of this file.
Detailed Descriptionserial protocol parser and commands.
- Version:
Definition in file parser.h.
Enumeration Type Documentation
Function Documentation
Find the template for the command contained in the text line.
The template can be used to tokenize the command and interpret it.
This function can be used to find out which command is contained in a given text line without parsing all the parameters and executing it.
- Parameters:
-
- Returns:
- The command template associated with the command contained in the line, or NULL if the command is invalid.
Definition at line 286 of file parser.c.
Hook for readline to provide completion support for the commands registered in the parser.
- Note:
- This is meant to be used with mware/readline.c. See the documentation there for a description of this hook. | http://doc.bertos.org/2.1/parser_8h.html | crawl-003 | refinedweb | 149 | 59.5 |
Zooko <zooko@zooko.com>: > So your proposal seems sort of like a kind of dynamic scoping for > modules Yes, it would be dynamic scoping of the import namespace. The reason I think it needs to be dynamic rather than lexical is that it isn't really objects or functions that we want to allow or deny capabilities to, it's *users* (for some suitably general notion of "user"). It may be okay for a particular method to do something when it's called by one user, but not another. The current method of controlling access to modules by overriding __import__ suffers from the problem that a given module can only have one __import__ hook at a time. There's no way for different users of the same module to have different importing abilities. >From what's been said about E, it seems that the solution there is to have instantiable modules (which means they're more like classes than modules, in Python terms) and to explicitly pass a lot of capabilities around. It seems to me that you'd end up with a lot of extra parameters to pass around in calls that way, and most of the time you'd just be passing on what had been passed to you -- hence my suggestion of dynamic scoping. But, not having studied any real E code, it may be that it doesn't turn out to be that bad in practice. Probably I shouldn't say any more until I know what I'm talking about... Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+ | https://mail.python.org/pipermail/python-dev/2003-March/034180.html | CC-MAIN-2019-18 | refinedweb | 282 | 53.14 |
Alright, I just I’ve been quite for far too long, and I feel like trying to stir up some googlejuice, and this is just the topic to do.
The people that know me for a while have seen my forays into declarative user interfaces, and the attempts to extend the concepts behind HTML into a much richer UI definition language. I got hooked once I fell into the XML camp, and started to use Element Behaviors to extend HTML. I picked up Adobe’s SVG Element Behavior experiment and enhanced it. I then worked with Adobe to get the 3.0 version of the viewer to support binary behaviors (the binary version of element behaviors). The next natural progression was to create my own element behaviors which rendered not to HTML but to SVG. My Angular Gauges and Bar Chart examples are nice snapshots of those experiments (requires Adobe’s SVG Viewer). I then hit upon the idea of migrating the custom namespace idea from the element behavior HTML world into the SVG document, and came up with a much cleaner implementation that didn’t rely on an IE (windows only) technology (seen here).
At this point I started to wonder if we could eventually create a SVG rendering engine for the .Net platform (which became the SharpVectorGraphics project). The hope was that eventually we could add other namespaces to the project and have them render as SVG, which would then render to the native graphics layer (DirectX). Combine that with the abilities of the CLR, and you would have one powerful UI development tool.
It was at this point that I started to hear rumors of a similar architecture being developed at MS. An UI architecture that would allow a developer to declaratively create/combine UI elements. But instead of rendering directly to the graphics layer, render to an intermediate XML based vector graphics layer (see my previous post on Serializing User Interfaces). Well that’s when I knew I was on the right track, and I finally get to see Avalon in a couple weeks at the PDC.
But if you thought the W3C was going to let MS roll out this new technology without a version to call their own and make so sort of an attempt to compete, well you would be wrong. They are busy working on the latest version of the SVG spec (1.2) that will include a very similar GUI architecture called RCC (Rendering Custom Content), that they also have been working on for a long time. The basis of RCC is very similar to Avalon, create custom namespaces, bind them to a composition engine (RCC) and have them render to a vector graphics intermediate language (SVG). Adobe has even release a pre-beta version of their SVG viewer that uses an early version of the RCC spec. If you want to check want all the fuss is about, install the pre-beta viewer and hit the SVG-Wiki site. The UI element example is the one you may want to pay special attention to.
So the way I see it, Avalon and SVG-RCC are going to go head to head for the next generation GUI architecture. We are still way early in the development life cycle and things can change, but no matter what it should be a very interesting adventure. If you thought HTML really change the way we develop apps, and think web services are cool, just wait until you get a hold of this new stuff. BTW, the XUL guys have a cool technology, but it misses the mark. It can’t handle custom content, and it doesn’t render to a vector graphics layer so you can’t abstract out the different platform graphics APIs.
DonXML | http://weblogs.asp.net/donxml/archive/2003/10/15/32121.aspx | crawl-002 | refinedweb | 631 | 58.42 |
NAMEreadline - get a line from a user with editing
SYNOPSIS
#include <stdio.h> #include <readline/readline.h> #include <readline/history.h>
char *
readline (const char *prompt);
DESCRIPTIONreadreadRead BindingsT.
VariablesRead (the default), in vi mode when the)
- (100)
- This determines when the user is queried about viewing the number of possible completions generated by the possible-completions)..
- emacs-mode-string (@)
- If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when emacs editing mode is active..
- enable-bracketed-paste (Off)
- When set to On, readline will configure the terminal in a way that will enable it to insert each paste into the editing buffer as a single string of characters, instead of treating each character as if it had been read from the keyboard. This can prevent pasted characters from being interpreted as editing commands.
-)
-. If an attempt is made to set history-size to a non-numeric value, the maximum number of history entries will be set to 500.
-.-mode-in-prompt (Off)
- If set to On, add a string to the beginning of the prompt indicating the editing mode: emacs, vi command, or vi insertion. The mode strings are user-settable (e.g., emacs-mode-string).
- skip-completed-text .
- vi-cmd-mode-string ((cmd))
- If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when vi editing mode is active and in command.
- vi-ins-mode-string ((ins))
- If the show-mode-in-prompt variable is enabled, this string is displayed immediately before the last line of the primary prompt when vi editing mode is active and in insertion.
- visible-stats (Off)
- If set to On, a character denoting a file's type as reported by stat(2) is appended to the filename when listing possible completions.
Conditional ConstructsRead, after any comparison operator, extends to the end of the line; unless otherwise noted,.
-.
-
- variable
- The variable construct provides simple equality tests for readline variables and values. The permitted comparison operators are =, ==, and !=. The variable name must be separated from the comparison operator by whitespace; the operator may be separated from the value on the right hand side by whitespace. Both string and boolean variables may be tested. Boolean variables must be tested against the values on and off.
- would read /etc/inputrc:
$include /etc/inputrc
SEARCHINGRead COMMANDST).
- previous-screen-line
- Attempt to move point to the same physical screen column on the previous physical screen line. This will not have the desired effect if the current Readline line does not take up more than one physical line or if point is not greater than the length of the prompt plus the screen width.
- next-screen-line
- Attempt to move point to the same physical screen column on the next physical screen line. This will not have the desired effect if the current Readline line does not take up more than one physical line or if the length of the current Readline line is not greater than the length of the prompt plus the screen width.
--backward
- Search backward through the history for the string of characters between the start of the current line and the current cursor position (the point). The search string must match at the beginning of a history line. This is a non-incremental search.
- history-search-forward
- Search forward through the history for the string of characters between the start of the current line and the point. The search string must match at the beginning of a history line...
Commands for Changing Text
-.
- cursor position). This text is referred to as the region.
- copy-region-as-kill
- Copy the text in the region to the kill buffer.
- copy-backward-word
- Copy the word before point to the kill buffer. The word boundaries following. This command.
- print-last-kbd-macro ()
- Print the last keyboard macro defined in a format suitable for the inputrc file.-lowercase-version (M-A, M-B, M-x, ...)
- If the metafied character x is BINDINGST
FILES
- ~/.inputrc
- Individual readline initialization file
AUTHORSBrian Fox, Free Software Foundation
bfox@gnu.org
Chet Ramey, Case Western Reserve University
chet.ramey@case.edu
BUG REPORTSIf. | https://jlk.fjfi.cvut.cz/arch/manpages/man/readline.3 | CC-MAIN-2019-26 | refinedweb | 703 | 55.64 |
Introduction: WithYou on Boltiot Platform
I have a friend who makes greeting cards, scrapbook and some extraordinary gifts by her own she will make everything in a creative manner (to see Click here). and you can follow her on FB in "Creative Crissy" page.
some people will buy them for some occasions like Birthdays, marriages and so on.....
Then I got an idea that if the gift has some advanced future which is linked with IoT.Then by the Bolt Unit and the bolt team helps me to do this, you can get the device by Clicking here.
Everyone will give gifts to share their feelings so I thought if they share their little feeling to other it makes each other to feel that they are with their lovable person.
And if there is any emergency occurred then by one click the other person will get alerted by msg.
Step 1: Components Used:
2)Battery's
3)Arduino UNO
4)LCD display
5)Smile Board
6)LED strips (which works on DC voltage)
7)Bolt Shield
8)Jumper Wires
9)Switch
10)10k ohm potentiometer
11)220 ohm resistor
12)Bread Board
Step 2: Bolt Unit
Bolt is an electronic device which has an inbuilt nature of connecting to the internet using ESP8266 and It works on a 5v power supply.
The device will connect to the near wifi router or mobile hotspot to access the internet. We can make it connect to the specific wifi using "Boltiot app" it is available in both the play store and app store. By that, we can control this device remotely using the Internet.
Bolt has many futures like data visualization, controlling and reading data from the sensors to see them Click here.
It can also communicate to other microcontrollers using UART communication.
Step 3: Connecting Arduino UNO With Lcd Display
By seeing the pic we can connect the LCD with Arduino UNO.
Step 4: Connecting Arduino UNO With BoltShield and Programming
We will connect Arduino to bolt shield to control the IC's, this will control(ON/OFF) the LED strips.This is works as H-bridge.
BoltShield --- Arduino UNO
1)0 pin - 6 pin
2)2 pin - 7 pin
3)3 pin - 8 pin
4)4 pin - 9 pin
5)5pin - 10 pin
6)6 pin - 13 pin
And upload the below program in the Arduino UNO.
Attachments
Step 5: LED Strips Connection
To make on the Led strip it should get +ve and -ve connection so by changing the state of the pins of the boltshield from the Arduino UNO we can supply or we can stop by that we can controll the led strips remotely.
Step 6: App for WithYou
the features of the app are to chat with each other and control the box remotely from the app and sending the msg if there is any emergency by one click and we can send the location to the other person.
To make a chat app e need the database for that we will take the database from the firebase
to make it Click here.
And to control the device from the app we use the link of the boltiot which has API key and Device Name.
Step 7: WithYou App Screen1
In the button of the take care in the app, there is a link which connects the device to our app.
This is work on the UART communication protocol.
to start the UART communication first we need to start the communication for that
we have to use the link
""
This will start the UART communication with the baud rate 9600 and for communicating with the Arduino uno, the baud rate should be 9600.
Step 8: WithYou App Screen2
and in every button we will send the data from bolt to Arduino, for that
in the text box of the button we will give the link
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Netural&deviceName=BOLTxxxxxx".
in every button, we have to change the data
like
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Smile&deviceName=BOLTxxxxxx"
"htp://cloud.boltiot.com/remote/Yourapikey/serialWrite?data=Crazy&deviceName=BOLTxxxxxx"
Step 9: WithYou App Screen3 and Getting Msg
In the button, we will give the link
"htp://cloud.boltiot.com/remote/YourApiKey/digitalWrite?pin=0&state=LOW&deviceName=BOLTxxxxxx"
In the screen3 initialization, we will give the link
"htp://cloud.boltiot.com/remote/YourApiKey/digitalWrite?pin=0&state=HIGH&deviceName=BOLTxxxxxx"
and to get the msg we need a separate server we will get it from the digital ocean
Click here to create the digital ocean account and you will be credited with 10$ in your digital ocean account.
and to getting the msg we use Twilio
Click here to know how to get msg from the Twilio
and use the below program to get the msg when the alert has been came
from twilio.rest import TwilioRestClient
from credentials import account_sid, auth_token, my_cell, my_mobile
import requests,json,time
client = TwilioRestClient(account_sid, auth_token)
def send_msg(sensor_data):
my_msg = "I'm in problem"
message = client.messages.create(to=my_cell, from_=my_mobile, body=my_msg)
while True:
r = requests.get('')
data = json.loads(r.text)
print data['value']
try: sensor_value = int(data['value'])
print sensor_value if sensor_value == 1:
send_msg(str(sensor_value))
except Exception as e:
print "Error",e
time.sleep(5)
Run this on your server. This will trigger when the alert has been pressed.
Participated in the
Invention Challenge 2017
Be the First to Share
Recommendations
Discussions | https://www.instructables.com/WithYou-on-Boltiot-Platform/ | CC-MAIN-2021-04 | refinedweb | 915 | 57.61 |
relationship between RDF HDT (Header-Dictionary-Triples) and other selected relevant technologies. Vocabulary of Interlinked Datasets [VoID] provides a vocabulary and a set of instruction that allows the discovery and usage of linked data sets. VoID aims to bridge data publishers and data users, so that publishers can distribute the data sets (as a RDF dump, SPARQL Endpoints, etc.) and users can discover and use identified data sets given certain attributes.
HDT can interact with VoID in two different ways:
In the first case, a VoID data set will specify a data dump void:dataDump) through a URI, and this URI will be entrance point of a HDT data set, i.e., the Header in which all the metadata is present.
In the second case, part of the publication metadata of the Header will make use of VoID properties. For example, the publication metadata can be pruned with VoID properties, such as void:sparqlEndpoint and void:exampleResource. Statistical metadata can also use basic VoID statistics, such as void:distinctSubjects.
[Semantic Sitemaps] support efficient semantic data sets discovery and high-performance retrieval. It is based on extending the traditional Sitemap Protocol with new XML tags for describing the presence of RDF data (and to deal with specific RDF publishing needs).
HDT can interact with Semantic Sitemaps considering HDT as an RDF format, thus the Header of an HDT data set can be the final URI destination of a sitemap property, such as sc:datasetURI, and sc:dataDumpLocation. The Header could have some properties similar to the Semantic Sitemap ones, such a description of the change frequency, but the protocol is different, so that the interpretation could also differ.
The Internet Archive ARC file format (ARC_IA) and its latest revision, Web ARChive file format (WARC), specify a method for storing web crawls. They are provided as sequences of content blocks and some basic related information. WARC generalizes the format for a better harvesting, accessing, and exchanging of resources. It also allows efficient indexing for access by URL and date.
In terms of HDT, these formats would be seen as a basic Header together with the raw data. Each document in an ARC_IA or WARC web crawl is preceded by some header information, such as the document file format and size, outward links, etc. Headers and documents (html, gif, etc.) are codified in DAT and ARC files respectively.
HDT is focused on a homogeneous RDF data set, while ARC_IA and WARC approach complete and heterogeneous web crawls. Data definition in HDT is "fine-grained" in Dictionary and Triples, which can be indexed for "fine-grained" operations. ARC_IA and WARC provide a bigger granularity for the contained resources. They have a marked preservation design.
The Efficient XML Interchange Format (EXI) is a compact representation for XML. It is based on efficient encodings of XML event streams using a grammar-driven approach. The stream of events is represented using variable length codes. EXI can utilize schema information to improve compactness and processing efficiency. When schemas are used, it allows efficient user-defined Datatypes.
HDT shares with EXI the aims of efficiency, flexibility and compactness. EXI streams are codified in two parts, similar to the HDT core data; streams are composed by a header (similar to the HDT Control Information) and a EXI body with the events (equivalent to the HDT body).
In contrast, EXI is not focused on publication and resource discovery (the Header component of HDT) and it is not involved neither in indexing nor querying the data.
To date, there are several representations for RDF data, but none of these proposals, though, seems to have considered data volume as a primary goal. HDT is different from other RDF representations because it is focused on publishing and exchanging RDF data at large. While current proposals try to be human-readable (with few compacting structures such as collection and lists of elements), HDT is an efficient machine-readable serialization format. Here we discuss some issues for the best-known RDF representations.
RDF/XML, due to its verbosity, is good for exchanging data, but only at small scale. It includes some compacting features such as:
Regarding HDT, the third feature is supported by the dictionary configuration, defining common prefixes and base URI. The other three features are outperformed by the Adjacency List implementation of triples, e.g., in Compact Triples and Bitmap Triples.
[Notation3 (N3)] is a language which was originally intended to be a compact and readable alternative to RDF's XML syntax. Thus, it reduces verbosity and represents the RDF with a simple grammar based on the natural triples philosophy. It also allows some compacting features:
Except for the latter one, all these abbreviations are also present in HDT whether in dictionary configuration or in triples implementation. Dictionary configuration allows to define common prefixes and a base URI. Shorthands are well specified in the HDT syntax. Adjacency List implementation of triples outperforms the simple lists of N3. Blank nodes in HDT are named with the _: namespace prefix.
N3 is extended to allow greater expressiveness, e.g. with Quantification, which is not considered in HDT.
[Turtle] is a more compact and readable alternative. It is intended to be compatible with N3, as a subset of it. Thus, it inherits its compact features and adds extra compact ability, e.g. through abbreviating RDF Collections ([Turtle], section 2.5).
[RDF/JSON] resembles Turtle, with the advantage of being coded in a language easier to parse and more widely accepted in the programming world, such as the JavaScript Object Notation (JSON). It is intended to be easy to read and write by humans and easy to parse and generate by machines. HDT is a more compact format focusing on machine-readable data at large scale, keeping the Header component as the entrance point both for humans and machines.. | http://www.w3.org/Submission/2011/SUBM-HDT-Related-20110330/ | CC-MAIN-2015-27 | refinedweb | 971 | 54.63 |
Archives for October 2012
A week of symfony #304 (22->28 October 2012)
This week Symfony 2.0.18 was released to fix some minor issues and to update some important dependencies. Meanwhile, the master branch added a new SecureRandom generator. In addition, the Symfony CMF project showed some important progress..
A week of symfony #303 (15->21 October 2012)
This week, Symfony2 master branch eased the service container debugging and simplified the routing matcher and dumper. Meanwhile, Symfony 2.1 introduced some changes to be forward compatible with the upcoming Twig 2.x. In adition, the videos of the last Symfony Live San Francisco 2012 were published.
Let's end this year with a blast!.
Symfony Live San Francisco 2012: Videos are online
Videos for the Symfony Live San Francisco 2012 conference are now online.
A week of symfony #302 (8->14 October 2012)
This week, symfony 1.4.19 maintainance version was released, and Symfony2 added a new PBKDF2 Password encoder and started refactoring the WebProfilerBundle to make it useable outside the full-stack framework. However, the biggest news of the week was the publication of the Symfony Live 2012 videos, more than 15 hours of Symfony and PHP sessions.
Symfony Live Paris 2012: The videos are online
Discover more than 15 hours of videos from SymfonyLive Paris 2012.
A new Release Process for Symfony
Symfony now manages its releases through a time-based model.
A week of symfony #301 (1->7 October 2012)
This week, Symfony 2.2 version added support for Twig namespaces, which allows to use native Twig template names and therefore it improves performance. In addition, the routing component also improved its matching performance by almost 20% in some cases. | http://symfony.com/blog/archives/2012/10 | CC-MAIN-2016-22 | refinedweb | 286 | 64.61 |
Hi everyone,
I just learning how to personalize the databricks notebooks and would like to show a logo in a cell.
I installed the databricks cli and was able to upload the image file to the dbfs:
I try to display it like this:
displayHTML("<img src ='files/Omnetric_logo.jpg'>")
Is not working:
If I used the full URI of the image, same result:
displayHTML("<img src ='dbfs:/FileStore/files/Omnetric_logo.jpg'>")
I also tried with a "images" folder instead of "files", again, same result.
Could you please help me with that. Any comment will be appreciated.
Best,
Paul
Answer by leedabee · Dec 02, 2019 at 04:45 PM
Hi @Paul Hernandez, please try adding a preceding slash before the
files path:
displayHTML("<img src ='/files/Omnetric_logo.jpg'>")
Just to add as a design pattern - I like to have any static content contained in a markdown block. Most notebooks/workshops I've seen produced by Databricks also do this. That is, you would use the
%md magic command at the top of your block and allow markdown to render the html, along with any other markdown you like:
%md <img src ='/files/Omnetric_logo.jpg'> # Hello Omnetric ## Overview Blah Blah Blah - list item 1 - list item 2 ## Details Blah blah
thanks! I used your snippet for my notebook and it works.
I also had to correct the url of the image. Since I uploaded the file in dbfs:/FileStore and then in a subfolder called images, the right url is:
/files/files/Omnetric_logo.jpg
Reviewing the documentation I noticed that dbfs:/FileStore is mapped to files
Best, Paul
Answer by shyamspr · Dec 02, 2019 at 06:49 AM
Hi @Paul Hernandez,
Please use IPython library as in below,
from IPython.display import Image from IPython.core.display import HTML Image(url= "")
Answer by Tuts · May 13 at 08:12 AM
Hi @Paul Hernandez, Did you find a resolution to displaying the images? Image('xyz.png') results with <IPython.core.display.Image object> and no image.
Displaying HTML Output 3 Answers
How do I render a png file from a Blob storage container in a Notebook 2 Answers
Can I lock a notebook? 2 Answers
Return code from notebook 1 Answer
notebook stops tracking job while the job is still running on the cluster 2 Answers
Databricks Inc.
160 Spear Street, 13th Floor
San Francisco, CA 94105
info@databricks.com
1-866-330-0121 | https://forums.databricks.com/questions/29012/how-to-show-an-image-in-a-notebook-using-html.html | CC-MAIN-2020-40 | refinedweb | 402 | 63.09 |
Data Structures for Drivers
no-involuntary-power-cycles(9P)
usb_completion_reason(9S)
usb_other_speed_cfg_descr(9S)
usb_request_attributes(9S)
- callback structure for subscribing to netinfo events
#include <sys/hook.h>
Solaris DDI specific (Solaris DDI).
The hook_t data structure defines a callback that is to be inserted into a networking event. This data structure must be allocated with a call to hook_alloc() and released with a call to hook_free().
hook_func_t h_func; /* callback function to invoke */ char *h_name; /* unique name given to the hook */ int h_flags; hook_hint_t h_hint; /* insertion hint type */ uintptr_t h_hintvalue; /* used with h_hint */ void *h_arg; /* value to pass into h_func */ typedef int (*hook_func_t)(net_event_t token, hook_data_t info, void *);
Hook hints are hints that are used at the time of insertion and are not rules that enforce where a hook lives for its entire lifetime on an event. The valid values for the h_hint field are:
Insert the hook wherever convenient.
Place the hook first on the list of hooks.
Place the hook last on the list of hooks.
Place the hook before another hook on the list of hooks. The value in h_hintvalue must be a pointer to the name of another hook.
Place the hook after another hook on the list of hooks. The value in h_hintvalue must be a pointer to the name of another hook.
See attributes(5) for descriptions of the following attributes: | http://docs.oracle.com/cd/E18752_01/html/816-5181/hook-t-9s.html | CC-MAIN-2016-18 | refinedweb | 225 | 63.19 |
caleder
J2me - MobileApplications
J2me Hi, I would like to know how to send orders linux to a servlet which renvoit answers to a midlet. thank you
Platform Micro Edition |
MIDlet Lifecycle J2ME
|
jad and properties file in J2ME
| J2ME Hello World Program
| Creating MIDlet Apps for Login in J2ME |
Text
Field MIDlet J2ME |
J2ME Contact List |
Date Field MIDlet J2ME
;
EclipseME
EclipseME is an Eclipse plugin to help develop J2ME MIDlets. EclipseME does the "grunt work" of connecting Wireless Toolkits to the Eclipse...;
J2ME Java Editor
Extends Eclipse Java Editor support ing
j2me - MobileApplications
j2me Hi,
I have developed a midlet application in j2me now i want...,
For more information on J2me visit to :
Thanks
j2me database question
j2me database question **Is there any possibility to install a database into the mobile.
If possible how can i connect it through midlet(j2me)**
pls help me
j2me - MobileApplications
j2me i am trying to load one image in j2me program..but get... class Midlet extends MIDlet
implements CommandListener
{
private Display... ImageItem imageItem;
public Midlet()
{
display = Display.getDisplay
J2ME Icon MIDlet Example
J2ME Icon MIDlet Example
... element and an array of image element.
In the Icon MIDlet class we are creating...;javax.microedition.midlet.*;
public class SlideImage extends MIDlet{
J2ME Item State Listener Example
the
ItemStateListener interface in the j2me midlet. The ItemStateListener interface...
J2ME Item State Listener Example
...;class ItemStateListenerMIDlet extends MIDlet{
Timer MIDlet Example
J2ME Timer MIDlet Example
This Example shows how to use of timer class. In this example we are using
the Timer class to create the time of execution of application
J2ME Tutorial
;
Creating MIDlet Application For Login in J2ME
This example show... variable DATE which is 0.
J2ME Button MIDlet
This example...;
J2ME CheckBox ChoiceGroup MIDlet
This example illustrates how to create image application
j2me image application i can not get the image in my MIDlet .........please tell me the detailed process for creating immutable image without Canvas class project - Java Beginners
j2me project HOW TO CREATE MIDLET WHICH IS A GPRS BASED SOLUTION... SALES DATA FROM THE SERVER.
THIS MIDLET IS FOR THE PROJECT MEDICAL CENTRAL...://
Thanks
Rectangle Canvas MIDlet Example
Rectangle Canvas MIDlet Example
... of rectangle in J2ME.
We have created CanvasRectangle class in this example...;extends MIDlet{
private Display display;
J2ME Canvas Repaint
J2ME Canvas Repaint
In J2ME repaint is the method of the canvas class, and is used to repaint the
entire canvas class. To define the repaint method in you midlet follow
Radio Button in J2ME
Radio Button in J2ME
In this tutorial you will see the MIDlet Example that is going to
demonstrate, how to create the radio button in J2ME using MIDlet. The radio button Video Control Example
J2ME Video Control Example
This Application explain the use of Video Control. The work...;Thread {
VideoControlExample midlet;
Record Store MIDlet Example
J2ME Record Store MIDlet Example
This is a simple program to record data and print it on the console. In this
example we are using the following code to open, close.
j2me
j2me how to compile and run j2me program at command prompt
j2me
j2me i need more points about j2me
J2ME count character into string
J2ME count character into string i am new in J2ME, my problem is how... stuck at here and cant do more further work, if any one can give me some example with J2ME coding, tons of thx will be given :)
best regards,
Noob beginner
Check Box Midlet Example
J2ME CheckBox ChoiceGroup MIDlet
...;,
"J2ME", "J2EE", "JSF"). if user select a check
box...;technology.append("J2ME", null);
technology.append("J2EE Record Store Example
J2ME Record Store Example
In this Midlet, we are going to read string data and write.... In J2ME a record store consists of a collection of records
and that records remain
Text Example in J2ME
Text Example in J2ME
In J2ME programming language canvas class is used to paint and draw...
in our show text MIDlet Example. We have created a class called CanvasBox COmmand c=new Command("Exit",Command.EXIT,100);Please expalin abt 3 parameters Hi sir, i need a source code for simple calculator along with buttons in mobile application assignment on sun sdk and its running fine on emulator but not showing results in two... javax.microedition.midlet.MIDlet;
public class MoneyL extends MIDlet
implements CommandListener Books
J2ME Books
Free
J2ME Books
J2ME programming camp...;
The
Enterprise J2ME
This book helps experienced Java
j2me
j2me What is JAD file what is necesary of that
Hi Friend,
Please visit the following link:
JAD File
Thanks
Hi Friend,
Please visit the following link:
JAD File
Thanks
error in compiling j2me apllication - Applet
error in compiling j2me apllication hi,
in my j2me application... MIDlet implements CommandListener,ItemCommandListener,Runnable,PlayerListener...() OF THIS MIDlet
J2ME Servlet Example
J2ME Servlet Example
... you, how to
create the servlet and implement it with the midlet. In this servlet... steps.
For Details follow this link: J2ME Cookies Example
J2ME Animation using repaint( ) method
J2ME Animation using repaint( ) method
In this part of J2ME Image Tutorial, we... a class called ImageAanimation that
extends MIDlet and implements
Align Text MIDlet Example
to the text.
In this J2ME Midlet we are going to set the text at different locations...
Align Text MIDlet Example
... in this small j2me
example..
int width = getWidth();
J2ME Read File
of this file by the help of j2me midlet.
...
J2ME Read File
In this J2ME application, we are going to read the specified file.
This example
J2ME Cookies Example
J2ME Cookies Example
.... In this
example we are creating a MIDlet ( CookieMIDlet )
for access... MIDlet.
The Application is as follows:
CookieMIDlet.java
Graphics MIDlet Example
of graphics in
J2ME we use MIDlet's. In the example we have created PacerCanvas class...
Graphics MIDlet Example
...;PacerExample extends MIDlet{
public void startApp(){
Draw Line in J2me
Draw Line in J2me
In this example we are going to show you how to draw a line using J2ME.
Please go through the below given J2ME syntax that includes all the package,
methods
java MIDlet - MobileApplications
java MIDlet l need to write a program in java midlet which generates 10 random numbers and perform arithmetic operations with the numbers, using... with java midlet
Phone Book Midlet Example
J2ME Contact List
This Example goes to create a Phone Book MIDlet
This example illustrates how to create your phone book. In this example
we are taking three SCREEN
Command Midlet Example
J2ME Button MIDlet
This example illustrates how to create command button in your form. Command
class build to bind only the semantic information of the command
J2ME Current Date And Time
J2ME Current Date And Time
This is a simple J2ME form example, that is going to show the current date
and time on the screen. Like core Java J2ME too use the same | http://www.roseindia.net/tutorialhelp/comment/83712 | CC-MAIN-2014-10 | refinedweb | 1,129 | 54.22 |
If I have a list like this:
results=[-14.82381293 -0.29423447 -13.56067979 -1.6288903 -0.31632439
0.53459687 -1.34069996 -1.61042692 -4.03220519 -0.24332097]
Just use numpy's built-in function var (and add commas to your list):
import numpy as np results = [-14.82381293, -0.29423447, -13.56067979, -1.6288903, -0.31632439, 0.53459687, -1.34069996, -1.61042692, -4.03220519, -0.24332097] print np.var(results)
This gives you
28.822364260579157
If - for whatever reason - you cannot use numpy and/or you don't want to use a built-in function for it, you can also calculate it by hand using e.g. a list comprehension:
# calculate mean m = sum(results) / len(results) # calculate variance using a list comprehension varRes = sum([(xi - m)**2 for xi in results]) / len(results)
which gives you the identical result.
EDIT
@Serge Ballesta explained very well the difference between variance
n and
n-1. In numpy you can easily set this parameter using the option
ddof; its default is 0, so for the
n-1 case you can simply do:
np.var(results, ddof=1)
The "by hand" solution would be:
sum([(xi - m)**2 for xi in results]) / (len(results) - 1)
Both approaches give you
32.024849178421285. | https://codedump.io/share/I4nBXwhhDe4c/1/how-can-i-calculate-the-variance-of-a-list-in-python | CC-MAIN-2017-13 | refinedweb | 209 | 69.82 |
Is there any best practice of how to synchronize folders between two Windows Server 2012 server installed?
Windows Server has a distributed and replicated file system called DFSR. This is not a new technology to Windows Server, but the Server 2008 and later versions are substantially improved over the Server 2003 version.
There are two parts to this:
With DFS, you create a namespace. That namespace is generally \\domain.tld\namespace. For example, \\example.local\files. This namespace then has member servers. If your Active Directory Sites and Services is set up appropriately with the corret subnets applied to the correct sites, then each site will connect to its closest server.
\\domain.tld\namespace
\\example.local\files
This in its own isn't particularly useful though. Yes, it means that every computer on the network can use the same network path and expect a fast speed, but just connecting the namespace to different servers isn't particularly useful for your situation, as you also need the same data on each server.
DFSR replicates data between shares on multiple servers. There are a variety of different topologies you can choose from, but "Full Mesh" is a popular one. This means that every DFS node can "see" every other DFS node, and replicates all the changes from each individual DFS store. This means that a file written to one server will appear on all the other DFS members within a fairly short period of time.
With a Hub and Spoke topology, where not all the DFS members can see eachother, but they can all see one central server, then all changes are replicated to/from the central server. This effectively means that all replications take 2 steps to get to all the other nodes (Original > Central, then Central > Other Nodes).
With 2 servers, "Full Mesh" is the only viable replication option.
Now, you actually don't need to use DFS and R together. You can replicate two folders without presenting them in a namespace, and as previously mentioned, you can present a non-replicated namespace. Generally though you would use both together.
Another thing to note is that even though it's called "Distributed File System" it's not a block-level file system like you might associate with say, GlusterFS. All changes are made at file-system level and then the deltas are replicated. This can lead to multiple changes made on different servers conflicting with eachother, as there's no locking mechanism between DFS nodes, or if there is application-level locking, the locks may take time to replicate between all the nodes to indicate that the file is locked.
By posting your answer, you agree to the privacy policy and terms of service.
asked
1 year ago
viewed
2511 times
active | http://serverfault.com/questions/435197/how-to-synchronize-folders-between-two-windows-server-2012?answertab=votes | CC-MAIN-2014-23 | refinedweb | 462 | 61.97 |
<rant>
Why is it that everyone decides to create their own whiz-bang interface for drivers & whatnot? Why is it always so difficult to just say "Install my printer & use the Windows default interface for managing it". WiFi cards & printers are particularly bad (D-Link, HP, Epson, LinkSys, etc...), but then there are video drivers (particularly OEM laptop versions), network drivers (Intel's 'ProSet' ethernet driver crap comes to mind), and then, my personal favorite, sound drivers. Why do sound card mfr's decide a poorly skinned control panel & a monolithic set of useless addons packaged in one huge .exe is the best way to get drivers on a users machine? RealTek, CreativeLabs, nVidia, CMedia (I'm sure I'm missing a few, here) Personally, give me the minimal set of .inf files and dll's, and let me decide if I want your P.O.S. addon control panel to control volume and the plethora of doohickeys that are only ever used by game programmers (does anyone in their right mind actually listen to music while pumping it through the 'padded cell' filter?)
</rant>
Amen!
There is no need for these custom skinned control panels (that don’t even look like native Windows apps) in the first place.
I couldn’t agree more with your post.
I’ve gotta agree as well. I’d rather see a stable functional driver first. I wonder if Creative and others have done the research to see if people actually use the addons they throw in their driver sets? I can’t recall the last time, as you mentioned, I applied an EAX filter to my regular audio stream.
I think it’s also time to see more focus on certified/tested drivers. I’m starting to see the number of uncertified driverse rise again through various deployments.
About Intel’s ProSet drivers, I dunno what you have a problem with precisely? Their software and hardware is probably the best I’ve ever seen as far as network cards go. That their driver installer is intelligent enough to bring down the network interface, update the drivers, then bring everything back up is equally cool (other shoddier network card installers would tell you that you needed to reboot).
So what’s your beef with ProSet I guess is what I’m asking. 😛
Don’t forget logitech. 33Mb for QuickCam Pro drivers, which add all sorts of nonsense, including their own namespace into My Computer.
So you install it, then uninstall everything but the driver. Uninstall gives you granular options, but install is everything or nothing/
>Why do sound card mfr’s decide a poorly
>skinned control panel & a monolithic set of
>useless addons packaged in one huge .exe is
>the best way to get drivers on a users
>machine?
Because people who don’t spend all their free time sat in front of their computer are in the majority. Unfortunately.
I couldent agree more. Many drivers are poorly coded, slow, crash, ect. But my biggest problem is that video card drivers are not easy to update. You use the uninstaller there are still many bits left over. (Dont belive me get driver cleaner pro at drivercleaner.net and update your ati or nvidia drivers. Why cant it just auto uninstall/update? is that so hard. Any comments?
Totally agree with author.
I think marketing teams in mfctr companies don’t get the point. They think people WOW about their crappy skinned unusable control panels with two slidebars. Those days are gone – people need stability, compatibilty and speed. No more, no less.
My opinion on manufacturers:
HP – TOTAL crap, especially bs like JSP web server for just viewing toner status.
Creative – I just do not want to talk about their hyperskinned crappy control panel with zero usefull features.
NVidia – rather good. Especially platform chipset drivers – minimun crappy apps.
Intel – medium. Totally crappy Wi-Fi drivers, good chipset drivers.
Hey, manufacturers, DO YOU HEAR US?
I think Vista should pop up a diaog whenever something tries to create a key in HKLMSoftwareMicrosoftWindowsCurrentVersionRun, "do you want to allow this?"
However, I’ll play devil’s advocate and make an excuse for the Wifi vendors: up until XPSP2, Window’s built-in wireless stuff was utter crap. Linksys, Netgear, etc, pretty much had no choice but to roll their own.
…how else can you switch the sound card driver from 2.0 to 5.1 sound?
But then again, this should be a simple property page reachable from device manager. (which some drivers include I’ve noticed)
As for Intel’s ProSet drivers, they tend to mix languages. I only use English versions of Windows, but often switch it to use Norwegian locale so I get correct keyboard layout and decimal separator. This however seemingly means I also want Norwegian language in various apps… (I don’t) Intel gladly mixes both languages in many of their dialogs (not everything is translated).
So yeah, many of these companies should burn in h… for what they’ve done. (Not that I believe in such a place, but Creative is one of the companies I’d like to dispatch there if at all possible)
—
Rune | https://blogs.msdn.microsoft.com/freik/2005/07/17/driver-complaint/ | CC-MAIN-2019-47 | refinedweb | 864 | 65.22 |
A Reproducible Build Environment with Jenkins
Robert Fach, TechniSat Digital GmbH
In this talk Robert introduced what build reproducibility is and explained how TechniSat has gone about achieving it.
TechniSat has a rare and unique constraint where the customer can dictate what modules a feature can impact, but a release contains all modules and they are all rebuilt and tested so you need to ensure unchanged modules are not impacted.
You need to identify and track everything that has influence on the input.
- Source code, toolchains and build system validation, and everything else….
The benefit of a reproducible build environment gives a new level of trust to the customer – that you are tracking things correctly to know what has gone into each build. Then you can support them in the future (so you can make a bug fix without bringing in any extra variability into the build)! It can also be used to find issues in the builds (random GUIDs created and embedded for the build can be detected as what should be binary identical and what shouldn’t be).
Why is it hard?
Source code tracking: it is an easy and “bread and butter” method of managing sources (tags…), but what about if the source control system changes over time? (you need to make sure that the SCM stays compatible over time).
OS tracking: File system – large code base with 1000’s of files – some File systems may not perform well, but changing file systems can change file ordering which can affect the build. Locale issues can affect the build as well (marcos based on __DATE__, __TIME__ etc..)
Compiler: Picking up a new version of the compiler for bug fixes may bring in new libraries or optimizations (branch prediction) that could change the binary. You need to know about anything based on heuristics in the compiler and the switches that control the features so you can disable them, since after the fact it can be too late! You can create a seed for any random generations (namespace mangling -frandom-seed)
Dealing with complexity & scale.
As you scale out and distribute the build, it needs to be tracked and controlled even more.
This adds a requirement for a “release manager,” a system that controls what, how and where (release specification). This system maps the requirements onto the Jenkins jobs, which use a special plugin to control the job configuration (to pass variables to source control, scripts etc.). The Jenkins job maps to a Jenkins slave.
For each release, the release manager creates a new release environment. This includes a brand new Jenkins master configured with the slaves that are required for the build. The slaves are mapped onto infrastructure. The infrastructure is currently managed SQA Systems, artefact repository, KVM cluster (with Openstack coming soon) and individual KVM hosts.
After the release the infrastructure is archived (os tools Jenkins etc…). Also record the salt commands used). (provides one level of way to reproduce). The specification provides another way to recreate the environment (but it is not always reliable as something may have been missed).
Performance Lessons learned (a little bit random at the end of the talk).
- Use tmpfs inside VMs for fast random I/O file systems.
- Try to use nfs read-only cache to save network bandwidth
- Put Jenkins Workspace in a dedicated lvm in the host rather than network
We hope you enjoyed JUC Europe! Here is the abstract for Robert’s talk, “A Reproducible Build Environment with Jenkins.” Here are the slides for his talk. | https://www.cloudbees.com/blog/juc-session-blog-series-robert-fach-juc-europe | CC-MAIN-2018-17 | refinedweb | 588 | 61.46 |
import three OS3D Scene with .xos format into one file .xos ... Then i export into Stand Alone Mode.. When I click the launcher ( .scol ), it was running slowly. How should i handle it ??
Offline
With Flash inside ?
Flash is very heavy, more if it is used as a texture.
Os3d and the 3d content (management, interact, ...) is not light. If you add a Flash ... ;-) Your pc should be powerful !
Offline
Flash hasn't inside yet.. Have you solution for solving this? I combine 3 file OS3D (.xos) become one file .xos..size of my objects (material,mesh,xml) is approximately 100mb
Offline
Yup.. they are simultaneously required.. My project is about Augmented Reality, so movement of capturing from external webcam and the object become slowly..
Offline
What is your configuration ?
Hmm, what do you mean iri ? I don't understand..
Offline
For info, your configuration : operating system, ram, graphic card (model, driver, ...), webcam, Scol settings (SO3Engine, Webcam and Maintenance parameters) and others informations helpful
Have you many others opened applications/services in the OS background ?
Offline
Offline
Pages: 1 | https://forum.openspace3d.com/viewtopic.php?id=720 | CC-MAIN-2022-05 | refinedweb | 179 | 64.47 |
A simple Vue.js component for fullscreen
vue-fullscreen
You can use a simple Vue.js component to toggle fullscreen mode on any of your desired content.
You can see it live here.
Example
To start working with vue-fullscreen use the following command to install it.
$ yarn add vue-fullscreen
Import in your project
import fullscreen from 'vue-fullscreen' Vue.use(fullscreen)
Component Usage:
<fullscreen :fullscreen. Your Content to display in fullscreen ... ... </fullscreen>
The background style of the wrapper can be changed as the example, only available when fullscreen mode is on and
wrap is true. It can be also used as a component and as a plugin. All the available methods and events are on the plugin's page.
export default { methods: { toggle () { this.fullscreen = !this.fullscreen } }, data() { return { fullscreen: false } } }
Caution: Because of the browser security function, you can only call these methods by a user gesture. (e.g. a click callback). To make sure it is supported by browsers visit the Full-Screen API.
If you would like to explore more about vue-fullscreen, head to the project's repository on GitHub, where you will also find the source code. | https://vuejsfeed.com/blog/a-simple-vue-js-component-for-fullscreen | CC-MAIN-2021-21 | refinedweb | 194 | 77.03 |
Hello, I would like to run the following cell on Colab to enable my Google drive, and setup a link to easily save the exported files.
import Python
let drive = Python.import(“google.colab”).drive
drive.mount("/content/gdrive", force_remount: True)
let driveLink = “/content/fastai-v3-swift/”
!ln -sv “/content/gdrive/My Drive/fastai-v3” .
let _ = Python.import(“google.colab”).sys.path.insert(0, slink)
I get the following error:
error: <Cell 10>:8:3: error: consecutive statements on a line must be separated by ‘;’ ln -sv “/content/gdrive/My Drive/fastai-v3” .
It seems that the syntax to run shell commands is not working for me. I also tried %%, %%shell without luck.
How to run a script shell in google colab for swift?
Finally, if there is a snippet, or better way to do what I am trying please let me know. | https://forums.fast.ai/t/how-to-run-a-script-shell-in-google-colab-for-swift/55828 | CC-MAIN-2019-51 | refinedweb | 144 | 59.6 |
Jimmie Houchin wrote: > M. Right - if you are using the script I posted then it *only* generates the PI files for the assemblies / namespaces specified in the very last part of the script. Modifying it to add the 'clr' module is very easy (I've already done it in my copy). After these lines: import clr for entry in modnames: clr.AddReference(entry) __import__(entry) Add the following line: modnames.append('clr') You will also have to modify the script to generate PI files for the custom assemblies you use. Wing doesn't know about the contents of assemblies - the PI files are how you tell it what types (etc) are in custom assemblies. If the assembly names and the top level namespaces are the same then you can just add the assembly name to the 'modnames' list before it adds references to all the assemblies it is generating PI files for. This is the line: modnames = ['System', 'System.Data', 'System.Windows.Forms', 'System.Drawing'] > >>>. The only thing you haven't done is generate the PI files for the assemblies you want to use. Hopefully that will get you the autocomplete you are after. All the best, Michael Foord > >>> > > _________________________________________________ > Wing IDE users list > -- | http://wingware.com/pipermail/wingide-users/2009-April/006485.html | CC-MAIN-2014-42 | refinedweb | 204 | 72.16 |
You know Python, this is C++
Python does have type, but it does not technically have variables.
Python "variables" represent
names
, C++ variables represent
locations
.
Python was designed to be object-oriented. C++ is C with object-oriented features tacked on.
Python is interpreted, C++ is compiled.
C++ uses declarations.
C++ uses
{ }
for blocks. Python uses indentation.
C++ uses
;
at the end of a statement.
In C++, whitespace (spaces, tabs) does not matter ... most of the time.
C++ base types have limited size. Python base types grow.
C++ programmers handle addresses/references/pointers explicitly.
Python is pretty. C++ ... not.
...
Hello World
Python
C++
print("Hello World")
#include
using namespace std; int main() { cout << "Hello World\n" ; }
For Loop
Python
C++
for i in range(10): print(i)
for (int i=0 ; i<10 ; i++) { cout << i << endl ; }
While Loops
Python
C++
i = 0 while i < 10: print(i) i = i + 1
int i ; i = 0 ; while (i < 10) { cout << i << endl ; i = i + 1 ; }
Conditionals
Python
C++
myStr = input("Enter a number: ") i = int(myStr) if i < 0 : print("It's negative") elif i > 0 : print("It's positive") else : print("It's zero")
int i ; cout << "Enter a number: " ; cin >> i ; if (i < 0) { cout << "It's negative" << endl ; } else if (i > 0) { cout << "It's positive" << endl ; } else { cout << "It's zero" << endl ; }
Arrays/Lists
Python
C++
A = range(10) for i in A: print(i)
int A[10], i ; for (i=0; i<10; i++) { A[i] = i ; } for (i=0; i<10; i++) { cout << A[i] << endl ; }
C++ != OOP
Think Object-Oriented Programming first, code in C++ second.
You can just as easily write non-OOP programs in C++.
You can follow the OOP methodology using non-OOP languages.
No programming language will prevent a dedicated programmer from writing really bad code.
C++ is a big hairy monster, but it doesn't have to give you nightmares. | https://www.csee.umbc.edu/~chang/cs202.f15/Lectures/modules/m01a-Python/slides.php?print | CC-MAIN-2018-43 | refinedweb | 321 | 74.59 |
As I have posted before, I have been playing with the super-cheap WI07C WiFi module based on the ESP8266 chip. I’ve now had sufficient success with it that I can publish a post on a working project. This simple setup uses an Arduino nano to read temperatures from to 18BS20 sensors, formats the data as JSON and then sends it over WiFi to a server on my home network. It’s cheap and simple. Here’s the fritzing diagram:
You may notice the Adafruit level shifter board in there too. That’s because the digital IO from the arduino is 5V, but the WiFi module needs 3.3V. The Adafruit module is a dead easy way of joining the two. The temperature sensors use a three-wire protocol which allows you to connect many in parallel and address each one individually. there’s a software library which takes care of this.
Here’s the Arduino sketch. It uses Miles Burton’s temperature control library to read from the sensors, so you’ll need to download that. NB: this code is not a shining exaple of style or completeness. It’s a quick hack to get something working. It does no error checking or reconnection if there are problems. You may find yourself pressing the reset button a lot.
You might also note that the hardware serial port is required for the WiFi module, which needs 115200 baud. This means that you can’t upload a new sketch to the arduino while it’s connected to the WiFi module. I just whip out the wires to the TXD and RXD pins on the arduino while I’m uploading, and all is well.
The sketch tries to join the WiFi network, and then tries to establish a simple TCP connection to a server IP address and port of your choice. Once the connection is established, it checks the temperature sensors every 10 seconds or so and sends the temperatures to the server in JSON format, thus:
{"temp":[22.63,22.81]}. That’s all it does. You’ll need a TCP server listening on your chosen IP address and port, of course. It seems to work quite reliably for me.
#include <SoftwareSerial.h> #include <OneWire.h> #include <DallasTemperature.h> #define SSID "MyHomeSSID" #define PASS "MyPassword" #define TARGET_IP "192.168.1.xx" #define TARGET_PORT 5000 #define TEMPERATURE_PIN 9 SoftwareSerial dbgSerial(10,11); // RX,TX OneWire wire(TEMPERATURE_PIN); DallasTemperature sensors(&wire); void setup() { // WiFi module needs fast serial, so must use the hardware port which is also used for // uploading sketches Serial.begin(115200); Serial.setTimeout(5000); // For debugging, we therefore need a software serial port. This can be much slower. dbgSerial.begin(9600); dbgSerial.println("Starting"); delay(1000); // Connect to the wirelsess network dbgSerial.println("Joining network..."); Serial.print("AT+CWJAP=""); Serial.print(SSID); Serial.print("",""); Serial.print(PASS); Serial.println("""); receive(); // Just check that the WiFi module is joined to the network dbgSerial.println("Check connection..."); Serial.println("AT+CWJAP?"); receive(); dbgSerial.println("Initialising sensors..."); sensors.begin(); dbgSerial.println("Connecting to server..."); Serial.print("AT+CIPSTART="TCP",""); Serial.print(TARGET_IP); Serial.print("","); Serial.print(TARGET_PORT); receive(); delay(5000); dbgSerial.println("Ready to rumble!"); } int incomingByte=0; bool echoLocal = true; // Get the data from the WiFi module and send it to the debug serial port void receive(){ delay(500); while (Serial.available() >0) { incomingByte = Serial.read(); dbgSerial.write(incomingByte); } dbgSerial.println(); } char temp1[10]; char temp2[10]; void loop() { // call sensors.requestTemperatures() to issue a global temperature // request to all devices on the bus dbgSerial.print("Requesting temperatures..."); sensors.requestTemperatures(); // Send the command to get temperatures dbgSerial.println("DONE"); dtostrf(sensors.getTempCByIndex(0),1,2,temp1); dtostrf(sensors.getTempCByIndex(1),1,2,temp2); String json="{"temp":[" + String(temp1) + "," + String(temp2) + "]}"; dbgSerial.print("Sending "); dbgSerial.println(json); // Send the data to the WiFi module Serial.print("AT+CIPSEND="); Serial.println(json.length()); delay(500); Serial.print(json); receive(); delay(10000); }
This is a work in progress. I’ll be updating it soon. But for now, I’m very pleased with the simplicity of the WiFi modules, and even more pleased with their low cost (I am a Yorkshireman, after all).
Total cost? Practical range?
As for range, I haven’t tested it. This guy has, and he claims over 300m with the PCB antenna, longer with a bigger one:.
Cost? £5 for the wifi module, £6 for an arduino nano clone off eBay, and £3 for the Adafruit level converter. Temperature sensors are about £3 each. I’ve also just added a £2.50 combined 3.3V and 5V power supply. So it’s all dirt cheap, really 🙂
hi, the ESP8266 product page says it supports 802.11n, leading one to think it can support 802.11n speeds. Do you think it can? thx!
I don’t know. On the WI07C board (which is what I’m using), one communicates with the ESP8266 chip through a serial interface at 115200 baud, so wireless data rates above that are likely to be difficult to support. Though that’s really more dependent on the amount of data being sent – small, infrequent packets could be sent at high speed, I guess. Using the ESP8266 chip directly, it may well be possible to sustain high data rates and throughput. Though (again) I’m using an Arduino nano running at 16MHz, so even the 802.11b data rates could overwhelm it. | http://robinsonia.com/wp/?p=378 | CC-MAIN-2018-13 | refinedweb | 904 | 58.58 |
Introducing the Best 10 Node.js Frameworks for 2019 and 2020
Sam Quinn
Originally published at
softwareontheroad.com
on
・6 min read
JavaScript on Data (2 Part Series)
Originally published at softwareontheroad.com
I’m so tired of reading articles claiming what is the best node.js framework based on biased opinions or sponsorships (yes, that’s a thing)
So here are the top node.js frameworks ranked by daily downloads, the data was taken from npmjs.com itself (sorry yarn).
What is a node.js framework?
How to choose a node.js framework for my application?
You have to consider mainly 2 things:
The scalability and robustness of the framework
If the development process is something you feel comfortable working with.
Regardless of scalability and robustness, every node.js web framework is built on top of the
http module.
Some of these frameworks add too much … and that makes a huge impact on the server’s throughput.
In my opinion, working with a barebone framework like Express.js or Fastify.js is the best when the service you are developing is small in business logic but need to be highly scalable.
By the other hand, if you are developing a medium size application, it’s better to go with a framework that helps you have a clear structure like next.js or loopback.
There is no simple answer to the question, you better have a peek on how to declare API routes on every framework on this list and decide for yourself.
10. Adonis
Adonis.js is an MVC (Model-View-Controller) node.js framework capable of building an API Rest with JWT authentication and database access.
What’s is this framework about?
The good thing is that Adonis.js framework comes with a CLI to create the bootstrap for applications.
$ npm i -g @adonisjs/cli $ adonis new adonis-tasks $ adonis serve --dev
The typical Adonis app has an MVC structure, that way you don’t waste time figuring out how you should structure your web server.
Some apps built with adonis can be found here.
👉 GET MORE ADVANCED NODE.JS DEVELOPMENT ARTICLES
Join the other 2,000+ savvy node.js developers who get article updates.
9. Feathers
Feather.js is a node.js framework promise to be a REST and realtime API layer for modern applications.
See what’s capable of!!
This is all the code you need to set-up your API REST + realtime WebSockets connection thanks to the socket.io plugin
const feathers = require('@feathersjs/feathers'); const express = require('@feathersjs/express'); const socketio = require('@feathersjs/socketio'); const memory = require('feathers-memory'); // Creates an Express compatible Feathers application const app = express(feathers()); // Parse HTTP JSON bodies app.use(express.json()); // Parse URL-encoded params app.use(express.urlencoded({ extended: true })); // Add REST API support app.configure(express.rest()); // Configure Socket.io real-time APIs app.configure(socketio()); // Register a messages service with pagination app.use('/messages', memory({ paginate: { default: 10, max: 25 } })); // Register a nicer error handler than the default Express one app.use(express.errorHandler()); // Add any new real-time connection to the `everybody` channel app.on('connection', connection => app.channel('everybody').join(connection)); // Publish all events to the `everybody` channel app.publish(data => app.channel('everybody')); // Start the server app.listen(3030).on('listening', () => console.log('Feathers server listening on localhost:3030') );
Pretty sweet right?
Here are some apps built with feathers.js.
8. Sails
Sails.js Ye’ olde node.js framework
With 7 years of maturity, this is a battle-tested node.js web framework that you should definitively check out!
See it in action
Sails.js comes with a CLI tool to help you get started in just 4 steps
$ npm install sails -g $ sails new test-project $ cd test-project $ sails lift
7. Loopback
Backed by IBM, Loopback.io is an enterprise-grade node.js framework, used by companies such as GoDaddy, Symantec, IBM itself.
They even offer Long-Term Support (LTS) for 18 months!
This framework comes with a CLI tool to scaffold your node.js server
$ npm i -g @loopback/cli
Then to create a project
$ lb4 app
Here is what an API route and controller looks like:
import {get} from '@loopback/rest'; export class HelloController { @get('/hello') hello(): string { return 'Hello world!'; } }
6. Fastify
Fastify.io is a node.js framework that is designed to be the replacement of express.js with a 65% better performance.
Show me the code
// Require the framework and instantiate it const fastify = require('fastify')({ logger: true }) // Declare a route fastify.get('/', (request, reply) => { reply.send({ hello: 'world' }) }) // Run the server! fastify.listen(3000, (err, address) => { if (err) throw err fastify.log.info(`server listening on ${address}`) })
And that’s it!
I love the simplicity and reminiscence to Express.js of Fastify.js, definitively is the framework to go if performance is an issue in your server.
5. Restify
Restify claims to be the future of Node.js Web Frameworks.
This framework is used in production by NPM, Netflix, Pinterest and Napster.
Code example
Setting up a Restify.js server is just as simple as this
const restify = require('restify'); function respond(req, res, next) { res.send('hello ' + req.params.name); next(); } const server = restify.createServer(); server.get('/hello/:name', respond); server.head('/hello/:name', respond); server.listen(8080, function() { console.log('%s listening at %s', server.name, server.url); });
👉 GET MORE ADVANCED NODE.JS DEVELOPMENT ARTICLES
Join the other 2,000+ savvy node.js developers who get article updates.
4. Nest.js
A relatively new node.js framework, Nest.js has a similar architecture to Angular.io, so if you are familiar with that frontend framework, you'll find this one pretty easy to develop as well.
Example
import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.setViewEngine('hbs'); await app.listen(3000); } bootstrap();
3. Hapi
One of the big 3 node.js frameworks, hapi.js has an ecosystem of libraries and plugins that makes the framework highly customizable.
Although I never used hapi.js on production, I’ve been using its validation library Joi.js for years.
Creating a server
A hapi.js webserver looks like this
const Hapi = require('@hapi/hapi'); const init = async () => { const server = Hapi.server({ port: 3000, host: 'localhost' }); await server.start(); console.log('Server running on %s', server.info.uri); }; init();
2. Koa
Koa is a web framework designed by the team behind Express.js the most famous and used node.js framework.
Koa aims to be a smaller, more expressive, and more robust foundation for web applications and APIs than express.js.
Through leveraging generators Koa allows you to ditch callbacks and greatly increase error-handling.
Koa does not bundle any middleware within the core and provides an elegant suite of methods that make writing servers fast and enjoyable.
Example
const Koa = require('koa'); const app = new Koa(); app.use(async ctx => { ctx.body = 'Hello World'; }); app.listen(3000);
1. Express
Express.js is definitively the king of node.js frameworks, will reach the incredible mark of 2 million daily downloads by the end of 2019.
Despite being such an old framework, Express.js is actively maintained by the community and is used by big companies such as User, Mulesoft, IBM, and so on.
Example
Just add it to your node.js project
$ npm install express
Then declare some API routes
const express = require('express') const app = express() const port = 3000 app.get('/', (req, res) => res.send('Hello World!')) app.listen(port, () => console.log(`Example app listening on port ${port}!`))
And that’s all you need to start using it!
Conclusion
There are tons of node.js frameworks out there, the best you can do is go and try them all ‘til you find the ones that suit your needs.
Personally, I prefer Express.js because, through these 6 years of node.js development, I build a strong knowledge of good architectural patterns, all based on trial and error.
But that doesn’t mean you have to do the same, here is all the secrets of a good express.js framework project.
Bulletproof node.js project architecture 🛡️
Sam Quinn ・ Apr 18 ・ 11 min read
Now tell me, what is your favorite node.js framework?
Send me a tweet to @santypk4, come on! I want to know what the people are using, I don’t want to fall behind!
👉 GET MORE ADVANCED NODE.JS DEVELOPMENT ARTICLES
Join the other 2,000+ savvy node.js developers who get article updates.
JavaScript on Data (2 Part Series)
Have you ever quit a job without anything else lined up?
If so, what lead to this decision? ...
Take a look at Plant. It's a WebAPI based framework. And it seems like it's the only which supports HTTP/2 pushes. It's transport agnostic what means you can deliver requests via HTTP(S), WebSocket, WebRTC, etc. Also it works in browser without compilation/browserification due to its' WebAPI compatibility and transport agnosticism, though you can develop your server using text editor and DevTools for debugging.
I wrote it and ready to answer questions.
P.S. You place too much advertisement into the post. It's too unfriendly to the readers.
Do you know how does it compare performance wise versus Fastify? Having a benchmark would be nice. (My use case does benefit from performance, so I'm choosing between frameworks mainly on performance + availability of extra plugins and DevEx)
On hello world test its' performance was about express'. But on my machine koa was always behind express and on fastify's benchmarks it's not. Need a verification.
Super high performance has never been the main goal of the current development iteration, I've just been holding it on acceptable level before API became stable. Currently I'm working on improvement which should make Plant faster than others with extra deep optimizations, but it's a piece of work. Not sure if it will be done very soon.
Seems like an amazing framework, I’ll try it :)
Nest doesn't belong on this list. It gets out of control really quickly and suddenly you realize you've landed in an old school ASP MVC or Zend app where new developers have to spend a month ramping up to figure out where everything is and groking the abstraction layers. Nest might be okay for small apps, but it'll get out of control and then you're back to the "memorization driven development" that we used to lean on in old school monoliths.
Glad to see fastify on this list 👍
For my specific use case (pure rest api with a mobile client) it looks to be the perfect alternative. Actually thinking of switching from Koa+debug.js!
I hope to be using fastify soon !!
If y'all want something more express.js like and really wanna go barbones, I recommend checking out Polka: A micro web server so fast, it'll make you dance! 👯
Also, Polka should probably get a mention too, considering how dominant it is in benchmark tests vs others, and how highly it ranked in user satisfaction (see Eran Hammer's article on Node framework dominance in 2019)
Thanks for sharing about Polka, seems like a pretty sweet framework to work with!
How does it stack up against Fastify performance wise? Would be nice to see it in the leaderboard here: fastify.io/benchmarks/
Absolutely right , Node.js is a perfect platform to use right now, but however we cannot totally forget about PHP .I recently moved from PHP to Node.js and made an article to share my experience: hackernoon.com/nodejs-vs-php-which... Kindly go through it and choose yourself.
I strongly believe AdonisJS should be like No. 1 on this list. Good thing though is it made the list.
As far as I am concerned, it's my No. 1 for all times when it comes to JavaScript Frameworks
Curious: what are the benefits of Adonis over Express.js? Would you consider switching existing Express projects to Adonis, or would it only make sense to start new projects from Adonis?
AdonisJs is battery included, comes with db setup, mail, mvc, testing utlities, you name it. It lets you focus on writing the application, so you don't have to focus much about building the architecture around it.
Thanks a lot, that makes sense. I prefer to compile those modules together myself, that tend to achieve maximum flexibility and gives you a better time if there appeared to be a better alternative on the market which needs to be included vs relying on framework devs to bring the support and define the migration path for it. Got very burnt on that with Sails and their ORM. Seems like Adonis is a good alternative to Sails in that regard, so if I need to pick ease of initial setup as a requirement for another project, Adonis would be a good candidate.
It’s such a great and easy to learn framework :)
Koa 1 leveraged generators. Your code sample shows Koa 2, which leverages promises (async/await).
What is supporting the abstraction of async/await syntax ?
Generators and coroutines :D
Wrong. Koa 2 is not based on generators, if you read their (very short) source code you will not find a single generator. Koa 1 was based on generators. Every middleware simply returns a promise. We've been using it for years. You await
nextto hook into the downstream middleware. You never use
yieldor
function *. Generators support streams of values, since middlewares don't need that, they are overkill (and not as well performing). The only reason they went with generators for the first iteration of Koa is because the syntax was easier than composing promises for versions of node that did not support async/await.
AdonisJS is definitely in the top 3 most used NodeJS MVC Framework.
It’s awesome to see so much community around AdonisJS :) | https://dev.to/santypk4/introducing-the-best-10-node-js-frameworks-for-2019-and-2020-mcm?ref=repo.design | CC-MAIN-2019-43 | refinedweb | 2,332 | 60.31 |
ADC-X Add-on
ADC-X Add-on
Need more analog sampling? Here's a TI ADS-7830 ADC on an I2C Bus with 8 channels, each with a resolution of 8 bits.
An external or internal 2.5V reference is selectable via I2C command, and the external reference is connected to a 3-way jumper that you can cut with a razor blade and re-solder to a different position.
By default the external reference jumper is connected to the board's 3.3V power supply. Choosing this reference raises the measurement range of the device compared to the 2.5V, but lowers the resolution. You can eliminate noise and reclaim some of this lost resolution simply by taking several samples and averaging them (however you must use floating point math). This is demonstrated here: ADC-X Code Examples
Another reference option is to route it to the input socket for Channel 7 of the ADC. This will allow you to easily plug in an external voltage source to use as a reference (or output the ADC's internal 2.5V reference), but will also sacrifice the functionality of the eighth channel on the ADC if chosen.
Features Include:
Hook up your AVR-X Add-on and ADC-X and paste the following into the Arduino SDK to get started, or check out ADC-X Code Examples for a more detailed step-by-step guide.
#include <Wire.h> #include ); } | https://www.upgradeindustries.com/product/13/ADC-X-Add-on | CC-MAIN-2017-51 | refinedweb | 240 | 54.42 |
Chuck Esterbrook wrote:
> My understanding when talking with Jay about the protocol is that we were
> only talking about the _response_, not the request.
But I think that this is one protocol, because both use one socket :-(.
> Since the request comes
> from things like os.environ, it has to be packed up anyway and marshal
> seems like the fastest way to do that.
From environment comes only header of request, body comes from stream
and is reading into string in Adapter. Then string is marshaled to
HTTPRequest, where from request body string is making file ( StringIO )
and this file is send to module cgi. This work, if request is small, but
this cann't be used for file upload.
My idea was :
marshal as dictionary only data from os.environ, and input stream simly
copy after marshaling dictionary to socket over which communication with
AppServer comes. In HTTPRequest, instead of making file from string,
simply make file from socket. Now request body isn't stored in memory as
string.
> The response on the other hand eventually has to be packed up as HTTP, so
> we might as well do that from the start and be done with it.
It has low importance for me, if header is packed up as dictionary or
HTTP-string, but I can't store in memory 10-40MB of data, which user
need download from my database :-(.
My idea was :
Request data ( headers and body ) is buffered in memory until
HTTPRespone.deliver() was not called.
Before deliver was call, all headers and body can be changed ( for
example : Error page display )
After deliver headers and body are sent to adapter, but socket doesn't
close, and following call of HTTPResponse.write() send data directly to
socket. Disadvantage is that headers and sending part of body can not be
changed after deliver. ( no error page :-().
> If Jay verifies that the request protocol is NOT changing, then it seems
> like you could proceed however you wanted. However, I would really like to
> know why pickle isn't working for you before switching to it from marshal.
I found it, when I made patch AsyncoreThreadedAppServer, I need own
implementation of file-like access. I take idea from StringIO, but this
doesn't work with marshal( see code below ).
import marshal
x={1:1}
import StringIO
a=StringIO.StringIO()
marshal.dump(x,a)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: marshal.dump() 2nd arg must be
file
View entire thread | http://sourceforge.net/p/webware/mailman/message/7616846/ | CC-MAIN-2015-27 | refinedweb | 415 | 72.97 |
19 June 2012 05:03 [Source: ICIS news]
SINGAPORE (ICIS)--?xml:namespace>
The company originally planned to start up both the GPPS line and the 50,000 tonne/year GPPS/high impact PS (HIPS) swing line of its 100,000 tonne/year polystyrene (PS) plant on 18 June, the source said.
However, the company has started up only the GPPS line because of weak demand in the east China PS market, the source said.
The specific start-up date of the GPPS/HIPS swing line has not been confirmed, the source added.
The grade of Sabron’s GPPS is GP-525, which is the grade produced by Jiangsu Laidun Baofu Plast | http://www.icis.com/Articles/2012/06/19/9570650/chinas-sabron-petrochemical-runs-new-gpps-line-at-full.html | CC-MAIN-2014-23 | refinedweb | 111 | 76.76 |
Hi! I'm trying to create a program that will allow the user to input 5 numbers
and will print the largest and smallest number.
I tried doing it and this is what I came up.. The thing is, after the program executes its purpose i want to add a statement that will allow you to loop the program or ends it.
I'm having a hard time trying to figure out where to put the looping statement and what kind. Can anyone post your suggestion..
and also if you have any suggestion in what to do to simplify this program your welcome to do so :)
import java.util.Scanner; public class LargestAndSmallestNumber { public static void main(String[] args) { Scanner console = new Scanner(System.in); // Variable Declaration float num; //variable to hold the current number float max; //variable to hold the largest number float min; //variable to hold the smallest number int count; //loop control variable System.out.println("This program accepts 5 input numbers and will" + " print the highest and lowest number."); System.out.print("Enter 5 integers: "); num = console.nextFloat(); max = num; min = num; for (count = 1; count < 5; count++) { num = console.nextFloat(); max = larger(max,num); min = smaller(min,num); }//end of for statement System.out.println("******************************"); System.out.println("The largest number is " + max); System.out.println("The smallest number is " + min); System.out.println("******************************"); } public static float larger(float x, float y) { float max; if(x >= y) max = x; else max = y; return max; }//end of larger method public static float smaller(float a, float b) { float min; if(a <= b) min = a; else min = b; return min; }//end of smaller method } | https://www.daniweb.com/programming/software-development/threads/395598/largest-and-smallest-number | CC-MAIN-2017-09 | refinedweb | 277 | 63.39 |
import java.io.*; class piglatin { static void pig()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the word for which you want to get the piglatin form of:\n"); String s=br.readLine(); int l=s.length(),n=0; String s1=""; for(int j=0;j<l;j++) { char c=s.charAt(j); if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u') { s1=s.substring(j); s1=s1+(s.substring(0,j)); break; } } s1=s1+"ay"; System.out.println("The pig latin form of the word: \'"+s+"\' is: \'"+s1+"\'"); } }
Are you able to help answer this sponsored question?
Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies. | https://www.daniweb.com/programming/software-development/code/217432/piglatin | CC-MAIN-2017-51 | refinedweb | 129 | 61.02 |
Part 23: Testing and Submitting to the Store
Source Code:
Now that we've finished our first app, let's move on to building a second app. This time let's build an app that is both location-aware and social in nature... so, it will use the Phone's GPS to determine where the current user is standing, and then use the latitude and longitude to search for photos that others have taken within a few meters of where the user is standing.
How will we do that? We'll call on Flickr, the social photo sharing website, to provide the data. Whenever you take a photo with a camera that supports Geotagging, extra meta data is added to the photo that includes the latitude and longitude (amongst other) data. Then, when you upload the photos to Flickr, it will store that extra data and make it available so that others can search based on a specific latitude and longitude.
Our app should not only allow me to search for photos "around me", but it should be able to let me pick my favorite Flickr photos as lock screen background images. That would be cool!
Now that we have some ideas of how it should work, let's spend a few moments mocking up how we want to app to behave. That will be the target that we build to throughout the remainder of this series.
Our game plan in this lesson:
Again, we should spend some time thinking about the functionality of the app, about the interaction between the user and the app, how the information should be displayed to the user and we'll do that through a "low-tech mockup" using the templates available from Microsoft:
After some brainstorming, we come up with some good design ideas. The MainPage will show the user the map control that displays the user's current location. Below that, a Textbox where the user can add an optional search phrase to refine which photos are returned. And below that, an application bar with a search button.
When the user clicks the search button, we'll make a call to Flickr's web-callable API using the user's current locale and the search phrase. We'll get back a list of images that we'll display in a grid. The user can select photos and click a button in the application bar which will cache those photos on the phone and randomly use them as the lock screen image. This will require we use a background agent to run every 30 minutes or so.
Now that we have a basic idea of the interactions, functionality and screen elements we'll need, let's start building towards that design.
You should be familiar with this process already, however for the sake of completeness, begin the process by going to the File menu, New | Project ... submenu. That will open the New Project dialog:
The MainPage.xaml should open in the main area of Visual Studio.
Up to now, we've been working with XAML directly. Now that you're comfortable with typing in XAML, I feel comfortable to showing you a shortcut ... you can drag elements from the Toolbox into the visual XAML Editor:
When you do that, there are a few side effects. See what happened to me:
In my case, it created a left-margin of 368 and a top-margin of 101. That's not what I wanted, but I can easily edit that out in the XAML itself.
It's for this reason that I prefer to work directly with XAML ... especially if I remember the name of the control I want to use.
However, in this particular case, there's a huge upside to using the drag and drop technique. Look at the code that was added in line 8:
By dragging and dropping the Maps control, an XAML Namespace was added to the XAML document. This is necessary because the Maps control lives in a different Namespace and Assembly from the other controls I had been using.
Nonetheless, I now have a Map control. I edit it to simply sport a Name attribute. I want this because I know I'll be working with it in C# in just a moment:
If I were to try and run the application at this point (F5), I would experience an error at runtime:
The problem is that the Map control requires the Mapping and Location capabilities of the phone and we've not told the Windows Phone operating system we want to use those capabilities in our app.
The mapping functionality of the Windows Phone 8 Operating System has changed dramatically from the previous version based on Bing maps. The new mapping features were built in conjunction with Nokia and are more integrated into the Phone's operating system than before in an effort to make the maps more performant. So this is why we need to request permission to use this capability of the phone ... it is now a core feature of the phone.
To learn more about the rationale for the changes to mapping in Windows Phone 8:
To remedy this, we'll make changes in the WPAppManifest.xml ... open the WMAppManifest.xml file:
We'll need to add two Capabilities:
In the WPAppManifest.xml visual designer ...
Save your changes and re-run the app (F5).
The Map control appears, but it's at a very high level because no location is set. We'll do that next.
In the MainPage.xaml.cs:
Inside the UpdateMap() we'll add the following code:
The SetView() method combines several property settings into one convenient call. We'll pass in a GeoCoordinate hardcoded to a specific place (in Chicago ... more on that in a moment) and a scaling factor of 17. You can experiment with these numbers. 19 is zoomed in really close and 5 is really far away.
By the way, I've suffixed each of the values with the letter "D" which is for Double ... this is just a way to ensure we're working with Double literals.
Now I'll test to make sure it works (F5).
And it does!
To recap, the big take away from this lesson is how to use the new Map control in the Windows Phone 8. We'll become even more familiar with it as we go through these lessons, but at a minimum, we know that it requires us to set a Capability in the WMAppManifest.xml file. We also learned how to change the focus of the map and the zoom level. We learned about the GeoCoordinate class that represents a position on the globe based on its latitude and longitude. We still need to learn how to retrieve the current position of the Phone, and we'll do that soon, but this is a good start.
Hi, Bob. Is it possible adding map control to a windows store apps? I made some research on the internet and found this page, but it seemed a little complicated to me. Is there an easier way to do this? Thanks...
@merakli: Win8.1 makes this much more simple
There is one more thing I wanna ask. If I get a 90-day trial Bing Maps key, develop an app with that key and put that app into store, what happens after 90 days have passed?
@merakli: the new map control doesn't require this anymore for WP8.
But I am developing a desktop app for windows 8 and win rt, not for a win phone app. It seems I have no choice other than using bing map control, but what happens to an app in the store developed with a trial map key after trial period has expired? Does that app become undownloadable(I don't know If there is such a word :)) or unusable?
@merakli:Lets keep this thread on topic for WP8 topic stuff, namely what is shown on each video. has information on what is deemed a free key, trial key, and enterprise key. You may qualify for a free key.
please i need some help
when i add the map control to my page and run it on the emulator
it does not display the map it displays just a blue screen instead..
could u please tell me the solution for this problem ..
@Moamen: I've never seen that happen. You may want to post here:
Hi
I am using visual studio premium 2012
after drag and drop of map, i m not getting line no. 8 code.
and i m getting code like this..
<Controls:Map
@gauravi: the line Bob mentions is adding in the namespace at the top of the document. Looking at your map XAML, your's would be prefixed with "Controls" instead of maps.
if the default bothers you, change xmlns:Controls to xmlns:maps and do the same your Map control: <Controls:Map would become <maps:Map
Hi Bob, First of all thanks a lot for the videos. When I run my app, my map is not getting displayed.. It's just displaying blue color.
Please help me out with this.
@Kumar Abhinav: in the tools pane, where does it say you should be location wise?
Opening thread...
Hi Bob,
Even I am facing the same issue that have been mentioned by Kumar and Moamen. Do you know how this could be resolved? Any pointers will be greatly appreciated.
I had the same issue with the map only showing a blue screen. turned out it was an issue with the emulator not connecting to the network, the following article solved the issue for me (turning off a proxy to the internet) :
Bob Tabor, many thanks for these series (as well as the c# series) ! | https://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners/Part-24-Getting-Started-with-the-AroundMe-Project | CC-MAIN-2019-35 | refinedweb | 1,633 | 70.84 |
From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2008-08-27 08:22:23
David Abrahams wrote:
> What was wrong with my proposal?
>
> You can't guarantee it will be right every time, but it's easy to
> correct when wrong, and that would only take a very few
> specializations.
Please note: The question is /not/ whether T has a custom swap. The
question is whether default-construction + swap outperforms
copy-construction for type T. Only in that case, it makes sense to
activate "Swaptimization".
Anyway, I agree, your approach provides a reasonable first guess:
> std is an associated namespace of T
> ? has_member_swap<T>
> : has_nonmember_swap<T>
So for such a type T, _Move_operation_category<T>::_Move_cat should be
set to "_Swap_move_tag", instead of "_Undefined_move_tag", by default.
Do you know how we can technically overrule the default
_Move_operation_category<T> provided by MSVC's STL? In ConceptC++, it
would look a little bit like this:
template <class T> where HasCustomSwap<T> // Pseudo ConceptC++
struct _Move_operation_category<T>
{
typedef _Swap_move_tag _Move_cat;
};
But how to do that in C++03?
Kind regards,
Niels
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk | https://lists.boost.org/Archives/boost/2008/08/141473.php | CC-MAIN-2019-39 | refinedweb | 205 | 57.67 |
How do I know which .net version my CPU is using?
- Sunday, March 16, 2008 6:32 AM
When looking at posts, I see that some functions (I think that's what it's called) only work with certain versions.
**For example this was in a post "The namespace System.Net.Mail is a part of the class library of .NET framwork 2.0 (currently in BETA version), to send mail using .NET framework 1.1, you'd use System.Web.Mail instead.."
What .net version is my CPU running? Should I be concerned with using a beta version?
My CPU has the following programs installed:
-Microsoft .NET Compact Framework 2.0 SP2
-Microsoft .NET Compact Framework 3.5
-Microsoft .NET Compact Framework 1.1
-Microsoft .NET Compact Framework 1.1 Hotfix (KB928366)
-Microsoft .NET Compact Framework 2.0 Service Pack 1
-Microsoft .NET Compact Framework 3.0 Service Pack 1
-Microsoft .NET Compact Framework 3.5
All Replies
- Monday, March 17, 2008 9:42 PM
Your question is a little hard to interpret, but generally the .NET version used depends on the application calling it. If I, as a developer choose to target .NET 2.0 for my application (by using Visual Studio 2005 or explicitly choosing that version in Visual Studio 2008), that's the version that will run. Each application (process) can load a different version as needed.
- Tuesday, March 18, 2008 11:55 PMModerator
From the list of installed programs, your system has .Net 1.1, 2.0, 2.0 SP2, 3.0 and 3.5 Compact Framework installed. The way to check the version of a particular dll would be to check under "References" in VS where that is being picked up from. This will open a Add Reference where you can see a list of .dlls listed as:
Component Name - Version - Runitme Version
HTH
Saurabh Gupta
- Thursday, March 20, 2008 12:56 AM
Thank you...
I downloaded the trial version of VS '08, should I be using Visual Studios '05 b/c it's a complete version, or wait to use '08 when it's complete.
I'm trying to have a site return an emeil to me using SMTP functions. I believe that the beta version ISS or IIS server application will not run localy to test. Is this b/c I'm using VS '08 b/c it's a beta version?
- Thursday, March 20, 2008 11:07 PMVisual Studio 2008 is an officially shipped product now (as of November 2007). I'm not sure about beta status of IIS versions, though. | http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/thread/2a40c432-8995-4399-951c-e7c46d13605d | CC-MAIN-2013-20 | refinedweb | 430 | 78.65 |
Download this article as a playground for Xcode 7.
In this final part of my little series on pattern matching I’d like to show you some more examples of what we can do with this.
Recap
In part 1, we overloaded the pattern matching operator
~= with a variant that takes a function of the type
T -> Bool as its first argument:
func ~=<T>(pattern: T -> Bool, value: T) -> Bool { return pattern(value) }
We also saw that this implementation is very generic. We can use it to match any value of type
T against any function that takes a
T and returns a
Bool (like the
isEven example in part 1).
When we tried to use pattern matching with the
String.hasPrefix method next, we hit a problem with the order of the parameters. Remember that instance methods are (partially) curried functions with the instance as the first argument. So the type of the
String.prefix function is
String -> String -> Bool, where the first
String parameter is the method receiver and the second one is the prefix we want to match:
// This: "Hello World".hasPrefix("H") // true // is equivalent to this: String.hasPrefix("Hello World")("H") // true
The argument order is exactly backwards from what we need when we want to use a partially applied version of this method with our pattern matching operator. We need a version where the receiver is applied last (unless you want to match one prefix against multiple strings, in which case the order would be correct but the method name would be confusing). In part 1 we wrote a small helper function that flips the arguments:
func hasPrefix(prefix: String)(_ value: String) -> Bool { return value.hasPrefix(prefix) } // Now we can call it with the arguments flipped: hasPrefix("H")("Hello World") // true
That way we can partially apply the prefix and get a function back that we can then use as the pattern argument for
~=.
A Generic Solution
This works, but doing this for every method we want to use in this way quickly becomes tedious. So let’s write a generic function,
flip, that moves the first argument of a curried function to the back, right before the final return value.
/// Moves the first argument to the back func flip<A, B, C>(method: A -> B -> C) -> (B -> A -> C) { return { (b: B) in { (a: A) in method(a)(b) } } }
I like the type signature of this function because the type alone shows very clearly what it does: there is really only one possible implementation for a function of the type
(A -> B -> C) -> (B -> A -> C). The function body with its pair of nested closure expressions can be a bit difficult to parse, though. An alternative way to write this function is to take advantage of Swift’s special syntax for curried functions. This variant makes the function body trivial to write, but the type signature is a little harder to understand in my opinion:
func flip<A, B, C>(method: A -> B -> C)(_ b: B)(_ a: A) -> C { return method(a)(b) }
We can now match a string against different prefixes like this:
let str = "ABCDEF" switch str { case flip(String.hasPrefix)("A"): print("A") case flip(String.hasPrefix)("B"): print("B") default: "default" }
And since
flip is generic, it works with all methods on all types – even those that have a different number of parameters. This last bit may be surprising, but a (non-curried) function that takes multiple arguments really just takes one argument: a tuple with a corresponding number of elements that have the same types as the parameters. It’s no accident that the syntax for tuples,
(a, b), is the same as the syntax for function arguments,
f(a, b) – they are the same thing. This means that any method matches the generic type
A -> B -> C our
flip function expects, no matter how many elements the parameter tuple (represented by the generic type
B) contains.
Examples
Matching Arrays
flip even works for methods that take no arguments (except the implicit receiver parameter) because the empty tuple
() is also a valid type. Unfortunately, we can’t use
flip directly on properties because Swift currently doesn’t allow referring to a type’s property as a function. We need write a separate wrapper function, like in this example for a collection’s
isEmpty property:
extension CollectionType { func isEmptyFunc() -> Bool { return isEmpty } }
Here is a full example where we do pattern matching on an array of numbers. In addition to the
contains method that’s included in the standard library, we use a custom overload of
contains that takes two arguments and checks whether the sequence contains both.
extension SequenceType where Generator.Element : Equatable { func contains(a: Self.Generator.Element, and b: Self.Generator.Element) -> Bool { return contains(a) && contains(b) } } let numbers = [1,2,3,4,5,6,7,8,9] switch numbers { case flip(Array.isEmptyFunc)(): print("is empty") case flip(Array.contains)(10): print("contains 10") case flip(Array.contains)(2, 4): print("contains 2 and 4") case flip(Array.contains)(5): print("contains 5") default: print("default") }
Matching CGRects
Or how about matching a
CGRect against another?
import CoreGraphics let rect1 = CGRect(x: 20, y: 20, width: 50, height: 50) let rect2 = CGRect(x: 40, y: 40, width: 100, height: 100) switch rect1 { case flip(CGRect.contains)(rect2): "contains" case flip(CGRect.intersects)(rect2): "intersects" default: "default" }
Matching Sets
One last example, comparing two sets. Here we use another helper function,
not, to negate a pattern.
func not<T>(f: T -> Bool) -> T -> Bool { return { !f($0) } } let set1: Set = [1,2,3,4,5,6,7,8,9] let set2: Set = [3,4,5] switch set1 { case flip(Set.contains)(10): "contains 10" case not(flip(Set.isSupersetOf)(set2)): "is not a superset of \(set2)" case flip(Set.isSupersetOf)(set2): "is superset of \(set2)" case flip(Set.isDisjointWith)(set2): "is disjoint with \(set2)" default: "default" }
Conclusion
Let me say again that I’m not claiming you should write code like this. Although I think the patterns we developed are extremely elegant, the syntax is often less so. Many of the examples above are quite ugly in my opinion, and harder to read than the alternative (a bunch of if statements).
My goal with this series was to encourage you (and myself) to start thinking about programming problems in terms of functions. By treating functions as values that can be passed to and returned from other functions, and by composing multiple simple functions into more complex ones, we can build very generic and expressive systems from a few simple building blocks. | https://oleb.net/blog/2015/09/more-pattern-matching-examples/ | CC-MAIN-2018-47 | refinedweb | 1,109 | 60.04 |
Includes a file in the current script.
#include "[path\]filename"
#include <filename>
Other scripts can be included into an Autoit script using the #include command - these can be in either .au3 or .a3x format. The content of the included file is inserted into the script at the point of the #include command - in most cases this is the beginning of the script so that any variable or constant declarations within the included text are available to the rest of the script.
If you include the same file containing a user defined function more than once you will get a "Duplicate function" error. When writing an include file that may be used in this way, make sure that the firstline contains #include-once to prevent that file from being included more than once..
The search order used by AutoIt depends on which form of #include you use. The tables below show the order directories are searched using both forms.
Using #include <>
#include-once | https://www.autoitscript.com/autoit3/docs/keywords/include.htm | CC-MAIN-2021-04 | refinedweb | 162 | 68.2 |
#include <itkTimeProbe.h>
Inheritance diagram for itk::TimeProbe:
This class allows the user to trace the time passed between the execution of two pieces of code. It can be started and stopped in order to evaluate the execution over multiple passes. The values of time are taken from the RealTimeClock.
Testing/Code/Common/itkVectorImageTest.cxx.
Definition at line 39 of file itkTimeProbe.h.
Type for counting how many times the probe has been started and stopped.
Reimplemented from itk::ResourceProbe< ValueType, MeanType >.
Definition at line 46 of file itkTimeProbe.h.
Type for measuring time. See the RealTimeClock class for details on the precision and units of this clock signal
Definition at line 50 of file itkTimeProbe.h.
Constructor
Destructor
Get the current time. Warning: the returned value is not the elapsed time since the last Start() call.
Implements itk::ResourceProbe< ValueType, MeanT
Referenced by itk::XMLFilterWatcher::StartFilter().
Stop counting the change of value
Referenced by itk::XMLFilterWatcher::EndFilter(). | https://itk.org/Doxygen310/html/classitk_1_1TimeProbe.html | CC-MAIN-2020-40 | refinedweb | 158 | 51.85 |
My Colour Changing Icosahedron Quilt is my Coding Playground
This quilted icosahedron is packed with 180 RGB LEDs and a pair of speakers, all controlled by a Raspberry Pi. I made it as a learning project and Python playground and as an experiment in light diffusion.
A learning project
After using Adafruit’s NeoPixel rings to create sun and moon wake-up lamps, my mind turned to the possibility of larger scale projects.
I like the idea of hiding light sources in places you wouldn’t expect, especially behind fabrics. I would love to make a stealthy light up fraction wall, or 100 square, which could hang unassuming in my classroom ready to sparkle into life as a teaching aid. This icosahedron project gave me a chance to answer some questions and clear some learning barriers before taking on more complex projects: would I be able to solder, power and program nearly 200 pixels? Is a quilt and cardboard combination a good way to partition LED groups and diffuse light sufficiently?
I had the icosahedron logo printed on a heavy Jersey fabric, and hoped the thick lines in the design would help prevent light from bleeding between sections. Hey, another time I’ll proper piece a quilt together, but as this was all an experiment I was happy to cheat with a printed picture and just quilt tramlines along each line to help further divide each section.
I commandeered a panel of my cardboard Planetarium and built a frame with a depth of 2cm. Wood may be a more obvious choice for this purpose, but double walled cardboard certainly seemed rigid enough to support electronics. I carefully followed the lines in the print to assemble the icosahedron centre piece.
Powering the LEDs, Speakers and Raspberry Pi
I connected three one metre strips in series, each with 60 LEDs. I had expected to find a far more pronounced dimming between first and 180th NeoPixel due to voltage drop, but the difference in brightness appeared marginal.
I had also expected a far bigger current draw too — 180 LEDs x 60 milliamps equating to nearly 11 amps in total — but even at full brightness, the lights drew less than 6 amps.
I powered the LEDs and the Raspberry Pi with a single 10amp power supply, for once ensuring that there was a suitable capacitor across the positive and negative terminals. To connect the Pi, I cut into a USB cable and inserted the powered wires into the same terminal block as the LEDs.
After playing with the strips, and confirming that the same old Circuit Python code would work as well with 180 LEDs as it had with the NeoPixel rings, I began to snip and group the LEDs into sections. Cutting straight through the copper terminals and stripping wires was child’s play, but soldering proved to be tortuous at first. I knew that this was a necessary endeavour however if I wanted to improve, and eventually I found my groove with a series of not terrible joins.
I attached the LEDs to the cardboard with thin double sided tape, but in most cases I found that hot glue was also needed. The mass of disconnected wires poking through holes made the back look like some kind of desolate battleground and so it was extremely satisfying to restore order by using heat shrink to connect each section to the next.
The chain of LEDs starts in the centre with each triangle lit with between three and seven lights, then continues around the outside of the hexagon piece — it’s the light from these ‘inner’ LEDs that shines through the fabric. The remaining lights extend the chain behind the frame to create back lighting. The data wire runs directly from the Pi through each NeoPixel right through to the last one, but I connected the power source to three different points along the chain which took care of the voltage drop, minimal as it was.
I am hoping to learn more about coordinating lights with sound, and so I bought cheap Adafruit speakers to embed in the cardboard frame. I naively thought that I’d just be able to connect them to a 3.5mm jack and plug them into the Raspberry Pi, but when I did so the the resulting sound was almost inaudible. However, when connected to a USB digital to analogue converter, I found the speakers to have slightly more oomph, and it was clear that with a half decent set of speakers it would work well. In fact, the AudioQuest DragonFly USB stick, which was generously passed on to me by an audiophile neighbour, turned out to be a premium audio device, as you may hear (if you watch the video) when connected to my living room speakers.
Using Circuit Python, each LED can be programmed with red, green and blue values — it is easy to set a colour for the whole thing and even without the fabric this looked very cool. With a few simple Python functions, it is also possible to loop through all LEDs in a section and set a colour.
def centre(r,g,b):
for x in range(0, 7):
pixels[x] = (r,g,b)
When the frame was placed against the wall, the back lighting looked effective — even during the day and without the quilt top.
Satisfied that the lights were working well, and that nothing had caught fire, I set about carefully putting the quilt cover in position on the frame. I trimmed the excess fabric, folded the edges over and stuck them to the cardboard with packaging tape. On flipping it over, I was impressed with its final appearance, and my first experiments showed that the light doesn’t bleed between sections.
Music Synchronisation
In terms of music sequencing and visualisation, I know I am lacking a whole universe of knowledge, but I found PyGame — a set of Python modules designed for writing video games and which has a very simple method to play a sounds files — and used it to run a simple sequence of lights matched to recordings of notes on a keyboard.
centre(255,0,0)
pygame.mixer.music.load(‘1.wav’)
pygame.mixer.music.set_volume(1)
pygame.mixer.music.play(-1)
pixels.show()
time.sleep(0.5)
pygame.mixer.music.stop()
A sandbox for future learning
I am hoping that I can use this quilt as a sandbox to experiment with holiday light show systems like Falcon Pi Player with XLights. However, I did have a quick and dirty go at creating a sequence using Pygame. Having roughly worked out the tempo of this song, I created different sequences in different threads which are triggered every four beats. At the 80th beat, I varied the threads selected in an attempt to match the base drop. The result is entertaining, but fully amateur. It’s akin to watching a row of cars with their turn signals seemingly in sync but which before long drift off to different rhythms only to then loop back to synchronisation. It’s a start!
The quilt is also a sandbox for future experiments with IoT, MQTT, Flask and controlling physical devices from webservers, as well as a chance to tip my toes into a pool of Arduino devices. Perhaps my quilt could become my own upbeat smart speaker, or I could connect it to my doorbell like Bitluni’s lamp.
As a learning project, this RGB icosahedron quilt had been perfect. It’s helped me get a better understanding of what’s possible!
| https://medium.com/age-of-awareness/my-colour-changing-icosahedron-quilt-is-my-coding-playground-2b0f2b28421d | CC-MAIN-2021-49 | refinedweb | 1,260 | 62.72 |
> openh323-v1_15_1-src.zip > ixjlid.h
/* * ixjlid.h * * QuickNet Internet Phone/Line JACK codec interface * * * Quicknet Technologies, Inc.. * * Contributor(s): ______________________________________. * * $Log: ixjlid.h,v $ * Revision 1.67 2004/08/22 04:21:06 csoutheren * Added compiler.h for new glibc * Thanks to Klaus Kaempf * * Revision 1.66 2004/04/25 09:08:25 rjongbloed * Fixed being able to link of system does not have IxJ LID configured. * * Revision 1.65 2004/01/31 13:13:22 csoutheren * Fixed problem with HAS_IXJ being tested but not included * * Revision 1.64 2003/10/27 20:27:37 dereksmithies * Add log scale methods for audio. * * Revision 1.63 2003/04/29 08:27:47 robertj * Cleaned up documentation for new wink duration functions. * * Revision 1.62 2003/04/28 01:47:53 dereks * Add ability to set/get wink duration for ixj device. * * Revision 1.61 2002/11/06 04:03:38 dereks * Improve docs for SetToneFilterParameters(). * * Revision 1.60 2002/11/05 04:26:21 robertj * Imported RingLine() by array from OPAL. * * Revision 1.59 2002/09/16 01:14:15 robertj * Added #define so can select if #pragma interface/implementation is used on * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. * * Revision 1.58 2002/09/03 06:19:37 robertj * Normalised the multi-include header prevention ifdef/define symbol. * * Revision 1.57 2002/08/05 10:03:47 robertj * Cosmetic changes to normalise the usage of pragma interface/implementation. * * Revision 1.56 2002/05/09 06:26:30 robertj * Added fuction to get the current audio enable state for line in device. * Changed IxJ EnableAudio() semantics so is exclusive, no direct switching * from PSTN to POTS and vice versa without disabling the old one first. * * Revision 1.55 2001/09/24 12:31:35 robertj * Added backward compatibility with old drivers. * * Revision 1.54 2001/07/19 05:54:27 robertj * Updated interface to xJACK drivers to utilise cadence and filter functions * for dial tone, busy tone and ringback tone detection. * * Revision 1.53 2001/05/21 06:36:46 craigs * Changed to allow optional wink detection for line disconnect * * Revision 1.52 2001/03/29 23:38:48 robertj * Added ability to get average signal level for both receive and transmit. * * Revision 1.51 2001/02/09 05:16:24 robertj * Added #pragma interface for GNU C++. * * Revision 1.50 2001/01/25 07:27:14 robertj * Major changes to add more flexible OpalMediaFormat class to normalise * all information about media types, especially codecs. * * Revision 1.49 2001/01/24 05:34:49 robertj * Altered volume control range to be percentage, ie 100 is max volume. * * Revision 1.48 2000/12/19 06:38:57 robertj * Fixed missing virtual on IsTonePlaying() function. * * Revision 1.47 2000/12/11 01:47:28 robertj * Changed to use built PWLib class for overlapped I/O. * * Revision 1.46 2000/12/11 00:16:51 robertj * Removed unused filter/cadence function. * * Revision 1.45 2000/12/05 11:29:31 craigs * Fixed problem with DTMF signal by adding queue for DTMF digits * * Revision 1.44 2000/12/04 23:30:02 craigs * Added better initialisation of Quicknet devices * * Revision 1.43 2000/11/30 21:28:47 eokerson * Fixed DTMF signal handling to stop polling ixj driver. * * Revision 1.42 2000/11/30 08:48:35 robertj * Added functions to enable/disable Voice Activity Detection in LID's * * Revision 1.41 2000/11/27 10:30:01 craigs * Added SetRawCodec function * * Revision 1.40 2000/11/27 00:12:17 robertj * Added WIN32 version of hook flash detection function. * * Revision 1.39 2000/11/26 23:12:18 craigs * Added hook flash detection API * * Revision 1.38 2000/11/24 11:18:36 robertj * Don't need special raw modes for Linux drivers ... yet. * * Revision 1.37 2000/11/24 10:50:13 robertj * Added a raw PCM dta mode for generating/detecting standard tones. * Modified the ReadFrame/WriteFrame functions to allow for variable length codecs. * Fixed hook state debouncing. * Added codec to explicitly set LineJACK mixer settings to avoid funny modes * the driver/hardware gets into sometimes. * * Revision 1.36 2000/11/20 03:15:13 craigs * Changed tone detection API slightly to allow detection of multiple * simultaneous tones * Added fax CNG tone to tone list * * Revision 1.35 2000/11/12 22:34:32 craigs * Changed Linux driver interface code to use signals * * Revision 1.34 2000/11/06 06:33:20 robertj * Changed hook state debounce so does not block for 200ms. * * Revision 1.33 2000/11/03 06:22:48 robertj * Added flag to IsLinePresent() to force slow test, guarenteeing correct value. * * Revision 1.32 2000/10/23 05:39:07 craigs * Added access to exception detection on Unix * Fixed problem with detecting available devices when * devices with lower ordinals were used * * Revision 1.31 2000/10/19 04:12:13 robertj * Added enum for xJACK card types. * * Revision 1.30 2000/10/19 04:00:35 robertj * Added functions to get xJACK card type and serial number. * * Revision 1.29 2000/10/13 02:21:40 robertj * Changed volume control code to set more mixer values on LineJACK. * * Revision 1.28 2000/09/25 23:59:42 craigs * Finally got G.728 working on boards which use the 8021 * Added better handling for wink exceptions * * Revision 1.27 2000/09/22 01:35:03 robertj * Added support for handling LID's that only do symmetric codecs. * * Revision 1.26 2000/09/13 09:26:28 rogerh * Add location of FreeBSD header files * * Revision 1.25 2000/09/08 06:43:42 craigs * Added additional ioctl debugging * Added attempt to reduce ioctl count for hookstate monitoring * * Revision 1.24 2000/08/31 13:14:39 craigs * Added functions to LID * More bulletproofing to Linux driver * * Revision 1.23 2000/07/28 06:29:20 robertj * Fixed AEC under Win32 so can be changed from other processes. * * Revision 1.22 2000/06/22 02:47:12 craigs * Improved PSTN ring detection * * Revision 1.21 2000/06/17 09:34:45 robertj * Put back variables mistakenly thought to be Linux specific. * * Revision 1.20 2000/06/17 04:11:13 craigs * Fixed problem with potential codec startup problem in Linux IXJ driver * Moved Linux specific variables to Linux specific section * * Revision 1.19 2000/05/24 06:42:18 craigs * Added calls to get volume settings * * Revision 1.18 2000/05/02 04:32:24 robertj * Fixed copyright notice comment. * * Revision 1.17 2000/04/13 23:09:38 craigs * Fixed problem with callerId on some systems * * Revision 1.16 2000/04/06 20:36:25 robertj * Fixed some LineJACK compatbility problems (eg DTMF detect stopping). * * Revision 1.15 2000/04/06 19:37:50 craigs * Normalised bask to HAS_IXJ * * Revision 1.14 2000/04/06 19:29:04 craigs * Removed all vestiges of the old IXJ driver * * Revision 1.13 2000/04/06 17:49:40 craigs * Removed LINUX_TELEPHONY. Again. * * Revision 1.12 2000/04/05 18:04:12 robertj * Changed caller ID code for better portability. * * Revision 1.11 2000/04/05 16:28:05 craigs * Added caller ID function * * Revision 1.10 2000/03/29 20:46:47 robertj * Added function on LID to get available codecs. * * Revision 1.9 2000/03/28 03:47:12 craigs * Added stuff to stop tone playing from going wrong * * Revision 1.8 2000/03/22 17:18:48 robertj * Changed default DTMF tone string times. * * Revision 1.7 2000/03/17 20:58:51 robertj * Fixed line count to be xJACK card dependent. * * Revision 1.6 2000/03/14 11:20:49 rogerh * Compile the ixj code on FreeBSD. This is needed for openphone support. * * Revision 1.5 2000/02/22 09:44:33 robertj * Fixed compatibility with Linux systems not yet with the Linux Telephony code. * * Revision 1.4 2000/01/07 10:01:26 robertj * GCC/Linux compatibility * * Revision 1.3 2000/01/07 08:28:09 robertj * Additions and changes to line interface device base class. * * Revision 1.2 1999/12/24 00:28:03 robertj * Changes to IXJ interface to follow LID abstraction * * Revision 1.1 1999/12/23 23:02:35 robertj * File reorganision for separating RTP from H.323 and creation of LID for VPB support. * */ #ifndef __OPAL_IXJLID_H #define __OPAL_IXJLID_H #ifdef P_USE_PRAGMA #pragma interface #endif #include "openh323buildopts.h" #ifdef HAS_IXJ #include "lid.h" #include "h323caps.h" #ifdef P_LINUX #include
#include #include #endif #ifdef P_FREEBSD #include #include #endif /////////////////////////////////////////////////////////////////////////////// /**This class describes the xJack line interface device. */ class OpalIxJDevice : public OpalLineInterfaceDevice { PCLASSINFO(OpalIxJDevice, OpalLineInterfaceDevice); enum { MaxIxjDevices = 10 }; public: /**Create a new, closed, device for a xJack card. */ OpalIxJDevice(); /**Destroy line interface device. This calls Close() on the device. */ ~OpalIxJDevice() { Close(); } /**Open the xJack device. */ virtual BOOL Open( const PString & device /// Device identifier name. ); /**Close the xJack device. */ virtual BOOL Close(); /**Get the device name. */ virtual PString GetName() const; enum { POTSLine, PSTNLine, NumLines }; /**Get the total number of lines supported by this device. */ virtual unsigned GetLineCount(); /**Get the type of the line. */ virtual BOOL IsLineTerminal( unsigned line /// Number of line ) { return line == POTSLine; } /**Determine if a physical line is present on the logical line. */ virtual BOOL IsLinePresent( unsigned line, /// Number of line BOOL force = FALSE /// Force test, do not optimise ); /**Determine if line is currently off hook. This returns TRUE if GetLineState() is a state that implies the line is off hook (eg OffHook or LineBusy). */ virtual BOOL IsLineOffHook( unsigned line /// Number of line ); /**Set the state of the line. Note that not be possible on a given line. */ virtual BOOL SetLineOffHook( unsigned line, /// Number of line BOOL newState = TRUE /// New state to set ); /**Determine if line is ringing. */ virtual BOOL IsLineRinging( unsigned line, /// Number of line DWORD * cadence = NULL /// Cadence of incoming ring ); /**Begin ringing local phone set with specified cadence. If cadence is zero then stops ringing. */ virtual BOOL RingLine( unsigned line, /// Number of line DWORD cadence /// Cadence bit map for ring pattern ); /**Begin ringing local phone set with specified cadence. If nCadence is zero then stops ringing. Note that not be possible on a given line, for example on a PSTN line the ring state is determined by external hardware and cannot be changed by the software. Also note that the cadence may be ignored by particular hardware driver so that only the zero or non-zero values are significant. The ring pattern is an array of millisecond times for on and off parts of the cadence. Thus the Australian ring cadence would be represented by the array unsigned AusRing[] = { 400, 200, 400, 2000 } */ virtual BOOL RingLine( unsigned line, /// Number of line PINDEX nCadence, /// Number of entries in cadence array unsigned * pattern /// Ring pattern times ); /**Determine if line has been disconnected from a call. */ virtual BOOL IsLineDisconnected( unsigned line, /// Number of line BOOL checkForWink = TRUE ); /**Directly connect the two lines. */ BOOL SetLineToLineDirect( unsigned line1, /// Number of first line unsigned line2, /// Number of second line BOOL connect /// Flag for connect/disconnect ); /**Determine if the two lines are directly connected. */ BOOL IsLineToLineDirect( unsigned line1, /// Number of first line unsigned line2 /// Number of second line ); /**Get the media formats this device is capable of using. */ virtual OpalMediaFormat::List GetMediaFormats() const; /**Set the xJack codec for reading. */ virtual BOOL SetReadFormat( unsigned line, /// Number of line const OpalMediaFormat & mediaFormat /// Codec type ); /**Set the xJack codec for writing. */ virtual BOOL SetWriteFormat( unsigned line, /// Number of line const OpalMediaFormat & mediaFormat /// Codec type ); /**Get the media format (codec) for reading on the specified line. */ virtual OpalMediaFormat GetReadFormat( unsigned line /// Number of line ); /**Get the media format (codec) for writing on the specified line. */ virtual OpalMediaFormat GetWriteFormat( unsigned line /// Number of line ); /**Set the line codec for reading/writing raw PCM data. A descendent may use this to do anything special to the device before beginning special PCM output. For example disabling AEC and set volume levels to standard values. This can then be used for generating standard tones using PCM if the driver is not capable of generating or detecting them directly. The default behaviour simply does a SetReadCodec and SetWriteCodec for PCM data. */ virtual BOOL SetRawCodec( unsigned line /// Number of line ); /**Stop the raw PCM mode codec. */ virtual BOOL StopRawCodec( unsigned line /// Number of line ); /**Stop the read codec. */ virtual BOOL StopReadCodec( unsigned line /// Number of line ); /**Stop the write codec. */ virtual BOOL StopWriteCodec( unsigned line /// Number of line ); /**Get the read frame size in bytes. All calls to ReadFrame() will return this number of bytes. */ virtual PINDEX GetReadFrameSize( unsigned line /// Number of line ); virtual BOOL SetReadFrameSize(unsigned, PINDEX); /**Get the write frame size in bytes. All calls to WriteFrame() must be this number of bytes. */ virtual PINDEX GetWriteFrameSize( unsigned line /// Number of line ); virtual BOOL SetWriteFrameSize(unsigned, PINDEX); /**Low level read of a frame from the device. */ virtual BOOL ReadFrame( unsigned line, /// Number of line void * buf, /// Pointer to a block of memory to receive data. PINDEX & count /// Number of bytes read, <= GetReadFrameSize() ); /**Low level write frame to the device. */ virtual BOOL WriteFrame( unsigned line, /// Number of line const void * buf, /// Pointer to a block of memory to write. PINDEX count, /// Number of bytes to write, <= GetWriteFrameSize() PINDEX & written /// Number of bytes written, <= GetWriteFrameSize() ); /**Get average signal level in last frame. */ virtual unsigned GetAverageSignalLevel( unsigned line, /// Number of line BOOL playback /// Get average playback or record level. ); /**Enable audio for the line. */ virtual BOOL EnableAudio( unsigned line, /// Number of line BOOL enable = TRUE ); /**Determine if audio for the line is enabled. */ virtual BOOL IsAudioEnabled( unsigned line /// Number of line ); /**Set volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware. */ virtual BOOL SetRecordVolume( unsigned line, /// Number of line unsigned volume /// Volume level from 0 to 100% ); /**Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware. */ virtual BOOL SetPlayVolume( unsigned line, /// Number of line unsigned volume /// Volume level from 0 to 100% ); /**Get volume level for recording. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware. */ virtual BOOL GetRecordVolume( unsigned line, /// Number of line unsigned & volume /// Volume level from 0 to 100% ); /**Set volume level for playing. A value of 100 is the maximum volume possible for the hardware. A value of 0 is the minimum volume possible for the hardware. */ virtual BOOL GetPlayVolume( unsigned line, /// Number of line unsigned & volume /// Volume level from 0 to 100% ); /**Get acoustic echo cancellation. */ AECLevels GetAEC( unsigned line /// Number of line ); /**Set acoustic echo cancellation. */ BOOL SetAEC( unsigned line, /// Number of line AECLevels level /// AEC level ); /**Get wink detect minimum duration. This is the signal used by telcos to end PSTN call. */ unsigned GetWinkDuration( unsigned line /// Number of line ); /**Set wink detect minimum duration. This is the signal used by telcos to end PSTN call. */ BOOL SetWinkDuration( unsigned line, /// Number of line unsigned winkDuration /// New minimum duration ); /**Get voice activity detection. Note, not all devices, or selected codecs, may support this function. */ virtual BOOL GetVAD( unsigned line /// Number of line ); /**Set voice activity detection. Note, not all devices, or selected codecs, may support this function. */ virtual BOOL SetVAD( unsigned line, /// Number of line BOOL enable /// Flag for enabling VAD ); /**Get Caller ID from the last incoming ring. The idString parameter is either simply the "number" field of the caller ID data, or if full is TRUE, all of the fields in the caller ID data. The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('\t'). */ virtual BOOL GetCallerID( unsigned line, /// Number of line PString & idString, /// ID string returned BOOL full = FALSE /// Get full information in idString ); /**Set Caller ID for use in next RingLine() call. The full data of the caller ID string consists of the number field, the time/date and the name field separated by tabs ('\t'). If the date field is missing (two consecutive tabs) then the current time and date is used. Using an empty string will clear the caller ID so that no caller ID is sent on the next RingLine() call. */ virtual BOOL SetCallerID( unsigned line, /// Number of line const PString & idString /// ID string to use ); /**Send Caller ID during call */ virtual BOOL SendCallerIDOnCallWaiting( unsigned line, /// Number of line const PString & idString /// ID string to use ); /**Send a Visual Message Waiting Indicator */ virtual BOOL SendVisualMessageWaitingIndicator( unsigned line, /// Number of line BOOL on ); /**Play a DTMF digit. Any characters that are not in the set 0-9, A-D, * or # will be ignored. */ virtual BOOL PlayDTMF( unsigned line, /// Number of line const char * digits, /// DTMF digits to be played DWORD onTime = DefaultDTMFOnTime, /// Number of milliseconds to play each DTMF digit DWORD offTime = DefaultDTMFOffTime /// Number of milliseconds between digits ); /**Read a DTMF digit detected. This may be characters from the set 0-9, A-D, * or #. A null ('\0') character indicates that there are no tones in the queue. */ virtual char ReadDTMF( unsigned line /// Number of line ); /**Get DTMF removal mode. When set in this mode the DTMF tones detected are removed from the encoded data stream as returned by ReadFrame(). */ virtual BOOL GetRemoveDTMF( unsigned line /// Number of line ); /**Set DTMF removal mode. When set in this mode the DTMF tones detected are removed from the encoded data stream as returned by ReadFrame(). */ virtual BOOL SetRemoveDTMF( unsigned line, /// Number of line BOOL removeTones /// Flag for removing DTMF tones. ); /**See if a tone is detected. */ virtual unsigned IsToneDetected( unsigned line /// Number of line ); /**Set a tones filter parameters. The times are in centi-seconds. Thus, to have a 1 second delay, 100 is required. */ virtual BOOL SetToneFilterParameters( unsigned line, /// Number of line CallProgressTones tone, /// Tone filter to change unsigned lowFrequency, /// Low frequency unsigned highFrequency, /// High frequency PINDEX numCadences, /// Number of cadence times const unsigned * onTimes, /// Cadence ON times const unsigned * offTimes /// Cadence OFF times ); /**Play a tone. */ virtual BOOL PlayTone( unsigned line, /// Number of line CallProgressTones tone /// Tone to be played ); /**Determine if a tone is still playing */ virtual BOOL IsTonePlaying( unsigned line /// Number of line ); /**Stop playing a tone. */ virtual BOOL StopTone( unsigned line /// Number of line ); /**Return TRUE if a hook flash has been detected */ virtual BOOL HasHookFlash(unsigned line); /**Set the country code set for the device. This may change the line analogue coefficients, ring detect, call disconnect detect and call progress tones to fit the countries telephone network. */ virtual BOOL SetCountryCode( T35CountryCodes country /// COuntry code for device ); /**Get the serial number for the xJACK card. */ virtual DWORD GetSerialNumber(); enum CardTypes { PhoneJACK = 1, LineJACK = 3, PhoneJACK_Lite, PhoneJACK_PCI, PhoneCARD, PhoneJACK_PCI_TJ }; /**Get the serial number for the xJACK card. */ DWORD GetCardType() const { return dwCardType; } /**Get all the xJack devices. */ static PStringArray GetDeviceNames(); protected: PINDEX LogScaleVolume(unsigned line, PINDEX volume, BOOL isPlay); PString deviceName; DWORD dwCardType; PMutex readMutex, writeMutex; BOOL readStopped, writeStopped; PINDEX readFrameSize, writeFrameSize; PINDEX readCodecType, writeCodecType; BOOL lastHookState, currentHookState; PTimer hookTimeout; BOOL inRawMode; unsigned enabledAudioLine; BOOL exclusiveAudioMode; #if defined(WIN32) BOOL InternalSetVolume(BOOL record, unsigned id, int volume, int mute); BOOL InternalPlayTone(unsigned line, DWORD toneIndex, DWORD onTime, DWORD offTime, BOOL synchronous); BOOL IoControl(DWORD dwIoControlCode, DWORD inParam = 0, DWORD * outParam = NULL); BOOL IoControl(DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpdwBytesReturned, PWin32Overlapped * overlap = NULL); HANDLE hDriver; DWORD driverVersion; PTimer ringTimeout; DWORD lastDTMFDigit; DWORD lastFlashState; PTimeInterval toneSendCompletionTime; BOOL vadEnabled; HANDLE hReadEvent, hWriteEvent; #elif defined(HAS_IXJ) public: class ExceptionInfo { public: int fd; BOOL hasRing; BOOL hookState; BOOL hasWink; BOOL hasFlash; char dtmf[16]; int dtmfIn; int dtmfOut; #ifdef IXJCTL_VMWI BOOL hasCid; PHONE_CID cid; #endif BOOL filter[4]; BOOL cadence[4]; telephony_exception data; timeval lastHookChange; }; static void SignalHandler(int sig); ExceptionInfo * OpalIxJDevice::GetException(); int GetOSHandle() { return os_handle; } protected: BOOL ConvertOSError(int err); static ExceptionInfo exceptionInfo[MaxIxjDevices]; static PMutex exceptionMutex; static BOOL exceptionInit; AECLevels aecLevel; BOOL removeDTMF; PMutex toneMutex; BOOL tonePlaying; PTimer lastRingTime; BOOL pstnIsOffHook; BOOL gotWink; int userPlayVol, userRecVol; int savedPlayVol, savedRecVol; AECLevels savedAEC; #ifdef IXJCTL_VMWI PHONE_CID callerIdInfo; #endif #endif }; #endif // HAS_IXJ #endif // __OPAL_IXJLID_H ///////////////////////////////////////////////////////////////////////////// | http://read.pudn.com/downloads14/doc/comm/56136/openh323/include/ixjlid.h__.htm | crawl-002 | refinedweb | 3,346 | 55.03 |
JavaScript Style Guide:
const myArray = ["Volvo", "Saab", "Fiat"];
Code Indentation
Always use 2 spaces for indentation of code blocks:
Functions:
return (5 / 9) * (fahrenheit - 32);
}
Do not use tabs (tabulators) for indentation. Different editors interpret tabs differently.
Statement Rules
General rules for simple statements:
- Always end a simple statement with a semicolon.
Examples:).:
const obj = getElementById("demo")
If possible, use the same naming convention (as JavaScript) in HTML.
Visit the HTML Style Guide.
File Extensions
HTML files should have a .html extension (.htm is allowed).).
Performance
Coding conventions are not used by computers. Most rules have little impact on the execution of programs.
Indentation and extra spaces are not significant in small scripts.
For code in development, readability should be preferred. Larger production scripts should be minified. | https://www.w3schools.com/jS/js_conventions.asp | CC-MAIN-2022-21 | refinedweb | 127 | 52.36 |
You can do more data science than you think from the terminal
One of the most frustrating aspects of data science can be the constant switching between different tools whilst working. You can be editing some code in a Jupyter Notebook, having to install a new tool on the command line and maybe editing a function in an IDE all whilst working on the same task. Sometimes it is nice to find ways of doing more things in the same piece of software.
In the following post, I am going to list some of the best tools I have found for doing data science on the command line. It turns out there are many tasks that can be completed via simple terminal commands than I first thought and I wanted to share some of those here.
cURL
This is a useful tool for obtaining data from any server via a variety of protocols including HTTP.
I’ll give a couple of example use cases for obtaining publically available data sets. The UCI Machine Learning Repository is an excellent resource for obtaining datasets for machine learning projects. I am going to use a simple curl command to download a data set taken from the blood transfusion centre in Hsin-Chu City, Taiwan. If we simply run
curl [url] which in our example will be
curl this will print the data to the terminal.
Adding some additional arguments will download and save the data using a specified filename. The file will now be available in your current working directory.
curl -o data_dl.csv
Another common method of obtaining data for data science projects is via an API. This tool also supports both
GET and
POST requests for interacting with an API. Running the following command will obtain a single record from the OpenWeatherMap API and save as a JSON file named
weather.json . For a more comprehensive tutorial on cURL see this excellent article by Zaiste.
curl -o weather.json -X GET \
'' \
-H 'Postman-Token: dcf3c17f-ef3f-4711-85e1-c2d928e1ea1a' \
-H 'cache-control: no-cache'
csvkit
csvkit is a set of command line tools for working with CSV files. The tasks that it can execute can be divided into three areas: input, processing and output. Let’s look at a quick real-world example of how you can use this.
Firstly let’s install the tool using pip install.
pip install csvkit
For the purposes of this example, I am going to be using the same CSV file I created from the UCI Machine Learning Repository via a curl command above.
First, let’s use
csvclean to make sure that our CSV file is in the correct format. This function will automatically fix common CSV errors and remove any bad rows. A useful aspect of this function is that it automatically outputs a new cleaned version of the CSV file so that the raw data is preserved. The new file always has the following naming convention
[filename]_out.csv. If you would prefer for the original file to be overwritten you can add the optional
-n argument.
csvclean data_dl.csv
In the example file I have, there are no errors but this can be a really useful way to reduce errors further down the line when working with CSV files.
Now let’s say we want to quickly inspect the file. We can use
csvcut and
csvgrep to do this.
Firstly let’s print out the column names.
csvcut -n data_dl_out.csv | cut -c6-
Recency (months)
Frequency (times)
Monetary (c.c. blood)
Time (months)
whether he/she donated blood in March 2007
Let’s now determine how many classes there are in the target column
whether he/she donated blood in March 2007.
csvcut -c "whether he/she donated blood in March 2007" data_dl_out.csv | sed 1d | sort | uniq
0
1
The
csvgrep function allows you to filter CSV files based on regular expression matching.
Let’s use this function to extract only the rows that match class 1.
csvgrep -c "whether he/she donated blood in March 2007" -m 1 data_dl_out.csv
You can also use
csvkit to perform simple data analysis using the
csvstat function.
Simply running
csvstat data_dl_out.csv prints descriptive statistics for the entire file to the command line. You can also just request the result of only one statistic with an optional command.
csvstat --mean data_dl_out.csv
1. a: 373.5
2. Recency (months): 9.507
3. Frequency (times): 5.515
4. Monetary (c.c. blood): 1,378.676
5. Time (months): 34.282
6. whether he/she donated blood in March 2007: None
IPython
IPython gives access to enhanced interactive python from the shell. In essence, it means you can do most of the things that you can do in a Jupyter Notebook from the command line.
You can follow these steps to install it if you do not already have it available in your terminal.
To initiate IPython simply type
ipython at the command line. You are now in the interactive shell. Here you can import python installed libraries and I find this tool most useful for doing some quick data analysis on the command line.
Let’s perform some basic tasks on the data set we have already been using. First I will import pandas, read in the file and inspect the first few rows of data.
import pandas as pd
data = pd.read_csv('data_dl_out.csv')
data.head()
The file column names are quite long so next, I am going to use pandas to rename them, and then export the resulting dataframe to a new CSV file for later use.
data = data.rename(columns={'Recency (months)': 'recency', 'Frequency (times)': 'frequency', 'Monetary (c.c. blood)': 'volumne', 'Time (months)': 'time', 'whether he/she donated blood in March 2007': 'target'})
data.to_csv('data_clean.csv')
As a final exercise let’s inspect the correlation between the features and the target variable using the pandas
corr() function.
corr_matrix = data.corr() corr_matrix['target'].sort_values(ascending=False)
To exit IPython simply type
exit .
csvsql
At times you may also want to obtain a data set via a SQL query on a database. The tool csvsql, which is also part of the csvkit tool, supports querying, writing and creating tables directly on a database. It also supports SQL statements for querying a CSV file. Let’s run an example query on the cleaned dataset.
csvsql --query "select frequency, count(*) as rows from data_clean where target = 1 group by frequency order by 2 desc" data_clean.csv
SciKit-Learn Laboratory
Yes, you can perform machine learning at the command line! There are a few tools for this but SciKit-Learn Laboratory is probably one of the most accessible. Let’s build a model using our blood donations data set.
SciKit-Learn laboratory relies on the correct files being placed in consistently named directories. So to begin with we will make a directory named
train and copy, move and rename the data file to
features.csv .
mkdir train cp data_clean.csv train/features.csv
Next, we need to create a config file named
predict-donations.cfg and place it in our
data directory.
[General] experiment_name = Blood_Donations task = cross_validate
[Input] train_directory = train featuresets = [["features.csv"]] learners = ["RandomForestClassifier", "DecisionTreeClassifier", "SVC", "MultinomialNB"] label_col = target
[Tuning] grid_search = false objective = accuracy
[Output] log = output results = output predictions = output
Then we simply run this command
run_experiment -l predict-donations.cfg .
This automatically runs the experiment and creates an output folder containing the results.
We can run a SQL query to summarise the results in the
Blood_Donations_summary.tsv file.
cd output
< Blood_Donations_summary.tsv csvsql --query "SELECT learner_name, accuracy FROM stdin "\ > "WHERE fold = 'average' ORDER BY accuracy DESC" | csvlook
There are many other command line tools that can be useful for data science but I wanted to highlight here those that I had found useful in my work. For a really comprehensive view of data science at the command line, I found the book Data Science at the Command Line which is freely available online to be extremely useful.
Source: towardsdatascience | https://learningactors.com/five-command-line-tools-for-data-science/ | CC-MAIN-2021-43 | refinedweb | 1,338 | 64.1 |
We have many Windows Azure SDKs that you can use on Linux to access Windows Azure Blob Storage and upload or download files, all hosted on GitHub. For example, you could write scripts in Python or Node.JS to upload files to Blob storage.
If you just want to interact with Windows Azure Storage from the command line on a vanilla Linux installation though, chances are that Python is the scripting environment that is pre-installed, not requiring you to compile anything before you can start working.
Here is a quick cheat sheet on how to use the Python SDK from the command line:
Just download the latest tarball from Git, extract the contents, and run the install script as root to install the SDK:
curl -L -O
tar xzf master.tar.gz
cd azure-sdk-for-python-master/src
sudo python setup.py install
Now in order to make it simpler to use the Blob Service using the Python module, you can set your Storage credentials as environment variables. You can find these values in the Windows Azure Management Portal, just select your Storage Account and click on the "Manage Access Keys" button to open the pop-up dialog that shows both the account name and the secret keys.
export AZURE_STORAGE_ACCOUNT=tcontepub
export AZURE_STORAGE_ACCESS_KEY='secret key'
Now it's super simple to access Blob Storage directly from the Python interpreter; just run python, import the module and create the BlobService object:
python
BlobService
from azure.storage import BlobService
blob_service = BlobService()
Now here are a few code snippets you can use...
for i in blob_service.list_containers():
print i.name
blob_service.create_container('foo')
The first parameter is the container name, then the name of the Blob that will be created, then the data to be sent (typically the contents of a file you read from the local filesystem).
blob_service.put_blob('foo', 'README.txt', file('/usr/share/doc/grep/README').read(), 'BlockBlob')
Hope this helps. You can find more information and examples on the Windows Azure SDK for Python Github page. | http://blogs.msdn.com/b/tconte/archive/2013/04/17/how-to-interact-with-windows-azure-blob-storage-from-linux-using-python.aspx | CC-MAIN-2013-48 | refinedweb | 339 | 58.92 |
RationalWiki:Saloon bar/Archive54
[edit] Pwned
That school that banned the prom when a girl wanted to bring her girl friend has been well and truly Pwned Hat tip. They said they'd organise a private (i.e. one were they could disinvite the girl) one, but the American Humanist Association has beaten them to it. Laugh? I nearly choked. 05:11, 14 March 2010 (UTC)
ContribsTalk
- The reason Mississippi exists is so that Texas can claim to be "only 49th" on whatever sane metric one is measuring. ħuman
05:44, 14 March 2010 (UTC)
- Hey, don't judge the good folks of Mississippi too harshly. I thought it quite progressive when in 2008 they decided to have an integrated prom. Damn these people are dumb. It's at times unfortunate that breathing is an autonomic function, since some shiny foil and squirrels would otherwise be enough of a distraction to wipe out entire towns in Mississippi.--
Ask me about your mother 10:14, 14 March 2010 (UTC)
- Do you know how the school board and religious groups are spinning this?
narchist 12:46, 14 March 2010 (UTC)
- Hopefully better than they did in the past. --
Ask me about your mother 13:08, 14 March 2010 (UTC)
- Kudos to the humanists for organizing a prom, but how does that stop the school from still organizing a private prom? My suspicion is that there would be two proms, one of which the more free-thinking students will attend, and one of which the conservative ones will attend (or the ones that are ordered to attend by their parents.) Hopefully, there will be some kids who just go to both.
- Dear sweet FSM, though. I'm glad the Air Force sent my brother-in-law away from his posting in Mississippi. I shudder at the thought of my nieces ("Her Worshipfulness" and "Miss Precious Perfect" to their Uncle MDB) being educated there.) Though now that I think of it, the elder of the two was in private school (a church run school, but Presbyterian, not one of the "we put the fun in fundamentalist dogma type places), and the younger was too young to attend, so maybe there still would have been hope they'd grow up with an education. MDB (talk) 18:13, 14 March 2010 (UTC)
(undent) It's good that the humanists got in their ball first. I think that sends a clear message that the school board can run off and in a huff, taking the ball with them, but theirs isn't the only ball in town. I hope that some of the students and families support this. Mississippi has a pretty piss-poor track record, and it won't harm the to show that some of the students and families understand the principle. --
Ask me about your mother 18:50, 14 March 2010 (UTC)
- Although the AHA one could be a bit of a damp squib as I presume that in an area that would do something this regressive the majority will be of the, if not totally fundie, then at least quite a bit on the right leaning side of conservative religion. Ergo the majority wouldn't be seen dead (or at least their parents wouldn't let them be seen at) anything organised by those Devil Worshipping Atheist Scumbags.
narchist 22:45, 14 March 2010 (UTC)
[edit] this is hopeless.........
with conservative far right taking over the USA and Australian Far right putting new censorship law.
i fear for the future. i live in Canada so if America fall to the loony so will Canada...... Canada is the USA little brother always copying his elder brother........
god i hate this world.Waronstupidity (talk) 00:54, 14 March 2010 (UTC)
- australia just hates young actresses with a-cup breasts. Its all about protecting the children and cartoon characters. Hamster (talk) 01:25, 14 March 2010 (UTC)
- A-cup breasts? Ears and eyes on alert... ħuman
09:56, 14 March 2010 (UTC)
- Hmmm, me senses a kindred spirit in the Human one. --Psygremlin話しなさい 12:07, 14 March 2010 (UTC)
- Yeah, with our (UK) gov't sucking up to the US all the time and allowing cretinism in state sponsored schools We've gotta stop it ASAP. (see "Another poll, above) 02:25, 14 March 2010 (UTC)
ContribsTalk
- Always darkest before the dawn, pessimists. Though we've been waiting quite a long time for the dawn. Don't forget this time about 20 years ago we had the Falklands War, and the ten years before that we had Maggie Thatcher trying to destroy the working class, the five years before that stealing milk from kids, then the twenty/thirty years before that we had reds-under-the-bed and the disassembling of the British empire, then the fifteen years before that we had Nazi Germany to worry about, then the fifteen years before that we had to try and please everyone in Europe, then the four years before that we had World War One.
- In short, America and the UK always find themselves in the middle of some wacky jam. But we always manage to pull ourselves up, blunder on, and kick about weaker countries! SJ Debaser 11:47, 14 March 2010 (UTC)
- "...we had Maggie Thatcher trying to destroy the working class..." She did not need to; the workers did that for themselves by abusing strike actions.
ListenerXTalkerX 02:27, 15 March 2010 (UTC)
- Josh, the Falklands war was 29 years ago, at the start of Thatcher's time as PM. This is a significant part of modern British history, and it's a little worrying that a young chap such as yourself could be so far off with it. (hope that isn't too bitchy/daily heilish) DeltaStarSenior SysopSpeciationspeed! 03:09, 15 March 2010 (UTC)
The Australian Far right? This has been coming from our centre-left party. Each Australian Labor Prime Minister is entitled to one true stupid idea that will blow up in their face. This is reminiscent of Hawkes' Australia Card we were all going to carry around, that got so heavily debated and pushed we had a double dissolution over it. The bill was withdrawn when it was pointed out that no funding was provided to implement the scheme in the bill, rendering worse than useless. - π 05:18, 15 March 2010 (UTC)
- Delta- We didn't learn about the Falklands in school and I thought it happened in the late 80s not the early; thanks for informing me. And Listener- Maggie abused her position as PM, threw the country into a recession, and didn't have the fucking decency to support the workers that she'd kicked out on the street. The whole reason of unions is to raise concerns when you're being treated unfairly. That's hardly abusing strike actions. Please try and learn with an open mind in the future, or there is no point in talking to you. SJ Debaser 17:03, 15 March 2010 (UTC)
- I was talking about the strike actions before Thatcher was voted in, e.g., the Winter of Discontent. And the British economy was in a mess even at that time.
ListenerXTalkerX 17:13, 15 March 2010 (UTC)
[edit] Just going to put this out there
Could we do something for the Day of Silence next month, possible followed up by some snide comments on the day of truth?--Thanatos (talk) 01:21, 14 March 2010 (UTC)
- sure why not, what did you have in mind ? Not very in favor of messing with the other sides day of truth, both sides entitled to have their say regardless of what it is. snide seems fine though. Hamster (talk) 01:30, 14 March 2010 (UTC)
When the hell is it? Artikal not say. ħuman
03:24, 14 March 2010 (UTC)
[edit] Marjoe
Been invited to watch Marjoe tonite. Should be interesting to watch a film they were too scared to show in the Bible belt. --PsygremlinSermā! 12:21, 14 March 2010 (UTC)
- Never heard of it or him. But it certainly sounds interesting from the liberalatheistevolutionistantiamericapedia atricle. Let us know if it's worth searching out. DeltaStarSenior SysopSpeciationspeed! 03:04, 15 March 2010 (UTC)
- PS. Wasn't there (quite recently) a couple of fundie preachers/televangelists who came to their senses and realised what they were saying was bollocks, but admitted it's "too late to go back"? DeltaStarSenior SysopSpeciationspeed! 03:04, 15 March 2010 (UTC)
[edit] A thought/question
Should Rational Wiki celebrate Pi Day?
I mean, it is today (the date being 3/14), and Pi is certainly scientific, but it is, by definition, not rational.
MDB (talk) 18:06, 14 March 2010 (UTC)
- Pshaw! Pi is not 1.43! Down with your American dates of inconsistent endianness! Wisest stupid Hoover! 18:11, 14 March 2010 (UTC)
- The problem is that we have to agree with them on this one occasion unless we can persuade everyone to add an extra day to April. –SuspectedReplicant retire me 18:14, 14 March 2010 (UTC)
- When you get an April 31 or a fourteenth month on the calendar, you can celebrate Pi day, too. MDB (talk) 18:16, 14 March 2010 (UTC)
- Not so! The 27th of July, or 22/7! (Fun fact: My father used to hold an unshakeable belief that pi was exactly equal to 22/7, until I convinced him otherwise with much argument.) Wisest stupid Hoover! 19:20, 14 March 2010 (UTC)
- Don't you mean the 22nd of July? Or am I being unusually dense? –SuspectedReplicant retire me 19:24, 14 March 2010 (UTC)
- That's what I said. Wisest stupid Hoover! 19:47, 14 March 2010 (UTC)
- I think it's often celebrated on both days. Although this is also Steak And Blow-job Day for those who wish to partake in that sort of thing.
narchist 22:40, 14 March 2010 (UTC)
- 1. See the top of RC/watchlist, ie, "yes". 2. We also celebrate 22/7. 3. Sounds good to me. Can I choose whose steak I have to blow this time though? ħuman
23:17, 14 March 2010 (UTC)
- I thought Steak and BJ day was the day after Valentines Day? That's how they advertise it here. Aboriginal Noise Oh, what a lovely tea party! 01:52, 15 March 2010 (UTC)
- I MISSED STEAK AND BLOWJOB DAY!?!? Oh, well... There's always NEXT year... The Foxhole Atheist (talk) 18:46, 15 March 2010 (UTC)
[edit] Google maps
Google's updated the UK. Yonken ago I mentioned that the Street View mobile had ben outside. We're somewhere on this map. (I've marked the river that flooded) Happy hunting. 20:22, 14 March 2010 (UTC)
ContribsTalk
- Hehe, it looks as if the Police have been called to a disturbance at this shop. Bondurant (talk) 21:10, 14 March 2010 (UTC)
- And he's parked on double yellows! 21:15, 14 March 2010 (UTC)
ContribsTalk
- Just roaming around the map above, I think I've found #2 cat outside a neighbour's door, scrounging, no doubt. 04:25, 15 March 2010 (UTC)
ContribsTalk
- It's nice. I can now drive home uninterrupted via Street View. However, this latest round of images seem to be a lot closer together so you can't get up to any "speed" - making a long distance race between car and Street View a little one more sided than the across town one you could do before.
narchist 12:59, 15 March 2010 (UTC)
[edit] Can a US President resign?
If Barry were to say to his party "Back my health bill or I quit" what'd be the outcome? 02:51, 15 March 2010 (UTC)
ContribsTalk
- If he quits, then Biden becomes the president. Gooniepunk2010 Oi! Oi! Oi! 02:54, 15 March 2010 (UTC)
- see Richard Nixon --CPAdmin1 (talk) 02:56, 15 March 2010 (UTC)
- You mean if Barry says "Screw you guys, I'm going home to Kenya"? DeltaStarSenior SysopSpeciationspeed! 02:57, 15 March 2010 (UTC)
- Can he just quit though? 03:01, 15 March 2010 (UTC)
ContribsTalk
- Yes, although bowing out would probably hurt his allies than it would help them. Lord of the Goons The official spikey-haired skeptical punk 03:03, 15 March 2010 (UTC)
- Excactly think of what a threat that'd be to them. 03:04, 15 March 2010 (UTC)
ContribsTalk
- yes, he can resign. I believe he is forbidden to hold any elected office though, so he is done politically Hamster (talk) 03:09, 15 March 2010 (UTC)
- I doubt the second clause of Hamster's comment. But anyway, Susan, why do you think whining "or I'll take ball and go home" could possibly be effective politics? ħuman
03:32, 15 March 2010 (UTC)
- Well,
whenif he doesn't get it through, he's politically finished isn't he? After all it was a major point, or am I mistaken? 03:35, 15 March 2010 (UTC)
ContribsTalk
- There's nothing that would legally prohibit Obama from resigning and holding any elective office later. He could even run for President again, and, if he resigned before January of 2011, he could serve two full terms. I'd say its unlikely he'd be elected to anything of note is he resigned the Presidency, but there's nothing to prohibit it. (And one President -- Taft, I think -- served on the Supreme Cort after being President.) MDB (talk) 10:52, 15 March 2010 (UTC)
Susan is thinking like someone from a country with a proper parliamentary democracy, where the leader of the ruling party can resign, become a backbench MP, the party can choose a new leader and continue to run out their mandate. If the US were a country with a proper parliament, BO could impose party discipline to get his party to pass his legislation his way, lest they get kicked out of the caucus. The weird system here is weird, where folks from the same frickin' party but in different branches on the government (executive v. legislative) often find themselves in as much of an adversarial relationship as folks from different parties. TheoryOfPractice (talk) 03:45, 15 March 2010 (UTC)
- Yeah, I suppose: you can't have a "vote of no confidence" over there, can you. Fixed terms are a bit of a curse as well as an occasional blessing. 03:48, 15 March 2010 (UTC)
ContribsTalk
- "The weird system here is weird..." Yes, we were started by people who believed that legislators were individual people and not just party hacks. The reality varies somewhat, but the groundwork remains.
ListenerXTalkerX 04:00, 15 March 2010 (UTC)
- For someone like me from a country with a British-style parliament, the idea that members of the Democratic Party are the biggest obstacle to a Democratic Party policy initiative, or the idea that a party with a majority--a substantial majority -- in both houses cannot pass the legislation it campaigned on, is weird. TheoryOfPractice (talk) 04:10, 15 March 2010 (UTC)
- It makes you wonder? I live here and it boggles my mind. Bush got his shit in with are bare naked majority and Obama can't with supermajorities? Can't even get a watered-down version of what he wanted passed? Of course, this is a giant bigger country, with some huge voting blocks (bible belt) who are truly insane. A "Democrat" from Mississipi could easily be far to the right of a "Republican" from Massachusetts. And, yes, we also are competing with the Welsh for silly place names. ħuman
05:50, 15 March 2010 (UTC)
- Parliamentary democracy require more party cohesions because the government does not have a fixed legislating period, the government can be voted out at any time using a simple parliamentary motion. Internal party fight is usually kept quite and they try to united front in public. Although when the deputy has called the Prime Minster out publicly, you realise it is just a well organised façade. I remember the later days of the Howard government when he would sit with his back to the opposition benches so he would be able to keep his enemies in front of him. - π 04:16, 15 March 2010 (UTC)
- Just think of the (alleged) acrimony between Blair and his de facto number two (Brown). 05:22, 15 March 2010 (UTC)
ContribsTalk
- Also remember that in a win/loss system like America has (IE, no proportional voting) smaller parties tend to consolidate into the larger ones. If you actually rank congress by positions they hold, they are rather scattered around the political map. Thus, you have some very conservative legislaters in the Democratic party (ala Stupak, Nelson, etc) and some rather liberal members of the GOP (McCain (socially) Collins, Snowe). If the candidates weren't so reliant on the major parties for funding and such, we would have about 10 different political parties in congress. SirChuckBWill Sysop for food 07:06, 15 March 2010 (UTC)
- One downside of the British system is that we could conceivably have two general elections in the space of a year if the first one results in a hung parliament - a definite possibility this year. Instead of just getting on with the business of making a coalition, as we see in other European countries, the Prime Minister can call an election as soon as (s)he thinks their party can win. I'd prefer to see some kind-of minimum term - say 2 years - for a coalition government to knuckle down and get on with running the country. Bondurant (talk) 12:04, 15 March 2010 (UTC)
[edit] Copyright Violations
How ironic it is that you people complain about CP's copyvios given the excessive amount of copyvios this site has! I hope MPAA rips this place to shreds! DMCA Fanatic (talk) 03:11, 15 March 2010 (UTC)
- Examples. Now. Please. Lord of the Goons The official spikey-haired skeptical punk 03:13, 15 March 2010 (UTC)
- Just go ahead and delete all of your images; about one in ten of all of the images here are legal. DMCA Fanatic (talk) 03:19, 15 March 2010 (UTC)
- Examples! Goddamnit, give examples and links to ones you think are in violation, or else you are just, obviously, being a liar and a concern troll. Lord Goonie Hooray! I'm helping! 03:21, 15 March 2010 (UTC)
- So, who here watches South Park, and which character is your favorite? Lord of the Goons The official spikey-haired skeptical punk 03:38, 15 March 2010 (UTC)
- Oh shit, you killed Kenny! You bastard! ħuman
03:52, 15 March 2010 (UTC)
- I look to Cartman to make all funny--Thanatos (talk) 04:35, 15 March 2010 (UTC)
- One of the things that makes South Park so good is that all the characters are very strong, even the minor characters are good characters in their own right. As a result, I'd be tempted to say that Randy Marsh is my favourite (character - just in case I haven't used that word enough in this edit) DeltaStarSenior SysopSpeciationspeed! 05:17, 15 March 2010 (UTC)
- Not a huge SP fan, but I do agree with Delta* - the characters are strong amd well-written. Randy is one of the stronger "supporting" characters. Chef used to be. Before they CoSed him to death. ħuman
05:42, 15 March 2010 (UTC)
- Butters. ωεαşεζόίď
Methinks it is a Weasel 07:55, 15 March 2010 (UTC)
- seriously........... these guy think they are so important....... what the next step ? telling the FBI to arrest us for being Liberal ?Waronstupidity (talk) 10:54, 15 March 2010 (UTC)
- I've never got into South Park. It always seemed like a summation of what's wrong with the world today. A couple of homos in Colorado making snarky comments about celebrities and being offensive for the sake of being offensive and everyone hails them as brilliant. SirChuckBPenguin Knight, First Class 18:08, 15 March 2010 (UTC)
- Chuck, you've just articulated why I think it's so good! Some of SP is bang on the money, and they also touch subjects that no other programme would touch with a barge-pole. DeltaStarSenior SysopSpeciationspeed! 19:13, 15 March 2010 (UTC)
[edit] Would even CP agree with these guys?
It is people like this who are taking over the Christian identity, and some conservatives don't see it. These guys are way more extreme, and God only knows what they truly plan to do--Thanatos (talk) 05:19, 15 March 2010 (UTC)
- I can't watch the vid (the fun-police have blocked YT), what group is it about? DeltaStarSenior SysopSpeciationspeed! 19:15, 15 March 2010 (UTC)
[edit] On-line gaming mini-rant
So, I'm a World of Warcraft player (yeah, I'm a geek. So sue me.)
For those of you unfamiliar with the game, dungeons are large areas that have to be in teams of five. There's also a tool to find other players to work with you to do the dungeon.
I've had it demonstrated to me lately that there is no minimum age to play the game, or at least not a well-enforced one.
The first time, there was a ten year old (I asked) in the team who would not stick with the party, and actually asked us to stop for a while because he had to go do his chores. Even when he was "helping", he proved completely useless. We eventually voted to kick him out.
The second, while he was at least useful, kept asking repeatedly if we were at the location for the quest he had to complete. Basically, it started to feel like.... this:
I know there's no really effective way to verify age on-line, but geez, maybe they could establish an "adults only" server with a requirement that the account have a credit card with the owner's name on it... MDB (talk) 11:17, 15 March 2010 (UTC)
- Yup, that's been a long-running request, particularly for role playing servers. The inherent problem though is that age isn't a guaranteed determiner of mature behaviour. It's a good one, but not perfect. The "are we there yet" thing has always been a problem with PuGs, but it's becoming more common now with cross-realm randoms. The thing I dislike the most is the need to just rush through everything at high speed, as the game is about nothing more than already over-geared people farming badges. I suggest a spinoff game in which there is a UI with a single "give badges" button. Players would receive a badge for every thousandth click of the button. The worst kid I ever grouped expected us to wait while we went off to watch a TV show. I thought he was kidding, but after he'd been gone for 15 minutes we decided to remove him and move on. It's one of the many reasons I stopped doing PuGs. I'm a pretty good healer, so I can get groups at the drop of a hat, and see no reason to deal with the hassle of aggressive and willfully ignorant people. Ultimately they're self-defeating, since that mentality drives good tanks and healers away.
- Are you on a US or EU server? I'm on Moonglade EU. --
Ask me about your mother 13:22, 15 March 2010 (UTC)
- I'm on Proudmoore US. The problem is that I'm playing a Retribution Pally (a dwarf named Atreuss), which pretty much means I DPS (though I can tank in a pinch. I'm not good at it, but I keep a one handed weapon and a shield handy just in case.) I'm in a good guild, but its mostly level eighties, and even if they are willing to help a leveling character, I'd rather do the instance with people at my level, so there's a challenge to it. I mean, where's the fun in doing Zul Furrak if you've got a level eighty who can spit on the bosses and kill them instantly? So, I resort to the Dungeon Finder. I've gotten some excellent groups, but also some really awful ones. And I know tanks like to prove the size of their e-penis by doing huge pulls, but I like taking it slowly and getting a chance to breathe in between fights. And I at least try to be polite by taking "bio" and smoke breaks before even getting into the queue. I try not to step away for more than a minute. MDB (talk) 13:48, 15 March 2010 (UTC)
- Yeah, it's not as easy for the DPS monkeys. I rolled a healer because my small guild had too many nights of being unable to run dungeons or raids, and I got kind of bored finding groups when they were at the time preferring ranged DPS and those with crowd control. Fury warriors were amazing DPS if tuned and played well, but our only viable CC was to kill things very quickly.
- Chain pulling tanks can be fun, at least in heroics. It depends entirely on whether or not that group want that and can handle it. It's been fun to do that as a challenge, although not so much fun if the group sucks and their simply doing it because they think it'll be faster. Reminds me of Shattered Halls. That was arguably the best heroic ever. Streams of mobs, and a lot of fun for fury warriors and resto druids. Misery though with a bad group. --
Ask me about your mother 15:18, 15 March 2010 (UTC)
- Proper tanking requires intelligence. Yesterday, I had an entire group wiped because our tank got a shiny new weapon he had no skill in, and decided to switch to it right before the Gahr'zilla pool in ZF. (To his credit, he admitted how stupid it was after the massacre.) MDB (talk) 16:16, 15 March 2010 (UTC)
I understand nothing in this thread. I am officially my parents. TheoryOfPractice (talk) 16:26, 15 March 2010 (UTC)
- Not that you directly asked, but...
- *DPS: Damage Per Second -- the job is to kill the enemies, quickly.
- *Tank: The job is to draw the enemies' attacks, soak up their damage, and hurt them while you're at it.
- *Healer: The job is to heal your fellow players, especially the tank.
- *Paladin: A holy warrior, can be either a tank, a DPS or a healer. My paladin is a retribution paladin, which means he specializes as DPS, and can kinda be a tank. He'd only heal in an emergency.
- *Pulling: Getting the enemies to attack.
- *Zul Farrak: A city of evil voodoo practiciing trolls. A dungeon you run at roughly mid-level (and has a really cool epic battle mid-way through it.)
- *Gahr'zilla: a great big lizard monster in Zul Farrak. Any similarity to a famed Japanese movie monster is purely coincidental, no really.
- MDB (talk) 16:56, 15 March 2010 (UTC)
- Jesus motherfucking H christ on a bike. I knew there were problems with age verification online, but I didn't realise just how serious it could be. Kids annoying the grown-ups in whilst they're playing online dungeons and dragons? Whatever shall we do? Let's stop pouring money in to renewable energy and medical research, and get those boffins working on a way to allow adult nerds (who really should know better) to play in peace. I feel your pain MDB, but you'll just have to be brave, lil'soldier. Have you considered praying for a solution? (PS. ToP, I only know about WoW due to the South Park episode) DeltaStarSenior SysopSpeciationspeed! 19:22, 15 March 2010 (UTC)
- That was a surprisingly assholish response, DS. Having a bad day?
- To reply to the actual topic: I don't touch MMOs, but I do occasionally play Team Fortress 2. There's a very similar problem in FPS games, not just with kids but with adults of very low maturity. There's nothing that ruins a good round faster then having a whiny 12-year old start screeching through voice chat or some nimrod plays terrible music at ear-splitting decibels. My solution is to stick with rooms run by clans that I know and trust. That's not much help in WoW, I suppose. Colonel of Squirrels (talk) 19:39, 15 March 2010 (UTC)
- DS, some might question the value that editing RW offers to society, not to mention time spent wanking that could otherwise be used campaigning for better science standards in schools. Oddly enough, people I've met in-game and here on RW have been pretty helpful when I went through a difficult time. The squirrel is probably right, and that all of these online things are subject to the effects of anonymity and disassociation. --
Ask me about your mother 20:40, 15 March 2010 (UTC)
- Oh, gimme a break, DS. I'm complaining about an annoyance in my life, nothing more. I never claimed it was of earth-shattering importance or anything. If you're not interested in the topic, then just don't read it; there's no reason to get insulting. (Oh, and for what its worth, on-line age verification for WoW is pretty trivial, but it doesn't take much imagination to come up with ways on line age verification could be quite useful.) MDB (talk) 20:45, 15 March 2010 (UTC)
- Sorry MDB, I didn't mean it to be so personal. However, I have just read through yours and CR's discussions and description, I can only conclude that this game is even sadder, geekier and nerdier than I had imagined. Though there's nothing wrong with that, each to their own! Happy gaming! DeltaStarSenior SysopSpeciationspeed! 21:13, 15 March 2010 (UTC)
I haven't logged in since around New Year's, since I was so busy with school. And on Saturday, I get a request to change my password. Which is odd, since I didn't do a "forgot my password" request. So I do, and for fun log in to see what's up. Well, my main character is suddenly in Northrend, all her stuff is gone and replaced by minerals, and my other three characters have all been deleted. So I alert the GMs, and they lock down my account to fix things up. In the meantime, I get another change of password request, and I change both that pass and my email's pass, plus do a system scan on my computer. Comes up clean, and I'm behind a firewall anyhow. I get my characters and their stuff back (but not the stuff on the surviving character, sadly), and I get another password request. So I alert Blizzard again, saying someone's hitting the "forgot password" button. So they lock down my account again, and give me the same form letter about how I need to secure my email and such! So two days later, it's still locked down, I've had to fill out forms three times for reinstatement, and I've received no less than SIX customer satisfaction surveys! This is insane! If nothing else, I've stopped getting password change requests, so that's a mercy at least. Frustrating for a game I probably won't play much of for another five or six weeks yet. --Kels (talk) 03:20, 16 March 2010 (UTC)
[edit] Gannet
What would you call someone who ate 6 (SIX!!!) Cadbury creme[sic] eggs in the space of one hour!!!? 11:59, 15 March 2010 (UTC)
ContribsTalk
- Full. Tetronian you're clueless 12:07, 15 March 2010 (UTC)
- Paul Newman??? Bondurant (talk) 12:11, 15 March 2010 (UTC)
- Roger Schlafly's new girlfriend? TheoryOfPractice (talk) 12:34, 15 March 2010 (UTC)
- The eggterminator! Sen (talk) 13:11, 15 March 2010 (UTC)
- I'd call the "nuckin' futz", but then, I hate Cadbury Creme Eggs, even if I do find the commercials amusing. Give me a Reese's Cup or an Almond Joy any day.
- "Sometimes you feel like a nut (yeah yeah yeah), sometimes you don't".... MDB (talk) 16:07, 15 March 2010 (UTC)
- Pah, six? A former workmate of mine once (stupidly) proclaimed that he could eat 30 (yes, thirty!) in half an hour. No sooner had he uttered his words then the posters were made and the creme eggs purchased for "Woody's creme egg challenge". A large crowd gathered the next lunchtime, we even had some motivational music on (Eye of the Tiger, that kind of shit). He managed 21 in 25mins then spewed everywhere. Not a bad effort, better than I'd expected (my £2 was on 15) but way short. I don't know if he still eats creme eggs. (I may in the future regail the RW camp with the tale of "Lamby's diet coke challenge" - 8 litres in 3 hours) DeltaStarSenior SysopSpeciationspeed! 19:30, 15 March 2010 (UTC)
- Six in an hour is a strange amount. It's not up to eating contest level, like DeltaStar's example, but seems like more than somebody would choose to eat as a regular snack. Did anything particular prompt this creme egg binge? ωεαşεζόίď
Methinks it is a Weasel 19:35, 15 March 2010 (UTC)
- Isn't the more relevant question "how do you eat yours?" Nope, advertising has no effect on me. --JeevesMkII The gentleman's gentleman at the other site 20:02, 15 March 2010 (UTC)
[edit] Poll encore
Autism:vaccine Hat tip this time. 13:18, 15 March 2010 (UTC)
ContribsTalk
- When I saw it, the poll was 23% believe in a connection, 77% don't. That's pretty horrifying seeing as the article above the poll stressed that there is no connection. Tetronian you're clueless 13:43, 15 March 2010 (UTC)
- They live in a giant Skinner box, and right now they're confused and trying to replicate the behaviour that'll reward their actions, or beliefs in this case. There are quite a few comments in there that mirror the utlimate conclusion of any debate between a naturalist and a believer in woo. The connection is there because it has to be! --
Ask me about your mother 15:12, 15 March 2010 (UTC)
- Now it's 20-80. I agree with CR; almost all religionists and conspiracy theorists live in a Skinner box. Tetronian you're clueless 18:03, 15 March 2010 (UTC)
[edit] Hitler and evolution
Since the loonies over at CP claim that Hitler was an atheist motivated by Theory of Evolution, they should take a look at this. Mr.Orange (talk) 15:59, 15 March 2010 (UTC)
- For those who can't read Eye-talian... MDB (talk) 16:03, 15 March 2010 (UTC)
- All these photographs are pretty much taken from this: website, which btw is nicely referenced. I intended to do a "Nazi & Christianity" article or something but never got around to it. Sen (talk) 17:20, 15 March 2010 (UTC)
- Nah, they'd just use No True Scotsman to say that Hitler really wasn't a Christian. I've seen that argument many, many times before. Tetronian you're clueless 18:12, 15 March 2010 (UTC)
- What I hate, regarding the illogicality of that argument, is that it doesn't matter wither Hitler was Christian or not. Germany was a christian nation. I mean, pointy buildings? Churches? Hello? The "Volk", as today most western "volk" (and today Europe is at its most secular), was a Christian majority by far. What did they do when the Nazis were in power? Were they all "charging them extra?" /sarcasm
I have read a quote somewhere in Kenneth Miller's book Only a Theory something like "There is nothing worse than having a beautiful theory slaughtered by a bunch of ugly facts" (Please correct if I am wrong). The scientist changes the theory, and the creationists changes the facts. ThiehCP≠Child Porn? 22:04, 15 March 2010 (UTC)
[edit] Cartoon about Phyllis Schlafly / Texas board of education
Here [1]. CS Miller (talk) 18:39, 15 March 2010 (UTC)
- Very funny, but I'm busy trying to guess which gnome will tell you that this section doesn't technically belong here. — Sincerely, Neveruse / Talk / Block 18:45, 15 March 2010 (UTC)
- saloon bar may have been better , since its not specifically CP related, but it is Schlafly so that close enough .. I Hamster RW SYSOP extrordinairre has spoke Hamster (talk) 18:56, 15 March 2010 (UTC)
- Oh oh oh.... I'll do it. I never get to be annoying and wiki-lawyerish: CS, that is very funny, but this page is for CP related discussion. You should move that to the saloon bar. SirChuckBCall the FBI 19:16, 15 March 2010 (UTC)
moved from CP talk:WIGO CS Miller (talk) 19:27, 15 March 2010 (UTC)
- Oh jeez, I was just joking.... SirChuckBA product of Affirmative Action 19:51, 15 March 2010 (UTC)
- you has abrogated Hamsters unilateral decision and super sysoppy powers. I shall blok youz laters SirChuckB when I figure out how It does fit here better though Hamster (talk) 19:55, 15 March 2010 (UTC)
- I think this deserves it's own article, in Category:Cartoons about Phyllis Schlafly and the Texas board of education DeltaStarSenior SysopSpeciationspeed! 20:33, 15 March 2010 (UTC)
[edit] Texas School Board & stuff
How is the TSB made up, is it elected, appointed or what? How come homeschool fanatics are allowed to dictate the curriculum for public schools: .)'" Huff post Hat tip. / 00:12, 16 March 2010 (UTC)
ContribsTalk
- Yeah, that's insane. For example, last I knew, Boston has a requirement that city employees (cops, fireladies, teachers, etc) actually live in the city, in order for their interests to coincide or whatever. Homeschooling parents on the school board is just fucking insane. Private school parents bad enough, too. I wish Barry's kids were in some "test to get in" public school in DC, but we all know how that goes.... ħuman
03:22, 16 March 2010 (UTC)
- Private schools should be barred from enrolling kids in their school district! ħuman
03:24, 16 March 2010 (UTC)
- The whole democracy thing is a bit out of hand over there, if you ask me. Elections for jobs that ought to be decided by qualifications (sheriff?) is mad! 03:29, 16 March 2010 (UTC)
ContribsTalk
[edit] It's over. They've won.
In less than ten years, people who were educated this way will be running the world. Between this and vajazzling, I'm convinced that the end of Western civilization is nigh. TheoryOfPractice (talk) 16:21, 13 March 2010 (UTC)
- Fuck. That makes me more pissed off at social conservatives than I've ever been before. We can only hope that American educators are smart enough to counter this bias. Tetronian you're clueless 16:35, 13 March 2010 (UTC)
- it will be interesting to see what the universities do in response. Disqualifying a states curiculum from entry to courses may need to happen Hamster (talk) 16:54, 13 March 2010 (UTC)
- To present Republican philosophies in a more "positive light." Far right American Republicans tend to pride themselves on freedom of speech, hating Communists, and all that, but how is this anything short of propaganda? Fucking hypocritical cunts. SJ Debaser 17:38, 13 March 2010 (UTC)
- Perfect example of the inmates taking over the asylum. Can't disagree with ToP. The end of the world as we know it. All the more reason to fight the idiots. 17:44, 13 March 2010 (UTC)
ContribsTalk
- The horrifying thing is that Texas sells textbooks to thousands of schools in almost all 50 states, so this will affect education all over the country. As Susan says, "All the more reason to fight the idiots." Tetronian you're clueless 17:47, 13 March 2010 (UTC)
I think this WAS the outcome of the legal battle. TheoryOfPractice (talk) 17:57, 13 March 2010 (UTC)
- I guess that every empire has to end sometime. Insanity like this will just hasten the end of the American one.--BobIt's windy! 19:29, 13 March 2010 (UTC)
- Texas doesn't really sell textbooks to other states. Texas is such a huge market that they largely set the standards for textbooks, though. MDB (talk) 19:34, 13 March 2010 (UTC)
- Since when does America mean "Western civilization" or even the "world"?--Earthland (talk) 19:53, 13 March 2010 (UTC)
- Glad I live in my far out corner of the world. Acei9 20:01, 13 March 2010 (UTC)
- A good way to counter this is to make Texas the national laughingstock for that, like what happened to Kansas when they took evolution out of schools. But then again, we may or may not have bold enough comedians to beat that for sufficiently long to have a significant influence. ThiehCP≠Child Porn? 07:36, 14 March 2010 (UTC)
And of course, Listener has reduced it to the Reds. Wisest stupid Hoover! 07:50, 14 March 2010 (UTC)
- (cut from fuss closet) So in study of economics, in addition to learning about Karl Marx, one now has to learn about people who were actually educated in economics, like Milton Friedman. And in political history, developments that do not fit the Marxist model of social progression will not now be ignored. Yes, obviously the end of civilization is on its way.
ListenerXTalkerX 22:54, 13 March 2010 (UTC)
- You're fucking nuts. Ever study a guy named Keynes? Oh, I thunk not. Because you disagree with his conclusions? Maybe. ħuman
09:16, 14 March 2010 (UTC)
- Fuck Listener can you even read? Read the summary of the changes made. If the current Texas books are full of marxist social progression, then apparently the Texans have completely missed the target, because instead they've kicked out Jefferson and the hispanics. Then again, maybe I overlooked the part where they decided to end the current compulsory reading and memorization of the Communist Manifesto.
- I think Listener saw the part about how they're going to claim that McCarthy was right and got all hot under the collar. Then when he found out that they even mention Marx and his philosophy he just couldn't help himself. Bil08 (talk) 10:45, 14 March 2010 (UTC)
- Yes. I hope that one day Listner can get over his McCartyism. Wisest stupid Hoover! 11:05, 14 March 2010 (UTC)
- Human, Keynes is still on the list of economists to study, and he belongs there, since he was actually an economist.
- Bil08, face it, McCarthy was right. His only problem was that he got so reckless and heavy-handed that he managed to disgrace anti-communists to the point where actual communists could get under the radar; this is why I oppose McCarthyism. The specific events I was referring to were the "conservative resurgence" of the 1980s and '90s and the concurrent collapse of communism the world over; while the Red would just see it as a mere speed-bump on the glorious road to socialism, and the wingnut would see it as akin to Christ's Second Coming, the neutral observer would see that it happened and that it has exerted much influence on our political history.
- I much disagree with the removal of Jefferson (although John Locke would probably be a better writer to cite there) and the refusal to add more Latino historical figures (provided that the addition was to correct previous unwarranted exclusion of Latinos, rather than exaggerate their influence for political purposes, but it does not look like that was being attempted).
ListenerXTalkerX 17:46, 14 March 2010 (UTC)
- A hypocrite too? My, my, Listener, you are indeed a man of many faces. Wisest stupid Hoover! 18:01, 14 March 2010 (UTC)
- ???
ListenerXTalkerX 18:02, 14 March 2010 (UTC)
- You don't support disallowing racist neofascists from being teachers, but you do support witch-hunts for commies? Wisest stupid Hoover! 18:07, 14 March 2010 (UTC)
- I support the removal of foreign spies from the government when their presence becomes known, but would not go so far as to support witch hunts (as I have said, several times, I very much disagree with McCarthy's methods). The CPUSA was at that time effectively a Soviet auxiliary, as several "anti-war" organizations were effectively Nazi puppets during World War II.
ListenerXTalkerX 18:14, 14 March 2010 (UTC)
So ListenerX, a quick question: How many "foreign spies" did McCarthy discover? --DamoHi 18:27, 14 March 2010 (UTC)
- He was so reckless and self-aggrandizing that he did not actually get very many, as I understand. As Edward R. Murrow said, he was just exploiting an existing situation for political gain; that he happened to be right about the infiltration threat was no excuse for his tactics.
ListenerXTalkerX 19:28, 14 March 2010 (UTC)
- He was right about the infiltration threat (there has always been the threat that a government can be infiltrated by foreign spies) but was he right when he asserted that the State Department had already been infiltrated? He never proved it, was my understanding. Bondurant (talk) 19:58, 14 March 2010 (UTC)
- I meant the threat posed by the infiltration campaign that was going on. Alger Hiss, for example, was caught as a spy, as were several CIA people; if the evidence from the Venona project had been able to be used, the accusations might not have seemed so reckless.
ListenerXTalkerX 20:08, 14 March 2010 (UTC)
- I have read a lot about McCarthy as I find the whole subject very interesting. From what I understand he didn't actually find any foreign spies at all. --DamoHi 04:58, 15 March 2010 (UTC)
- McCarthy did not, perhaps, but HUAC did.
ListenerXTalkerX 05:11, 15 March 2010 (UTC)
- Which foreign spies did the HUAC find? One, if you count Alger Hiss. And how many false positives? And, bonus question: Who said the HUAC was "most un-American thing in the country today?" Bondurant (talk) 18:33, 15 March 2010 (UTC)
- Besides Hiss, there was Whittaker Chambers, who cooperated and also named Harry Dexter White as a spy, although the investigation was cut short by White's death. There were several other spies named as part of that group as well.
ListenerXTalkerX 18:43, 15 March 2010 (UTC)
- I make that about 6 people then. And the false positives - the 300+ artists who were blacklisted - were these acceptable collateral damage? That and the trampling of freedom of expression? The answer to who said the HUAC was the "most un-American thing in the country today." was Harry Truman, by the way. Bondurant (talk) 21:24, 15 March 2010 (UTC)
- I am not defending HUAC's tactics, only noting that it took a less reckless approach than McCarthy, which brought it more success. As to the Hollywood blacklist, the Hollywood Ten were all Reds and were jailed for contempt of Congress when they refused either to admit it or to plead the Fifth Amendment. I do not think the screenwriters should have been blacklisted, but there was no law compelling the studios to blacklist them.
ListenerXTalkerX 22:20, 15 March 2010 (UTC)
- "the Hollywood Ten were all Reds and were jailed for contempt of Congress when they refused either to admit it..." Silly me. And here I was thinking that there was freedom of thought in this country. TheoryOfPractice (talk) 22:28, 15 March 2010 (UTC)
- Membership in the CPUSA was not illegal at that time. The Hollywood Ten would not have gone to jail if they had admitted their membership, and they would not have gone to jail if they had pled the Fifth.
ListenerXTalkerX 22:33, 15 March 2010 (UTC)
- They wouldn't have gone to jail if they hadn't been dragged in front of a kangaroo court in the first place. Bondurant (talk) 11:00, 16 March 2010 (UTC)
- And as for the 300, let's see who gave evidence to the committee... Walt Disney and Screen Actors Guild president, Ronald Reagan. It was a witch-hunt; once accused publicly, nobody cared if they drowned in the dunking chair or were burned at the stake. Bondurant (talk) 11:07, 16 March 2010 (UTC)
I don't recall making any pronouncements about whether or not what McCarthy did was right. What I did suggest was that you look for the reds and the anti-reds in every news story and then judge what's happened on that basis, because not only are you rapidly turning into some kind of cartoon cut-out paranoid from the 50's, but you've outright lost the ability to evaluate anything in any other way than how it fits into the west's ongoing war against communism. The only thing that the SBOE's changes to the curriculum have to do with communism is the fact that they are attempting to revise history to fit their ideological viewpoint (and of course, you back them) Bil08 (talk) 20:23, 14 March 2010 (UTC)
- Pardon me. I do not "back them" in the slightest. Most of them are ignorant fools and probably would have introduced creationism to the curriculum if they could have gotten away with it. I support the changes only insofar as they remove historical revisionism, which in this case would be that of Marxists and various derivative groups, whose influence in the field of history — even mainstream history — is a fact (which even you seem to acknowledge, going by your admission that historical revisionism has something to do with communism). As you point out, the board also seem to be inserting some revisionism of their own, and I oppose that.
- "You've outright lost the ability to evaluate anything..." Replace "you've" with "communists have," and "the west's ongoing war against communism" with "class struggle," and you will have a true statement.
ListenerXTalkerX 23:44, 14 March 2010 (UTC)
- You are evidently the Odinist version of Andy Schlafly. Wisest stupid Hoover! 16:32, 15 March 2010 (UTC)
- No, Mr. Schlafly has fallen hook, line and sinker for certain Red modes of thought (all issues being political, dissenters being somehow mentally incapacitated, a cultural elite keeping the masses oppressed, certain authorities' pronouncements being a priori incorrect, etc.), even as he rejects explicitly communist politics.
ListenerXTalkerX 18:10, 15 March 2010 (UTC)
Schlafly is a communist, though he doesn't realise it. Were you always this insane? Wisest stupid Hoover! 18:13, 15 March 2010 (UTC)
- One of my examples was an allusion to the time that Mr. Schlafly, in one of his "WTF" moments, classed George Orwell as a "conservative." This was done to cover his rear as he is consistently quoting Orwell's statement that "all issues are political."
ListenerXTalkerX 18:21, 15 March 2010 (UTC)
[edit] Free Will: An Illusion? Interesting. What do you think?Ryantherebel (talk) 01:26, 15 March 2010 (UTC)
- You made me type this. ħuman
01:49, 15 March 2010 (UTC)
- What I think is, "Who is seriously disputing Prof. Cashmore on this?"
ListenerXTalkerX 02:21, 15 March 2010 (UTC)
- The Reds. --The Emperor Kneel before Zod! 03:06, 15 March 2010 (UTC)
- Surely you mean "the creationists"?
ListenerXTalkerX 03:30, 15 March 2010 (UTC)
- This is an interesting discussion. In order for there to be free will, there has to be somthing more to a person than simply the physical body. I don't think it is possible for there to be free will if there is no God. I'd be interested to hear what some of you atheists believe on this issue. --CPAdmin1 (talk) 04:51, 15 March 2010 (UTC)
- If we feel as if we have free will ... (If it talks like a duck and walks like a duck ...) 04:53, 15 March 2010 (UTC) ~~
- (Disclaimer: I am a determinist.)
- CPAdmin1, for there to be free-will, not only does there have to be "something more to a person" than the body, but that "something more" has to affect the body in a manner that violates natural law. There is no evidence of such violations.
- On the other hand, I agree with SusanG; although all our decisions may have been set before the beginning of the universe, they are still our decisions to make.
ListenerXTalkerX 05:22, 15 March 2010 (UTC)
- Quantum uncertainty? Many universes? Stuff of science fiction. 05:29, 15 March 2010 (UTC)
ContribsTalk
- To me such debates all seem so fuzzy without definitions. I understand that even the definitions are themselves debatable... but we can barely have a good discussion without defining what is "free will", a "decision" and a "choice". I've tried and the definitions quickly end up circular and entirely unsatisfying. ONE / TALK 10:58, 15 March 2010 (UTC)
- 1 brings up a good point. What exactly is "free will"? If you define it as a sort of consciousness that cannot be predestined, it falls flat pretty quickly. Tetronian you're clueless 12:07, 15 March 2010 (UTC)
- I would define free will as the idea that our choices are not determined by physical reactions. This requires a consciousness that is outside the body.
- @SusanG: if we have free will, how are the choices made?
- @ListenerX: If decisions are set before the beginning of the universe, how are they still ours?
- --aSKTim 14:11, 15 March 2010 (UTC)
- That's basically dualism, which is unfalsifiable. Tetronian you're clueless 14:41, 15 March 2010 (UTC)
- free will is the ability to select (chose) the grape jelly bean from the jar. You prove this is free will by NOT having the last grape bean but rather lemon or orange. Sometimes close your eyes when selecting to let pure randomness :) enter the arena Hamster (talk) 16:47, 15 March 2010 (UTC)
- You think you are choosing, but isn't it just the neurons in your brain firing based on chemical reactions? You think you are choosing by not taking the grape one, but in reality you were going to take that lemon or orange one all along. You had no choice. What is making the decision?
- Dualism, yes exactly. If some form of dualism isn't true, then it is very hard to argue for free will. --aSKTim 17:04, 15 March 2010 (UTC)
- (EC2) Tim, it is a bit sticky. To state that choices are not "ours" because we must act according to natural law, seems to imply that a person is defined solely by some existence beyond the natural universe (i.e., a person is properly their soul, not their body). However, if one includes a person's body as a part, or even the totality of their existence, this includes the portion of the universe where the decisions are made, so the decisions belong to the person in question even if they are pre-determined.
ListenerXTalkerX 17:10, 15 March 2010 (UTC)
- @Hamster: that isn't "pure randomness," sort of like rolling a die isn't really random. Tetronian you're clueless 18:06, 15 March 2010 (UTC)
- "If some form of dualism isn't true, then it is very hard to argue for free will." How so?
ListenerXTalkerX 18:12, 15 March 2010 (UTC)
- You already answered this question yourself: "In order for there to be free will, there has to be something more to a person than simply the physical body." Physical body + something non-physical = dualism. ωεαşεζόίď
Methinks it is a Weasel 18:56, 15 March 2010 (UTC)
- I thought he meant moral dualism; confusion of terms.
ListenerXTalkerX 19:02, 15 March 2010 (UTC)
- Is the universe determined? That is to say, if we had complete knowledge of the entire universe down to the sub-atomic level would we be able to predict everything that the universe would do from now on out. My understanding is that this is not possible even in principle because quantum processes are probabilistic rather than deterministic. We can predict that 50% of the atoms of a radioactive substance will undergo fission - but we cannot predict which 50%. So some things which happen in the universe are random in the sense that they are not individually predictable. I was going to brilliantly link this into free will at some point but the thought has escaped me. So much for my Nobel prize.--BobIt's windy! 22:02, 15 March 2010 (UTC)
- It is irrelevant to this question whether or not we can know how exactly natural law operates (we will probably never know), but just because we do not know which 50% of atoms will split, does not mean that it was not predetermined, before the universe began, which atoms would split and which would not.
ListenerXTalkerX 22:25, 15 March 2010 (UTC)
- Equally we do not know if it was predetermined.--BobIt's windy! 21:04, 16 March 2010 (UTC)
[edit] Fox News is really Helpful
You know, I have come to realize that I love Fox News and conservative wingnuts. Whenever I start a discussion with someone about politics, I know exactly what key words to listen to. Whenever I hear someone use the word Obamacare, I know that there is no real possibility for an intelligent discussion and I move on. Fox News: Helping liberals recognize insanity. SirChuckBA product of Affirmative Action 19:59, 15 March 2010 (UTC)
- I like the "ram it down your throat" meme. — Sincerely, Neveruse / Talk / Block 20:05, 15 March 2010 (UTC)
- Daily Show did a great sketch on that and the underlying homoerotic content behind the whole thing..... Very funny. SirChuckBCall the FBI 20:15, 15 March 2010 (UTC)
- The Colbert Report had a bit (I saw it on the Sunday Funnies on ABC's This Week with
David Brinkley George StephanapolousHost To Be Named Later.) It featured a graphic of Uncle Sam's head, with the Democrats trying to ram health care down his throat. At which point a Republican Congressman whose name I forget comes up Uncle Sam's throat to block health care reform.... prompting Uncle Sam to begin choking. MDB (talk) 11:00, 16 March 2010 (UTC)
[edit] Jesus Thanks You!
Hello, everyone, this is Jesus Christ, just stopping by to thank you all for buying my two thousand year-old best-seller, the Bible. It was a work in progress, and a hell of a challenge, especially the old testament, but god damn-it, I did it. Some of the Jewish poets that I collaborated with were real assholes, trying to change the plot-line, switch words around, and interject some of they're own philosophy, but they were a mostly helpful lot of guys. We'd come home on Fridays down to my basement and sit around a large semi-circular table, have a couple of martinis, and I'd tell the guys the basic theme of the story, then they'd dress it up, make it look pretty. Of Course, some of 'em didn't like the story. They said, "Why does God have to flood the earth?" and, "You mean Mary's a-virgin?" Some of 'em would even go as far as to change the actual scheme of some of the parts, and that's why certain parts are contradicting to the rest of the work. But, after trial and toil, and three years of hard work and concentration, we got the book finished. Of course, it would be another five-hundred years or so till printing would be invented, but we told it to many other writers of the day, and they wrote it down and translated it. So, thanks, for keeping this historically-inaccurate and racially-suggestive thousand-page piece of propaganda alive and well. And thanks, too, for the money!
P.S. My real name is Jerry.
— Unsigned, by: Jesus / talk / contribs
- Living in 2010 AD sucks. I miss you Jesus. --Swedmann (talk) 21:27, 15 March 2010 (UTC)
- Work in progress? Your disciple says otherwise:
- Revelation 22:18-19
- Although Your coworker/subordinate also have been witnessed to confirm that, ~600 years later. Please, make up your mind. ThiehAsk me for relationship advice 21:55, 15 March 2010 (UTC)
:::::Dead guys dont talk so shutup --Radioactive PIzza (talk) 22:11, 15 March 2010 (UTC)
- This can't really be Jesus. Jesus would write "G-D". --JeevesMkII The gentleman's gentleman at the other site 22:18, 15 March 2010 (UTC)
- Yo Hey-sus, arent you late for your second coming ? Hamster (talk) 23:01, 15 March 2010 (UTC)
- He just cummed/came (I don't know which word it should be) I think. ThiehMonitoring virgin birth experiment 23:16, 16 March 2010 (UTC)
[edit] The TriFuck of Shit
In order to take my mind off of all the bullshit from Beck, O'Keefe, The GOP, Armies of God, etc. I decided to play the original Zelda titles on my emulator (Before you condemn me, I used to have copies of both games, but my NES bit the bullet when I was 12). I can finally say I beat the original game. YAY ME! The second game though, ARGH!!! Enemies should not take away exp. points. IT IS AGAINST THE LAW OR SOMETHING! Instead of calming me down, this game is driving me insane--Thanatos (talk) 00:13, 16 March 2010 (UTC)
- I used to quite like you, Thanatos but ... /00:19, 16 March 2010 (UTC)
ContribsTalk
- Susan does not like games. This saddens me. -- Mei (talk) 00:24, 16 March 2010 (UTC)
- I think it is because I said I use an emulator--Thanatos (talk) 00:26, 16 March 2010 (UTC)
- I now dislike you as a person. -- Mei (talk) 00:29, 16 March 2010 (UTC)
- I used an emulator for a while once, & it ruined my laptop. Just say no. ωεαşεζόίď
Methinks it is a Weasel 00:35, 16 March 2010 (UTC)
- To quote Gendo Ikari "I’m not used to being liked. Being hated, on the other hand, is quite familiar."--Thanatos (talk) 00:39, 16 March 2010 (UTC)
- The original Zelda was my favorite game in the history of gaminghood, but I downloaded it for the Wii, and it was sad and boring. 'Twas kinda nice to play, for nostalgia's sake. Aboriginal Noise Oh, what a lovely tea party! 00:59, 16 March 2010 (UTC)
- If you've got a problem with enemies draining levels, try playing Rogue or Nethack or Angband. You'll get you ass kicked. Come to think of it, S've been playing rogue for probably two decades and still inevitably get my ass kicked. It's sad, in a way. --The Emperor Kneel before Zod! 01:58, 16 March 2010 (UTC)
I didn't realize there was anti-emulator sentiment left among educated members of the internet. Megaten (talk) 20:50, 16 March 2010 (UTC)
- Yeah...what the fuck is with that? If you don't have an NES emulator on your cellphone, you're not as cool as me. — Sincerely, Neveruse / Talk / Block 20:53, 16 March 2010 (UTC)
[edit] Probably nothing, but....
Take a look at this. Any thoughts? Keegscee (talk) 00:14, 16 March 2010 (UTC)
- Heh! it's DMorris playing his silly games. / 00:22, 16 March 2010 (UTC)
ContribsTalk
- I fixed both his odd criticisms just because it seemed like a good idea. Everyone can now be thankful we are no longer a Wikipedia mirror. -- Mei (talk) 00:30, 16 March 2010 (UTC)
- "==Personal vendetta==
- Is this the place for continuing what is apparently a personal vendetta? The user was repeatedly asked to identify breaches of copyright and refused to do so on RationalWiki (see contribs linked to above), it appears to be rather a grudge match caused by his membership of Conservapedia. I recommend that he be told to take his battles elsewhere." [2]
ContribsTalk 00:52, 16 March 2010 (UTC)
- Wow, I didn't realize DMorris created an account here. Hopefully TK doesn't find out. Keegscee (talk) 01:01, 16 March 2010 (UTC)
- Is he still on this shit? Doesn't he have a bible to translate or something.... PS, I love how he still thinks we're hosted by an outside company even though we have pitcures of the server uploaded to the site. What a fucktard. SirChuckBWhatever happened to Skip It? 01:11, 16 March 2010 (UTC)
- The trouble is... he's not wrong. Using CC-BY-SA images without crediting the source does violate the license. I know that this has been discussed ad nauseam elsewhere, but it's a problem that won't just go away. –SuspectedReplicant retire me 01:13, 16 March 2010 (UTC)
- No, he's right, but his "solution" is wrong. And Trent's ISP is not the "contact". I added a section to the main project talk page. ħuman
01:17, 16 March 2010 (UTC)
- Pot, meet kettle. If you're concerned about 2 examples of copyvio here and making vindicating some strangers' rights part of your holy mission, you might find RJJ and JM's persistent (and I mean shockingly flagrant) thievery of non-free-licensed material of particular concern. Cuddles.
02:22, 16 March 2010 (UTC)
Based on that response, I'd say he's obviously more interested in harming RW than about any sort of copyright violation. Keegscee (talk) 02:04, 16 March 2010 (UTC)
- He's wimped out and had the cheek to put a "let's be friends' thing on my talk page! (I've deleted it) 03:14, 16 March 2010 (UTC)
ContribsTalk
OMGD we stole a stop sign from WP!!! How can WP honestly claim that a design made by the US government is CC by SA anyway? ħuman
03:18, 16 March 2010 (UTC)
- There's so much irony in that post that a lesser man would have to resort to cheap jokes involving some sort of irony detection device, possibly including a visual readout of some kind, having a mechanical malfunction.... But being a better man than that, I'll just point out to our friend that Denile ain't just a river in egypt. He points out our article on Wikipedia, but ignores the fact that CP says the same shit but means it. Hey DMorris... Have you seen the ungodly examples of bias on Wikipedia article? I vote DMorris for our new Jinx. SirChuckBBoom Goes the Dynamite 08:26, 16 March 2010 (UTC)
[edit] British Libel laws (bump bump)
Email (Dated 12th - I don't check my mail often enuff):
- What the fuck is this and why does someone keep moving it to the bottom of the article? ħuman
04:03, 16 March 2010 (UTC)
- It's an email received by me. And it's not been moved - it's a new one. It ought to concern everyone as the British libel laws have been used to silence people from all over the world. The matter that brought this up was the complaint by a load of chiropractors against journalist Simon Sing. 04:15, 16 March 2010 (UTC)
ContribsTalk
- Can't you just link to their website or something and mark it "sticky"? I know it's an interesting topic but the emails aren't. ħuman
04:32, 16 March 2010 (UTC)
- I think they are interesting but I've trimmed it down just for you. 04:43, 16 March 2010 (UTC)
ContribsTalk
- Unfortunately Susan's correct, Huw. This is serious shit and British libel laws have a major impact on science & journalism around the world. Read a few of the examples and you will see how wealthy people use the London libel courts to censor anything they don't like. DeltaStarSenior SysopSpeciationspeed! 04:45, 16 March 2010 (UTC)
- PS: It's true about the National Enquirer. 04:47, 16 March 2010 (UTC)
ContribsTalk
- I said I know it's important, but this is a lousy way to spam it. Maybe we kan haz artikle pleez? ħuman
05:05, 16 March 2010 (UTC)
- I'll look at it Tuesday. Off to bed now: dawn chorus has started. That: 05:14, 16 March 2010 (UTC) is the time here
ContribsTalk
- Thanks! ħuman
05:23, 16 March 2010 (UTC)
- Here's the thing, though. I think the libel law is both just and necessary. The problem is not the law, but the cost of fighting a lawsuit. This is a generalised problem for all industries, it's the same problem exploited by patent trolls to extort money from legitimate businesses. It's also a problem that's very hard to fix. While one might argue that libel law has a chilling effect on some legitimate journalism, I have to wonder what else it has a chilling effect on. Is the reason we have no horrific attack journalism like fox news in the UK that there are legal consequences to flat out lying in a defamatory fashion about politicians? There's certainly a discussion to be had. To be honest, I find it very hard to support Simon Singh. He made a lazy sweeping generalisation about a major organisation in print. What exactly did he think was going to happen? If he'd stuck to specifics, and his criticisms were well founded he wouldn't have this problem. --JeevesMkII The gentleman's gentleman at the other site 05:40, 16 March 2010 (UTC)
- I'm not sure that's entirely fair. I agree that his wording was rather lazy, but he certainly was specific - he cite the research that backed up his statement. And his criticisms have indeed turned out to be well-founded, as the 'evidence' produced by the BCA is a laughable collection of irrelevant, inconclusive and/or unscientific 'studies'. If they based their promotion of treatment on that evidence then they are either incompetent or dangerous. The problem is that Singh's words read in one way seem to call them dangerous (they know the evidence isn't there - but they don't care). The real irony is that their whole defence now amounts to 'we are not dangerous, we are incompetent' (they didn't know the evidence wasn't there). What is most worrying really is that their first response was not to accept the offer of a rebuttal, but to sue. Worm(t | c) 10:43, 16 March 2010 (UTC)
- Jeeves, you're wrong and seem to have it a bit backwards. We do have some attack journalism, in fact the UK has plenty - they just cover it up because newspapers can A) afford fancy and expensive lawyers and B) you get away with murder with the word "allegedly". All Singh did was cite the evidence and the claims of the BCA - and then called them on it publicly. The injustice is that the BCA didn't have to lift a finger to get the libel action sought - Singh had to prove that he wasn't slanderous when pretty much every other legal process in the world does it the other way around, where someone suing for libel should have to show that it was actually slanderous first. That's the issue. If someone says that "So and so fucks goats for a living" they should have to prove that the person actually did, otherwise it's lies and slander and yes, they can be done for it. Singh's case is the other way around completely, he challenged them on the evidence and they sued to shut him up - if anything the BCA assert things without evidence so it's they who are guilty of slander, in a way. The result of the case existing is marginally positive, however, in that people now know a lot more about chiropractic medicine than before; the public conciousness may have just dismissed it as just some people working on back pains, but this case has brought to light the outlandish claims that aren't backed up with evidence.
narchist 12:12, 16 March 2010 (UTC)
- What you just said is so fractally wrong, I'm not sure where to start in explaining why you're wrong. From what you wrote, I'm reasonably sure you've never actually read the article in question. Singh didn't present evidence, he presented an anecdote. He used the anecdote to imply that all chiropractic treatments were both dangerous and inefficacious. I'm sceptical about whether chiropractic treatments have any value myself, but if you do this for a living and you really believe there is evidence that what you do works, then this is certainly a libellous contention.
- Secondly, in no instance is any plaintiff in a lawsuit ever required to prove their case before it is brought to trial. Your suggestion that they should is insanity.
- Thirdly, go back and reread what you said. Notice the gaping internal inconsistency? I hope so. Do try and at least make what you say make sense in and of itself, even if it conflicts so heavily with reality. --JeevesMkII The gentleman's gentleman at the other site 20:05, 16 March 2010 (UTC)
[edit] At some point in our mutual sobriety, Goonie and I decided to take over your wiki
We think the criteria for sysops and 'crats should be "slightly" better vetted. ħuman
07:03, 16 March 2010 (UTC)
- we have never had 'crat problems. Acei9 07:05, 16 March 2010 (UTC)
- My concern was mostly, if I remember correctly, that we have a standard of "mostly harmless" for sysops, when I think the bar should be raised to "mostly useful" or the like. The Goonie 1 What's this button do? Uh oh.... 07:07, 16 March 2010 (UTC)
- Why not. Perhaps bring it before the LJ? Acei9 07:08, 16 March 2010 (UTC)
- "Mostly harmless" was the invention of RA who simply hated the red exclamations points, and sysopped everyone in sight. 'Twas never the best idea. I don't like to argue with Ace, however, because he might come here and kill me. ħuman
07:11, 16 March 2010 (UTC)
- Nothing to argue about. Acei9 07:13, 16 March 2010 (UTC)
- I've been in favour of this for quite a while, it's only been fear of "being just like CP, OMG!!" that's kept us from making sysops actually useful. Give block powers, page move and some other similar stuff to sysops, raise the bar to "proven useful or at least we know you well" rather than "had an account for more than 30 seconds", leave stuff like article creation and other day to day stuff to any member and set BoN's to editing only every 5 minutes or so, but no goodies beyond straight editing of existing articles. Simple. Done. Don't much care about 'crats, we haven't had a lot of problem from that direction so don't mess with it. --Kels (talk) 13:23, 16 March 2010 (UTC)
What Kels said...TheoryOfPractice (talk) 13:28, 16 March 2010 (UTC)
- I have created a debate (or vote) about this topic here: [3]. I hope that is okay. -- Mei (talk) 18:25, 16 March 2010 (UTC)
[edit] Omigod
ħuman
07:04, 16 March 2010 (UTC)
[edit] Calling the LJ.
How do we call the lazy bastards to a meeting? ħuman
08:29, 16 March 2010 (UTC)
- Perhaps intecom? Acei9 08:33, 16 March 2010 (UTC)
- We don't have our fucking badges, let alone an intercom channel! Qnd Qhy Os Tour Skypey So WEirF? ħuman
08:38, 16 March 2010 (UTC)
- Is there a reason to call them that falls within their purview? The LJ do not run RW, they arbitrate specific disputes. If you want to change policy on sysopping or cratting, that's a matter for the whole community.--
talk
09:35, 16 March 2010 (UTC)
- AD has a good point. But I think Huw was asking a hypothetical question anyway. Tetronian you're clueless 11:37, 16 March 2010 (UTC)
- Tet's right, my mistake was in the header level, making it look like this was part of the sysopery discussion. ħuman
22:48, 16 March 2010 (UTC)
- TOO LATE YOUR TYRANNY IS EXPOSED - THE SKEPTICS WERE RIGHT ALL ALONG LET'S CLOSE RW.--
talk
00:00, 17 March 2010 (UTC)
- That's not what I said. --94.197.22.135 (talk) 00:14, 17 March 2010 (UTC)
- This isn't a Leatherjacket matter. Throw it to the mob. Totnesmartin (talk) 16:44, 16 March 2010 (UTC)
- I recommend projecting a massive "brain in brackets" sign into the air.
narchist 17:05, 16 March 2010 (UTC)
- I didn't think that changing policy was part of the Loya Jirga's role --92.41.65.248 (talk) 17:38, 16 March 2010 (UTC)
It's not. See AD's comment above. TheoryOfPractice (talk) 17:59, 16 March 2010 (UTC)
- Didn't mean to offend. --94.197.22.135 (talk) 00:14, 17 March 2010 (UTC)
[edit] On snark
I'm on the fence about the whole idea of SPOV and snark. There's nothing wrong with making an intelligent discussion humorous, but I don't think that snark is always justified. After all, isn't it the same as a creationist snidely adding "I'll pray for you" after making their point? As rationalists, shouldn't we patiently and calmly refute false arguments without spiteful add-ons? Granted, I realize that a lot of snark is rooted in frustration, since the YEC crowd simply won't listen to reason. But even so...does that justify obnoxiousness? I'm not sure. Tetronian you're clueless 13:30, 16 March 2010 (UTC)
- I'm in favour of a bit of snark, but not as a substitute for reason. It does at least stop us turning into
dullsvillewikipedia. Totnesmartin (talk) 16:39, 16 March 2010 (UTC)
- Precisely. The reason that "snark" exists is because Wikipedia is as dry as those arid regions of Antarctica. But it shouldn't be at the expense of well researched, well written and well sourced arguments - it should be added to enhance the readability of those arguments.
narchist 16:46, 16 March 2010 (UTC)
- Yep, there has to be a decent fact to snark ratio. We have fun space anyway for stuff that's intended to be more funny than factual. --
Ask me about your mother 21:46, 16 March 2010 (UTC)
[edit] Crazies on TV
So I decided to turn on the TV while cleaning up the apartment and the first thing I see is Kirk Cameron on NBC. Switching over to ABC I'm greeted with Jesse Ventura. Waiting to see who CBS will throw at me. Maybe Ken Demyer? DickTurpis (talk) 14:35, 16 March 2010 (UTC)
- Did you try Fox News? I'm sure they'll take the cake. Tetronian you're clueless 14:43, 16 March 2010 (UTC)
- Don't have cable, so I can't. Though, now that I think about it, it seems Kirk was sitting in for Kathy Lee, so it doesn't increase the craziness by much. DickTurpis (talk) 14:59, 16 March 2010 (UTC)
[edit] Sizing Up Sperm game @ National Geographic
Did you play the sperm game at NG website? it's fun to play. the prequel to this video game is a lot better though. Mr.Orange (talk) 18:20, 16 March 2010 (UTC)
- It was much more difficult than I expected. Tetronian you're clueless 19:33, 16 March 2010 (UTC)
[edit] Default search options
Since we're looking at updating a few things, I think the default search options could do with reviewing. Currently, for new users & anyone who hasn't set their own preferences, searches show results for: *Main *Essay *Essay Talk *Conservapedia *Conservapedia Talk. This seems rather out of date. I would suggest adding at least Forum & RationalWiki, & maybe removing CP (depending how others feel about this). If it's going to include Essay, it could have Debate as well, but I don't think they're essential, & I don't think talk pages (i.e. Essay Talk, CP Talk) should be in default searches at all. It could include Funspace too, as it contains a lot of things that were moved from Main, although it is mixed bag of mostly crap, so maybe not. What does anyone/everyone else think? ωεαşεζόίď
Methinks it is a Weasel 21:11, 16 March 2010 (UTC)
- Did you check search recently? I've enabled the new UI which has become default in MW 1.16. The categories aren't set up correctly, I have to figure out which settings control them. These are the default categories:
- Content pages
- Multimedia
- Help and Project pages
- Everything
- Advanced (this shows the old box with a thousand checkboxes - the default search options still apply here)
- You can debate what should go into which category. E.g. should Debate go into content? Also the old search UI is unavailable in MW1.16, so if you don't like the new one, tough luck. -- Nx / talk 21:36, 16 March 2010 (UTC)
- Nice, that's way better than the old help return. I like the hyperlinks to broaden a search, can we add a few more? Like all the namespaces and all their talkspaces? ħuman
22:55, 16 March 2010 (UTC)
- π 21:38, 16 March 2010 (UTC)
- OK, so which namespaces are in the "content" bit? It seems pretty similar to the old defaults (i.e. main, CP, essay). & Does the forum come under content, project pages or neither? ωεαşεζόίď
Methinks it is a Weasel 21:43, 16 March 2010 (UTC)
- Content uses the same setting as the old default. I just changed it to Main, CP, Fun, Essay, Recipe. The tooltip shows you which namespaces are searched btw. Project files currently contains User and Category, but in MW1.16 "Help and Project" is by default Help and Project. -- Nx / talk 21:47, 16 March 2010 (UTC)
- Also, the settings in preferences only applies to the Advanced option. -- Nx / talk 21:50, 16 March 2010 (UTC)
- And finally, in MW1.16 there's a new preferences system, which allows me to specify the defaults for any setting that will apply to any user who hasn't customized the setting. I can use that to specify the search defaults. Currently I'd have to edit the setting which determines what goes into the Content category, and it wouldn't update existing users' settings. -- Nx / talk 21:54, 16 March 2010 (UTC)
Talk pages should DEFINITELY be searchable/included in seach so that when I want to reference something stupid I said weeks or months ago, I can find it...TheoryOfPractice (talk) 22:32, 16 March 2010 (UTC)
- I second that. We do a lot of stuff on talk pages, and there are some real gems in there. --
Ask me about your mother 22:33, 16 March 2010 (UTC)
- They are searchable, but you have to either use the Everything option or select specific namespaces in Advanced. -- Nx / talk 22:34, 16 March 2010 (UTC)
- Ah, thanks. The everything search is a nice time saver. --
Ask me about your mother 22:57, 16 March 2010 (UTC)
[edit] In regards to a certain super secret discussion group starting with a 'z'
I was wondering if it would be allright to create a page in which we indicate which pages contain interesting material (e.g. "see pg 884 for the discussion on TK copying the UCLA article from WP, and see how Geo bends over backwards and how Andy ignores the issue"), as this would allow people to get their laughs without having to trawl through a large volume of uninteresting material (e.g. "Gentlemen, expect to see a certain page starting with an E rise up the rankings of a certain search engine starting with a G!"). There's some really enlightening stuff there. Also, feel free to memory hole this if it shouldn't have been said. EddyP (talk) 10:07, 17 March 2010 (UTC)
- It's on the internet, co memory-holing would be silly. The link is here for those who haven't figured it out yet...RationalwikiwikiUndergroundResistor (talk) 18:09, 17 March 2010 (UTC)
[edit] Happy Patrick's Day
To all Irish, and people who once a year claim to be Irish on account of owning Riverdance and being an admirer of all things quaint --
Ask me about your mother 14:57, 17 March 2010 (UTC)
- There was an SNL sketch, years ago, which featured a reporter in what she thought was an Irish themed pub, with the line "today be Saint Patrick's day, the day when everrrrrrybody's Irish!" And she mentioned some famous Americans of Irish descent, like "Donald O'Connor. Tip O'Neill. Wendy O. Williams."
- As it turned out, though, she was in a Jewish bar, and that year, Purim and St. Patrick's day were the same day, so it became, "today be Purim, the the day when everrrrrrybody's Jewish!"
- Me, my ancestry is Scots, Dutch and English, so, despite my company bringing in the very traditional Irish breakfast of doughnuts and bagels, I'm lobbying that we should celebrate Pi Day next year. There's more geeks than Irish Catholics here anyway.... MDB (talk) 15:48, 17 March 2010 (UTC)
- Slap a bit of black pudding on that bagel and you'll be halfway there. Yup, pi day is my favourite new tradition. --
Ask me about your mother 16:13, 17 March 2010 (UTC)
- I'm mixed, African American and Irish. I celebrate St. Patty's Day, but I do it by drinking malt liquor. SirChuckBBATHE THE WHALES!!!! 17:20, 17 March 2010 (UTC)
- I'm mixed English/Irish heritage. I'm celebrating by drinking Guinness, which tonight is £1 a pint in the students' union. SJ Debaser 17:27, 17 March 2010 (UTC)
- Half-Irish and quarter-German. Rest is muddied up (some small fraction is Native American). Bring on the shamrock shakes!--Thanatos (talk) 18:00, 17 March 2010 (UTC)
- I am of the same nationality as St Patrick and shall celebrate in the traditional way (puts kettle on). Totnesmartin (talk) 19:38, 17 March 2010 (UTC)
- I am technically all Irish but have lived in Scotland all my life, so I am Confused. Wisest stupid Hoover! 20:50, 17 March 2010 (UTC)
- Sorry Chuck, but no Irishman (or woman) would refer to it as St. Patty's Day, it's St Paddy's Day! I'm Engligh, so happy "Take advantage of all the Guinness promotions and get leathered on the black stuff Day"! DeltaStarSenior SysopSpeciationspeed! 23:40, 17 March 2010 (UTC)
- Remember, I'm Irish AND Black. In our community it is "St. Patty's day." Mostly because we spend most of the getting patted down by cops and security. SirChuckBA product of Affirmative Action 23:46, 17 March 2010 (UTC)
- Do you play the bass, have a large afro and a 'tache? Or am I stereotyping black Irishmen? (Does that even count as stereotyping, as I can't think of any other famous black Irish fellas - although Phil Lynott is right up there in my list rock stars so it's quality rather than quantity) DeltaStarSenior SysopSpeciationspeed! 23:55, 17 March 2010 (UTC)
[edit] Just a minute
I claim an extra point for not being interrupted for 100 edits without hesitation, deviation or repetition. (here) (10 days & >100 edits) 15:39, 17 March 2010 (UTC)
ContribsTalk
- Pffft. In high school forensics (debate/speech), I remember being able to speak for SIX minutes on a freshly given random topic with no preparation, deviation, or repetition. Amateurs! --The Emperor Kneel before Zod! 23:46, 17 March 2010 (UTC)
- Although I think your project has value, doesn't your brag also imply "no one else gives a shit"? (enough to edit it, that is. How are you ranked on a search page beginning with G? ħuman
03:15, 18 March 2010 (UTC)
[edit] Log In Difficulties
I am trying to log in, but always get a "not a valid user name" message. What gives? (RationalwikiwikiUndergroundResistor). AlsoRWWUR (talk) 17:58, 17 March 2010 (UTC)
- Thanks, NX--what was the problem? RationalwikiwikiUndergroundResistor (talk) 18:07, 17 March 2010 (UTC)
- Your name was longer than 32 characters. I limited usernames to 32 characters because someone was spamming us with extremely long usernames. I did not know it would also prevent existing users with long names from logging in. I apologize for that. I've increased the limit to 64 characters now, I hope that is reasonable. -- Nx / talk 18:11, 17 March 2010 (UTC)
[edit] Some assistance requested
This paper, which is also mentioned somewhere on TWIGO:CP, seems to be somewhat on-mission. I have two requests:
- Does anyone know how to upload it and put it in the proper format to do a side-by-side?
- What is your opinion of it? The abstract seems to indicate that it is some kind of postmodernist diatribe, but I'm not sure.
Thanks, Tetronian you're clueless 21:31, 17 March 2010 (UTC)
- The first step will be converting it in to text. I haven't used these myself, but there are some online OCR tools available. The side-by-side bit is fairly straightforward once you have the scanned images converted in to text. --
Ask me about your mother 21:50, 17 March 2010 (UTC)
- At 40 pages long, my advice would be not to even attempt side-by-siding the whole thing. Look around RW & you'll find loads of cases where people started overambitious side-by-sides (like the entire Bible) & lost interest, leaving pages of text in a left-hand column, with just a few stray comments on the other side. With something like this, it's better to just quote the parts you want to comment on & comment on them, as a selective side-by-side, + link to the document so readers can read the whole thing if they want. ωεαşεζόίď
Methinks it is a Weasel 22:07, 17 March 2010 (UTC)
- That's a good idea, thanks Weaseloid! I'll do it that way instead. Tetronian you're clueless 22:20, 17 March 2010 (UTC)
- Yes, I made a long SBS awhile back, and it doesn't work. There seems to be a sweet spot in terms of length. Šţěŗĭļė buttoneer 03:05, 18 March 2010 (UTC)
- Yes, what works best is when the source can be broken into coherent segments. I think Sterile brought us one of our best ever (some crap by some IDiot). It working depends on the style of the original. If it's 20 simple paragraphs, it works great. Especially if it is really on mission, because then everybody cares and contributes. ħuman
03:44, 18 March 2010 (UTC)
- PS: RationalWiki:Side-by-Side Template FYI Šţěŗĭļė buttoneer 03:30, 19 March 2010 (UTC)
[edit] how the hell do i become a bureaucrat around here?
just curious what i have to do to get demoted/promoted to bureaucrat.
im pretty ACTIVE here and made a bunch of article and plan to make more this week and expend those i made.
so what are the requirement for bureaucrat?Waronstupidity (talk) 02:01, 18 March 2010 (UTC)
- Requirement Number One: Not asking about how to become a bureaucrat. Sorry. TheoryOfPractice (talk) 02:38, 18 March 2010 (UTC)
- really? wow that suck.......... i ask one question and get banned from the list..........really sad, really sad indeed!Waronstupidity (talk) 02:41, 18 March 2010 (UTC)
- It just happens--Thanatos (talk) 02:57, 18 March 2010 (UTC)
- well that reason is stupid i hope you guy are joking......... i just asked a question for Stephen Hawking sake.Waronstupidity (talk) 02:59, 18 March 2010 (UTC)
- k, I vote you guys make Stephan Hawking an honorary crat ... Hamster (talk) 03:19, 18 March 2010 (UTC)
- When you learn to speill and how to capitalize. And meibe not even then, you silly person. ħuman
03:54, 18 March 2010 (UTC)
- dont make me declare an atheistic jyhad on yo ass!Waronstupidity (talk) 03:57, 18 March 2010 (UTC)
- In all seriousness, becoming a crat is a bit more involved than becoming a sysop. The current criteria for sysopship is "mostly harmless" (I know it is under discussion), but becoming a crat takes a couple of months. RationalWiki doesn't give cratship to everyone. The general statement is, stick around for a few months, generally be nice, people will like you, and someone will start a Saloon Bar post saying "Waron for Crat", and people will vote there. ĴαʊΆʃÇä₰ no fate but what we make 04:08, 18 March 2010 (UTC)
- kk well thank you buddy :-)Waronstupidity (talk) 04:12, 18 March 2010 (UTC)
- Be around long enough & useful enough that most people know who you are & appreciate what you do. If you're doing a good job, eventually will somebody may nominate you. ωεαşεζόίď
Methinks it is a Weasel 07:39, 18 March 2010 (UTC)
- Don't believe what Weaseloid says, Waron. Sigh. Editor at CPmały książe 09:04, 18 March 2010 (UTC)
How the HEll do I become the ruler of the wolrd? Oh wait I'm alredy THE RUELER OF THE WORLD!!!! Bwahahahahahahahahhahahaahha!!!!--Radioactive PIzza (talk) 07:34, 18 March 2010 (UTC)
[edit] Alex Chilton is dead...
That sucks. TheoryOfPractice (talk) 02:43, 18 March 2010 (UTC)
- sure it suck!Waronstupidity (talk) 02:52, 18 March 2010 (UTC)
- FUCK, you're kidding, right? That was my favorite Replacements song... another bit of red left my atlas today.... ħuman
03:55, 18 March 2010 (UTC)
In memoriam ħuman
04:09, 18 March 2010 (UTC) I'll find a better placemats video.
- Westerberg maybe at his best? Who knows. Studio link to follow. ħuman
04:15, 18 March 2010 (UTC)
- More Paul live Saving you the trouble of typing "Alex Chilton Replacements" into the utube box... I am being barely useful :) ħuman
04:18, 18 March 2010 (UTC)
- At least he "died in Memphis"... wouldn't that be cool? Comment from the studio link above:
- "I like how most of the RIP's I've seen have been on comments to this video, not on actual Chilton stuff.
- RIP Alex Chilton" ħuman
04:23, 18 March 2010 (UTC)
- Fuck, I hate the "dead rock stars" thing. (In that it breaks my heart) Kan we haz snartikle? ħuman
09:18, 18 March 2010 (UTC)
- 27 club perhaps? Totnesmartin (talk) 13:54, 18 March 2010 (UTC)
[edit] Tea Party attacks Parkinson's victim
This makes me sick. These people actually think they are good Christians!? Good People!? I hope they burn in hell and are beaten with salt covered baseball bats!!!--Thanatos (talk) 05:17, 18 March 2010 (UTC)
- Sad to say that these are the people who get the coverage. SirChuckBObama/Biden? 2012 07:01, 18 March 2010 (UTC)
- Vile individuals.
narchist 11:41, 18 March 2010 (UTC)
- Heartless behavior, and not very good PR for the teabaggers I would think. On a side-note the male presenter is an obvious parodist. He started out with the nick Bunger. Can't believe everybody accepted that his real name was "Brian Unger". Internetmoniker (talk) 12:56, 18 March 2010 (UTC)
- I don't understand how one is supposed to debate with these people. EddyP (talk) 13:29, 18 March 2010 (UTC)
- Brian Unger was the best guy on the Daily Show back in the Kilbourn days. DickTurpis (talk) 13:33, 18 March 2010 (UTC)
- Wow, just wow. Ryantherebel (talk) 14:04, 18 March 2010 (UTC)
Brian Ugler was better TheoryOfPractice (talk) 14:43, 18 March 2010 (UTC)
[edit] Hello
I happened upon this youtube video: and notice that there is a long comment debate regarding wither mercury causes/is a cause of autism or not. I also realized that I actually had no idea. The video is from a university, a search seems to come up with a 2003 BBC article saying "mercury linked to autism" but then other results from 2010 say "no it's not", and some sites sound suspiciously like anti-vaccination-ers (apparently a vaccine had mercury particles or something), and so on. So errr, what's going on there? Opinionated Opinions appreciated. Sen (talk) 03:40, 18 March 2010 (UTC)
- Search this site for "vaccine" and/or "mercury" I think you'll find your answers, or at least some new questions. ħuman
04:20, 18 March 2010 (UTC)
- In a nutshell, mercury - and especially organometallic compounds of it - has a tendency to be quite toxic. Thimerosal is a preservative used in vaccines (our article explains why) which happens to contain mercury. So considering the "mercury is bad" meme combined with the ability of the anti-vaccination crowd to shoehorn anything to fit their ideas, the hypothesis emerged that autism was caused by mercury. There is, of course, very little evidence to back this up; the causes of autism are varied and complex - one of the few identified causes is the measles virus itself. One study on whether mercury compounds (namely thimerosal) were bioaccumulative in humans turned up negative, with mercury levels reaching undetectable levels within a day of injection with a vaccine and mercury-containing preservative. Although to my knowledge it does accumulate in aquatic life but that's a danger mostly unrelated to vaccinations. Most of the mercury based arguments are moot, however, as A) thimerosal is only used in a few vaccines B) it's being completely phased out so shouldn't really be in any vaccines of the last decade or so.
- Your 2003 BBC article would have been from the height (or at least just after the peak) of the great MMR scare/hoax following the media getting hold of and widely reporting Andrew Wakefield's 1998 case study report. The media attention sparked off a lot of research and many people were eager to see results as quick as possible - therefore any study would have been reported and you see a "oh yes it is, oh no it isn't" effect in the popular press for a good few years. By the time the systematic reviews or more thorough studies had been done (the ones that pretty much conclusively disproved the autism link - not that there was any proof to disprove in the first place) in the last few years the media hype had died down and the general public were left with a feeling of confusion as the more conclusive reports weren't widely circulated.
narchist 11:30, 19 March 2010 (UTC)
- But having read through the comments, I can safely say that the most coherent and accurate one is the guy who says "Bullshit this is the cause of autism. That is inconclusive." The arguments along the lines of "rising cases of autism" don't hold: there's a greater willingness to diagnose "autism" these days whereas in the past they'd have just said "retarded", this was shown by assessing a large group of adults using the same methodology as used today to diagnose children - autism rates in reality have remained unchanged. The one claiming that mercury "never leaves the body" is untrue, it accumulates primarily in the environment and in fish, humans tend to get rid of it quite quick. And finally, the video itself is an in vitro study - quite clearly too. This is pretty much along the same lines as the famous Daily Mail headline proclaiming that turmeric cures cancer - this was done by tipping large quantities of the material onto a petri dish of cells. This may not necessarily extrapolate to an in vivo situation (indeed, with the turmeric example, it physically can't as you'd have to eat 20 curries a day to get it to work) and it's similar with mercury, if you ingest a massive amount of it at once you'll notice, but otherwise you just don't experience any side effects of exposure.
narchist 11:38, 19 March 2010 (UTC)
[edit] Avatar vs Hurt Locker
- Moved to Forum:Avatar vs Hurt Locker
This was branching off a lot and getting confuddled so I've moved it and split it up into the areas that seemed to be appearing.
narchist 16:35, 19 March 2010 (UTC)
[edit] US got left behind...
On the 2-Day high speed train from London to China. FML. ĵ₳¥ášÇ♠ʘ unrefined wildebeests plagiarize me... 20:00, 18 March 2010 (UTC)
- China does seem to have got the idea off the US that a hegemony can be more effective than an empire. - π 22:20, 18 March 2010 (UTC)
- And picking up the tab... I am really, really scared of China now.
narchist 11:18, 19 March 2010 (UTC)
- Yup. It's amazing how much of an economic powerhouse China is now. Tetronian you're clueless 15:04, 19 March 2010 (UTC)
[edit] PCHS/DMCA/Cheerleaders...
Can somebody please explain to a slightly slow, slightly out-of-touch middle-aged white guy what the hell is going on with this bit of trollery? TheoryOfPractice (talk) 02:42, 19 March 2010 (UTC)
- Some very concerned high school students have found us. ħuman
04:18, 19 March 2010 (UTC)
- Someone wanna help a brother out and explain? SirChuckBA product of Affirmative Action 05:43, 19 March 2010 (UTC)
- Cheerleaders. They are stupid. Really. Check the links at CP. They came here because we have a "url" that any illiterate teenager can click on. They are really angry that wikipedia hates them. If none of that made sense, that's because I've followed the whole story and none of it makes sense. Go to utube and search for, um, cheerleaders. Plus I forget the town, but "bloomers" ought to do it. Just not in front of Mrs./Ms./Mr. B. ħuman
10:08, 19 March 2010 (UTC)
- So "cheerleaders" are what exactly? When I try to find out more about them I'm taken to pron sites. Could someone explain to this Brit what they do? After a bit more investigation I seem to find that they are dancers in some foreign country, but what is their political affiliation? What are their social objectives?--BobIt's windy! 15:36, 19 March 2010 (UTC)
narchist 16:08, 19 March 2010 (UTC)
- A Cheerleader Willem de Zwijger (talk) 16:20, 19 March 2010 (UTC)
- Does Cheerleader refers vaccine hysteria? I have no idea what PCHS refers to, and DMCA is someone trolling about copyright violations of some of our images without specific examples. Thieh[Talk needed] 01:05, 20 March 2010 (UTC)
[edit] Sean Hannity is running a huge scam
The Freedom Alliance charity, that raises money for wounded soldiers and survivors of fallen ones -- only three percent of its proceeds actually go to the stated purpose.
Hannity apparently insist on being flown around in a private jet, and a fleet of luxury vehicles for him and his family on the ground.
And this isn't a liberal making this charge -- its hard core right wing Ann Coulter wanna-be Debbie Schlussel.
MDB (talk) 17:39, 19 March 2010 (UTC)
- A lot of charities give out an embarrassing 10-20%, but this is a new low. Is he being investigated for this? - π 01:29, 20 March 2010 (UTC)
- Not kidding about the Ann Coulter wannabee. - π 01:32, 20 March 2010 (UTC)
- Mike Malloy said he will shortly be posting Freedom Alliance's tax form, whatever that might mean. Oh, yeah, what they spent their money on. ħuman
01:55, 20 March 2010 (UTC)
- We have an article on Sean Hannity, right? We should add... ħuman
04:03, 20 March 2010 (UTC)
- You might want to check this first. --TK/MyTalkRW User #45 05:14, 20 March 2010 (UTC)
[edit] Religious respect
There was a good opinion piece in today's Independent by Johann Hari entitled "The Pope, the Prophet, and the religious support for evil". Lily Inspirate me. 19:56, 19 March 2010 (UTC)
- Thanks for sharing, but links are appreciated. ωεαşεζόίď
Methinks it is a Weasel 20:03, 19 March 2010 (UTC)
- Sorry Weasley, my bad. I copied the link and then forgot to paste it in. Too many Bacardis after a rough day at work. Lily Inspirate me. 22:51, 19 March 2010 (UTC)
- That's the guy behind one of my favourite quotes ever. "All people deserve respect, but not all ideas do.... When you demand "respect", you are demanding we lie to you. I have too much real respect for you as a human being to engage in that charade." He's kind of a more restrained and better thought-out version of me when I wrote this. It is a great point to be made that religion is the only idea that asks to be held above any and all inquiry. Like someone on the Atheist Bus Campaign Facebook group said recently something along the lines of "I'm an atheist but... isn't this a bit like forcing it down people's throats disrespectfully?" Nice sentiment, but I doubt it'd be repeated for any other minority movement. Can you imagine a memeplex that allowed people to say "I'm a vegetarian, but, should we really be telling people about the conditions stock animals are kept in?" or "I'm an environmentalist but isn't it a bit much to raise awareness of the environment, we should respect people who continue to cause excessive pollution" or even "I'm gay, but this idea of gay dating, or gay clubs or even any targeted welfare is wrong" (well, the third one I have seen and it's a little more complex). Hari is perfectly right though, in any other sane society the Pope would be pulled up for aiding and abetting criminals - because that's what it damn well is.
narchist 20:35, 19 March 2010 (UTC)
[edit] Iraq War Anniversary
4,703 allied troops dead.
95,680 - 104,382 Iraqi civilians dead.
$747.3 billion spent, and no end in sight.
Heck of a job, huh?Ryantherebel (talk) 22:56, 19 March 2010 (UTC)
- And the Iraqi soldiers count too. Most of them were conscripts. — Pietrow ☏ 11:36, 20 March 2010 (UTC)
- So much for "Mission Accomplished"... --PsygremlinPrata! 11:45, 20 March 2010 (UTC)
[edit] Potential group of articles
Inspired by WIGO:Clogs, should we take a look at this and attempt to debunk each of them? I am currently unemployed so I got the time to look at it, but not the money to get the whole set ($100). Or if all of us are cheap bastards perhaps some of us can ask their local priest to spent money for a copy in church and take some OCR's once they are in? ThiehZOYG I edit like Ken! 18:58, 20 March 2010 (UTC)
- Certainly worth checking. We got several articles that side-by-side lists of proofs like this. I like doing them because I believe we shouldn't let it go unchallenged. Some things you can't debunk (the Not Even Wrong camp, for example) but challenging is certainly worth doing as many of these things just state "facts" and then draw conclusions in an ad hoc manner that should be brought to attention. So yeah, worth doing if we can find a format for it.
narchist 23:15, 20 March 2010 (UTC)
[edit]
Nigger!!! Faggot!!! Mr. Congressman!
Tea Partiers greet their members of Congress..... Fantastic. TheoryOfPractice (talk) 00:56, 21 March 2010 (UTC)
- Un. Be. Fucking. Lievable. –SuspectedReplicant retire me 01:26, 21 March 2010 (UTC)
- I suppose the general nuttiness being cultivated by the right should burn itself out at some point, and hopefully cause a loss of support, but it seems that America has an amazing tolerance for batshit crazy. --
Ask me about your mother 02:03, 21 March 2010 (UTC)
- It's been burning bright (not really!) for thirty years now. When will the pendulum finally swing back? ħuman
02:32, 21 March 2010 (UTC)
- I reckon it'll coincide with someone finding the remains of the Statue of Liberty on a beach. --
Ask me about your mother 02:34, 21 March 2010 (UTC)
- Oooh, Pierre Boulle! ħuman
02:39, 21 March 2010 (UTC)
- (EC) Depends: if one of these populist loons gets elected, then the left will swing into conspiracy theory mode. Overall, though, I think nowadays paranoia is nothing more than a sideshow that only distracts from the real issues, unlike in previous eras in which it was a major factor. (Examples: The Protocols of the Elders of Zion, McCarthyism, etc.) Tetronian you're clueless 02:41, 21 March 2010 (UTC)
- One of them??? We had eight years of Reagan and eight of Bush the lightest. Of course, oddly, they both jacked up the federal budget in record-breaking ways. But they both hated taxes. Oh, yeah, and faggots and niggers. ħuman
02:45, 21 March 2010 (UTC)
- I wasn't around for Reagan, but Bush Jr. did create some humorous conspiracy theories on the left, namely that 9/11 truther stuff ("Bush knew about 9/11 beforehand"). But, again, that was merely a sideshow. My point is that if someone like Palin gets elected, then the left will employ the paranoid style, too. Tetronian you're clueless 02:49, 21 March 2010 (UTC)
- Do you care to elaborate? Considering how fractured the "left" is in the US? ħuman
03:02, 21 March 2010 (UTC)
- Remember how fractured the right was in November? Look at them now, mobilized and fortified with conspiracy theories. My point is simply that having a persecution complex is non-partisan. If in 2012 we elect a far-right President (which is not too unrealistic), then it will be the left's turn to spread bullshit. It seems to me that whichever party or demographic feels the most down-and-out, the more they listen to their fringe. Tetronian you're clueless 03:08, 21 March 2010 (UTC)
This isn't really about conspiracy theories or "spreading bullshit," or about a political movement being unified or disjointed. It's about people feeling justified to use violent and hateful language because they are unhappy with a political process. TheoryOfPractice (talk) 03:13, 21 March 2010 (UTC)
- Yes, but the two often go hand in hand. Case in point: the incident in question. Tetronian you're clueless 03:17, 21 March 2010 (UTC)
- 9ec)It's about hate, yes. I'm not even sure it's because of some process - it's because they hate "niggers and faggots". Which really makes me want to puke. ħuman
03:20, 21 March 2010 (UTC)
- I love it personally. The pure hatred that the teabaggers have tried to cover with fancy linguistic gymnastics has been showing through the cracks for years (See the Obama Witchdoctor and the "Zoo has an African Lion..." signs) but now that these people have been carefully stoked and led into thinking that they speak for the Americans who hate this bill but are too afraid to speak out, they're showing their true colors. It's one thing to hold a protest and even to enter your Senators and Representative's office to speak to them, but to advertise the event as "storming the palace," aside from giving me an excuse to use my Billy Crystal impression to annoy right wingers, really shows exactly how you think. SirChuckBA product of Affirmative Action 04:16, 21 March 2010 (UTC)
[edit] Freakout
So I'm watching my local PBS station hoping for the vicker of dibbley or some such, and I see this scrawny freak doing some wooish crap like an infomercial. I'm on the verge of calling in and asking wtf, when guess what? They're using this moron to run a fundraiser! So I called the 800 number and said my piece.
Daniel Amen wp: Daniel G. Amen ħuman
04:33, 21 March 2010 (UTC)
"Dr. Daniel Amen has completed his new book, Change Your Brain, Change Your Body, as well as the associated PBS Special" Fuck ħuman
04:35, 21 March 2010 (UTC)
[edit] Books
I feel a bit guilty posting this trivial thread under the above topic, but here goes: what book are you currently reading? I'm interested in everyone's tastes in literature, and I figure maybe I can get some good recommendations. So, just post the name of whatever book you are currently reading. Here, I'll do mine: right now I'm in the middle of Chuck Palahnuik's "Haunted," after which I'm going to read Tim O'Brien's "Going After Cacciato." Tetronian you're clueless 02:26, 20 March 2010 (UTC)
- Reading right now/finished in the last week or so: Terry Teachout's new Louis Armstrong biog; *The French Imperial Nation-State* (Gary Wilder's book on French colonialism in West Africa); *A Mission to Civilize (Alice Conklin's book on the same); Greg Dening's *Islands and Beaches* (Colonialism in the Pacific Islands); Lewis Porter's Coltrane biog; *Les Porteurs de Valises* (French resistance/activism during the Algerian war); *Houseboy* by Oyono; *The Book of Negroes* by Lawrence Hill (sooooo awesome); Claude McKay's *Banjo*. Going to crack open some N'gugi tomorrow...TheoryOfPractice (talk) 02:38, 20 March 2010 (UTC)
- I usually go on a book binge where I start five or six books, get halfway through in a day or so, and then slowly finish them over the course of a month or so. Curently reading Origin of Species, A Tour of the Calculus, Richard Wagner's autobiography (He's probably the greatest historical asshole/genius ever), and rereading Asimov's Empire series (specifically Stars, Like Dust) for only the third time. --The Emperor Kneel before Zod! 03:48, 20 March 2010 (UTC)
- Recently finished:
- Can Christianity be good for the world? A Debate Christopher Hitchens and Douglas Wilson (I found it in book form in the Library, strangely)
- The Greatest Show on Earth Richard Dawkins
- Only A Theory Kenneth Miller
- The Religious case Against Belief James P. Carse
- Currently looking for a good book on epistemology. ThiehWhat is NOT going on? 04:31, 20 March 2010 (UTC)
- If you're looking for the sort of thing I use as an intro text, Crumley's "An Introduction to Epistemology" is pretty good. If you're looking for something a bit harder, Bonjour and Sosa's "Epistemic Justification" is my most recent favorite. Unemployed philosopher (talk) 02:11, 21 March 2010 (UTC)
- Wolf and Spice. Weird cover and Amazon links aside, it's a pretty good story. Later became manga and anime, if you're into that.
- Also, I compulsively recommend this. Technically not even a book, but it's basically the same and highly recommended. ~ Kupochama[1][2] 06:15, 20 March 2010 (UTC)
- I'm rereading the Count of Monte Cristo. Simultaneously I'm reading a biography on Roger Casement by Brian Inglis. I tend to read a novel and a biography at the same time. — Unsigned, by: 86.45.217.225 / talk / contribs 10:19, 20 March 2010 (UTC)
- "Into the Heart of darkness" - about the apartheid death squads; "The Perfect Store' - story of ebaY, couple of Stephen Leather's books for light reading. Listening to "Super Freakonomics", "Greatest Show on Earth" and "Coraline". --PsygremlinHable! 11:11, 20 March 2010 (UTC)
- >Tetronian - hope you like "Going After Cacciato" - I really enjoyed it. Like many others, I'm rarely reading 'a' book, usually 3 or 4 at a time. Currently on my list:
- "The Penguin History of the United States of America" by Hugh Brogan
- "The Command of the Ocean: A Naval History of Britain 1649-1815" by N.A.M. Rodger
- "The Pyjama Game: A Journey Into Judo" by Mark Law
- "South Africa 1948-1994: the Rise and Fall of Apartheid" by Josh Brooman and Martin Roberts
- No fiction for some reason, but sometimes that's the way it works. :) Worm(t | c) 11:13, 20 March 2010 (UTC)
- Now reading: The Greatest Show On Earth - Richard Dawkins
- Last book: Who Ate All The Pies? - Micky Quinn (autobiography) DeltaStarSenior SysopSpeciationspeed! 11:41, 20 March 2010 (UTC)
- "Who Ate All the Pies?" Lex Luthor, that's who! --Kels (talk) 15:29, 20 March 2010 (UTC)
- As you ask, I'm presently reading:
- Dogs - A new understanding of canine origin, behaviour and evolution. ISBN 0-226-11563-1
- --BobIt's windy! 15:35, 20 March 2010 (UTC)
Currently working on Creating Characters With Personality by Tom Bancroft, and referring a bit to Action Cartooning by Ben Caldwell. --Kels (talk) 15:39, 20 March 2010 (UTC)
- "The Hidden People of North Korea" EddyP (talk) 15:54, 20 March 2010 (UTC)
- Two books right now: Bertrand Russell's Why I am not a Christian, and Knack's Warcraft novel trilogy (I'm a lore geek, and nelfs rock!). --
Ask me about your mother 16:07, 20 March 2010 (UTC)
- Shakespeare's Wife. I just saw Germaine Greer give a talk about her (plugging her new book) and it was quite fascinating. However, when she signed the copy of the book which I asked to be dedicated to my sister and said "Is that alright?" I replied "Do you think you could rephrase it a bit?" I don't think she really got the joke. For Saloon Bar regulars you might like to know that rather than drinking the bottled water which was on the table she kept her throat moist with a glass of red wine. Lily Inspirate me. 20:32, 20 March 2010 (UTC)
- I was reading The Sandman, but I finished it. Wisest stupid Hoover! 20:38, 20 March 2010 (UTC)
- "Rapid Interpretation of EKG's" by Dale Dubin. It's a good book, but the plot is pretty derivative. Corry (talk) 01:42, 21 March 2010 (UTC)
- Fast Guide to Propellerhead Reason by Debbie Poyser, Derek Johnson and Hollin Jones - the film was better. Totnesmartin (talk) 17:50, 21 March 2010 (UTC)
[edit] Smithsonian Human Origins page
For you evolutionists, here's some info on human origins. Šţěŗĭļė buttoneer 20:36, 20 March 2010 (UTC)
- And for IDers, Top 10 ID stories of the year!!! Šţěŗĭļė buttoneer 12:22, 21 March 2010 (UTC)
[edit] Health Care Vote
Can I just say that for those of us who already have dirty, liberal, inefficient, socialised medicine and love every minute of it, the US vote on the bill is better theatre than anything I've seen in a long time. The Huffington Post and New York Times have some good coverage. May the memory of Stalin and Mao prevail! –SuspectedReplicant retire me 23:41, 20 March 2010 (UTC)
- I made a post on my facebook page about health care and I now have 45 comments (at last count) most of them my right wing friends completely ignoring everything I say and shouting Government takeover, higher taxes and any other right wing buzz words they care to throw out. Maybe schools should do a better job of teaching rational discussion and debate. SirChuckBThat is all 23:46, 20 March 2010 (UTC)
- Chuck, you are a far bigger man than I. I have a hard enough time being friends with liberals/Democrats because their politics are too conservative for me and piss me off. I couldn't imagine being friends with anyone who was American-right-wing in orientation. Good on you. TheoryOfPractice (talk) 00:00, 21 March 2010 (UTC)
- TheoryOfPractice (what a ridiculous name!), that is typical of Liberals and friendship!
- I try to keep in contact with friends both to the left and right of me (the former comes mainly in the form of one ex-flying picket from the Miners' Strike who believes the EU is evil). It helps me keep my own views sharp and, on occasion, changes them. –SuspectedReplicant retire me 00:11, 21 March 2010 (UTC)
- I won't lie TOP, it can be very difficult at times. I'll transcribe the comments later and post them so you can see what kind of shit I'm dealing with here..... I guess I really am a political science major at heart. I really think that civil discussion and differing ideas are the key to political success, but it's hard to discuss something when they just scream whatever Fox News has said about the issue. Plus they then all deny that they ever watch Fox News. SirChuckBCall the FBI 00:24, 21 March 2010 (UTC)
- Not a lot of my friends are politically outspoken, though the ones that are tend to be quite firm in left/right wing ideas. As a moderate it's nice to watch people tear each other apart over politics. One thing that does piss me off is how a lot of my peers when I was in high school responded to criminals. I studied psychology for a couple of years, and when we covered topics such as rehabilitation/murderers etc, it was quite unnerving how many of them were basically just saying give 'em rope. However, generally the people saying this tended to be the really fucking stupid people who couldn't hold a pencil the right way round, which was comforting heh, heh. SJ Debaser 12:25, 21 March 2010 (UTC)
- 48 now, but I can't read them :P
narchist 14:33, 21 March 2010 (UTC)
- Anyone who wants to friend me, just send a request. Do me a favor though, add your RW username to the message so I know who you are. SirChuckBWill Sysop for food 21:26, 21 March 2010 (UTC)
[edit] Let's Move On?
Someone said earlier this week something like There is more action (may i add, and smart asses!) on RW than CP. Shouldn't RW spread it's merry spirit around?
Had fun today hunting trolls on the Glenn Beck and White House facebooks... Glenn's FB is Reallllly packed to the top with great could-be Conservapedia users. I even got a thumbs up by a sysop posting something like Great show thursday Glenn, your best ever. then linking to Stewart's parody... A bit of cognitive dissonance can`t hurt those poor endoctrinated souls.
Lazily shooting arrows from my bed, sipping coffee. Posting Eco's definition of fascism on Glenn's frontpage, asking if football on shabbath is ok; supporting people asking Beck to run for president ( I added 'as an independant ) ... Greatest brunch ever! :) Alain (talk) 01:36, 21 March 2010 (UTC)
- Yeah, tell all the right wing crazies to go to CP! ħuman
02:32, 21 March 2010 (UTC)
Need a link? Is it trolling when you are right? Alain (talk) 20:04, 21 March 2010 (UTC)
[edit] Fighting Creationism on FB
After I got invited to this for the n-th time I decided to introduce them to the FSM and evolution. If you're on facebook, join the group and post something.
The title says: "Throw evolution out of schools". Mr.Orange (talk) 14:38, 21 March 2010 (UTC)
- A worthy cause, but I doubt it will do anything. As Mustex (or practically anyone else, but especially him) can tell you, arguing with creationists doesn't really get you anywhere. Tetronian you're clueless 14:41, 21 March 2010 (UTC)
- i know, i just want their group to be filled with FSM propaganda. maybe some of the people in the group will get the point. Mr.Orange (talk) 14:48, 21 March 2010 (UTC)
- I think that's been tried before. You can't reductio your way in with creationists either. There's this odd mental block there.
narchist 14:51, 21 March 2010 (UTC)
- Armond's right, they just block out anything that they don't want to hear. However, perhaps a non-creationist will get it and have a laugh. Tetronian you're clueless 14:56, 21 March 2010 (UTC)
[edit] I. Am. Awestruck.
The Who's Baba O'Riley.
As played exclusively on items available at ThinkGeek.
[edit] Can I count on your vote at the election?
This bloke came up to me, he's standing at the election as a...well, god knows. There's 9/11 truth, vaccine denial, globalisation, all sorts - his catchphrase: "the truth shall set you free." I shit you not. Totnesmartin (talk) 19:04, 20 March 2010 (UTC)
- Wow. I don't know how I would react if I saw something like that. Tetronian you're clueless 19:08, 20 March 2010 (UTC)
- Just glanced down one page (on ethics) & there's something for everyone: spirituality, alt medicine, quantum woo, prayer, 2012, the End Times, extraterrestrials. ωεαşεζόίď
Methinks it is a Weasel 19:17, 20 March 2010 (UTC)
- it was hard keeping a straight face as I looked at his material - he was handing out dvd-rs from a shopping bag, which is never a good sign. When I get a chance (monday probably) I might post some stuff here. I might even go to one of his meetings. Totnesmartin (talk) 19:22, 20 March 2010 (UTC)
- From the things I've heard about Totnes, I must say this doesn't surprise me very much. ωεαşεζόίď
Methinks it is a Weasel 19:43, 20 March 2010 (UTC)
- Try living here mate. They're very nice people but they'll believe anything. Totnesmartin (talk) 19:54, 20 March 2010 (UTC)
- I just had to double check that Totnes was in the UK. We're so fucked.
narchist 23:12, 20 March 2010 (UTC)
- An IP address added him to the Totnes election page in the see also section Willem de Zwijger (talk) 02:12, 21 March 2010 (UTC)
- Be glad that your crank candidates in the UK, at least, can put up a coherent, literate web site. This is what we have to deal with. Secret Squirrel (talk) 11:46, 21 March 2010 (UTC)
- (unindent) Fortunately London isn't actually too bad. I can't think of any prolific wannabe American Truthers trying to make people believe our water supply is tainted by the government. Martin, if this guy actually said to you "Can I count on your vote at the election?" did you just reply, "no," and walk off? I would've. SJ Debaser 12:13, 21 March 2010 (UTC)
- He didn't (my vote, incidentally will go the same way it has all my life - to the candidate best place to beat the tories). He did, though, ask me what I thought of his stuff, and I said it was very interesting, which seemed to please him. I didn't tell him about RW. Totnesmartin (talk) 17:37, 21 March 2010 (UTC)
- The Natural Law Party used to put up candidates in the 90s running on this kind of nonsense, mostly just as an excuse to get on TV & talk about yogic flying. ωεαşεζόίď
Methinks it is a Weasel 17:55, 21 March 2010 (UTC)
- I live in Canada and I am wishing the election to come up soon enough. ThiehCP≠Child Porn? 23:58, 22 March 2010 (UTC)
[edit] Healthcare reform
Someone explain to this Brit what's going on. Has it been passed? EddyP (talk) 19:05, 21 March 2010 (UTC)
- Despite being American, I really can't tell either. Doesn't look like anything definitive has happened so far, though. ~ Kupochama[1][2] 19:46, 21 March 2010 (UTC)
- I was watching live on Huffington Post, and saw a vote which Dems seem to have won. Got no idea what it means. EddyP (talk) 19:54, 21 March 2010 (UTC)
- hope they won, so i can tell the right wing *IN YOUR FACE BITCH!*Waronstupidity (talk) 19:57, 21 March 2010 (UTC)
- Speaking as a political nerd who is currently watching the C-Span Coverage, as of 4:00pm Eastern Time, The House is voting on procedural issues. There has been no major update on the overall status. SirChuckBI brake for Schukky 20:00, 21 March 2010 (UTC)
- The House just passed a vote that says they'll move forward with the bill. The real votes won't be until roughly 11pm from what I hear. Then there's the Senate. It's going to be a long process. –SuspectedReplicant retire me 20:11, 21 March 2010 (UTC)
- It's a hot, hot mess. Corry (talk) 20:14, 21 March 2010 (UTC)
- (EC) Actually, the most interesting scenario would be the bill and the fixes get passed, but then the fixes fail in the Senate. That would put Obama in the situation where he could sign the bill and enact reform, but he would lose the House for the rest of his term. He would never get them to pass anything he wanted again. Interesting possibility really. and Corry, that's representative Democracy with a two-house Congress. Everything is a hot mess. SirChuckBLeave Death Threats Here 20:15, 21 March 2010 (UTC)
- Live coverage from CNN here. Works across the Pond too. –SuspectedReplicant retire me 20:30, 21 March 2010 (UTC)
- im angnositic but screw it! i pray for healthcare reform to pass Waronstupidity (talk) 22:12, 21 March 2010 (UTC)
(<=) This is a fascinating article from David Frum, a former Bush speechwriter. He describes Healthcare as a Waterloo - but for the Republicans, not Obama. Who'll tell Ken? –SuspectedReplicant retire me 22:53, 21 March 2010 (UTC)
- Most of what we've been seeing was a debate about the limits of the debate: how long to discuss the bill, etc. The "revise and extend" stuff is something about putting language into the Congressional Record. Now that the limits have been determined, the motion can actually be discussed. Then the final vote will come. OR something like that. Šţěŗĭļė buttoneer 22:58, 21 March 2010 (UTC)
(unidnet) Speaker Pelosi is giving the final speech on the floor of the house. The vote will come any moment. Watch it online at SirChuckBThis country needs more Rutabegas 02:25, 22 March 2010 (UTC)
- I'm watching it too, very impatiently. They've been debating all day. Tetronian you're clueless 02:27, 22 March 2010 (UTC)
- Stupak's been de-"Defender of the faith"ed. That'll have him worried, or not. Willem de Zwijger (talk) 02:37, 22 March 2010 (UTC)
- IT PASSED!!!!!!! SirChuckBCall the FBI 02:51, 22 March 2010 (UTC)
- Yeah(!). Now for Medicare Part E(veryone). ħuman
04:35, 22 March 2010 (UTC)
- damn conservative are crying fool on youtube and ask for a civil revolt...... damn these guy are stupid.Waronstupidity (talk) 06:09, 22 March 2010 (UTC)
- Right on Human, I'm hoping this will be the first step to single payer. As for the conservs... They call for a revolt every five minutes. I love how they just don't seem to understand the concept of Democracy. Sometimes you win, sometimes you lose. When you lose, you have to try harder next time. I guess holding the seat of power for approx. 20 of the past 30 years has thrown them off. SirChuckBDMorris for new Jinx! 07:53, 22 March 2010 (UTC)
- High five SirChuckB, we're on the same page, I think. ħuman
07:55, 22 March 2010 (UTC)
- Freerepublic is a joy to read today... Sen (talk) 08:52, 22 March 2010 (UTC)
- High fives all around, everyone. Tetronian you're clueless 11:50, 22 March 2010 (UTC)
[edit] Cracked gets (slightly) serious
I just stumbled this Cracked list, and well, it's less funny than they usually manage (i.e. very) but it's quite thought-provoking. Totnesmartin (talk) 22:04, 21 March 2010 (UTC)
- The real scary bit is "the only reason we're not on the cusp of a factory that can turn out parentless kids is that nobody has figured out how to make money off such an operation." While I'm not 100% sure if it is totally possible right now, it's certainly true that it hasn't been looked at because it's profitless.
narchist 22:18, 21 March 2010 (UTC)
- I liked how rather than trying to be too funny all the time, it was nice and serious - but with a few howlers randomly inserted. It was also very well-informed. ħuman
00:47, 22 March 2010 (UTC)
- I love how Cracked used to be a shitty Mad knockoff that nobody read and now they are intelligent, hilarious, and popular. They are a case study for reinvention for the internet age. Corry (talk) 00:51, 22 March 2010 (UTC)
- Totally agree. When I jump in my time machine and visit myself back when I was semi-adolescent and I ask whether I would rather write for Cracked than Mad when I grow up, my younger self spits in my face. But crap, when you can write articles with unlimiteed dirty words and boob references and still be funny (and insightful), my younger self might rethink his lifelong dream.Brendiggg (talk) 08:57, 22 March 2010 (UTC)
[edit] Teapartiers are idiots
Ate it hook, line and sinker. On a related note, is the Coffee party prObama or just sane right wingers?--Thanatos (talk) 22:44, 21 March 2010 (UTC)
- Have any of them actually read the bill? I like that protestor, who when asked to describe specific problems with the bill, said something along the lines of "That's not a bill, that's socialised". It's all soundbites and shite and I'm 95% certain that these people support classroom prayer. --
Ask me about your mother 22:55, 21 March 2010 (UTC)
- Wow. Just wow. The only bill the US needs to pass is the one that says you must have an IQ o fat least 45 to vote...
narchist 23:15, 21 March 2010 (UTC)
- Thanks for the link, I ate it up. ħuman
08:04, 22 March 2010 (UTC)
- Yes, I "enjoyed" that vid. Apparently, you're all living in the Harry Potter world now that the bill has passed (???). Bondurant (talk) 09:32, 22 March 2010 (UTC)
They should totally lay off the caffeine then. I'm starting a new party called the water party. for a small membership fee you guys can gey in on the ground floor. Me!Sheesh!Mine! 15:50, 22 March 2010 (UTC)
[edit] Small Favor
Hey, I posted a while back about how I tried an experiment where I sent a video of mine to various creationists in a PM to see how many of those who responded would even attempt to address the issues I presented in the video (basically: I you go by baraminology, it’s impossible to define “baramins” in a way that puts apes and humans in a different category). I had extended conversations with three of them. The first of whom actually seemed interested in learning (we’re currently taking a break from our dialogue while he does some research, following my revelation to him that the Earth is not a closed system), another who just made up random arguments off the top of his head as far as I could tell, but at least TRIED to engage me, and a final one who really got my goat. His initial argument was literally just the “everything came from nothing” bullshit (remember: the topic was defining baramins in a way that put humans and apes in different groups *facepalm*). I responded to him by telling him that I wasn’t an atheist, but a Red Letter Christian (I decided not to define this for him, but to see if he showed any signs of knowing what that meant, or taking the time to do even a cursory Wikipedia search to see what it meant…he showed no signs, although he did occasionally say something like “you can still go to hell believing in Jesus, Red Letter or not”), he immediately stopped referencing any branch of science in any way, and the rest of his posts were nothing but scripture quotations he claimed refuted evolution, accusations that I was a false Christian, and threats of eternal damnation. This went on for a number of days, back and forth. In every response I’d try to address what he was saying, but would also remind him that the topic (which he NEVER ONCE acknowledged in any way) was defining primate baramins in a way that didn’t include humans. Finally, I just demanded that he address the issue, and he simply said “I don’t really care.” I sent him another message, asking why he had responded in the first place if he didn’t care to address the topic of conversation, and he didn’t respond. Yesterday I sent him another message, asking him to either give me a reason for his responding to the message, or an apology for wasting so much of my time. I’m not blocked from his account.
To get to the point: I’m curious, if some of you sent him messages asking why he responded (but being distinct enough to make it clear you’re not sock puppets of me), he might respond in attempts to “save your souls,” and I’d honestly like to know how he’d respond to variations of “why did you answer Mustex4’s original message if you weren’t going to address the topic.” So, if you’d message him (just once each, not spamming), and let me know if he responds and what he says, I’d appreciate it. This is him: --Mustex (talk) 23:29, 21 March 2010 (UTC)
- I think what you're trying to do is akin to emptying the Atlanic ocean by walking up to the Hudson river with a small bucket and attempting to drain it bit by bit. You've clearly just found either A) one hell of a deep cover parodist or B) someone who's entrenched in the religious aspects of the evolution/ID/creatardism thing - therefore fighting it with science or direct questioning will get you nowhere. It was a clearly losing battle from the beginning.
narchist 23:54, 21 March 2010 (UTC)
- Yeah, I know. At this point its as much for amusement as anything else, but I would like to see how he'd try to justify responding to the message at all if questioned by a third party (or if he'd just fly into more strawmen and scripture readings).--Mustex (talk) 00:03, 22 March 2010 (UTC)
- (EC) Just let it go, for fuck's sake. If he doesn't want to debate you on this issue, I can't see what's to be gained from a bunch of other people trying to enter the dialogue. & Anyone else nagging him about your interactions with him could look a lot like harassment. Think about it: if, after a few emails from him, you suddenly got a deluge of emails from other people you'd never contacted before, asking not about anything you'd said online but about things you'd said or hadn't said in emails with other guy, wouldn't you find that a little creepy? ωεαşεζόίď
Methinks it is a Weasel 00:01, 22 March 2010 (UTC)
- (EC)It's probably wrong to even do it "for amusement". That's basically trolling - being a dick for the sake of being a dick. If you want to seriously make a change, then you can't do it by swiping at where ignorance and sheer bloody-mindedness is firmly entrenched. All you can do is take the points raised by creationists and circulate the rebuttals widely and effectively - taking it straight to the individuals does nothing but annoy people who are probably well meaning, in their own way. Do you expect them to convert? Address the issues, not the individuals and make it public, not private.
narchist 00:07, 22 March 2010 (UTC)
- Not doing it to be a dick, so much as I actually want the question answered, I want to know how he'd answer it, and I would like it if creationists were occasionally called to task on their tendency to constantly gish gallop (although that's secondary to the first two).--Mustex (talk) 00:10, 22 March 2010 (UTC)
- Have you tried A Storehouse of Knowledge? Phil Rayment loves to debate & will be delighted to answer any questions about creationism, though I can't guarantee he would always stay on topic. A few RWians are relatively active there, & if you want a debate that's open to other parties, somewhere like that is the way to go. There's a big difference between stepping into a wiki/forum debate to ask why somebody didn't respond properly to a question, and emailing a stranger to ask why they didn't respond properly to an email from somebody else. ωεαşεζόίď
Methinks it is a Weasel 00:20, 22 March 2010 (UTC)
- I'm familiar with the website, I've considered going there. I think I'm probably just annoyed with the guy, although I would appreciate anyone who actually PMs him (as I said, once, even I'll admit that more than that would be trolling, and I posted this not expected more than two or three people to do it anyway).--Mustex (talk) 00:28, 22 March 2010 (UTC)
- Musty, it's called p(rivate e)mail for a reason. What you are asking for is really poor form. Just because you may be right doesn't mean you might not also be wrong on another level. ħuman
04:38, 22 March 2010 (UTC)
- Meh, maybe. Still, if anyone wants to gather ignorant creationist quotes, that guy's a gold mine.--76.18.115.64 (talk) 13:21, 22 March 2010 (UTC)
Cite error:
<ref>tags exist, but no
<references/>tag was found | http://rationalwiki.org/w/index.php?title=RationalWiki:Saloon_bar/Archive54&oldid=563771 | CC-MAIN-2014-42 | refinedweb | 23,682 | 70.84 |
This article explains a new class library I developed to internalize XML-like documents into classes. For brevity, I didn't use the assembly to extract tag contents from a document. I only try to show that the assembly does work consistently. In time, I will add new Windows Forms projects using this assembly. In fact, what this assembly does is to extract HTML or XML tags, attributes, and texts from document. You can see in this image, Count of _seq (938): This the cell number of the page (tag number).
Count
_seq
First of all, to use the DLL, you must add a reference and then add using ddm.Html. Now, it's ready to use. You first read the text from the document file and give this string to the constructor. The main class for parsing the HTML is HtmlDDM. It has two constructors. One take a string argument, the other does not. You use the main class like this:
using ddm.Html
HtmlDDM
StreamReader file = new StreamReader(@"HtmlFiles/page.html", true);
HtmlDDM doc = new HtmlDDM(file.ReadToEnd());
doc.Fill(pbFill);
Here, pbFill is a ProgressBar object. HtmlDDM takes it and runs its PerformStep() method. Now, let me explain what Fill() does. It reads all of the opening, closing, self closing, DOCTYPE, CDATA tags, and sets variables for each of them. And then, it fills the main structure to extract data from the document: blocks. I developed a nested block structure. There is a Block class. This class has a Childs property of List<Block> type. As you can predict, this structure is like an HTML block structure: tags in tags, tags around tags. Tags in tags finds itself in nested blocks. The block object has a StartCell and a EndCell property set in the Fill() method; nested blocks can be easily identified with two cells: start and end. The nested block in the parent block starts and ends inside. For tags around tags (like self closing, CDATA, DOCTYPE, etc.), blocks are also identified. But this time, startCell is equal to endCell, and each of them is the type of self closing cell. I named all kinds of tags with a "<" at the beginning and a ">" at the end. Here, we expand the properties of the Cell class:
pbFill
ProgressBar
PerformStep()
Fill()
Block
Childs
List<Block>
block
StartCell
EndCell
startCell
endCell
Cell
//in Cell.cs Cell class properties:
public Attributes Attrs { get; set; }
public int x { get; set; }
public int y { get; set; }
public int alpha { get; set; }
public int beta { get; set; }
public int Index { get; set; }
internal int iBgn { get; set; }
internal int iEnd { get; set; }
internal string Name { get; set; }
internal string Type { get; set; }
Attrs is an object of the Attributes class which implements IList<Attribute>. That Attributes object is a list of Attribute objects. x, y, alpha, beta are very important for the workflow of the program. They're signers for border tags (opening and closing tags). If during FillSequence(), the program counts an opening tag, it increments x, else y. That flow is forwards. The other type of flow is backwards, and changes alpha and beta. When backward flow runs, the program increments alpha for opening, and increments beta for closing tags. Next is FillBlocks(). It fills rootBlock with Block objects, each of them with a Childs list of List<Block> type. So, a block can contain child blocks (like an HTML block that contains head and body blocks), and these children may also contain children. That is the Document Digest Model I propose. In this image, you can see this clearly:
Attrs
Attributes
IList<Attribute>
Attribute
x
y
alpha
beta
FillSequence()
FillBlocks()
rootBlock
Now, here are the methods and properties of the CellSequence class:
CellSequence
FillBackAndForth() here makes the forwards and backwards flow of x, y, alpha, and beta. And after that method, Methods.IsCellBalanced() takes the first cell and checks if there is imbalance. If not, the sequence is intact. If yes, the program throws an exception with a message stating that documents with deficient tags are not allowed. But how does the program see the tag structure is deficient (like an unclosed td tag or a wrongly used self closing schema)? That is done by this calculation: when the program fills x, y, alpha, beta, the structure becomes meaningful; because, an arbitrary cell's x is the opening tag count till that cell, and y is the closing tag count till that cell from the beginning. And, that cell's alpha is the opening cell count from the end, and beta is the closing tag count from the end. To make sense, I will give the first and last cell's values in a two cell simple document:
FillBackAndForth()
Methods.IsCellBalanced()
firstCell:Open
lastCell:Close
firstCell: x=1, y=0; alpha=1, beta=1;
lastCell: x=1, y=1;alpha=0, beta=1;
Here, as you can see, for open cell, x-y = beta-alpha + 1, and for close cell, x-y = beta-alpha - 1. That makes the cell balanced. If all of the structure of the border cells (open and close) is intact, the balance check of any cell will be successful, if not, it won't be successful ever. Here, it's time to emphasize that the sequence of cells is represented by the CellSequence class. As you can see, it implements IList<Cell>. That is important because the Add() method must increase the Index property of the cell. By the way, the cell includes a property named Index. This property is available for all cells. But x, y, alpha, beta are available only for border cells. Above, GetCorrespondingCell() is important too. It finds the end cell of the start cell, and the start cell of the end cell. But how? Using this calculation: as I mentioned before, border cells have four values (let's call them track signs). With a little calculation over track signs, you can find the corresponding signs. If you have a method to find the depth of cell, you can compare other cells' depths with firstCell, and when you find a match, take it as endCell and stop. Let me show you how:
IList<Cell>
Add()
Index
GetCorrespondingCell()
firstCell
As you can see, the depths of the start and end cells are the same. But, how do we find the depth of an arbitrary cell from only track signs: it's simple: if the open tag: x-y-1; if the close tag: x-y. You can try it on the two cell document examples given before: 1-0-1 (firstCell) == 1-1 (endCell). You can trust it works on a 938 cell document in the w3.org page.
Now, I will explain the library for interested audience:
The Base namespace is for the base class and its dependencies. The base class is DDM_Base. It's an abstract class. The base class is in Base.Classes. There is one more class: Block. The Enumerations, Exceptions, and Methods classes are present in the ToolBox namespace. Methods is a static class because it encapsulates some necessary methods that will be used in the program, but unnecessary to contain in instances for performance reasons. The Exceptions class contains the exceptions of Base. The namespace I most like is the Settings namespace. It contains extra delimiter settings for the program. In a future version, I plan to make the program get it settings from an external settings file. So, for example, if you want to add a new delimiter for HTML 4.0 (let's say, DELIM), you simply edit the XML settings file and when the program starts, it's there. I think it's time to talk about it. In Settings, there is a Delimeter.cs file:
Base
DDM_Base
Base.Classes
Enumerations
Exceptions
Methods
ToolBox
Settings
internal class Delimeter
{
public Delimeter()
{
}
internal string Begin { get; set; }
internal string End { get; set; }
internal string Type { get; set; }
}
internal class StandartDelimeter : Delimeter
{
public StandartDelimeter()
{
}
public StandartDelimeter(string begin, string end, string type)
{
Begin = begin;
End = end;
Type = type;
}
}
In this file, there are two classes. One is for extra delimiters like CDATA, DOCTYPE etc. These delimiters are not open or close type. They're extra. And, each of them takes its own type. The standard delimiters are "<", ">", and "Standart". I made the program extendible so that you can change standard delimiters. In the Delims static class, there is a static constructor that reads delimiters (standard, borders, extra) and fills the Standart, Borders[], and Extra variables. Then, in the program, they're used in various places.
Delims
Standart
Borders[]
Extra
The Cells namespace is about the Cell class and its dependencies. Attribute is a simple class with name and value properties. The Attributes class is an implementation of IList<Attribute>. CellSequence is an IList<Cell>.
Cells
I made several attempts to find a good solution. At the beginning, I made a text search based document parse library. But to parse a medium level HTML document with it took 7 minutes. So I quitted and started this project.
This version runs better; also lets the user to search in page.html with the specified attribute names and the corresponding values.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL) | http://www.codeproject.com/Articles/58222/Document-Digest-Model-A-different-point-of-view | crawl-003 | refinedweb | 1,551 | 74.19 |
I'm trying to create a method for Readable Stream, but after trying just a little bit, I ran out of ideas to how.
import * as stream from 'stream'
//yields Property 'asdasas' does not exists on type 'Readable'
stream.Readable.prototype.asdasas
//yields asdas does not exists on type 'typeof Readable'
stream.Readable.asdas
I managed to extend them. The behaviour wasn't as unusual as I thought (I still would appreciate an explanation on the difference of "type 'Readable'" and "type 'typeof Readable'". The code:
import * as stream from 'stream' class mod_Readable extends stream.Readable { pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T { //whatever return super.pipe(destination, options) } } | https://codedump.io/share/QaJMDLUlWdRb/1/how-can-i-extend-node39s-stream | CC-MAIN-2017-26 | refinedweb | 113 | 51.75 |
Here at Be's galactic headquarters we're in the middle of a release, so I'm having trouble picking a topic for this article. R3 (in engineering terms) is history, and I can't remember now if I worked on any cool new stuff. R4 is fresh in my mind, but still months away from being available outside Be. So—do I review the past, or preview the future?
A flip of the coin came down on the side of telling you about some of the cool new features that will arrive in R4 in the main UI and Tracker. Since I don't want to set any false hopes I'll stick to features that are either already implemented or in progress. I'd hate to tell you R4 will have some nifty feature, and then fail to deliver because of some act of God (or JLG).
R3 was our first foray in the Intel world. People seem pleased with our efforts, although we've had plenty of feedback that some of the little differences between that other native OS and the BeOS are annoying. Two top issues have been the different menu-shortcut keys and the lack of application/window switching via the keyboard.
R4 addresses both issues. Users will be able to choose which key on the keyboard—either Control or Alt (Command on Power Mac systems)—maps to the menu-shortcut key. Also, they'll be able to switch between windows and apps via the keyboard. The key combo will match that of the other OS, but the UI is different, better, and more powerful (we hope you agree).
Is anyone out there interested in UI guidelines? We'll finally deliver on that promise. After what seems like years in the making, the guidelines will soon see the light of day, independent of the R4 release schedule. We'll get them to you as soon as they're spell-checked! R4 will overhaul many of the preferences apps to conform to the guidelines, as well as to increase their functionality.
R4 will have lots of improvements in the Tracker. One feature I personally like is the new, improved Drag-and-Drop protocol, which lets apps support drag and drop with the Tracker. For example, with the addition of about 10 lines of code to the Kits, you can now drag Replicants to the Trash.
The Drag-and-Drop protocol also supports the contextual menu you get when you drop a file using the secondary mouse button. Users see a menu listing the data types the application supports. From there you can drag and drop an image out of a graphics application and pick the format for the new "clip" file.
Tracker's list view will be much improved as well. Resizing and reordering columns is smoother and slicker. The Tracker will also be smarter about which columns are shown by default when creating new folders or showing the results of a query.
We'll also introduce lots of international support in R4. I've seen early versions of an input method, so yes, in R4, you'll be able to input Japanese characters. Behind this support is a new "input" server that enables other cool features, including support for various multiple- input devices.
That's a little peek into the future. Remember, though, these are only some of the highlights of what's coming in R4. There's much more I haven't mentioned, which reminds me—I better get back to work.
There are several ways to send data from one process or thread to another. The three well-established ways are:
send_data() &
receive_data()
ports
pipes
Of course, you could also share an area among threads and exchange data that way; that's the "shared memory" model of interprocess communication (IPC). This model has different semantics and can't easily be compared to the other three, so for the purposes of this article, I'm going to stick to discussing the different "message-passing" methods.
Each of the above three techniques has its advantages.
send_data() and
receive_data() (exhaustively described in the Be Book, as are ports)
require virtually no setup and can send a single message of any length
directly to an arbitrary thread. Once sent, the data sits in the thread's
message cache, waiting to be read. Any subsequent writes to the thread's
message cache using
send_data() will block until the data is received.
The data is also tagged with a four-byte identifier, making it easy for
the receiving thread to unpack the message and interpret its contents.
This method is very convenient for one-shot messages where the recipient
is well-known, but has the downside of being inflexible.
Most Be developers should be familiar with the second method, ports. Each
port is a unique, system-wide FIFO
buffer which threads can use to read
and write data. The advantage of using a port over
send_data() is that a
port can hold multiple messages at a time, and its data can be read by an
arbitrary thread. The queue length of a port is specified by the number
of messages (not the number of bytes!) and is set at creation time.
Now if I were only to discuss the above two, all I would be doing is rehashing the Be Book. And that ain't much of a Newsletter article. Luckily, I have remaining one more IPC method, pipes, which are not covered by the Be Book and have their own advantages. Others have briefly discussed pipes in previous articles, but I'd like to go a little bit deeper.
The pipe() call creates a FIFO, currently capable of holding up to 4K of data. This FIFO is addressed by two file descriptors, which are passed in an array as the argument to the call. One descriptor is used for reading from the pipe, the other for writing to the pipe. Writes to the pipe don't block until the pipe is full.
Here is a basic example of using pipes to send a byte from one thread to another (Unix weenies can sleep through the rest of this article, by the way):
#include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <stdarg.h> #include <OS.h> static int
reader(void *
arg) { int
fd= *(int *)
arg; char c; if (
read(
fd, &
c, 1) < 0) {
exit_thread(1); }
exit_thread(0); } static void
writer(int
fd) { char
c= 'A'; if (
write(
fd, &
c, 1) < 0) < 0) {
perror("write"); } }
main() { int
fd[2]; if (
pipe(
fd) < 0) {
perror("pipe");
exit(1); }
resume_thread(
spawn_thread(
reader, "reader",
B_NORMAL_PRIORITY, (void *)&
fd[0]));
writer(
fd[1]);
wait_for_thread(
tid,
NULL); }
The main advantages of pipes stem from the fact that they are file descriptors. It is a very powerful abstraction to have a uniform way of reading and writing data, whether it be to a file, a raw device, or to another thread. You could then use the same code to do I/O to any one of these "objects," and not have to special case them.
Take the case where your program is expecting data from multiple objects (threads, devices, and files, for example). If each object had a different means of addressing it, you would have to spawn a thread for each, wait for the data in a manner customized to each object, and perform some synchronization and notification to let the parent thread know which object has data available. If on the other hand each object is addressable uniformly, you have the ability (which we will deliver in R4) to "wait" for data from any one of sources using a single call in a single thread. This is a very great convenience to the programmer. At present, pipes are essentially just as fast as ports, so there is no reason to not use them for IPC. If anything, we expect pipes to get faster as we optimize them in future releases.
Unix was the operating system that wanted to treat everything as a file
-- devices, other processes, memory, etc. The BeOS takes this idea very
literally for pipes. For every pipe that is created, a file is created in
/pipe on the system. Similarly, if a
file is created in
/pipe, a
honest-to-goodness pipe is created, ready for reading and writing. This
allows the creation of "named" pipes, i.e., pipes which are globally
addressable on the system. One thread can create the named pipe, and
another thread in another team just needs to know the name, open the
pipe-file, and start using it. In this way, creating pipes is identical
to creating files.
Replace the
pipe(fd) call in the previous example with this code snippet:
if ((
fd[1] =
open("/pipe/mypipe",
O_WRONLY|
O_CREAT)) < 0) {
perror("pipe 1"); } if ((
fd[0] =
open("/pipe/mypipe",
O_RDONLY)) < 0) {
perror("pipe 2"); }
and the program behaves the same way.
At Be we like pipes, and we encourage you to use 'em too.
In last week's article I talked about static queries, one-time glimpses at entries which matched certain criteria on a given disk. If you have not done so already, please go back and read that article, it will make this article much easier to understand.
Developers' Workshop: Let's See What We Can Find, Part 1: Static Queries
This week we are going to look at using live queries to keep the list of matching entries up-to-date in an ever changing file system. The associated sample code for this week can be found at:
The basic theory behind a live query is pretty straight forward. A
BQuery is built in the traditional fashion, and then
assigned a target messenger to deliver update messages to. The
BMessenger specified by
SetTarget() could receive messages identifying
items that now meet (or no longer meet) the query criteria. These messages
could start arriving as soon as the query is
Fetch()ed and will continue until the
BQuery object is deleted or
Clear()ed.
Two messages with a
what data member of
B_QUERY_UPDATE can be sent to a target messenger. They
are differentiated by an int32 data item called
"opcode", one being
B_ENTRY_REMOVED the
other being
B_ENTRY_CREATED. The rest of the messages
detail exactly which item needs to be added or removed from the matching
list.
This identification is not done with
BEntrys, or
even entry_refs or node_refs as you might like,
but with the components that build those structures: the nodes
(ino_t), device ids (dev_t) and names of the item
and parent. Much like using the C functions from last week's article, you
will need to build the more useful objects from these blocks.
The full descriptions of these messages can be found at:
One thing you will note from the documentation is the suggestion that the
Node Monitor is utilized in conjunction with live queries. This is an
exceedingly good idea on several different fronts. First and foremost,
the
BQuery will only inform you whether a given entry meets the query
criteria or not. Usually you will be trying to display information about
the item itself, and this can change without ever invoking a
B_QUERY_UPDATED message. So if you are trying to keep in sync with the
data on disk (and you probably are or you wouldn't have implemented a
live query to begin with) it behooves you to also use the Node Monitor to
let you know when your entry is modified.
A good basic look at the Node Monitor mechanism was provided by Scott Barta in his Folder Watcher Newletter article:
Be Engineering Insights: The Tracker Is Your Friend
and the documentation can be found at:
I will not go into the details of how to implement node monitoring here. A look at the documentation, Scott's article and sample code, and the LiveQueryApp itself will show you what you need to know. It will suffice to say that the Node Monitor sends update messages to a messenger whenever a specified node is modified. You can then use these messages to update your entry information as needed, in much the same way as you might use the query update messages.
One thing worth mentioning is that in many cases you might receive multiple, complimentary updates from the query and the Node Monitor. For example, if you were to use LiveQueryApp to look for all source code that contained Query somewhere in the file name, and then modified the file name so that it changed, but still met the query, you might receive the following 3 messages:
B_QUERY_UPDATED:
B_ENTRY_REMOVED(the name of the item has changed)
B_QUERY_UPDATED:
B_ENTRY_CREATED(the new name meets the query)
B_NODE_MONITOR:
B_ENTRY_MOVED(the item has moved)
This redundancy in notification is a good thing, but there is work that needs to be done to handle the multiple messages correctly. You definitely don't want the overhead of creating and removing items from your lists unnecessarily. You also need to be able to recognize when a redundant message comes in, so that you do not create new items in your list when an update corresponds to something already there.
It should be obvious at this point is that a live query application needs to have a caching mechanism to track details about its matching nodes. The only way to know what items need to be updated is by caching all of the relevant information needed to identify the node, along with all of the information about the node you care about. Then as changes come in, the appropriate structure can be found and updated with the new information (or removed if it no longer exists or if it no longer matches the query.) It turns out that implementing this caching mechanism is the most difficult part of dealing with live queries (or the Node Monitor for that matter.)
The fundamental idea behind the live query is to keep your internal list of matching items in step with the current state of the file system. A valid question to ask is exactly how live do you need this list to be? It is important to get an answer to this question, as it will determine the lengths to which you need to go to keep in sync with the disk. Certain rare applications have the need to keep a list of items absolutely in sync with the disk. These apps have a very low tolerance for error. The Tracker is a good example of an application that is expected to have its queries keep in step as much as possible. Users expect this of the main interface for the BeOS. There is a lot of work involved with keeping a query absolutely true to the file system, far more than I could easily put into an understandable bit of sample code.
The reason behind all of the work has to do with the nature of the
updating mechanism. There is no guarantee that all of the
B_QUERY_UPDATED
and
B_NODE_MONITOR messages will come through to you. The message sending
system will drop these messages if unable to deliver them, rather than
keep trying and slow down the system in general. There are a whole host
of edge conditions that a truly robust live query application would need
to have accommodations for. There are various race conditions that would
need to be dealt with, such as a file moving between the time of
identification of the query match and pulling the entry out of the query.
There is also a period of time between the pulling from the query and the
starting of node monitoring that could cause a given entry to be
untrackable. Developers need to be aware of these "limitations" of the
query and node monitoring systems, and be prepared to deal with failures
to instantiate items identified in the query. As you will see, the sample
code deals with some of these issues.
Also, the nature of your query can determine if you receive proper update messages. As you know, a query needs to have at least a single indexed attribute in the search criteria. But the order in which these attributes change currently has an effect on whether a query update will arrive. Take for example the instance where an application creates its own document type, and has a single indexed attribute and the document's MIME-type (the BEOS:TYPE attribute). The order in which these attributes are written into the file can have a great effect on updates. Let's say that the indexed attribute is written before the MIME-type. If you have an open live query on the MIME-type and the indexed attribute, and someone copies a file, here is the sequence of events:
Indexed attribute is written.
The query notices a new item in the index but sees that the MIME type does not match.
No query update is sent.
The matching MIME-type is set.
This file that matches the query will not be sent in a query update message. If, on the other hand, the non-indexed MIME-type was written before the indexed attribute, the update message would be sent, as the query criteria would be met when the new file was examined.
Right now the only work-around to this problem is to not query on non-indexed fields but instead to institute a filter in the target to check the validity of the items. Or you could make sure that all unindexed attributes are written to a file before indexed attributes.
Still, the main source of problems when dealing with live queries come from the free-form nature of the file system: anyone can create or change a matching entry at any time. One way to make queries more reliable is if you search for items that only your application can create. Then barring a user bring a whole slew of matching items from off disk, it will be much easier to maintain a very tight sync between the file system and the internal list.
If you were to examine side by side this week's LiveQueryApp and last week's QueryApp you would see a significant difference in underlying design, even though the interface itself is nearly identical. (With the exception of the removal of the methods for retrieval of static queries. The combining of these two apps into one is left as an exercise for the reader...although personally I suggest that implementing an application of your own would be much better.) Without going into the code in great detail it is beneficial to note the major changes.
First, due to the nature of live queries and the possibilities of
impending updates it is desirable to move the initial query iteration
code into a separate thread. Not only does this free up the window thread
to handle incoming
B_QUERY_UPDATED and
B_NODE_MONITOR messages, it also
makes the interface much more responsive. You can see items being added
to the list rather than waiting for the iteration to complete before the
end. One implication of this threaded model is the need to use a BLocker
to protect the
BLists for tracking the contents of the query and insure
the integrity of the lists.
The tracking lists are the most important structural changes in the application. To adequately keep track of the matching items, and to recognize and identify the items which need changes, a caching mechanism has been created. It is a system based on a data structure for caching entry information, and two lists: a valid list and a zombie list.
The live_ref data structure represents the information this application
cares about for each matching entry. This includes items meant to
uniquely identify the item (node, device id, parent node, name), a
pointer to the data we care to display to the user (a
BStringItem), and
two fields for the caching mechanism (status and state). live_ref.status
contains information about how successful the application was in
acquiring the needed information about the entry. If all of the entry's
information was successfully retrieved it is marked
B_OK. If there was an
error initializing the object or retrieving the appropriate information
(as might be the case if the matching node was moved in between the time
the update message was generated and attempting to access the entry
described), then status will log the error encountered, like
B_ENTRY_NOT_FOUND. The state, on the other hand, records whether the item
should be included in the valid list if all of the information is
successfully retrieved.
So, the valid list is where all entries are cached if they match the
query and if they could be successfully instantiated. Items in the valid
list also have their
BStringItems added to the
BListView that displays
results to the world. Any item that no longer matches the query, could
not be instantiated, or gets an update before the initial retrieval from
the BQuery gets moved into the zombie list. As every update comes in from
either the Node Monitor or the query, both lists are checked to see if
the item already has a live_ref cached. If one is located, it is updated,
and if appropriate (i.e., it was not removed from the query and all the
information could be accessed), moved into the valid list.
A short example is probably in order.
void
LiveQueryWindow::
UpdateEntry(live_ref *
rec, bool
valid) { entry_ref
ref;
ref.
device=
rec->
pdev;
ref.
directory=
rec->
pnode;
ref.
set_name(
rec->
name);
BEntry
entry(&
ref); if ((
rec->
status=
entry.
InitCheck()) ==
B_OK) {
BPath
path;
entry.
GetPath(&
path); if ((
rec->
status=
path.
InitCheck()) ==
B_OK) { if (
rec->
item==
NULL)
rec->
item= new
BStringItem(
path.
Path()); else if (strcmp(
rec->
item->
Text(),
path.
Path()) != 0) {
printf("new path: %s\n",
path.
Path()); if (
valid) {
Lock();
rec->
item->
SetText(
path.
Path());
fValidView->
InvalidateItem(
fValidView->
IndexOf(
rec->
item));
Unlock(); } else {
rec->
item->
SetText(
path.
Path()); } } } } if (
valid&&
rec->
status!=
B_OK) ValidToZombie(rec); else if (
valid==
false&&
rec->
status==
B_OK&&
rec->
state==
B_OK)
ZombieToValid(
rec); }
Before we get to this function we have set the live_ref state to
determine whether it should be in the valid list or not. The only time an
entry should not be in the valid list is if it has been removed from the
query. Then we attempt to instantiate the entry and get the info we need.
We record the status of each operation in
as we go. Then
we do a simple test: if the item is in the valid list currently, but we
failed to get the info we need, it is moved to the zombie list. Likewise,
if the item is in the zombie list, we succeed in getting the info we
need, and it is not an item that has been removed, we move it to the
valid list.
live_ref.status
Finally, I will note several suggestions for improving the caching mechanism, but which would have added unnecessary complexity to the sample code. The current caching implementation is not very memory efficient. Items that no longer match the query are kept around indefinitely in the zombie list on the off chance that they would be needed again. In addition, as node monitoring is not turned off, the removed node will still generate updates if it is changed.
One improvement would be the addition of a timed event that regularly
clears the zombie list of items with a
B_ENTRY_REMOVED state. It is also
possible to implement the caching and tracking within a single list, or
to implement the valid list inside
fValidView by using a subclass of
BStringItem that contains the live_ref information in addition to the
information that is displayed. This subclass would become the standard
data storage for both the valid and zombie lists.
As you can see, live queries are very powerful, but there is a corresponding increase in the amount of work necessary to use them correctly. If you are prepared for the extra effort, and do not blindly depend on accuracy of the updates, live queries can add a lot to your application.
I say "what we hope to offer" in recognition of the fact that we have, by necessity, a biased view of what our little company has going for it. Beyond that, I won't insult the reader's intelligence. After all, this is a newsletter of opinions, not revealed truths.
Last week, I attempted to describe the types of individuals we're looking for to help us actualize our potential. This week, I'd like to discuss what a candidate might find in us, what kind of work, work environment, and culture one might find here at Be.
We've already noted that we were looking for a few good "self-directed missiles." That statement is based on our avowed need to minimize management layers and spend more of our resources on getting things done, as opposed to directing traffic and holding those dreaded cross-functional review meetings.
There is more to this. As much as we can, we're structuring work in ways that minimize another plague—the "n" factorial problem. When you have "n" individuals working on a task, the number of communication paths is a function of "n" factorial. As "n" grows, the function accelerates tremendously and coordination eats up more and more of the available resources.
We're trying to combat this by putting as much of a given problem inside a single human head as we believe it can hold. This makes for shorter meetings, with disagreements handled between one ear and the other. Work done this way tends to be more interesting and less political. Also, one is more able to feel the impact of one's efforts on the company, and on developers and customers, than in an environment where work is more fragmented.. We pay market-driven compensation, the upside being in stock ownership in the company. We have decent medical coverage and a 401K plan. However, you assemble your own chair, and perks such as massages and free juice aren't our style.
So, if it's not the mahogany that attracts people to Be, it must be the work. We've been criticized for being a little too daring and quixotic: Why write an OS, when we already have one. For our part, we know we're doing something that, if successful (we know it's still a big "if"), will have an impact on the industry. How big, we don't know, but as one investor rationalized his decision to support us, this is either going to be big, or it's going to be nothing.
Indeed, we won't be a $12 million software company. While critics say we're playing a game that's too big for us, supporters agree that we're right to focus our specialized OS on emerging digital A/V media and to position the BeOS as a complement to Windows, rather than foolishly attempt to replace it.
One last element of our corporate culture, if we can use so pompous a term—though perhaps it would be better to call it a group character study. Just as I mentioned the multiethnic composition of our team last week, we are also multiopinionated. We like lively debate. This is not always entirely pleasant—we don't defer to New Age sensitivities -- but issues get aired and sacred cows are looked in the mouth. Companies often suffer from refusal to deal with unpleasant facts, potential facts, and thoughts. At Be, reality prevails over the toxic comforts of groupthink.
These are but a few, admittedly biased, and, by necessity, self-serving, features of our work environment. If you'd like to take a closer look, point your browser to, see if we have something that matches your skills and goals and give us an opportunity to show you how you could help us. | https://www.haiku-os.org/legacy-docs/benewsletter/Issue3-29.html | CC-MAIN-2016-18 | refinedweb | 4,650 | 68.1 |
Hi, Wrote a simple java class as : import java.lang.*; public class A { public prnt() { System.out.println("Hello World"); } } Compiled it with gcj and linked libgcj.so and libiconv.so and created a shared object libA.so. Again wrote a short 'C' program : main() { _Zx726xkjad(); } This method is read by using 'nm' on libA.so. Compiled it with gcc and linked libA.so. While running this C-code it gives segmentation fault. The whole test was also performed with in a web server to call a function from a shared object during initiation. In both these cases there was a segmentation fault. (In second case it is : [04/Feb/2003:20:04:20] config (22135): SIGSEGV 11 segmentation violation [04/Feb/2003:20:04:20] config (22135): si_signo [11]: SEGV [04/Feb/2003:20:04:20] config (22135): si_errno [0]: [04/Feb/2003:20:04:20] config (22135): si_code [1]: SEGV_MAPERR [addr: 0x0] I am new to gcj and this way of programming. Any help is highly appreciated. Thanks, -Ashish ===== /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_/_/Ashish Srivastava/_/_/_/ /_/_/(ashish7s@yahoo.com)_/_/_/ /_/ _/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. | https://gcc.gnu.org/pipermail/java/2003-February/013336.html | CC-MAIN-2022-21 | refinedweb | 231 | 69.79 |
!19 65 2011/03/19 23:2519 49 + regen Ada html documentation. 50 + change order of -I options from ncurses*-config script when the 51 --disable-overwrite option was used, so that the subdirectory include 52 is listed first. 53 + modify the make-tar.sh scripts to add a MANIFEST and NEWS file. 54 + modify configure script to provide value for HTML_DIR in 55 Ada95/gen/Makefile.in, which depends on whether the Ada95 binding is 56 distributed separately (report by Nicolas Boulenguez). 57 + modify configure script to add -g and/or -O3 to ADAFLAGS if the 58 CFLAGS for the build has these options. 59 + amend change from 20070324, to not add 1 to the result of getmaxx 60 and getmaxy in the Ada binding (report by Nicolas Boulenguez for 61 thread in comp.lang.ada). 62 + build-fix Ada95/samples for gnat 4.5 63 + spelling fixes for Ada95/samples/explain.txt 64 > fixes for Ada95 binding (Nicolas Boulenguez): 65 + add item in Trace_Attribute_Set corresponding to TRACE_ATTRS. 66 + add workaround for binding to set_field_type(), which uses varargs. 67 The original binding from 990220 relied on the prevalent 68 implementation of varargs which did not support or need va_copy(). 69 + add dependency on gen/Makefile.in needed for *-panels.ads 70 + add Library_Options to library.gpr 71 + add Languages to library.gpr, for gprbuild 72 73 20110307 74 + revert changes to limit-checks from 20110122 (Debian #616711). 75 > minor type-cleanup of Ada95 binding (Nicolas Boulenguez): 76 + corrected a minor sign error in a field of Low_Level_Field_Type, to 77 conform to form.h. 78 + replaced C_Int by Curses_Bool as return type for some callbacks, see 79 fieldtype(3FORM). 80 + modify samples/sample-explain.adb to provide explicit message when 81 explain.txt is not found. 82 83 20110305 84 + improve makefiles for Ada95 tree (patch by Nicolas Boulenguez). 85 + fix an off-by-one error in _nc_slk_initialize() from 20100605 fixes 86 for compiler warnings (report by Nicolas Boulenguez). 87 + modify Ada95/gen/gen.c to declare unused bits in generated layouts, 88 needed to compile when chtype is 64-bits using gnat 4.4.5 89 90 20110226 5.8 release for upload to 91 92 20110226 93 + update release notes, for 5.8. 94 + regenerated html manpages. 95 + change open() in _nc_read_file_entry() to fopen() for consistency 96 with write_file(). 97 + modify misc/run_tic.in to create parent directory, in case this is 98 a new install of hashed database. 99 + fix typo in Ada95/mk-1st.awk which causes error with original awk. 100 101 20110220 102 + configure script rpath fixes from xterm #269. 103 + workaround for cygwin's non-functional features.h, to force ncurses' 104 configure script to define _XOPEN_SOURCE_EXTENDED when building 105 wide-character configuration. 106 + build-fix in run_tic.sh for OS/2 EMX install 107 + add cons25-debian entry (patch by Brian M Carlson, Debian #607662). 108 109 20110212 110 + regenerated html manpages. 111 + use _tracef() in show_where() function of tic, to work correctly with 112 special case of trace configuration. 113 114 20110205 115 + add xterm-utf8 entry as a demo of the U8 feature -TD 116 + add U8 feature to denote entries for terminal emulators which do not 117 support VT100 SI/SO when processing UTF-8 encoding -TD 118 + improve the NCURSES_NO_UTF8_ACS feature by adding a check for an 119 extended terminfo capability U8 (prompted by mailing list 120 discussion). 121 122 20110122 123 + start documenting interface changes for upcoming 5.8 release. 124 + correct limit-checks in derwin(). 125 + correct limit-checks in newwin(), to ensure that windows have nonzero 126 size (report by Garrett Cooper). 127 + fix a missing "weak" declaration for pthread_kill (patch by Nicholas 128 Alcock). 129 + improve documentation of KEY_ENTER in curs_getch.3x manpage (prompted 130 by discussion with Kevin Martin). 131 132 20110115 133 + modify Ada95/configure script to make the --with-curses-dir option 134 work without requiring the --with-ncurses option. 135 + modify test programs to allow them to be built with NetBSD curses. 136 + document thick- and double-line symbols in curs_add_wch.3x manpage. 137 + document WACS_xxx constants in curs_add_wch.3x manpage. 138 + fix some warnings for clang 2.6 "--analyze" 139 + modify Ada95 makefiles to make html-documentation with the project 140 file configuration if that is used. 141 + update config.guess, config.sub 142 143 20110108 144 + regenerated html manpages. 145 + minor fixes to enable lint when trace is not enabled, e.g., with 146 clang --analyze. 147 + fix typo in man/default_colors.3x (patch by Tim van der Molen). 148 + update ncurses/llib-lncurses* 149 150 20110101 151 + fix remaining strict compiler warnings in ncurses library ABI=5, 152 except those dealing with function pointers, etc. 153 154 20101225 155 + modify nc_tparm.h, adding guards against repeated inclusion, and 156 allowing TPARM_ARG to be overridden. 157 + fix some strict compiler warnings in ncurses library. 158 159 20101211 160 + suppress ncv in screen entry, allowing underline (patch by Alejandro 161 R Sedeno). 162 + also suppress ncv in konsole-base -TD 163 + fixes in wins_nwstr() and related functions to ensure that special 164 characters, i.e., control characters are handled properly with the 165 wide-character configuration. 166 + correct a comparison in wins_nwstr() (Redhat #661506). 167 + correct help-messages in some of the test-programs, which still 168 referred to quitting with 'q'. 169 170 20101204 171 + add special case to _nc_infotocap() to recognize the setaf/setab 172 strings from xterm+256color and xterm+88color, and provide a reduced 173 version which works with termcap. 174 + remove obsolete emacs "Local Variables" section from documentation 175 (request by Sven Joachim). 176 + update doc/html/index.html to include NCURSES-Programming-HOWTO.html 177 (report by Sven Joachim). 178 179 20101128 180 + modify test/configure and test/Makefile.in to handle this special 181 case of building within a build-tree (Debian #34182): 182 mkdir -p build && cd build && ../test/configure && make 183 184 20101127 185 + miscellaneous build-fixes for Ada95 and test-directories when built 186 out-of-tree. 187 + use VPATH in makefiles to simplify out-of-tree builds (Debian #34182). 188 + fix typo in rmso for tek4106 entry -Goran Weinholt 189 190 20101120 191 + improve checks in test/configure for X libraries, from xterm #267 192 changes. 193 + modify test/configure to allow it to use the build-tree's libraries 194 e.g., when using that to configure the test-programs without the 195 rpath feature (request by Sven Joachim). 196 + repurpose "gnome" terminfo entries as "vte", retaining "gnome" items 197 for compatibility, but generally deprecating those since the VTE 198 library is what actually defines the behavior of "gnome", etc., 199 since 2003 -TD 200 201 20101113 202 + compiler warning fixes for test programs. 203 + various build-fixes for test-programs with pdcurses. 204 + updated configure checks for X packages in test/configure from xterm 205 #267 changes. 206 + add configure check to gnatmake, to accommodate cygwin. 207 208 20101106 209 + correct list of sub-directories needed in Ada95 tree for building as 210 a separate package. 211 + modify scripts in test-directory to improve builds as a separate 212 package. 213 214 20101023 215 + correct parsing of relative tab-stops in tabs program (report by 216 Philip Ganchev). 217 + adjust configure script so that "t" is not added to library suffix 218 when weak-symbols are used, allowing the pthread configuration to 219 more closely match the non-thread naming (report by Werner Fink). 220 + modify configure check for tic program, used for fallbacks, to a 221 warning if not found. This makes it simpler to use additonal 222 scripts to bootstrap the fallbacks code using tic from the build 223 tree (report by Werner Fink). 224 + fix several places in configure script using ${variable-value} form. 225 + modify configure macro CF_LDFLAGS_STATIC to accommodate some loaders 226 which do not support selectively linking against static libraries 227 (report by John P. Hartmann) 228 + fix an unescaped dash in man/tset.1 (report by Sven Joachim). 229 230 20101009 231 + correct comparison used for setting 16-colors in linux-16color 232 entry (Novell #644831) -TD 233 + improve linux-16color entry, using "dim" for color-8 which makes it 234 gray rather than black like color-0 -TD 235 + drop misc/ncu-indent and misc/jpf-indent; they are provided by an 236 external package "cindent". 237 238 20101002 239 + improve linkages in html manpages, adding references to the newer 240 pages, e.g., *_variables, curs_sp_funcs, curs_threads. 241 + add checks in tic for inconsistent cursor-movement controls, and for 242 inconsistent printer-controls. 243 + fill in no-parameter forms of cursor-movement where a parameterized 244 form is available -TD 245 + fill in missing cursor controls where the form of the controls is 246 ANSI -TD 247 + fix inconsistent punctuation in form_variables manpage (patch by 248 Sven Joachim). 249 + add parameterized cursor-controls to linux-basic (report by Dae) -TD 250 > patch by Juergen Pfeifer: 251 + document how to build 32-bit libraries in README.MinGW 252 + fixes to filename computation in mk-dlls.sh.in 253 + use POSIX locale in mk-dlls.sh.in rather than en_US (report by Sven 254 Joachim). 255 + add a check in mk-dlls.sh.in to obtain the size of a pointer to 256 distinguish between 32-bit and 64-bit hosts. The result is stored 257 in mingw_arch 258 259 20100925 260 + add "XT" capability to entries for terminals that support both 261 xterm-style mouse- and title-controls, for "screen" which 262 special-cases TERM beginning with "xterm" or "rxvt" -TD 263 > patch by Juergen Pfeifer: 264 + use 64-Bit MinGW toolchain (recommended package from TDM, see 265 README.MinGW). 266 + support pthreads when using the TDM MinGW toolchain 267 268 20100918 269 + regenerated html manpages. 270 + minor fixes for symlinks to curs_legacy.3x and curs_slk.3x manpages. 271 + add manpage for sp-funcs. 272 + add sp-funcs to test/listused.sh, for documentation aids. 273 274 20100911 275 + add manpages for summarizing public variables of curses-, terminfo- 276 and form-libraries. 277 + minor fixes to manpages for consistency (patch by Jason McIntyre). 278 + modify tic's -I/-C dump to reformat acsc strings into canonical form 279 (sorted, unique mapping) (cf: 971004). 280 + add configure check for pthread_kill(), needed for some old 281 platforms. 282 283 20100904 284 + add configure option --without-tests, to suppress building test 285 programs (request by Frederic L W Meunier). 286 287 20100828 288 + modify nsterm, xnuppc and tek4115 to make sgr/sgr0 consistent -TD 289 + add check in terminfo source-reader to provide more informative 290 message when someone attempts to run tic on a compiled terminal 291 description (prompted by Debian #593920). 292 + note in infotocap and captoinfo manpages that they read terminal 293 descriptions from text-files (Debian #593920). 294 + improve acsc string for vt52, show arrow keys (patch by Benjamin 295 Sittler). 296 297 20100814 298 + document in manpages that "mv" functions first use wmove() to check 299 the window pointer and whether the position lies within the window 300 (suggested by Poul-Henning Kamp). 301 + fixes to curs_color.3x, curs_kernel.3x and wresize.3x manpages (patch 302 by Tim van der Molen). 303 + modify configure script to transform library names for tic- and 304 tinfo-libraries so that those build properly with Mac OS X shared 305 library configuration. 306 + modify configure script to ensure that it removes conftest.dSYM 307 directory leftover on checks with Mac OS X. 308 + modify configure script to cleanup after check for symbolic links. 309 310 20100807 311 + correct a typo in mk-1st.awk (patch by Gabriele Balducci) 312 (cf: 20100724) 313 + improve configure checks for location of tic and infocmp programs 314 used for installing database and for generating fallback data, 315 e.g., for cross-compiling. 316 + add Markus Kuhn's wcwidth function for compiling MinGW 317 + add special case to CF_REGEX for cross-compiling to MinGW target. 318 319 20100731 320 + modify initialization check for win32con driver to eliminate need for 321 special case for TERM "unknown", using terminal database if available 322 (prompted by discussion with Roumen Petrov). 323 + for MinGW port, ensure that terminal driver is setup if tgetent() 324 is called (patch by Roumen Petrov). 325 + document tabs "-0" and "-8" options in manpage. 326 + fix Debian "lintian" issues with manpages reported in 327 328 329 20100724 330 + add a check in tic for missing set_tab if clear_all_tabs given. 331 + improve use of symbolic links in makefiles by using "-f" option if 332 it is supported, to eliminate temporary removal of the target 333 (prompted by) 334 + minor improvement to test/ncurses.c, reset color pairs in 'd' test 335 after exit from 'm' main-menu command. 336 + improved ncu-indent, from mawk changes, allows more than one of 337 GCC_NORETURN, GCC_PRINTFLIKE and GCC_SCANFLIKE on a single line. 338 339 20100717 340 + add hard-reset for rs2 to wsvt25 to help ensure that reset ends 341 the alternate character set (patch by Nicholas Marriott) 342 + remove tar-copy.sh and related configure/Makefile chunks, since the 343 Ada95 binding is now installed using rules in Ada95/src. 344 345 20100703 346 + continue integrating changes to use gnatmake project files in Ada95 347 + add/use configure check to turn on project rules for Ada95/src. 348 + revert the vfork change from 20100130, since it does not work. 349 350 20100626 351 + continue integrating changes to use gnatmake project files in Ada95 352 + old gnatmake (3.15) does not produce libraries using project-file; 353 work around by adding script to generate alternate makefile. 354 355 20100619 356 + continue integrating changes to use gnatmake project files in Ada95 357 + add configure --with-ada-sharedlib option, for the test_make rule. 358 + move Ada95-related logic into aclocal.m4, since additional checks 359 will be needed to distinguish old/new implementations of gnat. 360 361 20100612 362 + start integrating changes to use gnatmake project files in Ada95 tree 363 + add test_make / test_clean / test_install rules in Ada95/src 364 + change install-path for adainclude directory to /usr/share/ada (was 365 /usr/lib/ada). 366 + update Ada95/configure. 367 + add mlterm+256color entry, for mlterm 3.0.0 -TD 368 + modify test/configure to use macros to ensure consistent order 369 of updating LIBS variable. 370 371 20100605 372 + change search order of options for Solaris in CF_SHARED_OPTS, to 373 work with 64-bit compiles. 374 + correct quoting of assignment in CF_SHARED_OPTS case for aix 375 (cf: 20081227) 376 377 20100529 378 + regenerated html documentation. 379 + modify test/configure to support pkg-config for checking X libraries 380 used by PDCurses. 381 + add/use configure macro CF_ADD_LIB to force consistency of 382 assignments to $LIBS, etc. 383 + fix configure script for combining --with-pthread 384 and --enable-weak-symbols options. 385 386 20100522 387 + correct cross-compiling configure check for CF_MKSTEMP macro, by 388 adding a check cache variable set by AC_CHECK_FUNC (report by 389 Pierre Labastie). 390 + simplify include-dependencies of make_hash and make_keys, to reduce 391 the need for setting BUILD_CPPFLAGS in cross-compiling when the 392 build- and target-machines differ. 393 + repair broken-linker configuration by restoring a definition of SP 394 variable to curses.priv.h, and adjusting for cases where sp-funcs 395 are used. 396 + improve configure macro CF_AR_FLAGS, allowing ARFLAGS environment 397 variable to override (prompted by report by Pablo Cazallas). 398 399 20100515 400 + add configure option --enable-pthreads-eintr to control whether the 401 new EINTR feature is enabled. 402 + modify logic in pthread configuration to allow EINTR to interrupt 403 a read operation in wgetch() (Novell #540571, patch by Werner Fink). 404 + drop mkdirs.sh, use "mkdir -p". 405 + add configure option --disable-libtool-version, to use the 406 "-version-number" feature which was added in libtool 1.5 (report by 407 Peter Haering). The default value for the option uses the newer 408 feature, which makes libraries generated using libtool compatible 409 with the standard builds of ncurses. 410 + updated test/configure to match configure script macros. 411 + fixes for configure script from lynx changes: 412 + improve CF_FIND_LINKAGE logic for the case where a function is 413 found in predefined libraries. 414 + revert part of change to CF_HEADER (cf: 20100424) 415 416 20100501 417 + correct limit-check in wredrawln, accounting for begy/begx values 418 (patch by David Benjamin). 419 + fix most compiler warnings from clang. 420 + amend build-fix for OpenSolaris, to ensure that a system header is 421 included in curses.h before testing feature symbols, since they 422 may be defined by that route. 423 424 20100424 425 + fix some strict compiler warnings in ncurses library. 426 + modify configure macro CF_HEADER_PATH to not look for variations in 427 the predefined include directories. 428 + improve configure macros CF_GCC_VERSION and CF_GCC_WARNINGS to work 429 with gcc 4.x's c89 alias, which gives warning messages for cases 430 where older versions would produce an error. 431 432 20100417 433 + modify _nc_capcmp() to work with cancelled strings. 434 + correct translation of "^" in _nc_infotocap(), used to transform 435 terminfo to termcap strings 436 + add configure --disable-rpath-hack, to allow disabling the feature 437 which adds rpath options for libraries in unusual places. 438 + improve CF_RPATH_HACK_2 by checking if the rpath option for a given 439 directory was already added. 440 + improve CF_RPATH_HACK_2 by using ldd to provide a standard list of 441 directories (which will be ignored). 442 443 20100410 444 + improve win_driver.c handling of mouse: 445 + discard motion events 446 + avoid calling _nc_timed_wait when there is a mouse event 447 + handle 4th and "rightmost" buttons. 448 + quote substitutions in CF_RPATH_HACK_2 configure macro, needed for 449 cases where there are embedded blanks in the rpath option. 450 451 20100403 452 + add configure check for exctags vs ctags, to work around pkgsrc. 453 + simplify logic in _nc_get_screensize() to make it easier to see how 454 environment variables may override system- and terminfo-values 455 (prompted by discussion with Igor Bujna). 456 + make debug-traces for COLOR_PAIR and PAIR_NUMBER less verbose. 457 + improve handling of color-pairs embedded in attributes for the 458 extended-colors configuration. 459 + modify MKlib_gen.sh to build link_test with sp-funcs. 460 + build-fixes for OpenSolaris aka Solaris 11, for wide-character 461 configuration as well as for rpath feature in *-config scripts. 462 463 20100327 464 + refactor CF_SHARED_OPTS configure macro, making CF_RPATH_HACK more 465 reusable. 466 + improve configure CF_REGEX, similar fixes. 467 + improve configure CF_FIND_LINKAGE, adding add check between system 468 (default) and explicit paths, where we can find the entrypoint in the 469 given library. 470 + add check if Gpm_Open() returns a -2, e.g., for "xterm". This is 471 normally suppressed but can be overridden using $NCURSES_GPM_TERMS. 472 Ensure that Gpm_Close() is called in this case. 473 474 20100320 475 + rename atari and st52 terminfo entries to atari-old, st52-old, use 476 newer entries from FreeMiNT by Guido Flohr (from patch/report by Alan 477 Hourihane). 478 479 20100313 480 + modify install-rule for manpages so that *-config manpages will 481 install when building with --srcdir (report by Sven Joachim). 482 + modify CF_DISABLE_LEAKS configure macro so that the --enable-leaks 483 option is not the same as --disable-leaks (GenToo #305889). 484 + modify #define's for build-compiler to suppress cchar_t symbol from 485 compile of make_hash and make_keys, improving cross-compilation of 486 ncursesw (report by Bernhard Rosenkraenzer). 487 + modify CF_MAN_PAGES configure macro to replace all occurrences of 488 TPUT in tput.1's manpage (Debian #573597, report/analysis by Anders 489 Kaseorg). 490 491 20100306 492 + generate manpages for the *-config scripts, adapted from help2man 493 (suggested by Sven Joachim). 494 + use va_copy() in _nc_printf_string() to avoid conflicting use of 495 va_list value in _nc_printf_length() (report by Wim Lewis). 496 497 20100227 498 + add Ada95/configure script, to use in tar-file created by 499 Ada95/make-tar.sh 500 + fix typo in wresize.3x (patch by Tim van der Molen). 501 + modify screen-bce.XXX entries to exclude ech, since screen's color 502 model does not clear with color for that feature -TD 503 504 20100220 505 + add make-tar.sh scripts to Ada95 and test subdirectories to help with 506 making those separately distributable. 507 + build-fix for static libraries without dlsym (Debian #556378). 508 + fix a syntax error in man/form_field_opts.3x (patch by Ingo 509 Schwarze). 510 511 20100213 512 + add several screen-bce.XXX entries -TD 513 514 20100206 515 + update mrxvt terminfo entry -TD 516 + modify win_driver.c to support mouse single-clicks. 517 + correct name for termlib in ncurses*-config, e.g., if it is renamed 518 to provide a single file for ncurses/ncursesw libraries (patch by 519 Miroslav Lichvar). 520 521 20100130 522 + use vfork in test/ditto.c if available (request by Mike Frysinger). 523 + miscellaneous cleanup of manpages. 524 + fix typo in curs_bkgd.3x (patch by Tim van der Molen). 525 + build-fix for --srcdir (patch by Miroslav Lichvar). 526 527 20100123 528 + for term-driver configuration, ensure that the driver pointer is 529 initialized in setupterm so that terminfo/termcap programs work. 530 + amend fix for Debian #542031 to ensure that wattrset() returns only 531 OK or ERR, rather than the attribute value (report by Miroslav 532 Lichvar). 533 + reorder WINDOWLIST to put WINDOW data after SCREEN pointer, making 534 _nc_screen_of() compatible between normal/wide libraries again (patch 535 by Miroslav Lichvar) 536 + review/fix include-dependencies in modules files (report by Miroslav 537 Lichvar). 538 539 20100116 540 + modify win_driver.c to initialize acs_map for win32 console, so 541 that line-drawing works. 542 + modify win_driver.c to initialize TERMINAL struct so that programs 543 such as test/lrtest.c and test/ncurses.c which test string 544 capabilities can run. 545 + modify term-driver modules to eliminate forward-reference 546 declarations. 547 548 20100109 549 + modify configure macro CF_XOPEN_SOURCE, etc., to use CF_ADD_CFLAGS 550 consistently to add new -D's while removing duplicates. 551 + modify a few configure macros to consistently put new options 552 before older in the list. 553 + add tiparm(), based on review of X/Open Curses Issue 7. 554 + minor documentation cleanup. 555 + update config.guess, config.sub from 556 557 (caveat - its maintainer put 2010 copyright date on files dated 2009) 558 559 20100102 560 + minor improvement to tic's checking of similar SGR's to allow for the 561 most common case of SGR 0. 562 + modify getmouse() to act as its documentation implied, returning on 563 each call the preceding event until none are left. When no more 564 events remain, it will return ERR. 565 566 20091227 567 + change order of lookup in progs/tput.c, looking for terminfo data 568 first. This fixes a confusion between termcap "sg" and terminfo 569 "sgr" or "sgr0", originally from 990123 changes, but exposed by 570 20091114 fixes for hashing. With this change, only "dl" and "ed" are 571 ambiguous (Mandriva #56272). 572 573 20091226 574 + add bterm terminfo entry, based on bogl 0.1.18 -TD 575 + minor fix to rxvt+pcfkeys terminfo entry -TD 576 + build-fixes for Ada95 tree for gnat 4.4 "style". 577 578 20091219 579 + remove old check in mvderwin() which prevented moving a derived 580 window whose origin happened to coincide with its parent's origin 581 (report by Katarina Machalkova). 582 + improve test/ncurses.c to put mouse droppings in the proper window. 583 + update minix terminfo entry -TD 584 + add bw (auto-left-margin) to nsterm* entries (Benjamin Sittler) 585 586 20091212 587 + correct transfer of multicolumn characters in multirow 588 field_buffer(), which stopped at the end of the first row due to 589 filling of unused entries in a cchar_t array with nulls. 590 + updated nsterm* entries (Benjamin Sittler, Emanuele Giaquinta) 591 + modify _nc_viscbuf2() and _tracecchar_t2() to show wide-character 592 nulls. 593 + use strdup() in set_menu_mark(), restore .marklen struct member on 594 failure. 595 + eliminate clause 3 from the UCB copyrights in read_termcap.c and 596 tset.c per 597 598 (patch by Nicholas Marriott). 599 + replace a malloc in tic.c with strdup, checking for failure (patch by 600 Nicholas Marriott). 601 + update config.guess, config.sub from 602 603 604 20091205 605 + correct layout of working window used to extract data in 606 wide-character configured by set_field_buffer (patch by Rafael 607 Garrido Fernandez) 608 + improve some limit-checks related to filename length in reading and 609 writing terminfo entries. 610 + ensure that filename is always filled in when attempting to read 611 a terminfo entry, so that infocmp can report the filename (patch 612 by Nicholas Marriott). 613 614 20091128 615 + modify mk-1st.awk to allow tinfo library to be built when term-driver 616 is enabled. 617 + add error-check to configure script to ensure that sp-funcs is 618 enabled if term-driver is, since some internal interfaces rely upon 619 this. 620 621 20091121 622 + fix case where progs/tput is used while sp-funcs is configure; this 623 requires save/restore of out-character function from _nc_prescreen 624 rather than the SCREEN structure (report by Charles Wilson). 625 + fix typo in man/curs_trace.3x which caused incorrect symbolic links 626 + improved configure macros CF_GCC_ATTRIBUTES, CF_PROG_LINT. 627 628 20091114 629 630 + updated man/curs_trace.3x 631 + limit hashing for termcap-names to 2-characters (Ubuntu #481740). 632 + change a variable name in lib_newwin.c to make it clearer which 633 value is being freed on error (patch by Nicholas Marriott). 634 635 20091107 636 + improve test/ncurses.c color-cycling test by reusing attribute- 637 and color-cycling logic from the video-attributes screen. 638 + add ifdef'd with NCURSES_INTEROP_FUNCS experimental bindings in form 639 library which help make it compatible with interop applications 640 (patch by Juergen Pfeifer). 641 + add configure option --enable-interop, for integrating changes 642 for generic/interop support to form-library by Juergen Pfeifer 643 644 20091031 645 + modify use of $CC environment variable which is defined by X/Open 646 as a curses feature, to ignore it if it is not a single character 647 (prompted by discussion with Benjamin C W Sittler). 648 + add START_TRACE in slk_init 649 + fix a regression in _nc_ripoffline which made test/ncurses.c not show 650 soft-keys, broken in 20090927 merging. 651 + change initialization of "hidden" flag for soft-keys from true to 652 false, broken in 20090704 merging (Ubuntu #464274). 653 + update nsterm entries (patch by Benjamin C W Sittler, prompted by 654 discussion with Fabian Groffen in GenToo #206201). 655 + add test/xterm-256color.dat 656 657 20091024 658 + quiet some pedantic gcc warnings. 659 + modify _nc_wgetch() to check for a -1 in the fifo, e.g., after a 660 SIGWINCH, and discard that value, to avoid confusing application 661 (patch by Eygene Ryabinkin, FreeBSD bin/136223). 662 663 20091017 664 + modify handling of $PKG_CONFIG_LIBDIR to use only the first item in 665 a possibly colon-separated list (Debian #550716). 666 667 20091010 668 + supply a null-terminator to buffer in _nc_viswibuf(). 669 + fix a sign-extension bug in unget_wch() (report by Mike Gran). 670 + minor fixes to error-returns in default function for tputs, as well 671 as in lib_screen.c 672 673 20091003 674 + add WACS_xxx definitions to wide-character configuration for thick- 675 and double-lines (discussion with Slava Zanko). 676 + remove unnecessary kcan assignment to ^C from putty (Sven Joachim) 677 + add ccc and initc capabilities to xterm-16color -TD 678 > patch by Benjamin C W Sittler: 679 + add linux-16color 680 + correct initc capability of linux-c-nc end-of-range 681 + similar change for dg+ccc and dgunix+ccc 682 683 20090927 684 + move leak-checking for comp_captab.c into _nc_leaks_tinfo() since 685 that module since 20090711 is in libtinfo. 686 + add configure option --enable-term-driver, to allow compiling with 687 terminal-driver. That is used in MinGW port, and (being somewhat 688 more complicated) is an experimental alternative to the conventional 689 termlib internals. Currently, it requires the sp-funcs feature to 690 be enabled. 691 + completed integrating "sp-funcs" by Juergen Pfeifer in ncurses 692 library (some work remains for forms library). 693 694 20090919 695 + document return code from define_key (report by Mike Gran). 696 + make some symbolic links in the terminfo directory-tree shorter 697 (patch by Daniel Jacobowitz, forwarded by Sven Joachim).). 698 + fix some groff warnings in terminfo.5, etc., from recent Debian 699 changes. 700 + change ncv and op capabilities in sun-color terminfo entry to match 701 Sun's entry for this (report by Laszlo Peter). 702 + improve interix smso terminfo capability by using reverse rather than 703 bold (report by Kristof Zelechovski). 704 705 20090912 706 + add some test programs (and make these use the same special keys 707 by sharing linedata.h functions): 708 test/test_addstr.c 709 test/test_addwstr.c 710 test/test_addchstr.c 711 test/test_add_wchstr.c 712 + correct internal _nc_insert_ch() to use _nc_insert_wch() when 713 inserting wide characters, since the wins_wch() function that it used 714 did not update the cursor position (report by Ciprian Craciun). 715 716 20090906 717 + fix typo s/is_timeout/is_notimeout/ which made "man is_notimeout" not 718 work. 719 + add null-pointer checks to other opaque-functions. 720 + add is_pad() and is_subwin() functions for opaque access to WINDOW 721 (discussion with Mark Dickinson). 722 + correct merge to lib_newterm.c, which broke when sp-funcs was 723 enabled. 724 725 20090905 726 + build-fix for building outside source-tree (report by Sven Joachim). 727 + fix Debian lintian warning for man/tabs.1 by making section number 728 agree with file-suffix (report by Sven Joachim). 729 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 730 731 20090829 732 + workaround for bug in g++ 4.1-4.4 warnings for wattrset() macro on 733 amd64 (Debian #542031). 734 + fix typo in curs_mouse.3x (Debian #429198). 735 736 20090822 737 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 738 739 20090815 740 + correct use of terminfo capabilities for initializing soft-keys, 741 broken in 20090509 merging. 742 + modify wgetch() to ensure it checks SIGWINCH when it gets an error 743 in non-blocking mode (patch by Clemens Ladisch). 744 + use PATH_SEPARATOR symbol when substituting into run_tic.sh, to 745 help with builds on non-Unix platforms such as OS/2 EMX. 746 + modify scripting for misc/run_tic.sh to test configure script's 747 $cross_compiling variable directly rather than comparing host/build 748 compiler names (prompted by comment in GenToo #249363). 749 + fix configure script option --with-database, which was coded as an 750 enable-type switch. 751 + build-fixes for --srcdir (report by Frederic L W Meunier). 752 753 20090808 754 + separate _nc_find_entry() and _nc_find_type_entry() from 755 implementation details of hash function. 756 757 20090803 758 + add tabs.1 to man/man_db.renames 759 + modify lib_addch.c to compensate for removal of wide-character test 760 from unctrl() in 20090704 (Debian #539735). 761 762 20090801 763 + improve discussion in INSTALL for use of system's tic/infocmp for 764 cross-compiling and building fallbacks. 765 + modify test/demo_termcap.c to correspond better to options in 766 test/demo_terminfo.c 767 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 768 + fix logic for 'V' in test/ncurses.c tests f/F. 769 770 20090728 771 + correct logic in tigetnum(), which caused tput program to treat all 772 string capabilities as numeric (report by Rajeev V Pillai, 773 cf: 20090711). 774 775 20090725 776 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 777 778 20090718 779 + fix a null-pointer check in _nc_format_slks() in lib_slk.c, from 780 20070704 changes. 781 + modify _nc_find_type_entry() to use hashing. 782 + make CCHARW_MAX value configurable, noting that changing this would 783 change the size of cchar_t, and would be ABI-incompatible. 784 + modify test-programs, e.g,. test/view.c, to address subtle 785 differences between Tru64/Solaris and HPUX/AIX getcchar() return 786 values. 787 + modify length returned by getcchar() to count the trailing null 788 which is documented in X/Open (cf: 20020427). 789 + fixes for test programs to build/work on HPUX and AIX, etc. 790 791 20090711 792 + improve performance of tigetstr, etc., by using hashing code from tic. 793 + minor fixes for memory-leak checking. 794 + add test/demo_terminfo, for comparison with demo_termcap 795 796 20090704 797 + remove wide-character checks from unctrl() (patch by Clemens Ladisch). 798 + revise wadd_wch() and wecho_wchar() to eliminate dependency on 799 unctrl(). 800 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 801 802 20090627 803 + update llib-lncurses[wt] to use sp-funcs. 804 + various code-fixes to build/work with --disable-macros configure 805 option. 806 + add several new files from Juergen Pfeifer which will be used when 807 integration of "sp-funcs" is complete. This includes a port to 808 MinGW. 809 810 20090613 811 + move definition for NCURSES_WRAPPED_VAR back to ncurses_dll.h, to 812 make includes of term.h without curses.h work (report by "Nix"). 813 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 814 815 20090607 816 + fix a regression in lib_tputs.c, from ongoing merges. 817 818 20090606 819 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 820 821 20090530 822 + fix an infinite recursion when adding a legacy-coding 8-bit value 823 using insch() (report by Clemens Ladisch). 824 + free home-terminfo string in del_curterm() (patch by Dan Weber). 825 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 826 827 20090523 828 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 829 830 20090516 831 + work around antique BSD game's manipulation of stdscr, etc., versus 832 SCREEN's copy of the pointer (Debian #528411). 833 + add a cast to wattrset macro to avoid compiler warning when comparing 834 its result against ERR (adapted from patch by Matt Kraii, Debian 835 #528374). 836 837 20090510 838 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 839 840 20090502 841 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 842 + add vwmterm terminfo entry (patch by Bryan Christ). 843 844 20090425 845 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 846 847 20090419 848 + build fix for _nc_free_and_exit() change in 20090418 (report by 849 Christian Ebert). 850 851 20090418 852 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 853 854 20090411 855 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 856 This change finishes merging for menu and panel libraries, does 857 part of the form library. 858 859 20090404 860 + suppress configure check for static/dynamic linker flags for gcc on 861 Darwin (report by Nelson Beebe). 862 863 20090328 864 + extend ansi.sys pfkey capability from kf1-kf10 to kf1-kf48, moving 865 function key definitions from emx-base for consistency -TD 866 + correct missing final 'p' in pfkey capability of ansi.sys-old (report 867 by Kalle Olavi Niemitalo). 868 + improve test/ncurses.c 'F' test, show combining characters in color. 869 + quiet a false report by cppcheck in c++/cursesw.cc by eliminating 870 a temporary variable. 871 + use _nc_doalloc() rather than realloc() in a few places in ncurses 872 library to avoid leak in out-of-memory condition (reports by William 873 Egert and Martin Ettl based on cppcheck tool). 874 + add --with-ncurses-wrap-prefix option to test/configure (discussion 875 with Charles Wilson). 876 + use ncurses*-config scripts if available for test/configure. 877 + update test/aclocal.m4 and test/configure 878 > patches by Charles Wilson: 879 + modify CF_WITH_LIBTOOL configure check to allow unreleased libtool 880 version numbers (e.g. which include alphabetic chars, as well as 881 digits, after the final '.'). 882 + improve use of -no-undefined option for libtool by setting an 883 intermediate variable LT_UNDEF in the configure script, and then 884 using that in the libtool link-commands. 885 + fix an missing use of NCURSES_PUBLIC_VAR() in tinfo/MKcodes.awk 886 from 2009031 changes. 887 + improve mk-1st.awk script by writing separate cases for the 888 LIBTOOL_LINK command, depending on which library (ncurses, ticlib, 889 termlib) is to be linked. 890 + modify configure.in to allow broken-linker configurations, not just 891 enable-reentrant, to set public wrap prefix. 892 893 20090321 894 + add TICS_LIST and SHLIB_LIST to allow libtool 2.2.6 on Cygwin to 895 build with tic and term libraries (patch by Charles Wilson). 896 + add -no-undefined option to libtool for Cygwin, MinGW, U/Win and AIX 897 (report by Charles Wilson). 898 + fix definition for c++/Makefile.in's SHLIB_LIST, which did not list 899 the form, menu or panel libraries (patch by Charles Wilson). 900 + add configure option --with-wrap-prefix to allow setting the prefix 901 for functions used to wrap global variables to something other than 902 "_nc_" (discussion with Charles Wilson). 903 904 20090314 905 + modify scripts to generate ncurses*-config and pc-files to add 906 dependency for tinfo library (patch by Charles Wilson). 907 + improve comparison of program-names when checking for linked flavors 908 such as "reset" by ignoring the executable suffix (reports by Charles 909 Wilson, Samuel Thibault and Cedric Bretaudeau on Cygwin mailing 910 list). 911 + suppress configure check for static/dynamic linker flags for gcc on 912 Solaris 10, since gcc is confused by absence of static libc, and 913 does not switch back to dynamic mode before finishing the libraries 914 (reports by Joel Bertrand, Alan Pae). 915 + minor fixes to Intel compiler warning checks in configure script. 916 + modify _nc_leaks_tinfo() so leak-checking in test/railroad.c works. 917 + modify set_curterm() to make broken-linker configuration work with 918 changes from 20090228 (report by Charles Wilson). 919 920 20090228 921 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 922 + modify declaration of cur_term when broken-linker is used, but 923 enable-reentrant is not, to match pre-5.7 (report by Charles Wilson). 924 925 20090221 926 + continue integrating "sp-funcs" by Juergen Pfeifer (incomplete). 927 928 20090214 929 + add configure script --enable-sp-funcs to enable the new set of 930 extended functions. 931 + start integrating patches by Juergen Pfeifer: 932 + add extended functions which specify the SCREEN pointer for several 933 curses functions which use the global SP (these are incomplete; 934 some internals work is needed to complete these). 935 + add special cases to configure script for MinGW port. 936 937 20090207 938 + update several configure macros from lynx changes 939 + append (not prepend) to CFLAGS/CPPFLAGS 940 + change variable from PATHSEP to PATH_SEPARATOR 941 + improve install-rules for pc-files (patch by Miroslav Lichvar). 942 + make it work with $DESTDIR 943 + create the pkg-config library directory if needed. 944 945 20090124 946 + modify init_pair() to allow caller to create extra color pairs beyond 947 the color_pairs limit, which use default colors (request by Emanuele 948 Giaquinta). 949 + add misc/terminfo.tmp and misc/*.pc to "sources" rule. 950 + fix typo "==" where "=" is needed in ncurses-config.in and 951 gen-pkgconfig.in files (Debian #512161). 952 953 20090117 954 + add -shared option to MK_SHARED_LIB when -Bsharable is used, for 955 *BSD's, without which "main" might be one of the shared library's 956 dependencies (report/analysis by Ken Dickey). 957 + modify waddch_literal(), updating line-pointer after a multicolumn 958 character is found to not fit on the current row, and wrapping is 959 done. Since the line-pointer was not updated, the wrapped 960 multicolumn character was written to the beginning of the current row 961 (cf: 20041023, reported by "Nick" regarding problem with ncmpc 962). 963 964 20090110 965 + add screen.Eterm terminfo entry (GenToo #124887) -TD 966 + modify adacurses-config to look for ".ali" files in the adalib 967 directory. 968 + correct install for Ada95, which omitted libAdaCurses.a used in 969 adacurses-config 970 + change install for adacurses-config to provide additional flavors 971 such as adacursesw-config, for ncursesw (GenToo #167849). 972 973 20090105 974 + remove undeveloped feature in ncurses-config.in for setting 975 prefix variable. 976 + recent change to ncurses-config.in did not take into account the 977 --disable-overwrite option, which sets $includedir to the 978 subdirectory and using just that for a -I option does not work - fix 979 (report by Frederic L W Meunier). 980 981 20090104 982 + modify gen-pkgconfig.in to eliminate a dependency on rpath when 983 deciding whether to add $LIBS to --libs output; that should be shown 984 for the ncurses and tinfo libraries without taking rpath into 985 account. 986 + fix an overlooked change from $AR_OPTS to $ARFLAGS in mk-1st.awk, 987 used in static libraries (report by Marty Jack). 988 989 20090103 990 + add a configure-time check to pick a suitable value for 991 CC_SHARED_OPTS for Solaris (report by Dagobert Michelsen). 992 + add configure --with-pkg-config and --enable-pc-files options, along 993 with misc/gen-pkgconfig.in which can be used to generate ".pc" files 994 for pkg-config (request by Jan Engelhardt). 995 + use $includedir symbol in misc/ncurses-config.in, add --includedir 996 option. 997 + change makefiles to use $ARFLAGS rather than $AR_OPTS, provide a 998 configure check to detect whether a "-" is needed before "ar" 999 options. 1000 + update config.guess, config.sub from 1001 1002 1003 20081227 1004 + modify mk-1st.awk to work with extra categories for tinfo library. 1005 + modify configure script to allow building shared libraries with gcc 1006 on AIX 5 or 6 (adapted from patch by Lital Natan). 1007 1008 20081220 1009 + modify to omit the opaque-functions from lib_gen.o when 1010 --disable-ext-funcs is used. 1011 + add test/clip_printw.c to illustrate how to use printw without 1012 wrapping. 1013 + modify ncurses 'F' test to demo wborder_set() with colored lines. 1014 + modify ncurses 'f' test to demo wborder() with colored lines. 1015 1016 20081213 1017 + add check for failure to open hashed-database needed for db4.6 1018 (GenToo #245370). 1019 + corrected --without-manpages option; previous change only suppressed 1020 the auxiliary rules install.man and uninstall.man 1021 + add case for FreeMINT to configure macro CF_XOPEN_SOURCE (patch from 1022 GenToo #250454). 1023 + fixes from NetBSD port at 1024 1025 patch-ac (build-fix for DragonFly) 1026 patch-ae (use INSTALL_SCRIPT for installing misc/ncurses*-config). 1027 + improve configure script macros CF_HEADER_PATH and CF_LIBRARY_PATH 1028 by adding CFLAGS, CPPFLAGS and LDFLAGS, LIBS values to the 1029 search-lists. 1030 + correct title string for keybound manpage (patch by Frederic Culot, 1031 OpenBSD documentation/6019), 1032 1033 20081206 1034 + move del_curterm() call from _nc_freeall() to _nc_leaks_tinfo() to 1035 work for progs/clear, progs/tabs, etc. 1036 + correct buffer-size after internal resizing of wide-character 1037 set_field_buffer(), broken in 20081018 changes (report by Mike Gran). 1038 + add "-i" option to test/filter.c to tell it to use initscr() rather 1039 than newterm(), to investigate report on comp.unix.programmer that 1040 ncurses would clear the screen in that case (it does not - the issue 1041 was xterm's alternate screen feature). 1042 + add check in mouse-driver to disable connection if GPM returns a 1043 zero, indicating that the connection is closed (Debian #506717, 1044 adapted from patch by Samuel Thibault). 1045 1046 20081129 1047 + improve a workaround in adding wide-characters, when a control 1048 character is found. The library (cf: 20040207) uses unctrl() to 1049 obtain a printable version of the control character, but was not 1050 passing color or video attributes. 1051 + improve test/ncurses.c 'a' test, using unctrl() more consistently to 1052 display meta-characters. 1053 + turn on _XOPEN_CURSES definition in curses.h 1054 + add eterm-color entry (report by Vincent Lefevre) -TD 1055 + correct use of key_name() in test/ncurses.c 'A' test, which only 1056 displays wide-characters, not key-codes since 20070612 (report by 1057 Ricardo Cantu). 1058 1059 20081122 1060 + change _nc_has_mouse() to has_mouse(), reflect its use in C++ and 1061 Ada95 (patch by Juergen Pfeifer). 1062 + document in TO-DO an issue with Cygwin's package for GNAT (report 1063 by Mike Dennison). 1064 + improve error-checking of command-line options in "tabs" program. 1065 1066 20081115 1067 + change several terminfo entries to make consistent use of ANSI 1068 clear-all-tabs -TD 1069 + add "tabs" program (prompted by Debian #502260). 1070 + add configure --without-manpages option (request by Mike Frysinger). 1071 1072 20081102 5.7 release for upload to 1073 1074 20081025 1075 + add a manpage to discuss memory leaks. 1076 + add support for shared libraries for QNX (other than libtool, which 1077 does not work well on that platform). 1078 + build-fix for QNX C++ binding. 1079 1080 20081018 1081 + build-fixes for OS/2 EMX. 1082 + modify form library to accept control characters such as newline 1083 in set_field_buffer(), which is compatible with Solaris (report by 1084 Nit Khair). 1085 + modify configure script to assume --without-hashed-db when 1086 --disable-database is used. 1087 + add "-e" option in ncurses/Makefile.in when generating source-files 1088 to force earlier exit if the build environment fails unexpectedly 1089 (prompted by patch by Adrian Bunk). 1090 + change configure script to use CF_UTF8_LIB, improved variant of 1091 CF_LIBUTF8. 1092 1093 20081012 1094 + add teraterm4.59 terminfo entry, use that as primary teraterm entry, rename 1095 original to teraterm2.3 -TD 1096 + update "gnome" terminfo to 2.22.3 -TD 1097 + update "konsole" terminfo to 1.6.6, needs today's fix for tic -TD 1098 + add "aterm" terminfo -TD 1099 + add "linux2.6.26" terminfo -TD 1100 + add logic to tic for cancelling strings in user-defined capabilities, 1101 overlooked til now. 1102 1103 20081011 1104 + regenerated html documentation. 1105 + add -m and -s options to test/keynames.c and test/key_names.c to test 1106 the meta() function with keyname() or key_name(), respectively. 1107 + correct return value of key_name() on error; it is null. 1108 + document some unresolved issues for rpath and pthreads in TO-DO. 1109 + fix a missing prototype for ioctl() on OpenBSD in tset.c 1110 + add configure option --disable-tic-depends to make explicit whether 1111 tic library depends on ncurses/ncursesw library, amends change from 1112 20080823 (prompted by Debian #501421). 1113 1114 20081004 1115 + some build-fixes for configure --disable-ext-funcs (incomplete, but 1116 works for C/C++ parts). 1117 + improve configure-check for awks unable to handle large strings, e.g. 1118 AIX 5.1 whose awk silently gives up on large printf's. 1119 1120 20080927 1121 + fix build for --with-dmalloc by workaround for redefinition of 1122 strndup between string.h and dmalloc.h 1123 + fix build for --disable-sigwinch 1124 + add environment variable NCURSES_GPM_TERMS to allow override to use 1125 GPM on terminals other than "linux", etc. 1126 + disable GPM mouse support when $TERM does not happen to contain 1127 "linux", since Gpm_Open() no longer limits its assertion to terminals 1128 that it might handle, e.g., within "screen" in xterm. 1129 + reset mouse file-descriptor when unloading GPM library (report by 1130 Miroslav Lichvar). 1131 + fix build for --disable-leaks --enable-widec --with-termlib 1132 > patch by Juergen Pfeifer: 1133 + use improved initialization for soft-label keys in Ada95 sample code. 1134 + discard internal symbol _nc_slk_format (unused since 20080112). 1135 + move call of slk_paint_info() from _nc_slk_initialize() to 1136 slk_intern_refresh(), improving initialization. 1137 1138 20080925 1139 + fix bug in mouse code for GPM from 20080920 changes (reported in 1140 Debian #500103, also Miroslav Lichvar). 1141 1142 20080920 1143 + fix shared-library rules for cygwin with tic- and tinfo-libraries. 1144 + fix a memory leak when failure to connect to GPM. 1145 + correct check for notimeout() in wgetch() (report on linux.redhat 1146 newsgroup by FurtiveBertie). 1147 + add an example warning-suppression file for valgrind, 1148 misc/ncurses.supp (based on example from Reuben Thomas) 1149 1150 20080913 1151 + change shared-library configuration for OpenBSD, make rpath work. 1152 + build-fixes for using libutf8, e.g., on OpenBSD 3.7 1153 1154 20080907 1155 + corrected fix for --enable-weak-symbols (report by Frederic L W 1156 Meunier). 1157 1158 20080906 1159 + corrected gcc options for building shared libraries on IRIX64. 1160 + add configure check for awk programs unable to handle big-strings, 1161 use that to improve the default for --enable-big-strings option. 1162 + makefile-fixes for --enable-weak-symbols (report by Frederic L W 1163 Meunier). 1164 + update test/configure script. 1165 + adapt ifdef's from library to make test/view.c build when mbrtowc() 1166 is unavailable, e.g., with HPUX 10.20. 1167 + add configure check for wcsrtombs, mbsrtowcs, which are used in 1168 test/ncurses.c, and use wcstombs, mbstowcs instead if available, 1169 fixing build of ncursew for HPUX 11.00 1170 1171 20080830 1172 + fixes to make Ada95 demo_panels() example work. 1173 + modify Ada95 'rain' test program to accept keyboard commands like the 1174 C-version. 1175 + modify BeOS-specific ifdef's to build on Haiku (patch by Scott 1176 Mccreary). 1177 + add configure-check to see if the std namespace is legal for cerr 1178 and endl, to fix a build issue with Tru64. 1179 + consistently use NCURSES_BOOL in lib_gen.c 1180 + filter #line's from lib_gen.c 1181 + change delimiter in MKlib_gen.sh from '%' to '@', to avoid 1182 substitution by IBM xlc to '#' as part of its extensions to digraphs. 1183 + update config.guess, config.sub from 1184 1185 (caveat - its maintainer removed support for older Linux systems). 1186 1187 20080823 1188 + modify configure check for pthread library to work with OSF/1 5.1, 1189 which uses #define's to associate its header and library. 1190 + use pthread_mutexattr_init() for initializing pthread_mutexattr_t, 1191 makes threaded code work on HPUX 11.23 1192 + fix a bug in demo_menus in freeing menus (cf: 20080804). 1193 + modify configure script for the case where tic library is used (and 1194 possibly renamed) to remove its dependency upon ncurses/ncursew 1195 library (patch by Dr Werner Fink). 1196 + correct manpage for menu_fore() which gave wrong default for 1197 the attribute used to display a selected entry (report by Mike Gran). 1198 + add Eterm-256color, Eterm-88color and rxvt-88color (prompted by 1199 Debian #495815) -TD 1200 1201 20080816 1202 + add configure option --enable-weak-symbols to turn on new feature. 1203 + add configure-check for availability of weak symbols. 1204 + modify linkage with pthread library to use weak symbols so that 1205 applications not linked to that library will not use the mutexes, 1206 etc. This relies on gcc, and may be platform-specific (patch by Dr 1207 Werner Fink). 1208 + add note to INSTALL to document limitation of renaming of tic library 1209 using the --with-ticlib configure option (report by Dr Werner Fink). 1210 + document (in manpage) why tputs does not detect I/O errors (prompted 1211 by comments by Samuel Thibault). 1212 + fix remaining warnings from Klocwork report. 1213 1214 20080804 1215 + modify _nc_panelhook() data to account for a permanent memory leak. 1216 + fix memory leaks in test/demo_menus 1217 + fix most warnings from Klocwork tool (report by Larry Zhou). 1218 + modify configure script CF_XOPEN_SOURCE macro to add case for 1219 "dragonfly" from xterm #236 changes. 1220 + modify configure script --with-hashed-db to let $LIBS override the 1221 search for the db library (prompted by report by Samson Pierre). 1222 1223 20080726 1224 + build-fixes for gcc 4.3.1 (changes to gnat "warnings", and C inlining 1225 thresholds). 1226 1227 20080713 1228 + build-fix (reports by Christian Ebert, Funda Wang). 1229 1230 20080712 1231 + compiler-warning fixes for Solaris. 1232 1233 20080705 1234 + use NCURSES_MOUSE_MASK() in definition of BUTTON_RELEASE(), etc., to 1235 make those work properly with the "--enable-ext-mouse" configuration 1236 (cf: 20050205). 1237 + improve documentation of build-cc options in INSTALL. 1238 + work-around a bug in gcc 4.2.4 on AIX, which does not pass the 1239 -static/-dynamic flags properly to linker, causing test/bs to 1240 not link. 1241 1242 20080628 1243 + correct some ifdef's needed for the broken-linker configuration. 1244 + make debugging library's $BAUDRATE feature work for termcap 1245 interface. 1246 + make $NCURSES_NO_PADDING feature work for termcap interface (prompted 1247 by comment on FreeBSD mailing list). 1248 + add screen.mlterm terminfo entry -TD 1249 + improve mlterm and mlterm+pcfkeys terminfo entries -TD 1250 1251 20080621 1252 + regenerated html documentation. 1253 + expand manpage description of parameters for form_driver() and 1254 menu_driver() (prompted by discussion with Adam Spragg). 1255 + add null-pointer checks for cur_term in baudrate() and 1256 def_shell_mode(), def_prog_mode() 1257 + fix some memory leaks in delscreen() and wide acs. 1258 1259 20080614 1260 + modify test/ditto.c to illustrate multi-threaded use_screen(). 1261 + change CC_SHARED_OPTS from -KPIC to -xcode=pic32 for Solaris. 1262 + add "-shared" option to MK_SHARED_LIB for gcc on Solaris (report 1263 by Poor Yorick). 1264 1265 20080607 1266 + finish changes to wgetch(), making it switch as needed to the 1267 window's actual screen when calling wrefresh() and wgetnstr(). That 1268 allows wgetch() to get used concurrently in different threads with 1269 some minor restrictions, e.g., the application should not delete a 1270 window which is being used in a wgetch(). 1271 + simplify mutex's, combining the window- and screen-mutex's. 1272 1273 20080531 1274 + modify wgetch() to use the screen which corresponds to its window 1275 parameter rather than relying on SP; some dependent functions still 1276 use SP internally. 1277 + factor out most use of SP in lib_mouse.c, using parameter. 1278 + add internal _nc_keyname(), replacing keyname() to associate with a 1279 particular SCREEN rather than the global SP. 1280 + add internal _nc_unctrl(), replacing unctrl() to associate with a 1281 particular SCREEN rather than the global SP. 1282 + add internal _nc_tracemouse(), replacing _tracemouse() to eliminate 1283 its associated global buffer _nc_globals.tracemse_buf now in SCREEN. 1284 + add internal _nc_tracechar(), replacing _tracechar() to use SCREEN in 1285 preference to the global _nc_globals.tracechr_buf buffer. 1286 1287 20080524 1288 + modify _nc_keypad() to make it switch temporarily as needed to the 1289 screen which must be updated. 1290 + wrap cur_term variable to help make _nc_keymap() thread-safe, and 1291 always set the screen's copy of this variable in set_curterm(). 1292 + restore curs_set() state after endwin()/refresh() (report/patch 1293 Miroslav Lichvar) 1294 1295 20080517 1296 + modify configure script to note that --enable-ext-colors and 1297 --enable-ext-mouse are not experimental, but extensions from 1298 the ncurses ABI 5. 1299 + corrected manpage description of setcchar() (discussion with 1300 Emanuele Giaquinta). 1301 + fix for adding a non-spacing character at the beginning of a line 1302 (report/patch by Miroslav Lichvar). 1303 1304 20080503 1305 + modify screen.* terminfo entries using new screen+fkeys to fix 1306 overridden keys in screen.rxvt (Debian #478094) -TD 1307 + modify internal interfaces to reduce wgetch()'s dependency on the 1308 global SP. 1309 + simplify some loops with macros each_screen(), each_window() and 1310 each_ripoff(). 1311 1312 20080426 1313 + continue modifying test/ditto.c toward making it demonstrate 1314 multithreaded use_screen(), using fifos to pass data between screens. 1315 + fix typo in form.3x (report by Mike Gran). 1316 1317 20080419 1318 + add screen.rxvt terminfo entry -TD 1319 + modify tic -f option to format spaces as \s to prevent them from 1320 being lost when that is read back in unformatted strings. 1321 + improve test/ditto.c, using a "talk"-style layout. 1322 1323 20080412 1324 + change test/ditto.c to use openpty() and xterm. 1325 + add locks for copywin(), dupwin(), overlap(), overlay() on their 1326 window parameters. 1327 + add locks for initscr() and newterm() on updates to the SCREEN 1328 pointer. 1329 + finish table in curs_thread.3x manpage. 1330 1331 20080405 1332 + begin table in curs_thread.3x manpage describing the scope of data 1333 used by each function (or symbol) for threading analysis. 1334 + add null-pointer checks to setsyx() and getsyx() (prompted by 1335 discussion by Martin v. Lowis and Jeroen Ruigrok van der Werven on 1336 python-dev2 mailing list). 1337 1338 20080329 1339 + add null-pointer checks in set_term() and delscreen(). 1340 + move _nc_windows into _nc_globals, since windows can be pads, which 1341 are not associated with a particular screen. 1342 + change use_screen() to pass the SCREEN* parameter rather than 1343 stdscr to the callback function. 1344 + force libtool to use tag for 'CC' in case it does not detect this, 1345 e.g., on aix when using CC=powerpc-ibm-aix5.3.0.0-gcc 1346 (report/patch by Michael Haubenwallner). 1347 + override OBJEXT to "lo" when building with libtool, to work on 1348 platforms such as AIX where libtool may use a different suffix for 1349 the object files than ".o" (report/patch by Michael Haubenwallner). 1350 + add configure --with-pthread option, for building with the POSIX 1351 thread library. 1352 1353 20080322 1354 + fill in extended-color pair two more places in wbkgrndset() and 1355 waddch_nosync() (prompted by Sedeno's patch). 1356 + fill in extended-color pair in _nc_build_wch() to make colors work 1357 for wide-characters using extended-colors (patch by Alejandro R 1358 Sedeno). 1359 + add x/X toggles to ncurses.c C color test to test/demo 1360 wide-characters with extended-colors. 1361 + add a/A toggles to ncurses.c c/C color tests. 1362 + modify test/ditto.c to use use_screen(). 1363 + finish modifying test/rain.c to demonstrate threads. 1364 1365 20080308 1366 + start modifying test/rain.c for threading demo. 1367 + modify test/ncurses.c to make 'f' test accept the f/F/b/F/</> toggles 1368 that the 'F' accepts. 1369 + modify test/worm.c to show trail in reverse-video when other threads 1370 are working concurrently. 1371 + fix a deadlock from improper nesting of mutexes for windowlist and 1372 window. 1373 1374 20080301 1375 + fixes from 20080223 resolved issue with mutexes; change to use 1376 recursive mutexes to fix memory leak in delwin() as called from 1377 _nc_free_and_exit(). 1378 1379 20080223 1380 + fix a size-difference in _nc_globals which caused hanging of mutex 1381 lock/unlock when termlib was built separately. 1382 1383 20080216 1384 + avoid using nanosleep() in threaded configuration since that often 1385 is implemented to suspend the entire process. 1386 1387 20080209 1388 + update test programs to build/work with various UNIX curses for 1389 comparisons. This was to reinvestigate statement in X/Open curses 1390 that insnstr and winsnstr perform wrapping. None of the Unix-branded 1391 implementations do this, as noted in manpage (cf: 20040228). 1392 1393 20080203 1394 + modify _nc_setupscreen() to set the legacy-coding value the same 1395 for both narrow/wide models. It had been set only for wide model, 1396 but is needed to make unctrl() work with locale in the narrow model. 1397 + improve waddch() and winsch() handling of EILSEQ from mbrtowc() by 1398 using unctrl() to display illegal bytes rather than trying to append 1399 further bytes to make up a valid sequence (reported by Andrey A 1400 Chernov). 1401 + modify unctrl() to check codes in 128-255 range versus isprint(). 1402 If they are not printable, and locale was set, use a "M-" or "~" 1403 sequence. 1404 1405 20080126 1406 + improve threading in test/worm.c (wrap refresh calls, and KEY_RESIZE 1407 handling). Now it hangs in napms(), no matter whether nanosleep() 1408 or poll() or select() are used on Linux. 1409 1410 20080119 1411 + fixes to build with --disable-ext-funcs 1412 + add manpage for use_window and use_screen. 1413 + add set_tabsize() and set_escdelay() functions. 1414 1415 20080112 1416 + remove recursive-mutex definitions, finish threading demo for worm.c 1417 + remove a redundant adjustment of lines in resizeterm.c's 1418 adjust_window() which caused occasional misadjustment of stdscr when 1419 softkeys were used. 1420 1421 20080105 1422 + several improvements to terminfo entries based on xterm #230 -TD 1423 + modify MKlib_gen.sh to handle keyname/key_name prototypes, so the 1424 "link_test" builds properly. 1425 + fix for toe command-line options -u/-U to ensure filename is given. 1426 + fix allocation-size for command-line parsing in infocmp from 20070728 1427 (report by Miroslav Lichvar) 1428 + improve resizeterm() by moving ripped-off lines, and repainting the 1429 soft-keys (report by Katarina Machalkova) 1430 + add clarification in wclear's manpage noting that the screen will be 1431 cleared even if a subwindow is cleared (prompted by Christer Enfors 1432 question). 1433 + change test/ncurses.c soft-key tests to work with KEY_RESIZE. 1434 1435 20071222 1436 + continue implementing support for threading demo by adding mutex 1437 for delwin(). 1438 1439 20071215 1440 + add several functions to C++ binding which wrap C functions that 1441 pass a WINDOW* parameter (request by Chris Lee). 1442 1443 20071201 1444 + add note about configure options needed for Berkeley database to the 1445 INSTALL file. 1446 + improve checks for version of Berkeley database libraries. 1447 + amend fix for rpath to not modify LDFLAGS if the platform has no 1448 applicable transformation (report by Christian Ebert, cf: 20071124). 1449 1450 20071124 1451 + modify configure option --with-hashed-db to accept a parameter which 1452 is the install-prefix of a given Berkeley Database (prompted by 1453 pierre4d2 comments). 1454 + rewrite wrapper for wcrtomb(), making it work on Solaris. This is 1455 used in the form library to determine the length of the buffer needed 1456 by field_buffer (report by Alfred Fung). 1457 + remove unneeded window-parameter from C++ binding for wresize (report 1458 by Chris Lee). 1459 1460 20071117 1461 + modify the support for filesystems which do not support mixed-case to 1462 generate 2-character (hexadecimal) codes for the lower-level of the 1463 filesystem terminfo database (request by Michail Vidiassov). 1464 + add configure option --enable-mixed-case, to allow overriding the 1465 configure script's check if the filesystem supports mixed-case 1466 filenames. 1467 + add wresize() to C++ binding (request by Chris Lee). 1468 + define NCURSES_EXT_FUNCS and NCURSES_EXT_COLORS in curses.h to make 1469 it simpler to tell if the extended functions and/or colors are 1470 declared. 1471 1472 20071103 1473 + update memory-leak checks for changes to names.c and codes.c 1474 + correct acsc strings in h19, z100 (patch by Benjamin C W Sittler). 1475 1476 20071020 1477 + continue implementing support for threading demo by adding mutex 1478 for use_window(). 1479 + add mrxvt terminfo entry, add/fix xterm building blocks for modified 1480 cursor keys -TD 1481 + compile with FreeBSD "contemporary" TTY interface (patch by 1482 Rong-En Fan). 1483 1484 20071013 1485 + modify makefile rules to allow clear, tput and tset to be built 1486 without libtic. The other programs (infocmp, tic and toe) rely on 1487 that library. 1488 + add/modify null-pointer checks in several functions for SP and/or 1489 the WINDOW* parameter (report by Thorben Krueger). 1490 + fixes for field_buffer() in formw library (see Redhat Bugzilla 1491 #310071, patches by Miroslav Lichvar). 1492 + improve performance of NCURSES_CHAR_EQ code (patch by Miroslav 1493 Lichvar). 1494 + update/improve mlterm and rxvt terminfo entries, e.g., for 1495 the modified cursor- and keypad-keys -TD 1496 1497 20071006 1498 + add code to curses.priv.h ifdef'd with NCURSES_CHAR_EQ, which 1499 changes the CharEq() macro to an inline function to allow comparing 1500 cchar_t struct's without comparing gaps in a possibly unpacked 1501 memory layout (report by Miroslav Lichvar). 1502 1503 20070929 1504 + add new functions to lib_trace.c to setup mutex's for the _tracef() 1505 calls within the ncurses library. 1506 + for the reentrant model, move _nc_tputs_trace and _nc_outchars into 1507 the SCREEN. 1508 + start modifying test/worm.c to provide threading demo (incomplete). 1509 + separated ifdef's for some BSD-related symbols in tset.c, to make 1510 it compile on LynxOS (report by Greg Gemmer). 1511 20070915 1512 + modify Ada95/gen/Makefile to use shlib script, to simplify building 1513 shared-library configuration on platforms lacking rpath support. 1514 + build-fix for Ada95/src/Makefile to reflect changed dependency for 1515 the terminal-interface-curses-aux.adb file which is now generated. 1516 + restructuring test/worm.c, for use_window() example. 1517 1518 20070908 1519 + add use_window() and use_screen() functions, to develop into support 1520 for threaded library (incomplete). 1521 + fix typos in man/curs_opaque.3x which kept the install script from 1522 creating symbolic links to two aliases created in 20070818 (report by 1523 Rong-En Fan). 1524 1525 20070901 1526 + remove a spurious newline from output of html.m4, which caused links 1527 for Ada95 html to be incorrect for the files generated using m4. 1528 + start investigating mutex's for SCREEN manipulation (incomplete). 1529 + minor cleanup of codes.c/names.c for --enable-const 1530 + expand/revise "Routine and Argument Names" section of ncurses manpage 1531 to address report by David Givens in newsgroup discussion. 1532 + fix interaction between --without-progs/--with-termcap configure 1533 options (report by Michail Vidiassov). 1534 + fix typo in "--disable-relink" option (report by Michail Vidiassov). 1535 1536 20070825 1537 + fix a sign-extension bug in infocmp's repair_acsc() function 1538 (cf: 971004). 1539 + fix old configure script bug which prevented "--disable-warnings" 1540 option from working (patch by Mike Frysinger). 1541 1542 20070818 1543 + add 9term terminal description (request by Juhapekka Tolvanen) -TD 1544 + modify comp_hash.c's string output to avoid misinterpreting a null 1545 "\0" followed by a digit. 1546 + modify MKnames.awk and MKcodes.awk to support big-strings. 1547 This only applies to the cases (broken linker, reentrant) where 1548 the corresponding arrays are accessed via wrapper functions. 1549 + split MKnames.awk into two scripts, eliminating the shell redirection 1550 which complicated the make process and also the bogus timestamp file 1551 which was introduced to fix "make -j". 1552 + add test/test_opaque.c, test/test_arrays.c 1553 + add wgetscrreg() and wgetparent() for applications that may need it 1554 when NCURSES_OPAQUE is defined (prompted by Bryan Christ). 1555 1556 20070812 1557 + amend treatment of infocmp "-r" option to retain the 1023-byte limit 1558 unless "-T" is given (cf: 981017). 1559 + modify comp_captab.c generation to use big-strings. 1560 + make _nc_capalias_table and _nc_infoalias_table private accessed via 1561 _nc_get_alias_table() since the tables are used only within the tic 1562 library. 1563 + modify configure script to skip Intel compiler in CF_C_INLINE. 1564 + make _nc_info_hash_table and _nc_cap_hash_table private accessed via 1565 _nc_get_hash_table() since the tables are used only within the tic 1566 library. 1567 1568 20070728 1569 + make _nc_capalias_table and _nc_infoalias_table private, accessed via 1570 _nc_get_alias_table() since they are used only by parse_entry.c 1571 + make _nc_key_names private since it is used only by lib_keyname.c 1572 + add --disable-big-strings configure option to control whether 1573 unctrl.c is generated using the big-string optimization - which may 1574 use strings longer than supported by a given compiler. 1575 + reduce relocation tables for tic, infocmp by changing type of 1576 internal hash tables to short, and make those private symbols. 1577 + eliminate large fixed arrays from progs/infocmp.c 1578 1579 20070721 1580 + change winnstr() to stop at the end of the line (cf: 970315). 1581 + add test/test_get_wstr.c 1582 + add test/test_getstr.c 1583 + add test/test_inwstr.c 1584 + add test/test_instr.c 1585 1586 20070716 1587 + restore a call to obtain screen-size in _nc_setupterm(), which 1588 is used in tput and other non-screen applications via setupterm() 1589 (Debian #433357, reported by Florent Bayle, Christian Ohm, 1590 cf: 20070310). 1591 1592 20070714 1593 + add test/savescreen.c test-program 1594 + add check to trace-file open, if the given name is a directory, add 1595 ".log" to the name and try again. 1596 + add konsole-256color entry -TD 1597 + add extra gcc warning options from xterm. 1598 + minor fixes for ncurses/hashmap test-program. 1599 + modify configure script to quiet c++ build with libtool when the 1600 --disable-echo option is used. 1601 + modify configure script to disable ada95 if libtool is selected, 1602 writing a warning message (addresses FreeBSD ports/114493). 1603 + update config.guess, config.sub 1604 1605 20070707 1606 + add continuous-move "M" to demo_panels to help test refresh changes. 1607 + improve fix for refresh of window on top of multi-column characters, 1608 taking into account some split characters on left/right window 1609 boundaries. 1610 1611 20070630 1612 + add "widec" row to _tracedump() output to help diagnose remaining 1613 problems with multi-column characters. 1614 + partial fix for refresh of window on top of multi-column characters 1615 which are partly overwritten (report by Sadrul H Chowdhury). 1616 + ignore A_CHARTEXT bits in vidattr() and vid_attr(), in case 1617 multi-column extension bits are passed there. 1618 + add setlocale() call to demo_panels.c, needed for wide-characters. 1619 + add some output flags to _nc_trace_ttymode to help diagnose a bug 1620 report by Larry Virden, i.e., ONLCR, OCRNL, ONOCR and ONLRET, 1621 1622 20070623 1623 + add test/demo_panels.c 1624 + implement opaque version of setsyx() and getsyx(). 1625 1626 20070612 1627 + corrected xterm+pcf2 terminfo modifiers for F1-F4, to match xterm 1628 #226 -TD 1629 + split-out key_name() from MKkeyname.awk since it now depends upon 1630 wunctrl() which is not in libtinfo (report by Rong-En Fan). 1631 1632 20070609 1633 + add test/key_name.c 1634 + add stdscr cases to test/inchs.c and test/inch_wide.c 1635 + update test/configure 1636 + correct formatting of DEL (0x7f) in _nc_vischar(). 1637 + null-terminate result of wunctrl(). 1638 + add null-pointer check in key_name() (report by Andreas Krennmair, 1639 cf: 20020901). 1640 1641 20070602 1642 + adapt mouse-handling code from menu library in form-library 1643 (discussion with Clive Nicolson). 1644 + add a modification of test/dots.c, i.e., test/dots_mvcur.c to 1645 illustrate how to use mvcur(). 1646 + modify wide-character flavor of SetAttr() to preserve the 1647 WidecExt() value stored in the .attr field, e.g., in case it 1648 is overwritten by chgat (report by Aleksi Torhamo). 1649 + correct buffer-size for _nc_viswbuf2n() (report by Aleksi Torhamo). 1650 + build-fixes for Solaris 2.6 and 2.7 (patch by Peter O'Gorman). 1651 1652 20070526 1653 + modify keyname() to use "^X" form only if meta() has been called, or 1654 if keyname() is called without initializing curses, e.g., via 1655 initscr() or newterm() (prompted by LinuxBase #1604). 1656 + document some portability issues in man/curs_util.3x 1657 + add a shadow copy of TTY buffer to _nc_prescreen to fix applications 1658 broken by moving that data into SCREEN (cf: 20061230). 1659 1660 20070512 1661 + add 'O' (wide-character panel test) in ncurses.c to demonstrate a 1662 problem reported by Sadrul H Chowdhury with repainting parts of 1663 a fullwidth cell. 1664 + modify slk_init() so that if there are preceding calls to 1665 ripoffline(), those affect the available lines for soft-keys (adapted 1666 from patch by Clive Nicolson). 1667 + document some portability issues in man/curs_getyx.3x 1668 1669 20070505 1670 + fix a bug in Ada95/samples/ncurses which caused a variable to 1671 become uninitialized in the "b" test. 1672 + fix Ada95/gen/Makefile.in adahtml rule to account for recent 1673 movement of files, fix a few incorrect manpage references in the 1674 generated html. 1675 + add Ada95 binding to _nc_freeall() as Curses_Free_All to help with 1676 memory-checking. 1677 + correct some functions in Ada95 binding which were using return value 1678 from C where none was returned: idcok(), immedok() and wtimeout(). 1679 + amend recent changes for Ada95 binding to make it build with 1680 Cygwin's linker, e.g., with configure options 1681 --enable-broken-linker --with-ticlib 1682 1683 20070428 1684 + add a configure check for gcc's options for inlining, use that to 1685 quiet a warning message where gcc's default behavior changed from 1686 3.x to 4.x. 1687 + improve warning message when checking if GPM is linked to curses 1688 library by not warning if its use of "wgetch" is via a weak symbol. 1689 + add loader options when building with static libraries to ensure that 1690 an installed shared library for ncurses does not conflict. This is 1691 reported as problem with Tru64, but could affect other platforms 1692 (report Martin Mokrejs, analysis by Tim Mooney). 1693 + fix build on cygwin after recent ticlib/termlib changes, i.e., 1694 + adjust TINFO_SUFFIX value to work with cygwin's dll naming 1695 + revert a change from 20070303 which commented out dependency of 1696 SHLIB_LIST in form/menu/panel/c++ libraries. 1697 + fix initialization of ripoff stack pointer (cf: 20070421). 1698 1699 20070421 1700 + move most static variables into structures _nc_globals and 1701 _nc_prescreen, to simplify storage. 1702 + add/use configure script macro CF_SIG_ATOMIC_T, use the corresponding 1703 type for data manipulated by signal handlers (prompted by comments 1704 in mailing.openbsd.bugs newsgroup). 1705 + modify CF_WITH_LIBTOOL to allow one to pass options such as -static 1706 to the libtool create- and link-operations. 1707 1708 20070414 1709 + fix whitespace in curs_opaque.3x which caused a spurious ';' in 1710 the installed aliases (report by Peter Santoro). 1711 + fix configure script to not try to generate adacurses-config when 1712 Ada95 tree is not built. 1713 1714 20070407 1715 + add man/curs_legacy.3x, man/curs_opaque.3x 1716 + fix acs_map binding for Ada95 when --enable-reentrant is used. 1717 + add adacurses-config to the Ada95 install, based on version from 1718 FreeBSD port, in turn by Juergen Pfeifer in 2000 (prompted by 1719 comment on comp.lang.ada newsgroup). 1720 + fix includes in c++ binding to build with Intel compiler 1721 (cf: 20061209). 1722 + update install rule in Ada95 to use mkdirs.sh 1723 > other fixes prompted by inspection for Coverity report: 1724 + modify ifdef's for c++ binding to use try/catch/throw statements 1725 + add a null-pointer check in tack/ansi.c request_cfss() 1726 + fix a memory leak in ncurses/base/wresize.c 1727 + corrected check for valid memu/meml capabilities in 1728 progs/dump_entry.c when handling V_HPUX case. 1729 > fixes based on Coverity report: 1730 + remove dead code in test/bs.c 1731 + remove dead code in test/demo_defkey.c 1732 + remove an unused assignment in progs/infocmp.c 1733 + fix a limit check in tack/ansi.c tools_charset() 1734 + fix tack/ansi.c tools_status() to perform the VT320/VT420 1735 tests in request_cfss(). The function had exited too soon. 1736 + fix a memory leak in tic.c's make_namelist() 1737 + fix a couple of places in tack/output.c which did not check for EOF. 1738 + fix a loop-condition in test/bs.c 1739 + add index checks in lib_color.c for color palettes 1740 + add index checks in progs/dump_entry.c for version_filter() handling 1741 of V_BSD case. 1742 + fix a possible null-pointer dereference in copywin() 1743 + fix a possible null-pointer dereference in waddchnstr() 1744 + add a null-pointer check in _nc_expand_try() 1745 + add a null-pointer check in tic.c's make_namelist() 1746 + add a null-pointer check in _nc_expand_try() 1747 + add null-pointer checks in test/cardfile.c 1748 + fix a double-free in ncurses/tinfo/trim_sgr0.c 1749 + fix a double-free in ncurses/base/wresize.c 1750 + add try/catch block to c++/cursesmain.cc 1751 1752 20070331 1753 + modify Ada95 binding to build with --enable-reentrant by wrapping 1754 global variables (bug: acs_map does not yet work). 1755 + modify Ada95 binding to use the new access-functions, allowing it 1756 to build/run when NCURSES_OPAQUE is set. 1757 + add access-functions and macros to return properties of the WINDOW 1758 structure, e.g., when NCURSES_OPAQUE is set. 1759 + improved install-sh's quoting. 1760 + use mkdirs.sh rather than mkinstalldirs, e.g., to use fixes from 1761 other programs. 1762 1763 20070324 1764 + eliminate part of the direct use of WINDOW data from Ada95 interface. 1765 + fix substitutions for termlib filename to make configure option 1766 --enable-reentrant work with --with-termlib. 1767 + change a constructor for NCursesWindow to allow compiling with 1768 NCURSES_OPAQUE set, since we cannot pass a reference to 1769 an opaque pointer. 1770 1771 20070317 1772 + ignore --with-chtype=unsigned since unsigned is always added to 1773 the type in curses.h; do the same for --with-mmask-t. 1774 + change warning regarding --enable-ext-colors and wide-character 1775 in the configure script to an error. 1776 + tweak error message in CF_WITH_LIBTOOL to distinguish other programs 1777 such as Darwin's libtool program (report by Michail Vidiassov) 1778 + modify edit_man.sh to allow for multiple substitutions per line. 1779 + set locale in misc/ncurses-config.in since it uses a range 1780 + change permissions libncurses++.a install (report by Michail 1781 Vidiassov). 1782 + corrected length of temporary buffer in wide-character version 1783 of set_field_buffer() (related to report by Bryan Christ). 1784 1785 20070311 1786 + fix mk-1st.awk script install_shlib() function, broken in 20070224 1787 changes for cygwin (report by Michail Vidiassov). 1788 1789 20070310 1790 + increase size of array in _nc_visbuf2n() to make "tic -v" work 1791 properly in its similar_sgr() function (report/analysis by Peter 1792 Santoro). 1793 + add --enable-reentrant configure option for ongoing changes to 1794 implement a reentrant version of ncurses: 1795 + libraries are suffixed with "t" 1796 + wrap several global variables (curscr, newscr, stdscr, ttytype, 1797 COLORS, COLOR_PAIRS, COLS, ESCDELAY, LINES and TABSIZE) as 1798 functions returning values stored in SCREEN or cur_term. 1799 + move some initialization (LINES, COLS) from lib_setup.c, 1800 i.e., setupterm() to _nc_setupscreen(), i.e., newterm(). 1801 1802 20070303 1803 + regenerated html documentation. 1804 + add NCURSES_OPAQUE symbol to curses.h, will use to make structs 1805 opaque in selected configurations. 1806 + move the chunk in lib_acs.c which resets acs capabilities when 1807 running on a terminal whose locale interferes with those into 1808 _nc_setupscreen(), so the libtinfo/libtinfow files can be made 1809 identical (requested by Miroslav Lichvar). 1810 + do not use configure variable SHLIB_LIBS for building libraries 1811 outside the ncurses directory, since that symbol is customized 1812 only for that directory, and using it introduces an unneeded 1813 dependency on libdl (requested by Miroslav Lichvar). 1814 + modify mk-1st.awk so the generated makefile rules for linking or 1815 installing shared libraries do not first remove the library, in 1816 case it is in use, e.g., libncurses.so by /bin/sh (report by Jeff 1817 Chua). 1818 + revised section "Using NCURSES under XTERM" in ncurses-intro.html 1819 (prompted by newsgroup comment by Nick Guenther). 1820 1821 20070224 1822 + change internal return codes of _nc_wgetch() to check for cases 1823 where KEY_CODE_YES should be returned, e.g., if a KEY_RESIZE was 1824 ungetch'd, and read by wget_wch(). 1825 + fix static-library build broken in 20070217 changes to remove "-ldl" 1826 (report by Miroslav Lichvar). 1827 + change makefile/scripts for cygwin to allow building termlib. 1828 + use Form_Hook in manpages to match form.h 1829 + use Menu_Hook in manpages, as well as a few places in menu.h 1830 + correct form- and menu-manpages to use specific Field_Options, 1831 Menu_Options and Item_Options types. 1832 + correct prototype for _tracechar() in manpage (cf: 20011229). 1833 + correct prototype for wunctrl() in manpage. 1834 1835 20070217 1836 + fixes for $(TICS_LIST) in ncurses/Makefile (report by Miroslav 1837 Lichvar). 1838 + modify relinking of shared libraries to apply only when rpath is 1839 enabled, and add --disable-relink option which can be used to 1840 disable the feature altogether (reports by Michail Vidiassov, 1841 Adam J Richter). 1842 + fix --with-termlib option for wide-character configuration, stripping 1843 the "w" suffix in one place (report by Miroslav Lichvar). 1844 + remove "-ldl" from some library lists to reduce dependencies in 1845 programs (report by Miroslav Lichvar). 1846 + correct description of --enable-signed-char in configure --help 1847 (report by Michail Vidiassov). 1848 + add pattern for GNU/kFreeBSD configuration to CF_XOPEN_SOURCE, 1849 which matches an earlier change to CF_SHARED_OPTS, from xterm #224 1850 fixes. 1851 + remove "${DESTDIR}" from -install_name option used for linking 1852 shared libraries on Darwin (report by Michail Vidiassov). 1853 1854 20070210 1855 + add test/inchs.c, test/inch_wide.c, to test win_wchnstr(). 1856 + remove libdl from library list for termlib (report by Miroslav 1857 Lichvar). 1858 + fix configure.in to allow --without-progs --with-termlib (patch by 1859 Miroslav Lichvar). 1860 + modify win_wchnstr() to ensure that only a base cell is returned 1861 for each multi-column character (prompted by report by Wei Kong 1862 regarding change in mvwin_wch() cf: 20041023). 1863 1864 20070203 1865 + modify fix_wchnstr() in form library to strip attributes (and color) 1866 from the cchar_t array (field cells) read from a field's window. 1867 Otherwise, when copying the field cells back to the window, the 1868 associated color overrides the field's background color (report by 1869 Ricardo Cantu). 1870 + improve tracing for form library, showing created forms, fields, etc. 1871 + ignore --enable-rpath configure option if --with-shared was omitted. 1872 + add _nc_leaks_tinfo(), _nc_free_tic(), _nc_free_tinfo() entrypoints 1873 to allow leak-checking when both tic- and tinfo-libraries are built. 1874 + drop CF_CPP_VSCAN_FUNC macro from configure script, since C++ binding 1875 no longer relies on it. 1876 + disallow combining configure script options --with-ticlib and 1877 --enable-termcap (report by Rong-En Fan). 1878 + remove tack from ncurses tree. 1879 1880 20070128 1881 + fix typo in configure script that broke --with-termlib option 1882 (report by Rong-En Fan). 1883 1884 20070127 1885 + improve fix for FreeBSD gnu/98975, to allow for null pointer passed 1886 to tgetent() (report by Rong-en Fan). 1887 + update tack/HISTORY and tack/README to tell how to build it after 1888 it is removed from the ncurses tree. 1889 + fix configure check for libtool's version to trim blank lines 1890 (report by sci-fi@hush.ai). 1891 + review/eliminate other original-file artifacts in cursesw.cc, making 1892 its license consistent with ncurses. 1893 + use ncurses vw_scanw() rather than reading into a fixed buffer in 1894 the c++ binding for scanw() methods (prompted by report by Nuno Dias). 1895 + eliminate fixed-buffer vsprintf() calls in c++ binding. 1896 1897 20070120 1898 + add _nc_leaks_tic() to separate leak-checking of tic library from 1899 term/ncurses libraries, and thereby eliminate a library dependency. 1900 + fix test/mk-test.awk to ignore blank lines. 1901 + correct paths in include/headers, for --srcdir (patch by Miroslav 1902 Lichvar). 1903 1904 20070113 1905 + add a break-statement in misc/shlib to ensure that it exits on the 1906 _first_ matched directory (report by Paul Novak). 1907 + add tack/configure, which can be used to build tack outside the 1908 ncurses build-tree. 1909 + add --with-ticlib option, to build/install the tic-support functions 1910 in a separate library (suggested by Miroslav Lichvar). 1911 1912 20070106 1913 + change MKunctrl.awk to reduce relocation table for unctrl.o 1914 + change MKkeyname.awk to reduce relocation table for keyname.o 1915 (patch by Miroslav Lichvar). 1916 1917 20061230 1918 + modify configure check for libtool's version to trim blank lines 1919 (report by sci-fi@hush.ai). 1920 + modify some modules to allow them to be reentrant if _REENTRANT is 1921 defined: lib_baudrate.c, resizeterm.c (local data only) 1922 + eliminate static data from some modules: add_tries.c, hardscroll.c, 1923 lib_ttyflags.c, lib_twait.c 1924 + improve manpage install to add aliases for the transformed program 1925 names, e.g., from --program-prefix. 1926 + used linklint to verify links in the HTML documentation, made fixes 1927 to manpages as needed. 1928 + fix a typo in curs_mouse.3x (report by William McBrine). 1929 + fix install-rule for ncurses5-config to make the bin-directory. 1930 1931 20061223 1932 + modify configure script to omit the tic (terminfo compiler) support 1933 from ncurses library if --without-progs option is given. 1934 + modify install rule for ncurses5-config to do this via "install.libs" 1935 + modify shared-library rules to allow FreeBSD 3.x to use rpath. 1936 + update config.guess, config.sub 1937 1938 20061217 5.6 release for upload to 1939 1940 20061217 1941 + add ifdef's for <wctype.h> for HPUX, which has the corresponding 1942 definitions in <wchar.h>. 1943 + revert the va_copy() change from 20061202, since it was neither 1944 correct nor portable. 1945 + add $(LOCAL_LIBS) definition to progs/Makefile.in, needed for 1946 rpath on Solaris. 1947 + ignore wide-acs line-drawing characters that wcwidth() claims are 1948 not one-column. This is a workaround for Solaris' broken locale 1949 support. 1950 1951 20061216 1952 + modify configure --with-gpm option to allow it to accept a parameter, 1953 i.e., the name of the dynamic GPM library to load via dlopen() 1954 (requested by Bryan Henderson). 1955 + add configure option --with-valgrind, changes from vile. 1956 + modify configure script AC_TRY_RUN and AC_TRY_LINK checks to use 1957 'return' in preference to 'exit()'. 1958 1959 20061209 1960 + change default for --with-develop back to "no". 1961 + add XTABS to tracing of TTY bits. 1962 + updated autoconf patch to ifdef-out the misfeature which declares 1963 exit() for configure tests. This fixes a redefinition warning on 1964 Solaris. 1965 + use ${CC} rather than ${LD} in shared library rules for IRIX64, 1966 Solaris to help ensure that initialization sections are provided for 1967 extra linkage requirements, e.g., of C++ applications (prompted by 1968 comment by Casper Dik in newsgroup). 1969 + rename "$target" in CF_MAN_PAGES to make it easier to distinguish 1970 from the autoconf predefined symbol. There was no conflict, 1971 since "$target" was used only in the generated edit_man.sh file, 1972 but SuSE's rpm package contains a patch. 1973 1974 20061202 1975 + update man/term.5 to reflect extended terminfo support and hashed 1976 database configuration. 1977 + updates for test/configure script. 1978 + adapted from SuSE rpm package: 1979 + remove long-obsolete workaround for broken-linker which declared 1980 cur_term in tic.c 1981 + improve error recovery in PUTC() macro when wcrtomb() does not 1982 return usable results for an 8-bit character. 1983 + patches from rpm package (SuSE): 1984 + use va_copy() in extra varargs manipulation for tracing version 1985 of printw, etc. 1986 + use a va_list rather than a null in _nc_freeall()'s call to 1987 _nc_printf_string(). 1988 + add some see-also references in manpages to show related 1989 wide-character functions (suggested by Claus Fischer). 1990 1991 20061125 1992 + add a check in lib_color.c to ensure caller does not increase COLORS 1993 above max_colors, which is used as an array index (discussion with 1994 Simon Sasburg). 1995 + add ifdef's allowing ncurses to be built with tparm() using either 1996 varargs (the existing status), or using a fixed-parameter list (to 1997 match X/Open). 1998 1999 20061104 2000 + fix redrawing of windows other than stdscr using wredrawln() by 2001 touching the corresponding rows in curscr (discussion with Dan 2002 Gookin). 2003 + add test/redraw.c 2004 + add test/echochar.c 2005 + review/cleanup manpage descriptions of error-returns for form- and 2006 menu-libraries (prompted by FreeBSD docs/46196). 2007 2008 20061028 2009 + add AUTHORS file -TD 2010 + omit the -D options from output of the new config script --cflags 2011 option (suggested by Ralf S Engelschall). 2012 + make NCURSES_INLINE unconditionally defined in curses.h 2013 2014 20061021 2015 + revert change to accommodate bash 3.2, since that breaks other 2016 platforms, e.g., Solaris. 2017 + minor fixes to NEWS file to simplify scripting to obtain list of 2018 contributors. 2019 + improve some shared-library configure scripting for Linux, FreeBSD 2020 and NetBSD to make "--with-shlib-version" work. 2021 + change configure-script rules for FreeBSD shared libraries to allow 2022 for rpath support in versions past 3. 2023 + use $(DESTDIR) in makefile rules for installing/uninstalling the 2024 package config script (reports/patches by Christian Wiese, 2025 Ralf S Engelschall). 2026 + fix a warning in the configure script for NetBSD 2.0, working around 2027 spurious blanks embedded in its ${MAKEFLAGS} symbol. 2028 + change test/Makefile to simplify installing test programs in a 2029 different directory when --enable-rpath is used. 2030 2031 20061014 2032 + work around bug in bash 3.2 by adding extra quotes (Jim Gifford). 2033 + add/install a package config script, e.g., "ncurses5-config" or 2034 "ncursesw5-config", according to configuration options. 2035 2036 20061007 2037 + add several GNU Screen terminfo variations with 16- and 256-colors, 2038 and status line (Alain Bench). 2039 + change the way shared libraries (other than libtool) are installed. 2040 Rather than copying the build-tree's libraries, link the shared 2041 objects into the install directory. This makes the --with-rpath 2042 option work except with $(DESTDIR) (cf: 20000930). 2043 2044 20060930 2045 + fix ifdef in c++/internal.h for QNX 6.1 2046 + test-compiled with (old) egcs-1.1.2, modified configure script to 2047 not unset the $CXX and related variables which would prevent this. 2048 + fix a few terminfo.src typos exposed by improvments to "-f" option. 2049 + improve infocmp/tic "-f" option formatting. 2050 2051 20060923 2052 + make --disable-largefile option work (report by Thomas M Ott). 2053 + updated html documentation. 2054 + add ka2, kb1, kb3, kc2 to vt220-keypad as an extension -TD 2055 + minor improvements to rxvt+pcfkeys -TD 2056 2057 20060916 2058 + move static data from lib_mouse.c into SCREEN struct. 2059 + improve ifdef's for _POSIX_VDISABLE in tset to work with Mac OS X 2060 (report by Michail Vidiassov). 2061 + modify CF_PATH_SYNTAX to ensure it uses the result from --prefix 2062 option (from lynx changes) -TD 2063 + adapt AC_PROG_EGREP check, noting that this is likely to be another 2064 place aggravated by POSIXLY_CORRECT. 2065 + modify configure check for awk to ensure that it is found (prompted 2066 by report by Christopher Parker). 2067 + update config.sub 2068 2069 20060909 2070 + add kon, kon2 and jfbterm terminfo entry (request by Till Maas) -TD 2071 + remove invis capability from klone+sgr, mainly used by linux entry, 2072 since it does not really do this -TD 2073 2074 20060903 2075 + correct logic in wadd_wch() and wecho_wch(), which did not guard 2076 against passing the multi-column attribute into a call on waddch(), 2077 e.g., using data returned by win_wch() (cf: 20041023) 2078 (report by Sadrul H Chowdhury). 2079 2080 20060902 2081 + fix kterm's acsc string -TD 2082 + fix for change to tic/infocmp in 20060819 to ensure no blank is 2083 embedded into a termcap description. 2084 + workaround for 20050806 ifdef's change to allow visbuf.c to compile 2085 when using --with-termlib --with-trace options. 2086 + improve tgetstr() by making the return value point into the user's 2087 buffer, if provided (patch by Miroslav Lichvar (see Redhat Bugzilla 2088 #202480)). 2089 + correct libraries needed for foldkeys (report by Stanislav Ievlev) 2090 2091 20060826 2092 + add terminfo entries for xfce terminal (xfce) and multi gnome 2093 terminal (mgt) -TD 2094 + add test/foldkeys.c 2095 2096 20060819 2097 + modify tic and infocmp to avoid writing trailing blanks on terminfo 2098 source output (Debian #378783). 2099 + modify configure script to ensure that if the C compiler is used 2100 rather than the loader in making shared libraries, the $(CFLAGS) 2101 variable is also used (Redhat Bugzilla #199369). 2102 + port hashed-db code to db2 and db3. 2103 + fix a bug in tgetent() from 20060625 and 20060715 changes 2104 (patch/analysis by Miroslav Lichvar (see Redhat Bugzilla #202480)). 2105 2106 20060805 2107 + updated xterm function-keys terminfo to match xterm #216 -TD 2108 + add configure --with-hashed-db option (tested only with FreeBSD 6.0, 2109 e.g., the db 1.8.5 interface). 2110 2111 20060729 2112 + modify toe to access termcap data, e.g., via cgetent() functions, 2113 or as a text file if those are not available. 2114 + use _nc_basename() in tset to improve $SHELL check for csh/sh. 2115 + modify _nc_read_entry() and _nc_read_termcap_entry() so infocmp, 2116 can access termcap data when the terminfo database is disabled. 2117 2118 20060722 2119 + widen the test for xterm kmous a little to allow for other strings 2120 than \E[M, e.g., for xterm-sco functionality in xterm. 2121 + update xterm-related terminfo entries to match xterm patch #216 -TD 2122 + update config.guess, config.sub 2123 2124 20060715 2125 + fix for install-rule in Ada95 to add terminal_interface.ads 2126 and terminal_interface.ali (anonymous posting in comp.lang.ada). 2127 + correction to manpage for getcchar() (report by William McBrine). 2128 + add test/chgat.c 2129 + modify wchgat() to mark updated cells as changed so a refresh will 2130 repaint those cells (comments by Sadrul H Chowdhury and William 2131 McBrine). 2132 + split up dependency of names.c and codes.c in ncurses/Makefile to 2133 work with parallel make (report/analysis by Joseph S Myers). 2134 + suppress a warning message (which is ignored) for systems without 2135 an ldconfig program (patch by Justin Hibbits). 2136 + modify configure script --disable-symlinks option to allow one to 2137 disable symlink() in tic even when link() does not work (report by 2138 Nigel Horne). 2139 + modify MKfallback.sh to use tic -x when constructing fallback tables 2140 to allow extended capabilities to be retrieved from a fallback entry. 2141 + improve leak-checking logic in tgetent() from 20060625 to ensure that 2142 it does not free the current screen (report by Miroslav Lichvar). 2143 2144 20060708 2145 + add a check for _POSIX_VDISABLE in tset (NetBSD #33916). 2146 + correct _nc_free_entries() and related functions used for memory leak 2147 checking of tic. 2148 2149 20060701 2150 + revert a minor change for magic-cookie support from 20060513, which 2151 caused unexpected reset of attributes, e.g., when resizing test/view 2152 in color mode. 2153 + note in clear manpage that the program ignores command-line 2154 parameters (prompted by Debian #371855). 2155 + fixes to make lib_gen.c build properly with changes to the configure 2156 --disable-macros option and NCURSES_NOMACROS (cf: 20060527) 2157 + update/correct several terminfo entries -TD 2158 + add some notes regarding copyright to terminfo.src -TD 2159 2160 20060625 2161 + fixes to build Ada95 binding with gnat-4.1.0 2162 + modify read_termtype() so the term_names data is always allocated as 2163 part of the str_table, a better fix for a memory leak (cf: 20030809). 2164 + reduce memory leaks in repeated calls to tgetent() by remembering the 2165 last TERMINAL* value allocated to hold the corresponding data and 2166 freeing that if the tgetent() result buffer is the same as the 2167 previous call (report by "Matt" for FreeBSD gnu/98975). 2168 + modify tack to test extended capability function-key strings. 2169 + improved gnome terminfo entry (GenToo #122566). 2170 + improved xterm-256color terminfo entry (patch by Alain Bench). 2171 2172 20060617 2173 + fix two small memory leaks related to repeated tgetent() calls 2174 with TERM=screen (report by "Matt" for FreeBSD gnu/98975). 2175 + add --enable-signed-char to simplify Debian package. 2176 + reduce name-pollution in term.h by removing #define's for HAVE_xxx 2177 symbols. 2178 + correct typo in curs_terminfo.3x (Debian #369168). 2179 2180 20060603 2181 + enable the mouse in test/movewindow.c 2182 + improve a limit-check in frm_def.c (John Heasley). 2183 + minor copyright fixes. 2184 + change configure script to produce test/Makefile from data file. 2185 2186 20060527 2187 + add a configure option --enable-wgetch-events to enable 2188 NCURSES_WGETCH_EVENTS, and correct the associated loop-logic in 2189 lib_twait.c (report by Bernd Jendrissek). 2190 + remove include/nomacros.h from build, since the ifdef for 2191 NCURSES_NOMACROS makes that obsolete. 2192 + add entrypoints for some functions which were only provided as macros 2193 to make NCURSES_NOMACROS ifdef work properly: getcurx(), getcury(), 2194 getbegx(), getbegy(), getmaxx(), getmaxy(), getparx() and getpary(), 2195 wgetbkgrnd(). 2196 + provide ifdef for NCURSES_NOMACROS which suppresses most macro 2197 definitions from curses.h, i.e., where a macro is defined to override 2198 a function to improve performance. Allowing a developer to suppress 2199 these definitions can simplify some application (discussion with 2200 Stanislav Ievlev). 2201 + improve description of memu/meml in terminfo manpage. 2202 2203 20060520 2204 + if msgr is false, reset video attributes when doing an automargin 2205 wrap to the next line. This makes the ncurses 'k' test work properly 2206 for hpterm. 2207 + correct caching of keyname(), which was using only half of its table. 2208 + minor fixes to memory-leak checking. 2209 + make SCREEN._acs_map and SCREEN._screen_acs_map pointers rather than 2210 arrays, making ACS_LEN less visible to applications (suggested by 2211 Stanislav Ievlev). 2212 + move chunk in SCREEN ifdef'd for USE_WIDEC_SUPPORT to the end, so 2213 _screen_acs_map will have the same offset in both ncurses/ncursesw, 2214 making the corresponding tinfo/tinfow libraries binary-compatible 2215 (cf: 20041016, report by Stanislav Ievlev). 2216 2217 20060513 2218 + improve debug-tracing for EmitRange(). 2219 + change default for --with-develop to "yes". Add NCURSES_NO_HARD_TABS 2220 and NCURSES_NO_MAGIC_COOKIE environment variables to allow runtime 2221 suppression of the related hard-tabs and xmc-glitch features. 2222 + add ncurses version number to top-level manpages, e.g., ncurses, tic, 2223 infocmp, terminfo as well as form, menu, panel. 2224 + update config.guess, config.sub 2225 + modify ncurses.c to work around a bug in NetBSD 3.0 curses 2226 (field_buffer returning null for a valid field). The 'r' test 2227 appears to not work with that configuration since the new_fieldtype() 2228 function is broken in that implementation. 2229 2230 20060506 2231 + add hpterm-color terminfo entry -TD 2232 + fixes to compile test-programs with HPUX 11.23 2233 2234 20060422 2235 + add copyright notices to files other than those that are generated, 2236 data or adapted from pdcurses (reports by William McBrine, David 2237 Taylor). 2238 + improve rendering on hpterm by not resetting attributes at the end 2239 of doupdate() if the terminal has the magic-cookie feature (report 2240 by Bernd Rieke). 2241 + add 256color variants of terminfo entries for programs which are 2242 reported to implement this feature -TD 2243 2244 20060416 2245 + fix typo in change to NewChar() macro from 20060311 changes, which 2246 broke tab-expansion (report by Frederic L W Meunier). 2247 2248 20060415 2249 + document -U option of tic and infocmp. 2250 + modify tic/infocmp to suppress smacs/rmacs when acsc is suppressed 2251 due to size limit, e.g., converting to termcap format. Also 2252 suppress them if the output format does not contain acsc and it 2253 was not VT100-like, i.e., a one-one mapping (Novell #163715). 2254 + add configure check to ensure that SIGWINCH is defined on platforms 2255 such as OS X which exclude that when _XOPEN_SOURCE, etc., are 2256 defined (report by Nicholas Cole) 2257 2258 20060408 2259 + modify write_object() to not write coincidental extensions of an 2260 entry made due to it being referenced in a use= clause (report by 2261 Alain Bench). 2262 + another fix for infocmp -i option, which did not ensure that some 2263 escape sequences had comparable prefixes (report by Alain Bench). 2264 2265 20060401 2266 + improve discussion of init/reset in terminfo and tput manpages 2267 (report by Alain Bench). 2268 + use is3 string for a fallback of rs3 in the reset program; it was 2269 using is2 (report by Alain Bench). 2270 + correct logic for infocmp -i option, which did not account for 2271 multiple digits in a parameter (cf: 20040828) (report by Alain 2272 Bench). 2273 + move _nc_handle_sigwinch() to lib_setup.c to make --with-termlib 2274 option work after 20060114 changes (report by Arkadiusz Miskiewicz). 2275 + add copyright notices to test-programs as needed (report by William 2276 McBrine). 2277 2278 20060318 2279 + modify ncurses.c 'F' test to combine the wide-characters with color 2280 and/or video attributes. 2281 + modify test/ncurses to use CTL/Q or ESC consistently for exiting 2282 a test-screen (some commands used 'x' or 'q'). 2283 2284 20060312 2285 + fix an off-by-one in the scrolling-region change (cf_ 20060311). 2286 2287 20060311 2288 + add checks in waddchnstr() and wadd_wchnstr() to stop copying when 2289 a null character is found (report by Igor Bogomazov). 2290 + modify progs/Makefile.in to make "tput init" work properly with 2291 cygwin, i.e., do not pass a ".exe" in the reference string used 2292 in check_aliases (report by Samuel Thibault). 2293 + add some checks to ensure current position is within scrolling 2294 region before scrolling on a new line (report by Dan Gookin). 2295 + change some NewChar() usage to static variables to work around 2296 stack garbage introduced when cchar_t is not packed (Redhat #182024). 2297 2298 20060225 2299 + workarounds to build test/movewindow with PDcurses 2.7. 2300 + fix for nsterm-16color entry (patch by Alain Bench). 2301 + correct a typo in infocmp manpage (Debian #354281). 2302 2303 20060218 2304 + add nsterm-16color entry -TD 2305 + updated mlterm terminfo entry -TD 2306 + remove 970913 feature for copying subwindows as they are moved in 2307 mvwin() (discussion with Bryan Christ). 2308 + modify test/demo_menus.c to demonstrate moving a menu (both the 2309 window and subwindow) using shifted cursor-keys. 2310 + start implementing recursive mvwin() in movewindow.c (incomplete). 2311 + add a fallback definition for GCC_PRINTFLIKE() in test.priv.h, 2312 for movewindow.c (report by William McBrine). 2313 + add help-message to test/movewindow.c 2314 2315 20060211 2316 + add test/movewindow.c, to test mvderwin(). 2317 + fix ncurses soft-key test so color changes are shown immediately 2318 rather than delayed. 2319 + modify ncurses soft-key test to hide the keys when exiting the test 2320 screen. 2321 + fixes to build test programs with PDCurses 2.7, e.g., its headers 2322 rely on autoconf symbols, and it declares stubs for nonfunctional 2323 terminfo and termcap entrypoints. 2324 2325 20060204 2326 + improved test/configure to build test/ncurses on HPUX 11 using the 2327 vendor curses. 2328 + documented ALTERNATE CONFIGURATIONS in the ncurses manpage, for the 2329 benefit of developers who do not read INSTALL. 2330 2331 20060128 2332 + correct form library Window_To_Buffer() change (cf: 20040516), which 2333 should ignore the video attributes (report by Ricardo Cantu). 2334 2335 20060121 2336 + minor fixes to xmc-glitch experimental code: 2337 + suppress line-drawing 2338 + implement max_attributes 2339 tested with xterm. 2340 + minor fixes for the database iterator. 2341 + fix some buffer limits in c++ demo (comment by Falk Hueffner in 2342 Debian #348117). 2343 2344 20060114 2345 + add toe -a option, to show all databases. This uses new private 2346 interfaces in the ncurses library for iterating through the list of 2347 databases. 2348 + fix toe from 20000909 changes which made it not look at 2349 $HOME/.terminfo 2350 + make toe's -v option parameter optional as per manpage. 2351 + improve SIGWINCH handling by postponing its effect during newterm(), 2352 etc., when allocating screens. 2353 2354 20060111 2355 + modify wgetnstr() to return KEY_RESIZE if a sigwinch occurs. Use 2356 this in test/filter.c 2357 + fix an error in filter() modification which caused some applications 2358 to fail. 2359 2360 20060107 2361 + check if filter() was called when getting the screensize. Keep it 2362 at 1 if so (based on Redhat #174498). 2363 + add extension nofilter(). 2364 + refined the workaround for ACS mapping. 2365 + make ifdef's consistent in curses.h for the extended colors so the 2366 header file can be used for the normal curses library. The header 2367 file installed for extended colors is a variation of the 2368 wide-character configuration (report by Frederic L W Meunier). 2369 2370 20051231 2371 + add a workaround to ACS mapping to allow applications such as 2372 test/blue.c to use the "PC ROM" characters by masking them with 2373 A_ALTCHARSET. This worked up til 5.5, but was lost in the revision 2374 of legacy coding (report by Michael Deutschmann). 2375 + add a null-pointer check in the wide-character version of 2376 calculate_actual_width() (report by Victor Julien). 2377 + improve test/ncurses 'd' (color-edit) test by allowing the RGB 2378 values to be set independently (patch by William McBrine). 2379 + modify test/configure script to allow building test programs with 2380 PDCurses/X11. 2381 + modified test programs to allow some to work with NetBSD curses. 2382 Several do not because NetBSD curses implements a subset of X/Open 2383 curses, and also lacks much of SVr4 additions. But it's enough for 2384 comparison. 2385 + update config.guess and config.sub 2386 2387 20051224 2388 + use BSD-specific fix for return-value from cgetent() from CVS where 2389 an unknown terminal type would be reportd as "database not found". 2390 + make tgetent() return code more readable using new symbols 2391 TGETENT_YES, etc. 2392 + remove references to non-existent "tctest" program. 2393 + remove TESTPROGS from progs/Makefile.in (it was referring to code 2394 that was never built in that directory). 2395 + typos in curs_addchstr.3x, some doc files (noticed in OpenBSD CVS). 2396 2397 20051217 2398 + add use_legacy_coding() function to support lynx's font-switching 2399 feature. 2400 + fix formatting in curs_termcap.3x (report by Mike Frysinger). 2401 + modify MKlib_gen.sh to change preprocessor-expanded _Bool back to 2402 bool. 2403 2404 20051210 2405 + extend test/ncurses.c 's' (overlay window) test to exercise overlay(), 2406 overwrite() and copywin() with different combinations of colors and 2407 attributes (including background color) to make it easy to see the 2408 effect of the different functions. 2409 + corrections to menu/m_global.c for wide-characters (report by 2410 Victor Julien). 2411 2412 20051203 2413 + add configure option --without-dlsym, allowing developers to 2414 configure GPM support without using dlsym() (discussion with Michael 2415 Setzer). 2416 + fix wins_nwstr(), which did not handle single-column non-8bit codes 2417 (Debian #341661). 2418 2419 20051126 2420 + move prototypes for wide-character trace functions from curses.tail 2421 to curses.wide to avoid accidental reference to those if 2422 _XOPEN_SOURCE_EXTENDED is defined without ensuring that <wchar.h> is 2423 included. 2424 + add/use NCURSES_INLINE definition. 2425 + change some internal functions to use int/unsigned rather than the 2426 short equivalents. 2427 2428 20051119 2429 + remove a redundant check in lib_color.c (Debian #335655). 2430 + use ld's -search_paths_first option on Darwin to work around odd 2431 search rules on that platform (report by Christian Gennerat, analysis 2432 by Andrea Govoni). 2433 + remove special case for Darwin in CF_XOPEN_SOURCE configure macro. 2434 + ignore EINTR in tcgetattr/tcsetattr calls (Debian #339518). 2435 + fix several bugs in test/bs.c (patch by Stephen Lindholm). 2436 2437 20051112 2438 + other minor fixes to cygwin based on tack -TD 2439 + correct smacs in cygwin (Debian #338234, report by Baurzhan 2440 Ismagulov, who noted that it was fixed in Cygwin). 2441 2442 20051029 2443 + add shifted up/down arrow codes to xterm-new as kind/kri strings -TD 2444 + modify wbkgrnd() to avoid clearing the A_CHARTEXT attribute bits 2445 since those record the state of multicolumn characters (Debian 2446 #316663). 2447 + modify werase to clear multicolumn characters that extend into 2448 a derived window (Debian #316663). 2449 2450 20051022 2451 + move assignment from environment variable ESCDELAY from initscr() 2452 down to newterm() so the environment variable affects timeouts for 2453 terminals opened with newterm() as well. 2454 + fix a memory leak in keyname(). 2455 + add test/demo_altkeys.c 2456 + modify test/demo_defkey.c to exit from loop via 'q' to allow 2457 leak-checking, as well as fix a buffer size in winnstr() call. 2458 2459 20051015 2460 + correct order of use-clauses in rxvt-basic entry which made codes for 2461 f1-f4 vt100-style rather than vt220-style (report by Gabor Z Papp). 2462 + suppress configure check for gnatmake if Ada95/Makefile.in is not 2463 found. 2464 + correct a typo in configure --with-bool option for the case where 2465 --without-cxx is used (report by Daniel Jacobowitz). 2466 + add a note to INSTALL's discussion of --with-normal, pointing out 2467 that one may wish to use --without-gpm to ensure a completely 2468 static link (prompted by report by Felix von Leitner). 2469 2470 20051010 5.5 release for upload to 2471 2472 20051008 2473 + document in demo_forms.c some portability issues. 2474 2475 20051001 2476 + document side-effect of werase() which sets the cursor position. 2477 + save/restore the current position in form field editing to make 2478 overlay mode work. 2479 2480 20050924 2481 + correct header dependencies in progs, allowing parallel make (report 2482 by Daniel Jacobowitz). 2483 + modify CF_BUILD_CC to ensure that pre-setting $BUILD_CC overrides 2484 the configure check for --with-build-cc (report by Daniel Jacobowitz). 2485 + modify CF_CFG_DEFAULTS to not use /usr as the default prefix for 2486 NetBSD. 2487 + update config.guess and config.sub from 2488 2489 2490 20050917 2491 + modify sed expression which computes path for /usr/lib/terminfo 2492 symbolic link in install to ensure that it does not change unexpected 2493 levels of the path (Gentoo #42336). 2494 + modify default for --disable-lp64 configure option to reduce impact 2495 on existing 64-bit builds. Enabling the _LP64 option may change the 2496 size of chtype and mmask_t. However, for ABI 6, it is enabled by 2497 default (report by Mike Frysinger). 2498 + add configure script check for --enable-ext-mouse, bump ABI to 6 by 2499 default if it is used. 2500 + improve configure script logic for bumping ABI to omit this if the 2501 --with-abi-version option was used. 2502 + update address for Free Software Foundation in tack's source. 2503 + correct wins_wch(), which was not marking the filler-cells of 2504 multi-column characters (cf: 20041023). 2505 2506 20050910 2507 + modify mouse initialization to ensure that Gpm_Open() is called only 2508 once. Otherwise GPM gets confused in its initialization of signal 2509 handlers (Debian #326709). 2510 2511 20050903 2512 + modify logic for backspacing in a multiline form field to ensure that 2513 it works even when the preceding line is full (report by Frank van 2514 Vugt). 2515 + remove comment about BUGS section of ncurses manpage (Debian #325481) 2516 2517 20050827 2518 + document some workarounds for shared and libtool library 2519 configurations in INSTALL (see --with-shared and --with-libtool). 2520 + modify CF_GCC_VERSION and CF_GXX_VERSION macros to accommodate 2521 cross-compilers which emit the platform name in their version 2522 message, e.g., 2523 arm-sa1100-linux-gnu-g++ (GCC) 4.0.1 2524 (report by Frank van Vugt). 2525 2526 20050820 2527 + start updating documentation for upcoming 5.5 release. 2528 + fix to make libtool and libtinfo work together again (cf: 20050122). 2529 + fixes to allow building traces into libtinfo 2530 + add debug trace to tic that shows if/how ncurses will write to the 2531 lower corner of a terminal's screen. 2532 + update llib-l* files. 2533 2534 20050813 2535 + modify initializers in c++ binding to build with old versions of g++. 2536 + improve special case for 20050115 repainting fix, ensuring that if 2537 the first changed cell is not a character that the range to be 2538 repainted is adjusted to start at a character's beginning (Debian 2539 #316663). 2540 2541 20050806 2542 + fixes to build on QNX 6.1 2543 + improve configure script checks for Intel 9.0 compiler. 2544 + remove #include's for libc.h (obsolete). 2545 + adjust ifdef's in curses.priv.h so that when cross-compiling to 2546 produce comp_hash and make_keys, no dependency on wchar.h is needed. 2547 That simplifies the build-cppflags (report by Frank van Vugt). 2548 + move modules related to key-binding into libtinfo to fix linkage 2549 problem caused by 20050430 changes to MKkeyname.sh (report by 2550 Konstantin Andreev). 2551 2552 20050723 2553 + updates/fixes for configure script macros from vile -TD 2554 + make prism9's sgr string agree with the rest of the terminfo -TD 2555 + make vt220's sgr0 string consistent with sgr string, do this for 2556 several related cases -TD 2557 + improve translation to termcap by filtering the 'me' (sgr0) strings 2558 as in the runtime call to tgetent() (prompted by a discussion with 2559 Thomas Klausner). 2560 + improve tic check for sgr0 versus sgr(0), to help ensure that sgr0 2561 resets line-drawing. 2562 2563 20050716 2564 + fix special cases for trimming sgr0 for hurd and vt220 (Debian 2565 #318621). 2566 + split-out _nc_trim_sgr0() from modifications made to tgetent(), to 2567 allow it to be used by tic to provide information about the runtime 2568 changes that would be made to sgr0 for termcap applications. 2569 + modify make_sed.sh to make the group-name in the NAME section of 2570 form/menu library manpage agree with the TITLE string when renaming 2571 is done for Debian (Debian #78866). 2572 2573 20050702 2574 + modify parameter type in c++ binding for insch() and mvwinsch() to 2575 be consistent with underlying ncurses library (was char, is chtype). 2576 + modify treatment of Intel compiler to allow _GNU_SOURCE to be defined 2577 on Linux. 2578 + improve configure check for nanosleep(), checking that it works since 2579 some older systems such as AIX 4.3 have a nonworking version. 2580 2581 20050625 2582 + update config.guess and config.sub from 2583 2584 + modify misc/shlib to work in test-directory. 2585 + suppress $suffix in misc/run_tic.sh when cross-compiling. This 2586 allows cross-compiles to use the host's tic program to handle the 2587 "make install.data" step. 2588 + improve description of $LINES and $COLUMNS variables in manpages 2589 (prompted by report by Dave Ulrick). 2590 + improve description of cross-compiling in INSTALL 2591 + add NCURSES-Programming-HOWTO.html by Pradeep Padala 2592 (see). 2593 + modify configure script to obtain soname for GPM library (discussion 2594 with Daniel Jacobowitz). 2595 + modify configure script so that --with-chtype option will still 2596 compute the unsigned literals suffix for constants in curses.h 2597 (report by Daniel Jacobowitz: 2598 + patches from Daniel Jacobowitz: 2599 + the man_db.renames entry for tack.1 was backwards. 2600 + tack.1 had some 1m's that should have been 1M's. 2601 + the section for curs_inwstr.3 was wrong. 2602 2603 20050619 2604 + correction to --with-chtype option (report by Daniel Jacobowitz). 2605 2606 20050618 2607 + move build-time edit_man.sh and edit_man.sed scripts to top directory 2608 to simplify reusing them for renaming tack's manpage (prompted by a 2609 review of Debian package). 2610 + revert minor optimization from 20041030 (Debian #313609). 2611 + libtool-specific fixes, tested with libtool 1.4.3, 1.5.0, 1.5.6, 2612 1.5.10 and 1.5.18 (all work except as noted previously for the c++ 2613 install using libtool 1.5.0): 2614 + modify the clean-rule in c++/Makefile.in to work with IRIX64 make 2615 program. 2616 + use $(LIBTOOL_UNINSTALL) symbol, overlooked in 20030830 2617 + add configure options --with-chtype and --with-mmask-t, to allow 2618 overriding of the non-LP64 model's use of the corresponding types. 2619 + revise test for size of chtype (and mmask_t), which always returned 2620 "long" due to an uninitialized variable (report by Daniel Jacobowitz). 2621 2622 20050611 2623 + change _tracef's that used "%p" format for va_list values to ignore 2624 that, since on some platforms those are not pointers. 2625 + fixes for long-formats in printf's due to largefile support. 2626 2627 20050604 2628 + fixes for termcap support: 2629 + reset pointer to _nc_curr_token.tk_name when the input stream is 2630 closed, which could point to free memory (cf: 20030215). 2631 + delink TERMTYPE data which is used by the termcap reader, so that 2632 extended names data will be freed consistently. 2633 + free pointer to TERMTYPE data in _nc_free_termtype() rather than 2634 its callers. 2635 + add some entrypoints for freeing permanently allocated data via 2636 _nc_freeall() when NO_LEAKS is defined. 2637 + amend 20041030 change to _nc_do_color to ensure that optimization is 2638 applied only when the terminal supports back_color_erase (bce). 2639 2640 20050528 2641 + add sun-color terminfo entry -TD 2642 + correct a missing assignment in c++ binding's method 2643 NCursesPanel::UserPointer() from 20050409 changes. 2644 + improve configure check for large-files, adding check for dirent64 2645 from vile -TD 2646 + minor change to configure script to improve linker options for the 2647 Ada95 tree. 2648 2649 20050515 2650 + document error conditions for ncurses library functions (report by 2651 Stanislav Ievlev). 2652 + regenerated html documentation for ada binding. 2653 see 2654 2655 20050507 2656 + regenerated html documentation for manpages. 2657 + add $(BUILD_EXEEXT) suffix to invocation of make_keys in 2658 ncurses/Makefile (Gentoo #89772). 2659 + modify c++/demo.cc to build with g++ -fno-implicit-templates option 2660 (patch by Mike Frysinger). 2661 + modify tic to filter out long extended names when translating to 2662 termcap format. Only two characters are permissible for termcap 2663 capability names. 2664 2665 20050430 2666 + modify terminfo entries xterm-new and rxvt to add strings for 2667 shift-, control-cursor keys. 2668 + workaround to allow c++ binding to compile with g++ 2.95.3, which 2669 has a broken implementation of static_cast<> (patch by Jeff Chua). 2670 + modify initialization of key lookup table so that if an extended 2671 capability (tic -x) string is defined, and its name begins with 'k', 2672 it will automatically be treated as a key. 2673 + modify test/keynames.c to allow for the possibility of extended 2674 key names, e.g., via define_key(), or via "tic -x". 2675 + add test/demo_termcap.c to show the contents of given entry via the 2676 termcap interface. 2677 2678 20050423 2679 + minor fixes for vt100/vt52 entries -TD 2680 + add configure option --enable-largefile 2681 + corrected libraries used to build Ada95/gen/gen, found in testing 2682 gcc 4.0.0. 2683 2684 20050416 2685 + update config.guess, config.sub 2686 + modify configure script check for _XOPEN_SOURCE, disable that on 2687 Darwin whose header files have problems (patch by Chris Zubrzycki). 2688 + modify form library Is_Printable_String() to use iswprint() rather 2689 than wcwidth() for determining if a character is printable. The 2690 latter caused it to reject menu items containing non-spacing 2691 characters. 2692 + modify ncurses test program's F-test to handle non-spacing characters 2693 by combining them with a reverse-video blank. 2694 + review/fix several gcc -Wconversion warnings. 2695 2696 20050409 2697 + correct an off-by-one error in m_driver() for mouse-clicks used to 2698 position the mouse to a particular item. 2699 + implement test/demo_menus.c 2700 + add some checks in lib_mouse to ensure SP is set. 2701 + modify C++ binding to make 20050403 changes work with the configure 2702 --enable-const option. 2703 2704 20050403 2705 + modify start_color() to return ERR if it cannot allocate memory. 2706 + address g++ compiler warnings in C++ binding by adding explicit 2707 member initialization, assignment operators and copy constructors. 2708 Most of the changes simply preserve the existing semantics of the 2709 binding, which can leak memory, etc., but by making these features 2710 visible, it provides a framework for improving the binding. 2711 + improve C++ binding using static_cast, etc. 2712 + modify configure script --enable-warnings to add options to g++ to 2713 correspond to the gcc --enable-warnings. 2714 + modify C++ binding to use some C internal functions to make it 2715 compile properly on Solaris (and other platforms). 2716 2717 20050327 2718 + amend change from 20050320 to limit it to configurations with a 2719 valid locale. 2720 + fix a bug introduced in 20050320 which broke the translation of 2721 nonprinting characters to uparrow form (report by Takahashi Tamotsu). 2722 2723 20050326 2724 + add ifdef's for _LP64 in curses.h to avoid using wasteful 64-bits for 2725 chtype and mmask_t, but add configure option --disable-lp64 in case 2726 anyone used that configuration. 2727 + update misc/shlib script to account for Mac OS X (report by Michail 2728 Vidiassov). 2729 + correct comparison for wrapping multibyte characters in 2730 waddch_literal() (report by Takahashi Tamotsu). 2731 2732 20050320 2733 + add -c and -w options to tset to allow user to suppress ncurses' 2734 resizing of the terminal emulator window in the special case where it 2735 is not able to detect the true size (report by Win Delvaux, Debian 2736 #300419). 2737 + modify waddch_nosync() to account for locale zn_CH.GBK, which uses 2738 codes 128-159 as part of multibyte characters (report by Wang 2739 WenRui, Debian #300512). 2740 2741 20050319 2742 + modify ncurses.c 'd' test to make it work with 88-color 2743 configuration, i.e., by implementing scrolling. 2744 + improve scrolling in ncurses.c 'c' and 'C' tests, e.g., for 88-color 2745 configuration. 2746 2747 20050312 2748 + change tracemunch to use strict checking. 2749 + modify ncurses.c 'p' test to test line-drawing within a pad. 2750 + implement environment variable NCURSES_NO_UTF8_ACS to support 2751 miscellaneous terminal emulators which ignore alternate character 2752 set escape sequences when in UTF-8 mode. 2753 2754 20050305 2755 + change NCursesWindow::err_handler() to a virtual function (request by 2756 Steve Beal). 2757 + modify fty_int.c and fty_num.c to handle wide characters (report by 2758 Wolfgang Gutjahr). 2759 + adapt fix for fty_alpha.c to fty_alnum.c, which also handled normal 2760 and wide characters inconsistently (report by Wolfgang Gutjahr). 2761 + update llib-* files to reflect internal interface additions/changes. 2762 2763 20050226 2764 + improve test/configure script, adding tests for _XOPEN_SOURCE, etc., 2765 from lynx. 2766 + add aixterm-16color terminfo entry -TD 2767 + modified xterm-new terminfo entry to work with tgetent() changes -TD 2768 + extended changes in tgetent() from 20040710 to allow the substring of 2769 sgr0 which matches rmacs to be at the beginning of the sgr0 string 2770 (request by Thomas Wolff). Wolff says the visual effect in 2771 combination with pre-20040710 ncurses is improved. 2772 + fix off-by-one in winnstr() call which caused form field validation 2773 of multibyte characters to ignore the last character in a field. 2774 + correct logic in winsch() for inserting multibyte strings; the code 2775 would clear cells after the insertion rather than push them to the 2776 right (cf: 20040228). 2777 + fix an inconsistency in Check_Alpha_Field() between normal and wide 2778 character logic (report by Wolfgang Gutjahr). 2779 2780 20050219 2781 + fix a bug in editing wide-characters in form library: deleting a 2782 nonwide character modified the previous wide-character. 2783 + update manpage to describe NCURSES_MOUSE_VERSION 2. 2784 + correct manpage description of mouseinterval() (Debian #280687). 2785 + add a note to default_colors.3x explaining why this extension was 2786 added (Debian #295083). 2787 + add traces to panel library. 2788 2789 20050212 2790 + improve editing of wide-characters in form library: left/right 2791 cursor movement, and single-character deletions work properly. 2792 + disable GPM mouse support when $TERM happens to be prefixed with 2793 "xterm". Gpm_Open() would otherwise assert that it can deal with 2794 mouse events in this case. 2795 + modify GPM mouse support so it closes the server connection when 2796 the caller disables the mouse (report by Stanislav Ievlev). 2797 2798 20050205 2799 + add traces for callback functions in form library. 2800 + add experimental configure option --enable-ext-mouse, which defines 2801 NCURSES_MOUSE_VERSION 2, and modifies the encoding of mouse events to 2802 support wheel mice, which may transmit buttons 4 and 5. This works 2803 with xterm and similar X terminal emulators (prompted by question by 2804 Andreas Henningsson, this is also related to Debian #230990). 2805 + improve configure macros CF_XOPEN_SOURCE and CF_POSIX_C_SOURCE to 2806 avoid redefinition warnings on cygwin. 2807 2808 20050129 2809 + merge remaining development changes for extended colors (mostly 2810 complete, does not appear to break other configurations). 2811 + add xterm-88color.dat (part of extended colors testing). 2812 + improve _tracedump() handling of color pairs past 96. 2813 + modify return-value from start_color() to return OK if colors have 2814 already been started. 2815 + modify curs_color.3x list error conditions for init_pair(), 2816 pair_content() and color_content(). 2817 + modify pair_content() to return -1 for consistency with init_pair() 2818 if it corresponds to the default-color. 2819 + change internal representation of default-color to allow application 2820 to use color number 255. This does not affect the total number of 2821 color pairs which are allowed. 2822 + add a top-level tags rule. 2823 2824 20050122 2825 + add a null-pointer check in wgetch() in case it is called without 2826 first calling initscr(). 2827 + add some null-pointer checks for SP, which is not set by libtinfo. 2828 + modify misc/shlib to ensure that absolute pathnames are used. 2829 + modify test/Makefile.in, etc., to link test programs only against the 2830 libraries needed, e.g., omit form/menu/panel library for the ones 2831 that are curses-specific. 2832 + change SP->_current_attr to a pointer, adjust ifdef's to ensure that 2833 libtinfo.so and libtinfow.so have the same ABI. The reason for this 2834 is that the corresponding data which belongs to the upper-level 2835 ncurses library has a different size in each model (report by 2836 Stanislav Ievlev). 2837 2838 20050115 2839 + minor fixes to allow test-compiles with g++. 2840 + correct column value shown in tic's warnings, which did not account 2841 for leading whitespace. 2842 + add a check in _nc_trans_string() for improperly ended strings, i.e., 2843 where a following line begins in column 1. 2844 + modify _nc_save_str() to return a null pointer on buffer overflow. 2845 + improve repainting while scrolling wide-character data (Eungkyu Song). 2846 2847 20050108 2848 + merge some development changes to extend color capabilities. 2849 2850 20050101 2851 + merge some development changes to extend color capabilities. 2852 + fix manpage typo (FreeBSD report docs/75544). 2853 + update config.guess, config.sub 2854 > patches for configure script (Albert Chin-A-Young): 2855 + improved fix to make mbstate_t recognized on HPUX 11i (cf: 2856 20030705), making vsscanf() prototype visible on IRIX64. Tested for 2857 on HP-UX 11i, Solaris 7, 8, 9, AIX 4.3.3, 5.2, Tru64 UNIX 4.0D, 5.1, 2858 IRIX64 6.5, Redhat Linux 7.1, 9, and RHEL 2.1, 3.0. 2859 + print the result of the --disable-home-terminfo option. 2860 + use -rpath when compiling with SGI C compiler. 2861 2862 20041225 2863 + add trace calls to remaining public functions in form and menu 2864 libraries. 2865 + fix check for numeric digits in test/ncurses.c 'b' and 'B' tests. 2866 + fix typo in test/ncurses.c 'c' test from 20041218. 2867 2868 20041218 2869 + revise test/ncurses.c 'c' color test to improve use for xterm-88color 2870 and xterm-256color, added 'C' test using the wide-character color_set 2871 and attr_set functions. 2872 2873 20041211 2874 + modify configure script to work with Intel compiler. 2875 + fix an limit-check in wadd_wchnstr() which caused labels in the 2876 forms-demo to be one character short. 2877 + fix typo in curs_addchstr.3x (Jared Yanovich). 2878 + add trace calls to most functions in form and menu libraries. 2879 + update working-position for adding wide-characters when window is 2880 scrolled (prompted by related report by Eungkyu Song). 2881 2882 20041204 2883 + replace some references on Linux to wcrtomb() which use it to obtain 2884 the length of a multibyte string with _nc_wcrtomb, since wcrtomb() is 2885 broken in glibc (see Debian #284260). 2886 + corrected length-computation in wide-character support for 2887 field_buffer(). 2888 + some fixes to frm_driver.c to allow it to accept multibyte input. 2889 + modify configure script to work with Intel 8.0 compiler. 2890 2891 20041127 2892 + amend change to setupterm() in 20030405 which would reuse the value 2893 of cur_term if the same output was selected. This now reuses it only 2894 when setupterm() is called from tgetent(), which has no notion of 2895 separate SCREENs. Note that tgetent() must be called after initscr() 2896 or newterm() to use this feature (Redhat Bugzilla #140326). 2897 + add a check in CF_BUILD_CC macro to ensure that developer has given 2898 the --with-build-cc option when cross-compiling (report by Alexandre 2899 Campo). 2900 + improved configure script checks for _XOPEN_SOURCE and 2901 _POSIX_C_SOURCE (fix for IRIX 5.3 from Georg Schwarz, _POSIX_C_SOURCE 2902 updates from lynx). 2903 + cosmetic fix to test/gdc.c to recolor the bottom edge of the box 2904 for consistency (comment by Dan Nelson). 2905 2906 20041120 2907 + update wsvt25 terminfo entry -TD 2908 + modify test/ins_wide.c to test all flavors of ins_wstr(). 2909 + ignore filler-cells in wadd_wchnstr() when adding a cchar_t array 2910 which consists of multi-column characters, since this function 2911 constructs them (cf: 20041023). 2912 + modify winnstr() to return multibyte character strings for the 2913 wide-character configuration. 2914 2915 20041106 2916 + fixes to make slk_set() and slk_wset() accept and store multibyte 2917 or multicolumn characters. 2918 2919 20041030 2920 + improve color optimization a little by making _nc_do_color() check 2921 if the old/new pairs are equivalent to the default pair 0. 2922 + modify assume_default_colors() to not require that 2923 use_default_colors() be called first. 2924 2925 20041023 2926 + modify term_attrs() to use termattrs(), add the extended attributes 2927 such as enter_horizontal_hl_mode for WA_HORIZONTAL to term_attrs(). 2928 + add logic in waddch_literal() to clear orphaned cells when one 2929 multi-column character partly overwrites another. 2930 + improved logic for clearing cells when a multi-column character 2931 must be wrapped to a new line. 2932 + revise storage of cells for multi-column characters to correct a 2933 problem with repainting. In the old scheme, it was possible for 2934 doupdate() to decide that only part of a multi-column character 2935 should be repainted since the filler cells stored only an attribute 2936 to denote them as fillers, rather than the character value and the 2937 attribute. 2938 2939 20041016 2940 + minor fixes for traces. 2941 + add SP->_screen_acs_map[], used to ensure that mapping of missing 2942 line-drawing characters is handled properly. For example, ACS_DARROW 2943 is absent from xterm-new, and it was coincidentally displayed the 2944 same as ACS_BTEE. 2945 2946 20041009 2947 + amend 20021221 workaround for broken acs to reset the sgr, rmacs 2948 and smacs strings as well. Also modify the check for screen's 2949 limitations in that area to allow the multi-character shift-in 2950 and shift-out which seem to work. 2951 + change GPM initialization, using dl library to load it dynamically 2952 at runtime (Debian #110586). 2953 2954 20041002 2955 + correct logic for color pair in setcchar() and getcchar() (patch by 2956 Marcin 'Qrczak' Kowalczyk). 2957 + add t/T commands to ncurses b/B tests to allow a different color to 2958 be tested for the attrset part of the test than is used in the 2959 background color. 2960 2961 20040925 2962 + fix to make setcchar() to work when its wchar_t* parameter is 2963 pointing to a string which contains more data than can be converted. 2964 + modify wget_wstr() and example in ncurses.c to work if wchar_t and 2965 wint_t are different sizes (report by Marcin 'Qrczak' Kowalczyk). 2966 2967 20040918 2968 + remove check in wget_wch() added to fix an infinite loop, appears to 2969 have been working around a transitory glibc bug, and interferes 2970 with normal operation (report by Marcin 'Qrczak' Kowalczyk). 2971 + correct wadd_wch() and wecho_wch(), which did not pass the rendition 2972 information (report by Marcin 'Qrczak' Kowalczyk). 2973 + fix aclocal.m4 so that the wide-character version of ncurses gets 2974 compiled as libncursesw.5.dylib, instead of libncurses.5w.dylib 2975 (adapted from patch by James J Ramsey). 2976 + change configure script for --with-caps option to indicate that it 2977 is no longer experimental. 2978 + change configure script to reflect the fact that --enable-widec has 2979 not been "experimental" since 5.3 (report by Bruno Lustosa). 2980 2981 20040911 2982 + add 'B' test to ncurses.c, to exercise some wide-character functions. 2983 2984 20040828 2985 + modify infocmp -i option to match 8-bit controls against its table 2986 entries, e.g., so it can analyze the xterm-8bit entry. 2987 + add morphos terminfo entry, improve amiga-8bit entry (Pavel Fedin). 2988 + correct translation of "%%" in terminfo format to termcap, e.g., 2989 using "tic -C" (Redhat Bugzilla #130921). 2990 + modified configure script CF_XOPEN_SOURCE macro to ensure that if 2991 it defines _POSIX_C_SOURCE, that it defines it to a specific value 2992 (comp.os.stratus newsgroup comment). 2993 2994 20040821 2995 + fixes to build with Ada95 binding with gnat 3.4 (all warnings are 2996 fatal, and gnat does not follow the guidelines for pragmas). 2997 However that did find a coding error in Assume_Default_Colors(). 2998 + modify several terminfo entries to ensure xterm mouse and cursor 2999 visibility are reset in rs2 string: hurd, putty, gnome, 3000 konsole-base, mlterm, Eterm, screen (Debian #265784, #55637). The 3001 xterm entries are left alone - old ones for compatibility, and the 3002 new ones do not require this change. -TD 3003 3004 20040814 3005 + fake a SIGWINCH in newterm() to accommodate buggy terminal emulators 3006 and window managers (Debian #265631). 3007 > terminfo updates -TD 3008 + remove dch/dch1 from rxvt because they are implemented inconsistently 3009 with the common usage of bce/ech 3010 + remove khome from vt220 (vt220's have no home key) 3011 + add rxvt+pcfkeys 3012 3013 20040807 3014 + modify test/ncurses.c 'b' test, adding v/V toggles to cycle through 3015 combinations of video attributes so that for instance bold and 3016 underline can be tested. This made the legend too crowded, added 3017 a help window as well. 3018 + modify test/ncurses.c 'b' test to cycle through default colors if 3019 the -d option is set. 3020 + update putty terminfo entry (Robert de Bath). 3021 3022 20040731 3023 + modify test/cardfile.c to allow it to read more data than can be 3024 displayed. 3025 + correct logic in resizeterm.c which kept it from processing all 3026 levels of window hierarchy (reports by Folkert van Heusden, 3027 Chris Share). 3028 3029 20040724 3030 + modify "tic -cv" to ignore delays when comparing strings. Also 3031 modify it to ignore a canceled sgr string, e.g., for terminals which 3032 cannot properly combine attributes in one control sequence. 3033 + corrections for gnome and konsole entries (Redhat Bugzilla #122815, 3034 patch by Hans de Goede) 3035 > terminfo updates -TD 3036 + make ncsa-m rmacs/smacs consistent with sgr 3037 + add sgr, rc/sc and ech to syscons entries 3038 + add function-keys to decansi 3039 + add sgr to mterm-ansi 3040 + add sgr, civis, cnorm to emu 3041 + correct/simplify cup in addrinfo 3042 3043 20040717 3044 > terminfo updates -TD 3045 + add xterm-pc-fkeys 3046 + review/update gnome and gnome-rh90 entries (prompted by Redhat 3047 Bugzilla #122815). 3048 + review/update konsole entries 3049 + add sgr, correct sgr0 for kterm and mlterm 3050 + correct tsl string in kterm 3051 3052 20040711 3053 + add configure option --without-xterm-new 3054 3055 20040710 3056 + add check in wget_wch() for printable bytes that are not part of a 3057 multibyte character. 3058 + modify wadd_wchnstr() to render text using window's background 3059 attributes. 3060 + improve tic's check to compare sgr and sgr0. 3061 + fix c++ directory's .cc.i rule. 3062 + modify logic in tgetent() which adjusts the termcap "me" string 3063 to work with ISO-2022 string used in xterm-new (cf: 20010908). 3064 + modify tic's check for conflicting function keys to omit that if 3065 converting termcap to termcap format. 3066 + add -U option to tic and infocmp. 3067 + add rmam/smam to linux terminfo entry (Trevor Van Bremen) 3068 > terminfo updates -TD 3069 + minor fixes for emu 3070 + add emu-220 3071 + change wyse acsc strings to use 'i' map rather than 'I' 3072 + fixes for avatar0 3073 + fixes for vp3a+ 3074 3075 20040703 3076 + use tic -x to install terminfo database -TD 3077 + add -x to infocmp's usage message. 3078 + correct field used for comparing O_ROWMAJOR in set_menu_format() 3079 (report/patch by Tony Li). 3080 + fix a missing nul check in set_field_buffer() from 20040508 changes. 3081 > terminfo updates -TD 3082 + make xterm-xf86-v43 derived from xterm-xf86-v40 rather than 3083 xterm-basic -TD 3084 + align with xterm patch #192's use of xterm-new -TD 3085 + update xterm-new and xterm-8bit for cvvis/cnorm strings -TD 3086 + make xterm-new the default "xterm" entry -TD 3087 3088 20040626 3089 + correct BUILD_CPPFLAGS substitution in ncurses/Makefile.in, to allow 3090 cross-compiling from a separate directory tree (report/patch by 3091 Dan Engel). 3092 + modify is_term_resized() to ensure that window sizes are nonzero, 3093 as documented in the manpage (report by Ian Collier). 3094 + modify CF_XOPEN_SOURCE configure macro to make Hurd port build 3095 (Debian #249214, report/patch by Jeff Bailey). 3096 + configure-script mods from xterm, e.g., updates to CF_ADD_CFLAGS 3097 + update config.guess, config.sub 3098 > terminfo updates -TD 3099 + add mlterm 3100 + add xterm-xf86-v44 3101 + modify xterm-new aka xterm-xfree86 to accommodate luit, which 3102 relies on G1 being used via an ISO-2022 escape sequence (report by 3103 Juliusz Chroboczek) 3104 + add 'hurd' entry 3105 3106 20040619 3107 + reconsidered winsnstr(), decided after comparing other 3108 implementations that wrapping is an X/Open documentation error. 3109 + modify test/inserts.c to test all flavors of insstr(). 3110 3111 20040605 3112 + add setlocale() calls to a few test programs which may require it: 3113 demo_forms.c, filter.c, ins_wide.c, inserts.c 3114 + correct a few misspelled function names in ncurses-intro.html (report 3115 by Tony Li). 3116 + correct internal name of key_defined() manpage, which conflicted with 3117 define_key(). 3118 3119 20040529 3120 + correct size of internal pad used for holding wide-character 3121 field_buffer() results. 3122 + modify data_ahead() to work with wide-characters. 3123 3124 20040522 3125 + improve description of terminfo if-then-else expressions (suggested 3126 by Arne Thomassen). 3127 + improve test/ncurses.c 'd' test, allow it to use external file for 3128 initial palette (added xterm-16color.dat and linux-color.dat), and 3129 reset colors to the initial palette when starting/ending the test. 3130 + change limit-check in init_color() to allow r/g/b component to 3131 reach 1000 (cf: 20020928). 3132 3133 20040516 3134 + modify form library to use cchar_t's rather than char's in the 3135 wide-character configuration for storing data for field buffers. 3136 + correct logic of win_wchnstr(), which did not work for more than 3137 one cell. 3138 3139 20040508 3140 + replace memset/memcpy usage in form library with for-loops to 3141 simplify changing the datatype of FIELD.buf, part of wide-character 3142 changes. 3143 + fix some inconsistent use of #if/#ifdef (report by Alain Guibert). 3144 3145 20040501 3146 + modify menu library to account for actual number of columns used by 3147 multibyte character strings, in the wide-character configuration 3148 (adapted from patch by Philipp Tomsich). 3149 + add "-x" option to infocmp like tic's "-x", for use in "-F" 3150 comparisons. This modifies infocmp to only report extended 3151 capabilities if the -x option is given, making this more consistent 3152 with tic. Some scripts may break, since infocmp previous gave this 3153 information without an option. 3154 + modify termcap-parsing to retain 2-character aliases at the beginning 3155 of an entry if the "-x" option is used in tic. 3156 3157 20040424 3158 + minor compiler-warning and test-program fixes. 3159 3160 20040417 3161 + modify tic's missing-sgr warning to apply to terminfo only. 3162 + free some memory leaks in tic. 3163 + remove check in post_menu() that prevented menus from extending 3164 beyond the screen (request by Max J. Werner). 3165 + remove check in newwin() that prevents allocating windows 3166 that extend beyond the screen. Solaris curses does this. 3167 + add ifdef in test/color_set.c to allow it to compile with older 3168 curses. 3169 + add napms() calls to test/dots.c to make it not be a CPU hog. 3170 3171 20040403 3172 + modify unctrl() to return null if its parameter does not correspond 3173 to an unsigned char. 3174 + add some limit-checks to guard isprint(), etc., from being used on 3175 values that do not fit into an unsigned char (report by Sami Farin). 3176 3177 20040328 3178 + fix a typo in the _nc_get_locale() change. 3179 3180 20040327 3181 + modify _nc_get_locale() to use setlocale() to query the program's 3182 current locale rather than using getenv(). This fixes a case in tin 3183 which relies on legacy treatment of 8-bit characters when the locale 3184 is not initialized (reported by Urs Jansen). 3185 + add sgr string to screen's and rxvt's terminfo entries -TD. 3186 + add a check in tic for terminfo entries having an sgr0 but no sgr 3187 string. This confuses Tru64 and HPUX curses when combined with 3188 color, e.g., making them leave line-drawing characters in odd places. 3189 + correct casts used in ABSENT_BOOLEAN, CANCELLED_BOOLEAN, matches the 3190 original definitions used in Debian package to fix PowerPC bug before 3191 20030802 (Debian #237629). 3192 3193 20040320 3194 + modify PutAttrChar() and PUTC() macro to improve use of 3195 A_ALTCHARSET attribute to prevent line-drawing characters from 3196 being lost in situations where the locale would otherwise treat the 3197 raw data as nonprintable (Debian #227879). 3198 3199 20040313 3200 + fix a redefinition of CTRL() macro in test/view.c for AIX 5.2 (report 3201 by Jim Idle). 3202 + remove ".PP" after ".SH NAME" in a few manpages; this confuses 3203 some apropos script (Debian #237831). 3204 3205 20040306 3206 + modify ncurses.c 'r' test so editing commands, like inserted text, 3207 set the field background, and the state of insert/overlay editing 3208 mode is shown in that test. 3209 + change syntax of dummy targets in Ada95 makefiles to work with pmake. 3210 + correct logic in test/ncurses.c 'b' for noncolor terminals which 3211 did not recognize a quit-command (cf: 20030419). 3212 3213 20040228 3214 + modify _nc_insert_ch() to allow for its input to be part of a 3215 multibyte string. 3216 + split out lib_insnstr.c, to prepare to rewrite it. X/Open states 3217 that this function performs wrapping, unlike all of the other 3218 insert-functions. Currently it does not wrap. 3219 + check for nl_langinfo(CODESET), use it if available (report by 3220 Stanislav Ievlev). 3221 + split-out CF_BUILD_CC macro, actually did this for lynx first. 3222 + fixes for configure script CF_WITH_DBMALLOC and CF_WITH_DMALLOC, 3223 which happened to work with bash, but not with Bourne shell (report 3224 by Marco d'Itri via tin-dev). 3225 3226 20040221 3227 + some changes to adapt the form library to wide characters, incomplete 3228 (request by Mike Aubury). 3229 + add symbol to curses.h which can be used to suppress include of 3230 stdbool.h, e.g., 3231 #define NCURSES_ENABLE_STDBOOL_H 0 3232 #include <curses.h> 3233 (discussion on XFree86 mailing list). 3234 3235 20040214 3236 + modify configure --with-termlib option to accept a value which sets 3237 the name of the terminfo library. This would allow a packager to 3238 build libtinfow.so renamed to coincide with libtinfo.so (discussion 3239 with Stanislav Ievlev). 3240 + improve documentation of --with-install-prefix, --prefix and 3241 $(DESTDIR) in INSTALL (prompted by discussion with Paul Lew). 3242 + add configure check if the compiler can use -c -o options to rename 3243 its output file, use that to omit the 'cd' command which was used to 3244 ensure object files are created in a separate staging directory 3245 (prompted by comments by Johnny Wezel, Martin Mokrejs). 3246 3247 20040208 5.4 release for upload to 3248 + update TO-DO. 3249 3250 20040207 pre-release 3251 + minor fixes to _nc_tparm_analyze(), i.e., do not count %i as a param, 3252 and do not count %d if it follows a %p. 3253 + correct an inconsistency between handling of codes in the 128-255 3254 range, e.g., as illustrated by test/ncurses.c f/F tests. In POSIX 3255 locale, the latter did not show printable results, while the former 3256 did. 3257 + modify MKlib_gen.sh to compensate for broken C preprocessor on Mac 3258 OS X, which alters "%%" to "% % " (report by Robert Simms, fix 3259 verified by Scott Corscadden). 3260 3261 20040131 pre-release 3262 + modify SCREEN struct to align it between normal/wide curses flavors 3263 to simplify future changes to build a single version of libtinfo 3264 (patch by Stanislav Ievlev). 3265 + document handling of carriage return by addch() in manpage. 3266 + document special features of unctrl() in manpage. 3267 + documented interface changes in INSTALL. 3268 + corrected control-char test in lib_addch.c to account for locale 3269 (Debian #230335, cf: 971206). 3270 + updated test/configure.in to use AC_EXEEXT and AC_OBJEXT. 3271 + fixes to compile Ada95 binding with Debian gnat 3.15p-4 package. 3272 + minor configure-script fixes for older ports, e.g., BeOS R4.5. 3273 3274 20040125 pre-release 3275 + amend change to PutAttrChar() from 20030614 which computed the number 3276 of cells for a possibly multi-cell character. The 20030614 change 3277 forced the cell to a blank if the result from wcwidth() was not 3278 greater than zero. However, wcwidth() called for parameters in the 3279 range 128-255 can give this return value. The logic now simply 3280 ensures that the number of cells is greater than zero without 3281 modifying the displayed value. 3282 3283 20040124 pre-release 3284 + looked good for 5.4 release for upload to (but see above) 3285 + modify configure script check for ranlib to use AC_CHECK_TOOL, since 3286 that works better for cross-compiling. 3287 3288 20040117 pre-release 3289 + modify lib_get_wch.c to prefer mblen/mbtowc over mbrlen/mbrtowc to 3290 work around core dump in Solaris 8's locale support, e.g., for 3291 zh_CN.GB18030 (report by Saravanan Bellan). 3292 + add includes for <stdarg.h> and <stdio.h> in configure script macro 3293 to make <wchar.h> check work with Tru64 4.0d. 3294 + add terminfo entry for U/Win -TD 3295 + add terminfo entries for SFU aka Interix aka OpenNT (Federico 3296 Bianchi). 3297 + modify tput's error messages to prefix them with the program name 3298 (report by Vincent Lefevre, patch by Daniel Jacobowitz (see Debian 3299 #227586)). 3300 + correct a place in tack where exit_standout_mode was used instead of 3301 exit_attribute_mode (patch by Jochen Voss (see Debian #224443)). 3302 + modify c++/cursesf.h to use const in the Enumeration_Field method. 3303 + remove an ambiguous (actually redundant) method from c++/cursesf.h 3304 + make $HOME/.terminfo update optional (suggested by Stanislav Ievlev). 3305 + improve sed script which extracts libtool's version in the 3306 CF_WITH_LIBTOOL macro. 3307 + add ifdef'd call to AC_PROG_LIBTOOL to CF_WITH_LIBTOOL macro (to 3308 simplify local patch for Albert Chin-A-Young).. 3309 + add $(CXXFLAGS) to link command in c++/Makefile.in (adapted from 3310 patch by Albert Chin-A-Young).. 3311 + fix a missing substitution in configure.in for "$target" needed for 3312 HPUX .so/.sl case. 3313 + resync CF_XOPEN_SOURCE configure macro with lynx; fixes IRIX64 and 3314 NetBSD 1.6 conflicts with _XOPEN_SOURCE. 3315 + make check for stdbool.h more specific, to ensure that including it 3316 will actually define/declare bool for the configured compiler. 3317 + rewrite ifdef's in curses.h relating NCURSES_BOOL and bool. The 3318 intention of that is to #define NCURSES_BOOL as bool when the 3319 compiler declares bool, and to #define bool as NCURSES_BOOL when it 3320 does not (reported by Jim Gifford, Sam Varshavchik, cf: 20031213). 3321 3322 20040110 pre-release 3323 + change minor version to 4, i.e., ncurses 5.4 3324 + revised/improved terminfo entries for tvi912b, tvi920b (Benjamin C W 3325 Sittler). 3326 + simplified ncurses/base/version.c by defining the result from the 3327 configure script rather than using sprintf (suggested by Stanislav 3328 Ievlev). 3329 + remove obsolete casts from c++/cursesw.h (reported by Stanislav 3330 Ievlev). 3331 + modify configure script so that when configuring for termlib, programs 3332 such as tic are not linked with the upper-level ncurses library 3333 (suggested by Stanislav Ievlev). 3334 + move version.c from ncurses/base to ncurses/tinfo to allow linking 3335 of tic, etc., using libtinfo (suggested by Stanislav Ievlev). 3336 3337 20040103 3338 + adjust -D's to build ncursesw on OpenBSD. 3339 + modify CF_PROG_EXT to make OS/2 build with EXEEXT. 3340 + add pecho_wchar(). 3341 + remove <wctype.h> include from lib_slk_wset.c which is not needed (or 3342 available) on older platforms. 3343 3344 20031227 3345 + add -D's to build ncursew on FreeBSD 5.1. 3346 + modify shared library configuration for FreeBSD 4.x/5.x to add the 3347 soname information (request by Marc Glisse). 3348 + modify _nc_read_tic_entry() to not use MAX_ALIAS, but PATH_MAX only 3349 for limiting the length of a filename in the terminfo database. 3350 + modify termname() to return the terminal name used by setupterm() 3351 rather than $TERM, without truncating to 14 characters as documented 3352 by X/Open (report by Stanislav Ievlev, cf: 970719). 3353 + re-add definition for _BSD_TYPES, lost in merge (cf: 20031206). 3354 3355 20031220 3356 + add configure option --with-manpage-format=catonly to address 3357 behavior of BSDI, allow install of man+cat files on NetBSD, whose 3358 behavior has diverged by requiring both to be present. 3359 + remove leading blanks from comment-lines in manlinks.sed script to 3360 work with Tru64 4.0d. 3361 + add screen.linux terminfo entry (discussion on mutt-users mailing 3362 list). 3363 3364 20031213 3365 + add a check for tic to flag missing backslashes for termcap 3366 continuation lines. ncurses reads the whole entry, but termcap 3367 applications do not. 3368 + add configure option "--with-manpage-aliases" extending 3369 "--with-manpage-aliases" to provide the option of generating ".so" 3370 files rather than symbolic links for manpage aliases. 3371 + add bool definition in include/curses.h.in for configurations with no 3372 usable C++ compiler (cf: 20030607). 3373 + fix pathname of SigAction.h for building with --srcdir (reported by 3374 Mike Castle). 3375 3376 20031206 3377 + folded ncurses/base/sigaction.c into includes of ncurses/SigAction.h, 3378 since that header is used only within ncurses/tty/lib_tstp.c, for 3379 non-POSIX systems (discussion with Stanislav Ievlev). 3380 + remove obsolete _nc_outstr() function (report by Stanislav Ievlev 3381 <inger@altlinux.org>). 3382 + add test/background.c and test/color_set.c 3383 + modify color_set() function to work with color pair 0 (report by 3384 George Andreou <gbandreo@tem.uoc.gr>). 3385 + add configure option --with-trace, since defining TRACE seems too 3386 awkward for some cases. 3387 + remove a call to _nc_free_termtype() from read_termtype(), since the 3388 corresponding buffer contents were already zeroed by a memset (cf: 3389 20000101). 3390 + improve configure check for _XOPEN_SOURCE and related definitions, 3391 adding special cases for Solaris' __EXTENSIONS__ and FreeBSD's 3392 __BSD_TYPES (reports by Marc Glisse <marc.glisse@normalesup.org>). 3393 + small fixes to compile on Solaris and IRIX64 using cc. 3394 + correct typo in check for pre-POSIX sort options in MKkey_defs.sh 3395 (cf: 20031101). 3396 3397 20031129 3398 + modify _nc_gettime() to avoid a problem with arithmetic on unsigned 3399 values (Philippe Blain). 3400 + improve the nanosleep() logic in napms() by checking for EINTR and 3401 restarting (Philippe Blain). 3402 + correct expression for "%D" in lib_tgoto.c (Juha Jarvi 3403 <mooz@welho.com>). 3404 3405 20031122 3406 + add linux-vt terminfo entry (Andrey V Lukyanov <land@long.yar.ru>). 3407 + allow "\|" escape in terminfo; tic should not warn about this. 3408 + save the full pathname of the trace-file the first time it is opened, 3409 to avoid creating it in different directories if the application 3410 opens and closes it while changing its working directory. 3411 + modify configure script to provide a non-empty default for 3412 $BROKEN_LINKER 3413 3414 20031108 3415 + add DJGPP to special case of DOS-style drive letters potentially 3416 appearing in TERMCAP environment variable. 3417 + fix some spelling in comments (reports by Jason McIntyre, Jonathon 3418 Gray). 3419 + update config.guess, config.sub 3420 3421 20031101 3422 + fix a memory leak in error-return from setupterm() (report by 3423 Stanislav Ievlev <inger@altlinux.org>). 3424 + use EXEEXT and OBJEXT consistently in makefiles. 3425 + amend fixes for cross-compiling to use separate executable-suffix 3426 BUILD_EXEEXT (cf: 20031018). 3427 + modify MKkey_defs.sh to check for sort utility that does not 3428 recognize key options, e.g., busybox (report by Peter S Mazinger 3429 <ps.m@gmx.net>). 3430 + fix potential out-of-bounds indexing in _nc_infotocap() (found by 3431 David Krause using some of the new malloc debugging features 3432 under OpenBSD, patch by Ted Unangst). 3433 + modify CF_LIB_SUFFIX for Itanium releases of HP-UX, which use a 3434 ".so" suffix (patch by Jonathan Ward <Jonathan.Ward@hp.com>). 3435 3436 20031025 3437 + update terminfo for xterm-xfree86 -TD 3438 + add check for multiple "tc=" clauses in a termcap to tic. 3439 + check for missing op/oc in tic. 3440 + correct _nc_resolve_uses() and _nc_merge_entry() to allow infocmp and 3441 tic to show cancelled capabilities. These functions were ignoring 3442 the state of the target entry, which should be untouched if cancelled. 3443 + correct comment in tack/output.c (Debian #215806). 3444 + add some null-pointer checks to lib_options.c (report by Michael 3445 Bienia). 3446 + regenerated html documentation. 3447 + correction to tar-copy.sh, remove a trap command that resulted in 3448 leaving temporary files (cf: 20030510). 3449 + remove contact/maintainer addresses for Juergen Pfeifer (his request). 3450 3451 20031018 3452 + updated test/configure to reflect changes for libtool (cf: 20030830). 3453 + fix several places in tack/pad.c which tested and used the parameter- 3454 and parameterless strings inconsistently, i.e., in pad_rin(), 3455 pad_il(), pad_indn() and pad_dl() (Debian #215805). 3456 + minor fixes for configure script and makefiles to cleanup executables 3457 generated when cross-compiling for DJGPP. 3458 + modify infocmp to omit check for $TERM for operations that do not 3459 require it, e.g., "infocmp -e" used to build fallback list (report by 3460 Koblinger Egmont). 3461 3462 20031004 3463 + add terminfo entries for DJGPP. 3464 + updated note about maintainer in ncurses-intro.html 3465 3466 20030927 3467 + update terminfo entries for gnome terminal. 3468 + modify tack to reset colors after each color test, correct a place 3469 where exit_standout_mode was used instead of exit_attribute_mode. 3470 + improve tack's bce test by making it set colors other than black 3471 on white. 3472 + plug a potential recursion between napms() and _nc_timed_wait() 3473 (report by Philippe Blain). 3474 3475 20030920 3476 + add --with-rel-version option to allow workaround to allow making 3477 libtool on Darwin generate the "same" library names as with the 3478 --with-shared option. The Darwin ld program does not work well 3479 with a zero as the minor-version value (request by Chris Zubrzycki). 3480 + modify CF_MIXEDCASE_FILENAMES macro to work with cross-compiling. 3481 + modify tack to allow it to run from fallback terminfo data. 3482 > patch by Philippe Blain: 3483 + improve PutRange() by adjusting call to EmitRange() and corresponding 3484 return-value to not emit unchanged characters on the end of the 3485 range. 3486 + improve a check for changed-attribute by exiting a loop when the 3487 change is found. 3488 + improve logic in TransformLine(), eliminating a duplicated comparison 3489 in the clr_bol logic. 3490 3491 20030913 3492 > patch by Philippe Blain: 3493 + in ncurses/tty/lib_mvcur.c, 3494 move the label 'nonlocal' just before the second gettimeofday() to 3495 be able to compute the diff time when 'goto nonlocal' used. 3496 Rename 'msec' to 'microsec' in the debug-message. 3497 + in ncurses/tty/lib_mvcur.c, 3498 Use _nc_outch() in carriage return/newline movement instead of 3499 putchar() which goes to stdout. Move test for xold>0 out of loop. 3500 + in ncurses/tinfo/setbuf.c, 3501 Set the flag SP->_buffered at the end of operations when all has been 3502 successful (typeMalloc can fail). 3503 + simplify NC_BUFFERED macro by moving check inside _nc_setbuf(). 3504 3505 20030906 3506 + modify configure script to avoid using "head -1", which does not 3507 work if POSIXLY_CORRECT (sic) is set. 3508 + modify run_tic.in to avoid using wrong shared libraries when 3509 cross-compiling (Dan Kegel). 3510 3511 20030830 3512 + alter configure script help message to make it clearer that 3513 --with-build-cc does not specify a cross-compiler (suggested by Dan 3514 Kegel <dank@kegel.com>). 3515 + modify configure script to accommodate libtool 1.5, as well as add an 3516 parameter to the "--with-libtool" option which can specify the 3517 pathname of libtool (report by Chris Zubrzycki). We note that 3518 libtool 1.5 has more than one bug in its C++ support, so it is not 3519 able to install libncurses++, for instance, if $DESTDIR or the option 3520 --with-install-prefix is used. 3521 3522 20030823 3523 > patch by Philippe Blain: 3524 + move assignments to SP->_cursrow, SP->_curscol into online_mvcur(). 3525 + make baudrate computation in delay_output() consistent with the 3526 assumption in _nc_mvcur_init(), i.e., a byte is 9 bits. 3527 3528 20030816 3529 + modify logic in waddch_literal() to take into account zh_TW.Big5 3530 whose multibyte sequences may contain "printable" characters, e.g., 3531 a "g" in the sequence "\247g" (Debian #204889, cf: 20030621). 3532 + improve storage used by _nc_safe_strcpy() by ensuring that the size 3533 is reset based on the initialization call, in case it were called 3534 after other strcpy/strcat calls (report by Philippe Blain). 3535 > patch by Philippe Blain: 3536 + remove an unused ifdef for REAL_ATTR & WANT_CHAR 3537 + correct a place where _cup_cost was used rather than _cuu_cost 3538 3539 20030809 3540 + fix a small memory leak in _nc_free_termtype(). 3541 + close trace-file if trace() is called with a zero parameter. 3542 + free memory allocated for soft-key strings, in delscreen(). 3543 + fix an allocation size in safe_sprintf.c for the "*" format code. 3544 + correct safe_sprintf.c to not return a null pointer if the format 3545 happens to be an empty string. This applies to the "configure 3546 --enable-safe-sprintf" option (Redhat #101486). 3547 3548 20030802 3549 + modify casts used for ABSENT_BOOLEAN and CANCELLED_BOOLEAN (report by 3550 Daniel Jacobowitz). 3551 > patch by Philippe Blain: 3552 + change padding for change_scroll_region to not be proportional to 3553 the size of the scroll-region. 3554 + correct error-return in _nc_safe_strcat(). 3555 3556 20030726 3557 + correct limit-checks in _nc_scroll_window() (report and test-case by 3558 Thomas Graf <graf@dms.at> cf: 20011020). 3559 + re-order configure checks for _XOPEN_SOURCE to avoid conflict with 3560 _GNU_SOURCE check. 3561 3562 20030719 3563 + use clr_eol in preference to blanks for bce terminals, so select and 3564 paste will have fewer trailing blanks, e.g., when using xterm 3565 (request by Vincent Lefevre). 3566 + correct prototype for wunctrl() in manpage. 3567 + add configure --with-abi-version option (discussion with Charles 3568 Wilson). 3569 > cygwin changes from Charles Wilson: 3570 + aclocal.m4: on cygwin, use autodetected prefix for import 3571 and static lib, but use "cyg" for DLL. 3572 + include/ncurses_dll.h: correct the comments to reflect current 3573 status of cygwin/mingw port. Fix compiler warning. 3574 + misc/run_tic.in: ensure that tic.exe can find the uninstalled 3575 DLL, by adding the lib-directory to the PATH variable. 3576 + misc/terminfo.src (nxterm|xterm-color): make xterm-color 3577 primary instead of nxterm, to match XFree86's xterm.terminfo 3578 usage and to prevent circular links. 3579 (rxvt): add additional codes from rxvt.org. 3580 (rxvt-color): new alias 3581 (rxvt-xpm): new alias 3582 (rxvt-cygwin): like rxvt, but with special acsc codes. 3583 (rxvt-cygwin-native): ditto. rxvt may be run under XWindows, or 3584 with a "native" MSWin GUI. Each takes different acsc codes, 3585 which are both different from the "normal" rxvt's acsc. 3586 (cygwin): cygwin-in-cmd.exe window. Lots of fixes. 3587 (cygwinDBG): ditto. 3588 + mk-1st.awk: use "cyg" for the DLL prefix, but "lib" for import 3589 and static libs. 3590 3591 20030712 3592 + update config.guess, config.sub 3593 + add triples for configuring shared libraries with the Debian 3594 GNU/FreeBSD packages (patch by Robert Millan <zeratul2@wanadoo.es>). 3595 3596 20030705 3597 + modify CF_GCC_WARNINGS so it only applies to gcc, not g++. Some 3598 platforms have installed g++ along with the native C compiler, which 3599 would not accept gcc warning options. 3600 + add -D_XOPEN_SOURCE=500 when configuring with --enable-widec, to 3601 get mbstate_t declaration on HPUX 11.11 (report by David Ellement). 3602 + add _nc_pathlast() to get rid of casts in _nc_basename() calls. 3603 + correct a sign-extension in wadd_wch() and wecho_wchar() from 3604 20030628 (report by Tomohiro Kubota). 3605 + work around omission of btowc() and wctob() from wide-character 3606 support (sic) in NetBSD 1.6 using mbtowc() and wctomb() (report by 3607 Gabor Z Papp). 3608 + add portability note to curs_get_wstr.3x (Debian #199957). 3609 3610 20030628 3611 + rewrite wadd_wch() and wecho_wchar() to call waddch() and wechochar() 3612 respectively, to avoid calling waddch_noecho() with wide-character 3613 data, since that function assumes its input is 8-bit data. 3614 Similarly, modify waddnwstr() to call wadd_wch(). 3615 + remove logic from waddnstr() which transformed multibyte character 3616 strings into wide-characters. Rewrite of waddch_literal() from 3617 20030621 assumes its input is raw multibyte data rather than wide 3618 characters (report by Tomohiro Kubota). 3619 3620 20030621 3621 + write getyx() and related 2-return macros in terms of getcury(), 3622 getcurx(), etc. 3623 + modify waddch_literal() in case an application passes bytes of a 3624 multibyte character directly to waddch(). In this case, waddch() 3625 must reassemble the bytes into a wide-character (report by Tomohiro 3626 Kubota <kubota@debian.org>). 3627 3628 20030614 3629 + modify waddch_literal() in case a multibyte value occupies more than 3630 two cells. 3631 + modify PutAttrChar() to compute the number of character cells that 3632 are used in multibyte values. This fixes a problem displaying 3633 double-width characters (report/test by Mitsuru Chinen 3634 <mchinen@yamato.ibm.com>). 3635 + add a null-pointer check for result of keyname() in _tracechar() 3636 + modify _tracechar() to work around glibc sprintf bug. 3637 3638 20030607 3639 + add a call to setlocale() in cursesmain.cc, making demo display 3640 properly in a UTF-8 locale. 3641 + add a fallback definition in curses.priv.h for MB_LEN_MAX (prompted 3642 by discussion with Gabor Z Papp). 3643 + use macros NCURSES_ACS() and NCURSES_WACS() to hide cast needed to 3644 appease -Wchar-subscript with g++ 3.3 (Debian #195732). 3645 + fix a redefinition of $RANLIB in the configure script when libtool 3646 is used, which broke configure on Mac OS X (report by Chris Zubrzycki 3647 <beren@mac.com>). 3648 + simplify ifdef for bool declaration in curses.h.in (suggested by 3649 Albert Chin-A-Young). 3650 + remove configure script check to allow -Wconversion for older 3651 versions of gcc (suggested by Albert Chin-A-Young). 3652 3653 20030531 3654 + regenerated html manpages. 3655 + modify ifdef's in curses.h.in that disabled use of __attribute__() 3656 for g++, since recent versions implement the cases which ncurses uses 3657 (Debian #195230). 3658 + modify _nc_get_token() to handle a case where an entry has no 3659 description, and capabilities begin on the same line as the entry 3660 name. 3661 + fix a typo in ncurses_dll.h reported by gcc 3.3. 3662 + add an entry for key_defined.3x to man_db.renames. 3663 3664 20030524 3665 + modify setcchar() to allow converting control characters to complex 3666 characters (report/test by Mitsuru Chinen <mchinen@yamato.ibm.com>). 3667 + add tkterm entry -TD 3668 + modify parse_entry.c to allow a terminfo entry with a leading 3669 2-character name (report by Don Libes). 3670 + corrected acsc in screen.teraterm, which requires a PC-style mapping. 3671 + fix trace statements in read_entry.c to use lseek() rather than 3672 tell(). 3673 + fix signed/unsigned warnings from Sun's compiler (gcc should give 3674 these warnings, but it is unpredictable). 3675 + modify configure script to omit -Winline for gcc 3.3, since that 3676 feature is broken. 3677 + modify manlinks.sed to add a few functions that were overlooked since 3678 they return function pointers: field_init, field_term, form_init, 3679 form_term, item_init, item_term, menu_init and menu_term. 3680 3681 20030517 3682 + prevent recursion in wgetch() via wgetnstr() if the connection cannot 3683 be switched between cooked/raw modes because it is not a TTY (report 3684 by Wolfgang Gutjahr <gutw@knapp.com>). 3685 + change parameter of define_key() and key_defined() to const (prompted 3686 by Debian #192860). 3687 + add a check in test/configure for ncurses extensions, since there 3688 are some older versions, etc., which would not compile with the 3689 current test programs. 3690 + corrected demo in test/ncurses.c of wgetn_wstr(), which did not 3691 convert wchar_t string to multibyte form before printing it. 3692 + corrections to lib_get_wstr.c: 3693 + null-terminate buffer passed to setcchar(), which occasionally 3694 failed. 3695 + map special characters such as erase- and kill-characters into 3696 key-codes so those will work as expected even if they are not 3697 mentioned in the terminfo. 3698 + modify PUTC() and Charable() macros to make wide-character line 3699 drawing work for POSIX locale on Linux console (cf: 20021221). 3700 3701 20030510 3702 + make typography for program options in manpages consistent (report 3703 by Miloslav Trmac <mitr@volny.cz>). 3704 + correct dependencies in Ada95/src/Makefile.in, so the builds with 3705 "--srcdir" work (report by Warren L Dodge). 3706 + correct missing definition of $(CC) in Ada95/gen/Makefile.in 3707 (reported by Warren L Dodge <warrend@mdhost.cse.tek.com>). 3708 + fix typos and whitespace in manpages (patch by Jason McIntyre 3709 <jmc@prioris.mini.pw.edu.pl>). 3710 3711 20030503 3712 + fix form_driver() cases for REQ_CLR_EOF, REQ_CLR_EOL, REQ_DEL_CHAR, 3713 REQ_DEL_PREV and REQ_NEW_LINE, which did not ensure the cursor was at 3714 the editing position before making modifications. 3715 + add test/demo_forms and associated test/edit_field.c demos. 3716 + modify test/configure.in to use test/modules for the list of objects 3717 to compile rather than using the list of programs. 3718 3719 20030419 3720 + modify logic of acsc to use the original character if no mapping is 3721 defined, noting that Solaris does this. 3722 + modify ncurses 'b' test to avoid using the acs_map[] array since 3723 20021231 changes it to no longer contain information from the acsc 3724 string. 3725 + modify makefile rules in c++, progs, tack and test to ensure that 3726 the compiler flags (e.g., $CFLAGS or $CCFLAGS) are used in the link 3727 command (report by Jose Luis Rico Botella <informatica@serpis.com>). 3728 + modify soft-key initialization to use A_REVERSE if A_STANDOUT would 3729 not be shown when colors are used, i.e., if ncv#1 is set in the 3730 terminfo as is done in "screen". 3731 3732 20030412 3733 + add a test for slk_color(), in ncurses.c 3734 + fix some issues reported by valgrind in the slk_set() and slk_wset() 3735 code, from recent rewrite. 3736 + modify ncurses 'E' test to use show previous label via slk_label(), 3737 as in 'e' test. 3738 + modify wide-character versions of NewChar(), NewChar2() macros to 3739 ensure that the whole struct is initialized. 3740 3741 20030405 3742 + modify setupterm() to check if the terminfo and terminal-modes have 3743 already been read. This ensures that it does not reinvoke 3744 def_prog_mode() when an application calls more than one function, 3745 such as tgetent() and initscr() (report by Olaf Buddenhagen). 3746 3747 20030329 3748 + add 'E' test to ncurses.c, to exercise slk_wset(). 3749 + correct handling of carriage-return in wgetn_wstr(), used in demo of 3750 slk_wset(). 3751 + first draft of slk_wset() function. 3752 3753 20030322 3754 + improved warnings in tic when suppressing items to fit in termcap's 3755 1023-byte limit. 3756 + built a list in test/README showing which externals are being used 3757 by either programs in the test-directory or via internal library 3758 calls. 3759 + adjust include-options in CF_ETIP_DEFINES to avoid missing 3760 ncurses_dll.h, fixing special definitions that may be needed for 3761 etip.h (reported by Greg Schafer <gschafer@zip.com.au>). 3762 3763 20030315 3764 + minor fixes for cardfile.c, to make it write the updated fields to 3765 a file when ^W is given. 3766 + add/use _nc_trace_bufcat() to eliminate some fixed buffer limits in 3767 trace code. 3768 3769 20030308 3770 + correct a case in _nc_remove_string(), used by define_key(), to avoid 3771 infinite loop if the given string happens to be a substring of other 3772 strings which are assigned to keys (report by John McCutchan). 3773 + add key_defined() function, to tell which keycode a string is bound 3774 to (discussion with John McCutchan <ttb@tentacle.dhs.org>). 3775 + correct keybound(), which reported definitions in the wrong table, 3776 i.e., the list of definitions which are disabled by keyok(). 3777 + modify demo_keydef.c to show the details it changes, and to check 3778 for errors. 3779 3780 20030301 3781 + restructured test/configure script, make it work for libncursesw. 3782 + add description of link_fieldtype() to manpage (report by 3783 L Dee Holtsclaw <dee@sunbeltsoft.com>). 3784 3785 20030222 3786 + corrected ifdef's relating to configure check for wchar_t, etc. 3787 + if the output is a socket or other non-tty device, use 1 millisecond 3788 for the cost in mvcur; previously it was 9 milliseconds because the 3789 baudrate was not known. 3790 + in _nc_get_tty_mode(), initialize the TTY buffer on error, since 3791 glibc copies uninitialized data in that case, as noted by valgrind. 3792 + modify tput to use the same parameter analysis as tparm() does, to 3793 provide for user-defined strings, e.g., for xterm title, a 3794 corresponding capability might be 3795 title=\E]2;%p1%s^G, 3796 + modify MKlib_gen.sh to avoid passing "#" tokens through the C 3797 preprocessor. This works around Mac OS X's preprocessor, which 3798 insists on adding a blank on each side of the token (report/analysis 3799 by Kevin Murphy <murphy@genome.chop.edu>). 3800 3801 20030215 3802 + add configure check for wchar_t and wint_t types, rather than rely 3803 on preprocessor definitions. Also work around for gcc fixinclude 3804 bug which creates a shadow copy of curses.h if it sees these symbols 3805 apparently typedef'd. 3806 + if database is disabled, do not generate run_tic.sh 3807 + minor fixes for memory-leak checking when termcap is read. 3808 3809 20030208 3810 + add checking in tic for incomplete line-drawing character mapping. 3811 + updated configure script to reflect fix for AC_PROG_GCC_TRADITIONAL, 3812 which is broken in autoconf 2.5x for Mac OS X 10.2.3 (report by 3813 Gerben Wierda <Sherlock@rna.nl>). 3814 + make return value from _nc_printf_string() consistent. Before, 3815 depending on whether --enable-safe-sprintf was used, it might not be 3816 cached for reallocating. 3817 3818 20030201 3819 + minor fixes for memory-leak checking in lib_tparm.c, hardscroll.c 3820 + correct a potentially-uninitialized value if _read_termtype() does 3821 not read as much data as expected (report by Wolfgang Rohdewald 3822 <wr6@uni.de>). 3823 + correct several places where the aclocal.m4 macros relied on cache 3824 variable names which were incompatible (as usual) between autoconf 3825 2.13 and 2.5x, causing the test for broken-linker to give incorrect 3826 results (reports by Gerben Wierda <Sherlock@rna.nl> and Thomas Esser 3827 <te@dbs.uni-hannover.de>). 3828 + do not try to open gpm mouse driver if standard output is not a tty; 3829 the gpm library does not make this check (bug report for dialog 3830 by David Oliveira <davidoliveira@develop.prozone.ws>). 3831 3832 20030125 3833 + modified emx.src to correspond more closely to terminfo.src, added 3834 emx-base to the latter -TD 3835 + add configure option for FreeBSD sysmouse, --with-sysmouse, and 3836 implement support for that in lib_mouse.c, lib_getch.c 3837 3838 20030118 3839 + revert 20030105 change to can_clear_with(), does not work for the 3840 case where the update is made on cells which are blanks with 3841 attributes, e.g., reverse. 3842 + improve ifdef's to guard against redefinition of wchar_t and wint_t 3843 in curses.h (report by Urs Jansen). 3844 3845 20030111 3846 + improve mvcur() by checking if it is safe to move when video 3847 attributes are set (msgr), and if not, reset/restore attributes 3848 within that function rather than doing it separately in the GoTo() 3849 function in tty_update.c (suggested by Philippe Blain). 3850 + add a message in run_tic.in to explain more clearly what does not 3851 work when attempting to create a symbolic link for /usr/lib/terminfo 3852 on OS/2 and other platforms with no symbolic links (report by John 3853 Polterak). 3854 + change several sed scripts to avoid using "\+" since it is not a BRE 3855 (basic regular expression). One instance caused terminfo.5 to be 3856 misformatted on FreeBSD (report by Kazuo Horikawa 3857 <horikawa@FreeBSD.org> (see FreeBSD docs/46709)). 3858 + correct misspelled 'wint_t' in curs_get_wch.3x (Michael Elkins). 3859 3860 20030105 3861 + improve description of terminfo operators, especially static/dynamic 3862 variables (comments by Mark I Manning IV <mark4th@earthlink.net>). 3863 + demonstrate use of FIELDTYPE by modifying test/ncurses 'r' test to 3864 use the predefined TYPE_ALPHA field-type, and by defining a 3865 specialized type for the middle initial/name. 3866 + fix MKterminfo.sh, another workaround for POSIXLY_CORRECT misfeature 3867 of sed 4.0 3868 > patch by Philippe Blain: 3869 + optimize can_clear_with() a little by testing first if the parameter 3870 is indeed a "blank". 3871 + simplify ClrBottom() a little by allowing it to use clr_eos to clear 3872 sections as small as one line. 3873 + improve ClrToEOL() by checking if clr_eos is available before trying 3874 to use it. 3875 + use tputs() rather than putp() in a few cases in tty_update.c since 3876 the corresponding delays are proportional to the number of lines 3877 affected: repeat_char, clr_eos, change_scroll_region. 3878 3879 20021231 3880 + rewrite of lib_acs.c conflicts with copying of SCREEN acs_map to/from 3881 global acs_map[] array; removed the lines that did the copying. 3882 3883 20021228 3884 + change some overlooked tputs() calls in scrolling code to use putp() 3885 (report by Philippe Blain). 3886 + modify lib_getch.c to avoid recursion via wgetnstr() when the input 3887 is not a tty and consequently mode-changes do not work (report by 3888 <R.Chamberlin@querix.com>). 3889 + rewrote lib_acs.c to allow PutAttrChar() to decide how to render 3890 alternate-characters, i.e., to work with Linux console and UTF-8 3891 locale. 3892 + correct line/column reference in adjust_window(), needed to make 3893 special windows such as curscr track properly when resizing (report 3894 by Lucas Gonze <lgonze@panix.com>). 3895 > patch by Philippe Blain: 3896 + correct the value used for blank in ClrBottom() (broken in 20000708). 3897 + correct an off-by-one in GoTo() parameter in _nc_scrolln(). 3898 3899 20021221 3900 + change several tputs() calls in scrolling code to use putp(), to 3901 enable padding which may be needed for some terminals (patch by 3902 Philippe Blain). 3903 + use '%' as sed substitute delimiter in run_tic script to avoid 3904 problems with pathname delimiters such as ':' and '@' (report by John 3905 Polterak). 3906 + implement a workaround so that line-drawing works with screen's 3907 crippled UTF-8 support (tested with 3.9.13). This only works with 3908 the wide-character support (--enable-widec); the normal library will 3909 simply suppress line-drawing when running in a UTF-8 locale in screen. 3910 3911 20021214 3912 + allow BUILD_CC and related configure script variables to be 3913 overridden from the environment. 3914 + make build-tools variables in ncurses/Makefile.in consistent with 3915 the configure script variables (report by Maciej W Rozycki). 3916 + modify ncurses/modules to allow 3917 configure --disable-leaks --disable-ext-funcs 3918 to build (report by Gary Samuelson). 3919 + fix a few places in configure.in which lacked quotes (report by 3920 Gary Samuelson <gary.samuelson@verizon.com>). 3921 + correct handling of multibyte characters in waddch_literal() which 3922 force wrapping because they are started too late on the line (report 3923 by Sam Varshavchik). 3924 + small fix for CF_GNAT_VERSION to ignore the help-message which 3925 gnatmake adds to its version-message. 3926 > Maciej W Rozycki <macro@ds2.pg.gda.pl>: 3927 + use AC_CHECK_TOOL to get proper values for AR and LD for cross 3928 compiling. 3929 + use $cross_compiling variable in configure script rather than 3930 comparing $host_alias and $target alias, since "host" is 3931 traditionally misused in autoconf to refer to the target platform. 3932 + change configure --help message to use "build" rather than "host" 3933 when referring to the --with-build-XXX options. 3934 3935 20021206 3936 + modify CF_GNAT_VERSION to print gnatmake's version, and to allow for 3937 possible gnat versions such as 3.2 (report by Chris Lingard 3938 <chris@stockwith.co.uk>). 3939 + modify #define's for CKILL and other default control characters in 3940 tset to use the system's default values if they are defined. 3941 + correct interchanged defaults for kill and interrupt characters 3942 in tset, which caused it to report unnecessarily (Debian #171583). 3943 + repair check for missing C++ compiler, which is broken in autoconf 3944 2.5x by hardcoding it to g++ (report by Martin Mokrejs). 3945 + update config.guess, config.sub (2002-11-30) 3946 + modify configure script to skip --with-shared, etc., when the 3947 --with-libtool option is given, since they would be ignored anyway. 3948 + fix to allow "configure --with-libtool --with-termlib" to build. 3949 + modify configure script to show version number of libtool, to help 3950 with bug reports. libtool still gets confused if the installed 3951 ncurses libraries are old, since it ignores the -L options at some 3952 point (tested with libtool 1.3.3 and 1.4.3). 3953 + reorder configure script's updating of $CPPFLAGS and $CFLAGS to 3954 prevent -I options in the user's environment from introducing 3955 conflicts with the build -I options (may be related to reports by 3956 Patrick Ash and George Goffe). 3957 + rename test/define_key.c to test/demo_defkey.c, test/keyok.c to 3958 test/demo_keyok.c to allow building these with libtool. 3959 3960 20021123 3961 + add example program test/define_key.c for define_key(). 3962 + add example program test/keyok.c for keyok(). 3963 + add example program test/ins_wide.c for wins_wch() and wins_wstr(). 3964 + modify wins_wch() and wins_wstr() to interpret tabs by using the 3965 winsch() internal function. 3966 + modify setcchar() to allow for wchar_t input strings that have 3967 more than one spacing character. 3968 3969 20021116 3970 + fix a boundary check in lib_insch.c (patch by Philippe Blain). 3971 + change type for *printw functions from NCURSES_CONST to const 3972 (prompted by comment by Pedro Palhoto Matos <plpm@mega.ist.utl.pt>, 3973 but really from a note on X/Open's website stating that either is 3974 acceptable, and the latter will be used in a future revision). 3975 + add xterm-1002, xterm-1003 terminfo entries to demonstrate changes in 3976 lib_mouse.c (20021026) -TD 3977 + add screen-bce, screen-s entries from screen 3.9.13 (report by 3978 Adam Lazur <zal@debian.org>) -TD 3979 + add mterm terminfo entries -TD 3980 3981 20021109 3982 + split-out useful fragments in terminfo for vt100 and vt220 numeric 3983 keypad, i.e., vt100+keypad, vt100+pfkeys, vt100+fnkeys and 3984 vt220+keypad. The last as embedded in various entries had ka3 and 3985 kb2 interchanged (report/discussion with Leonard den Ottolander 3986 <leonardjo@hetnet.nl>). 3987 + add check in tic for keypads consistent with vt100 layout. 3988 + improve checks in tic for color capabilities 3989 3990 20021102 3991 + check for missing/empty/illegal terminfo name in _nc_read_entry() 3992 (report by Martin Mokrejs, where $TERM was set to an empty string). 3993 + rewrote lib_insch.c, combining it with lib_insstr.c so both handle 3994 tab and other control characters consistently (report by Philippe 3995 Blain). 3996 + remove an #undef for KEY_EVENT from curses.tail used in the 3997 experimental NCURSES_WGETCH_EVENTS feature. The #undef confuses | http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blob;f=NEWS;hb=9776951416d7fb862b9dca1f4c9f8031a5c9059b | CC-MAIN-2022-40 | refinedweb | 30,009 | 66.44 |
Combining data from a database and a web service with Fetch
by Alejandro Gomez
- •
- January 19, 2017
- •
- scala• http4s• fetch• doobie
- |
- 11 minutes to read.
In a previous article, I discussed how you can use Fetch to query and combine data from a variety of sources such as databases and HTTP servers. This time, we’re going to examine a full example using the Doobie library for DB access and http4s as the HTTP client.
For the sake of this example, let’s assume we have a DB table with users and we are storing related to-do items in a third-party web service. We’ll query users from the DB and their list of to-do items from an HTTP API.
Querying the Database
We’ll start by creating our
user DB table and inserting a few values in it. For performing queries to the DB, we’ll need a Doobie
Transactor; you can find details on how to create one in Doobie’s documentation. We’ll create a transactor that runs queries to the
Task type from the fs2 library and makes sure that the
user table is created and populated with a few records upon transactor creation:
type UserId = Int case class User(id: UserId, name: String) val dropTable = sql"DROP TABLE IF EXISTS user".update.run val createTable = sql""" CREATE TABLE user ( id INTEGER PRIMARY KEY, name VARCHAR(20) NOT NULL UNIQUE ) """.update.run def addUser(usr: User) = sql"INSERT INTO user (id, name) VALUES(${usr.id}, ${usr.name})".update.run val users: List[User] = List("William Shakespeare", "Charles Dickens", "George Orwell").zipWithIndex.map { case (name, id) => User(id + 1, name) } val xa: Transactor[Task] = (for { xa <- createTransactor _ <- (dropTable *> createTable *> users.traverse(addUser)).transact(xa) } yield xa).unsafeRunSync.toOption.getOrElse( throw new Exception("Could not create test database and/or transactor") )
Now that we have the table created and a few records inputted, we can start using Doobie for querying users. We’ll start by writing a couple of functions that’ll help us run the queries for one user or multiple users:
import cats.data.NonEmptyList import doobie.imports.{Query => _, _} def userById(id: Int): ConnectionIO[Option[Author]] = sql"SELECT * FROM author WHERE id = $id".query[Author].option def usersByIds(ids: NonEmptyList[Int]): ConnectionIO[List[Author]] = { implicit val idsParam = Param.many(ids) sql"SELECT * FROM author WHERE id IN (${ids: ids.type})".query[Author].list }
Let’s run some queries for individual users:
import doobie.imports._ userById(1).transact(xa).unsafeRun //=> Some(User(1,William Shakespeare)) userById(42).transact(xa).unsafeRun // => None
as well as multiple users:
import cats.data.NonEmptyList val ids: NonEmptyList[UserId] = NonEmptyList(1, List(2, 3)) usersByIds(ids).transact(xa).unsafeRun //=> List(User(1,William Shakespeare), User(2,Charles Dickens), User(3,George Orwell))
The only missing piece of the puzzle is the user data source, which should be fairly easy to implement now
that we can query the
user table.
implicit val userDS = new DataSource[UserId, User] { override def name = "UserDoobie" override def fetchOne(id: UserId): Query[Option[User]] = Query.sync { userById(id).transact(xa).unsafeRun } override def fetchMany(ids: NonEmptyList[UserId]): Query[Map[UserId, User]] = Query.sync { usersByIds(ids).map { users => users.map(a => a.id -> a).toMap }.transact(xa).unsafeRun } } def user(id: UserId): Fetch[User] = Fetch(id)
We’ve seen how to create a DB data source using Doobie, now it’s time to move on to the HTTP data source and how we can use them together!
Querying the Web service
As I mentioned before, we are using a third-party web service for storing to-do items related to our users in the database. We’ll use the JSON placeholder to emulate queries to an API that stores to-do items, so let’s start by using Circe for deriving the JSON decoders. Circe makes this really easy:
type TodoId = Int case class Todo(id: TodoId, userId: UserId, title: String, completed: Boolean) import io.circe._ import io.circe.generic.semiauto._ implicit val todoDecoder: Decoder[Todo] = deriveDecoder
That’s it; we can now decode
Todo instance from JSON payloads. Our next step is to write a function to fetch a user’s
to-do items given its user id, for which we will use the http4s HTTP client. One thing to take into account is that both
Doobie and http4s use the
Task type in some of their results types. Unfortunately, the former is from fs2 and the latter from Scalaz.
import org.http4s.circe._ import org.http4s.client.blaze._ import scalaz.concurrent.{Task => Zask} val httpClient = PooledHttp1Client() def todosByUser(id: UserId): Zask[List[Todo]] = { val url = s"{id}" httpClient.expect(url)(jsonOf[List[Todo]]) }
We can now easily query the web service for obtaining a list of to-do items for a user:
todosByUser(1).run // => List(Todo(1,1,delectus aut autem,false), ...)
The only piece missing is writing the to-do items’ data source, we’ll use the
Query#async constructor and run the Scalaz Task’ returned by the HTTP client asynchronously. In the JVM, you can use
Query#sync for blocking calls and
Query#async for non-blocking calls, although, in
JS most of your data sources will use
Query#async since I/O in JavaScript does not block.
implicit val todosDS = new DataSource[UserId, List[Todo]] { override def name = "TodoH4s" override def fetchOne(id: UserId): Query[Option[List[Todo]]] = Query.async { (ok, fail) => todosByUser(id).unsafePerformAsync(_.fold(fail, (x) => ok(Some(x)))) } override def fetchMany(ids: NonEmptyList[UserId]): Query[Map[UserId, List[Todo]]] = batchingNotSupported(ids) } def todos(id: UserId): Fetch[List[Todo]] = Fetch(id)
Like many HTTP APIs, the to-do items’ endpoint doesn’t support batching, so we implement
DataSource#fetchMany with the default unbatched implementation with
DataSource#batchingNotSupported.
Putting it all together
We now have both data sources in place, let’s combine them and see how fetch optimizes data access. For querying users and to-dos, we’ll create a
Fetch for each of them and combine them using
.product. When combining fetches this way we are implicitly telling Fetch that they can be run in parallel:
def fetchUserAndTodos(id: UserId): Fetch[(User, List[Todo])] = user(id).product(todos(id))
Let’s run a fetch returned by the function above so you see that both queries (to the database and the web service) run concurrently; we’ll be using the debugging facilities recently introduced to fetch to visualize a fetch execution:
import cats.Id import fetch.syntax._ import fetch.unsafe.implicits._ import fetch.debug._ describe( fetchUserAndTodos(1).runE[Id] ) // ... // [Concurrent] // [Fetch one] From `UserDoobie` with id 1 // [Fetch one] From `TodoH4s` with id 1
Let’s take a look at a more involved example: a fetch that has multiple steps, deduplication and caching:
import fetch._ val involvedFetch: Fetch[List[(User, List[Todo])]] = for { userAndTodos <- Fetch.traverse(List(1, 2, 1, 2))(fetchUserAndTodos _) moreUserAndTodos <- Fetch.traverse(List(1, 2, 3))(fetchUserAndTodos _) } yield userAndTodos ++ moreUserAndTodos describe( involvedFetch.runE[Id] ) // .. // [Concurrent] // [Fetch many] From `UserDoobie` with ids List(1, 2) // [Fetch many] From `TodoH4s` with ids List(1, 2) // [Concurrent] // [Fetch one] From `UserDoobie` with id 3 // [Fetch one] From `TodoH4s` with id3
As you can see in the description of the fetch execution, the fetch was run in two rounds:
- In the first, both data sources were queried in batch for the ids 1 and 2. Repeated identities were deduplicated.
- In the second, both data sources were queried for getting the id 3. Note how Fetch didn’t need to ask for ids 1 and 2 since they are cached from the previous round.
Conclusion
The recently introduced asynchronous query support has made it possible to use Fetch with non-blocking clients and made it viable for using it in a non-JVM environment with Scala.js. Besides optimizing data access with caching, batching, and parallelism, Fetch lets you treat every data source uniformly and arbitrarily combines data from multiple data sources.
Hopefully, this article has helped you understand how Fetch can be useful. Feel free to drop by the Fetch Gitter channel to ask any questions. Most of the code contained in this article has been extracted from examples that Peter Neyens contributed to the Fetch repository. If you have more examples of Fetch usage, don’t hesitate to open a pull request so more people can benefit from them. | https://www.47deg.com/blog/fetch-doobie-http4s/ | CC-MAIN-2022-27 | refinedweb | 1,406 | 54.12 |
You can subscribe to this list here.
Showing
3
results of 3
Hi,
I'm a new Jython user and I'm attempting to implement a canvas using SWT
which will call a function when it is clicked, and the function will then be
able to extract the coordinates of where it was clicked.
It seemed intuitive to me to setup the canvas as follows:
canvas = Canvas(self.shell, SWT.BORDER, layoutData=fStretch,
paintControl=self.Paint, mouseListener=self.NewPt)
Where NewPt is
def NewPt(self, event):
However, this gives the error:
TypeError: can't convert <method MSTtestBed.NewPt of MSTtestBed instance
1> to org.eclipse.swt.events.MouseListener
Could someone point me in the right direction?
Thanks
--
View this message in context:
Sent from the jython-users mailing list archive at Nabble.com.
Have you considered using a third party Java library? I haven't used it mys=
elf, but Apache VFS seems to have sftp support.=0A=0A
org/commons/vfs/=0A=0ASince you're using Jython already.=0A=0AAdam=0A=0A---=
-- Original Message ----=0AFrom: gregory auvray <gregauvray@...>=0A=
To: jython-users@...=0ASent: Wednesday, January 10, 2007 =
5:52:42 PM=0ASubject: [Jython-users] ftp secured by Jython (python)=0A=0AH=
ello all ,=0A=0AI would like to do a secured FTP (with ssh) with a .py fun=
ction .=0AWith Jython , using a .py function I can do a FTP (non secured) =
from "cmd" =0Aterminal of my PC to a non-secured machine.=0A=0AHere is my .=
py function :=0Aimport sys=0Afrom ftplib import *=0Afrom logManager imp=
ort *=0A=0A=0Aclass myFtp:=0A _ftp =3D None=0A _lm =3D=
None=0A hostname =3D ""=0A host =3D ""=0A login =
=3D ""=0A password =3D ""=0A remothPath =3D "/"=0A=0A def __in=
it__(self, lm, hostname, host, login, password, remotePath):=0A self=
._lm =3D lm=0A self.hostname =3D hostname=0A self.=
host =3D host=0A self.login =3D login=0A self.pa=
ssword =3D password=0A self.remotePath =3D remotePath=0A =
self._ftp =3D FTP(host, login ,password)=0A self._(sel=
f.remotePath)=0A=0A def put(self, sourceFile,newFileName=3DNone, remoteP=
ath=3DNone):=0A # print "Source file ", sourceFile=0A try:=0A=
f =3D open(sourceFile,"r")=0A except:=0A sel=
f.printLog("! Impossible to open source file: " + sourceFile, ERROR)=0A =
return 1=0A=0A try:=0A if (remotePath !=3D None)=
:=0A self._ if (newFileName=
=3D=3DNone):=0A newFileName =3D sourceFile.split("\\")[-1]=
=0A=0A msg =3D ">> Transfer file. Orgin=3D'"+ sourceFile +"', d=
estination=3D'"+ =0Aself._"/"+ newFileName +"'"=0A sel=
f.printLog(msg)=0A self._("STOR "+ newFileName, f)=
=0A f.close()=0A except:=0A self.printLog("! F=
tp exception ", ERROR)=0A f.close()=0A return 1=0A =
return 0=0A=0A def close(self):=0A self._ =
def printLog(self, msg, level=3DDEBUG):=0A if self._lm=3D=3DNone:=
=0A print msg=0A else:=0A self._lm.msgLog(msg,=
level)=0A=0A=0ABut now I would like to do a secured FTP (with ssh) with a=
.py function . =0ADo you have any idea?=0A=0AThanks a lot=0A=0AGr=E9gory=
=0A=0A_________________________________________________________________=0AP=
ersonnalisez votre Messenger avec Live.com =0A
ecom/=0A=0A=0A-------------------------------------------------------------=
------------=0ATake Surveys. Earn Cash. Influence the Future of IT=0AJoin S=
ourceForge.net's Techsay panel and you'll get the chance to share your=0Aop=
inions on IT & business topics through brief surveys - and earn cash=0Ahttp=
://
=0A_______________________________________________=0AJython-users mailing l=
ist=0AJython-users@...=0A
sts/listinfo/jython-users=0A=0A=0A=0A=0A___________________________________=
_______________=0ADo You Yahoo!?=0ATired of spam? Yahoo! Mail has the best=
spam protection around =0A
On 1/10/07, Timothy Mann <mann23@...> wrote:
> Last, the application could add function calls to the code before it is
> compiled. It would call application.waitUntilNotPaused() between each
> statement.
IMO this would be best approach (you probably wanted to say
thread.waitWhilePaused()?). However to pause application at arbitrary
JVM instuctions you could use either JVM emulator (that's complex and
I am not aware of Java emulators written in java - so this is not
practical) or java debugger (that presumably would slow your entire
application). Forcibly blocking a thread at random points is
deadlock-prone so it is not safe - even if you do not use locks they
may occur in underlying Java code.
However it is worth asking if Jython has some kind of Python
interpreter at jython-dev@... If it has - it would
be not so hard to install some hooks there and use interpreted Jython
code only (although Jython scripts will run slowly in this case).
I hope this helps.
--
Petr Gladkikh | http://sourceforge.net/p/jython/mailman/jython-users/?viewmonth=200701&style=flat&viewday=11 | CC-MAIN-2015-06 | refinedweb | 764 | 69.28 |
This article appears in the Third Party Products and Tools section. Articles in this section are for the members only and must not be used to promote or advertise products in any way, shape or form. Please report any spam or advertising.
I’ve been using Resharper since I started coding in .NET/C#. It’s a tool with a lot of features which aids you in the average day development. In this blog post, I’m going to show you the features that I use the most.
ALT+Enter is the hotkey that you have to start with. It’s a context sensitive beast that will do the most stuff for you.
Let’s say that I create a new class:
public class UserRepository
{
}
In it, I need to use a DbContext. So I create a new member field:
DbContext
public class UserRepository
{
DbContext _dbContext;
}
However, when I type the semicolon, resharper inserts private for me:
private
public class UserRepository
{
private DbContext _dbContext;
}
Resharper sees that it has not been initialized and gives a warning (hoover over the field):
Pressing ALT+ENTER creates a constructor for me:
style="width: 640px; height: 219px" data-src="/KB/ThirdParty/543162/newclass2.png" data-sizes="auto" data->
which results in:
class UserRepository
{
private DbContext _dbContext;
public UserRepository(DbContext dbContext)
{
_dbContext = dbContext;
}
}
Now I want to make sure that null is not passed in, so I press ALT+ENTER on the argument name:
null
style="width: 465px; height: 266px" data-src="/KB/ThirdParty/543162/newclass3.png" data-sizes="auto":
return
width="464" data-src="/KB/ThirdParty/543162/newclass4.png" data-sizes="auto" data->
Now I want to cache the users. So I need to reference the cache which exists in another project. I do that by writing the name and use ALT+ENTER:
width="584" data-src="/KB/ThirdParty/543162/newclass5.png" data-sizes="auto" data->
That step will add a reference to the other project and import the correct namespace. After that, I press ALT+ENTER again on the field name and add a constructor.
namespace
Let’s say that I’ve renamed a class by just typing a new name (the file name is still the old one):
style="width: 640px; height: 230px" data-src="/KB/ThirdParty/543162/rename-file.png" data-sizes="auto" data->
I then press ALT+Enter on the class name:
The file is now renamed.
The file in the previous example should also be moved to a new folder. So I just drag it to the new one folder. However, the namespace is not correct now, so Resharper gives a warning (by a visual indication = the blue underline):
style="width: 640px; height: 198px" data-src="/KB/ThirdParty/543162/namespace1.png" data-sizes="auto" data->
which means that I can just press ALT+ENTER on it to rename the namespace (which also updates all usages in the solution).
style="width: 640px; height: 189px" data-src="/KB/ThirdParty/543162/namespace2.png" data-sizes="auto" data->
ALT+ENTER alone saves you a lot of typing and clicking. But most important: You get a much better flow when coding. No annoying stops for basic bootstrapping.
Resharper gives you a new unit test browser and context actions for each test.
Let’s say that you create a simple test:
style="width: 640px; height: 259px" data-src="/KB/ThirdParty/543162/tests1.png" data-sizes="auto" data->
which you run:
width="534" data-src="/KB/ThirdParty/543162/tests2.png" data-sizes="auto" data->
and get a result:
style="width: 640px; height: 465px" data-src="/KB/ThirdParty/543162/test3.png" data-sizes="auto" data->
The call stack is clickable which makes it easier to browse through the call stack to get an understanding of why the test failed. Anything written to the console (Console.WriteLine()) also gets included in the output.
Console.WriteLine()
The code completion in Resharper allows you to use abbreviations (the camel humps) to complete text:
style="width: 494px; height: 184px" data-src="/KB/ThirdParty/543162/navigation1.png" data-sizes="auto" data->
If I type one more letter, I only get one match.
style="width: 640px; height: 139px" data-src="/KB/ThirdParty/543162/navigation2.png" data-sizes="auto" data->
When you code against abstractions (interfaces), you’ll probably want to go to the implementation. ReSharper adds a new context menu item which allows you to do so:
style="width: 640px; height: 114px" data-src="/KB/ThirdParty/543162/navigation3.png" data-sizes="auto" data->
If there is only one implementation, it’s opened directly. If there are more than one, you get a list:
style="width: 640px; height: 136px" data-src="/KB/ThirdParty/543162/navigation4.png" data-sizes="auto" data->
CTRL+T opens up a dialog which you can use to navigate to any type. You can either type abbreviations or partial names:
style="width: 640px; height: 132px" data-src="/KB/ThirdParty/543162/navigation5.png" data-sizes="auto" data->
CTRL+SHIFT+T is similar, but is used for files:
style="width: 596px; height: 126px" data-src="/KB/ThirdParty/543162/navigation6.png" data-sizes="auto" data->
Finally, we have “Find usages” which analyses the code and finds where a type/method is used:
width="487" data-src="/KB/ThirdParty/543162/navigation7.png" data-sizes="auto" data->
width="546" data-src="/KB/ThirdParty/543162/navigation8.png" data-sizes="auto" data->
This well structured file can be only better:
width="556" data-src="cleanup1.png" data-sizes="auto" data->
I press ALT+E, C to initiate the cleanup dialog:
style="width: 640px; height: 484px" data-src="/KB/ThirdParty/543162/cleanup0.png" data-sizes="auto" data->
The “usevar” is my own custom rule where I change all possible usages to use var over explicit declarations.
usevar
var
Result:
style="width: 600px; height: 391px" data-src="/KB/ThirdParty/543162/cleanup2.png" data-sizes="auto" data->
Notice that the property got moved up above the method and that unused “using” directives where removed. You can also automatically sort methods and properties.
using
Finally, Resharper shows a warning about the property (since it’s not initialized). ALT+Enter and choose to initialize it using a constructor solves that:
style="width: 640px; height: 479px" data-src="/KB/ThirdParty/543162/cleanup3.png" data-sizes="auto" data->
Those are the features that I use the most. What are your favorite features?
The post How Resharper rocks my average work day appeared first on jgauffin's coding den.. | https://www.codeproject.com/Articles/543162/How-Resharper-Rocks-My-Average-Work-Day | CC-MAIN-2020-34 | refinedweb | 1,063 | 56.55 |
(The ,.) the perldebug manpage .
The value in each entry of the associative array is what you are referring to when you use the *name symbol table entry.
Perl modules are included by saying
or
This is exactly equivalent to
or . Therefore, if you're planning on the module altering your namespace, use use ; otherwise, use require . Otherwise you can get into this problem: just say use POSIX to get it all.
For more information on writing extension modules, see the perlapi).
The following are popular C extension modules, which while available at Perl 5.0 release time, do not come bundled (at least, not completely) due to their size,. There's no guarantee that the names or addresses below have not changed since printing, and in fact, they probably have!
It is currently in alpha test, so the name and ftp location may change. | http://www.slac.stanford.edu/grp/cd/soft/perl/perlmod.html | CC-MAIN-2018-05 | refinedweb | 144 | 65.62 |
Some Silverlight demos and learning samples.
Click on the "Toggle Full Screen" to test this example. "Tile Windows" will layout thumbnails of the windows and clicking on a thumbnail will restore the windows.
For this demo a FloatingWindow class has been created which inherits from UserControl. The class has a XAML page and codebehind file rather than the class file and a control template of FrameworkElement inherited controls. This method might be a useful for a multi document interface or XAML pages that are pulled in at runtime.
If you would like to receive an email when updates are made to this post, please register here
RSS
I like it, nice.
One thing, your missing a test for zero windows when executing the Tile Windows command. This causes an exception to be thrown. Null Reference.
Jeff Paries explains his Timeline Infographic, Bill Reiss points us at a SL2 Games contest, and Tim Rule
Very nice! The toggle fullscreen button doesn't work for me in firefox 2.0.0.14.
Awesome Tim!
Thank you,
David
JC,
I experienced the same issue. It appears to be a known issue which I assume will be fixed soon.
Great example! Found 2 more minor bugs:
1) While in tile mode, if you close all windows and try to add another window the floatingWindows[0].Parent is null.
2) When I clicked on 'Tile Windows' first thing, floatingWindows was null.
Hi,
i tried opening up the solution in vs2008 and i am not able to compile the solution with some errors like assambly not found in namespace mysilverligghtblog. can you help me in importing in vs2008 and silverlight2
thanks rohit
I downloaded the toggle window demo from your blog but when i run it the shadow is not being shown and also there are no error while compiling the source.
Help will be appriciated.
Lucky | http://blogs.msdn.com/timrule/archive/2008/05/22/windowing-demo-for-silverlight-2-beta.aspx | crawl-002 | refinedweb | 311 | 72.05 |
0
I have a generator function, i've filled in the function if there are no more_seqs. But I feel trouble if there are more sequences. I need to generate 1 tuple at a time. if the function call is
generate_zip(range(5),range(3),range(4),range(5)) then the tuple generated should be (0,0,0,0) (1,1,1,1) n so on
def generator_zip(seq1, seq2, *more_seqs): t1 = [(x,y) for i,x in enumerate(seq1) for j,y in enumerate(seq2) if i == j] if len(more_seqs) == 0: for tup in t1: yield tup
can anyone suggest me a way to unpack more_seqs and then join the tuples of seq1,seq2 with more_seqs tuples and then yield?? | https://www.daniweb.com/programming/software-development/threads/471289/generating-a-tuple-using-generators | CC-MAIN-2017-47 | refinedweb | 122 | 63.22 |
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi,
How do I move the tag position in stack? For instance, moving the python tag into the farther right.
You can check an illustration of the problem here:
Thank you
Hi @bentraje,
I came across this problem some time ago.
Have a look at:
import c4d
def main():
doc.StartUndo()
sel = doc.GetActiveTags()
for tag in sel:
obj = tag.GetMain()
taglist = obj.GetTags()
for i, t in enumerate(taglist):
if t in sel:
index = i+1
if index == len(taglist):
return
#print """Tag: %s || Index: %s""" % (t.GetName(), i)
doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj)
obj.InsertTag(t, taglist[index])
doc.EndUndo()
c4d.EventAdd()
if __name__=='__main__':
main()
This was essentially my approach, it’s not bulletproof but it works if you want to send multiple tags from one index to the next.
Cheers,
Lasse
@lasselauch
Thanks for the response. Gave me an idea what code to use.
Here is my working code:
import c4d
from c4d import gui
# Select an object.
# Hit Execute
# Sets python tag in the right most place
def main():
tag_list = op.GetTags()
for tag in tag_list:
if tag.GetType() == c4d.Tpython:
op.InsertTag(tag, tag_list[-1])
c4d.EventAdd()
main()
Hi @bentraje, thanks for reaching out us.
With regard to the solutions offered by @lasselauch - kudos Lasse - I have to remind that you're both benefiting of a automatism found in the Python implementation of the BaseObject::InsertTag(): when the method is called in Python, before inserting the tag, it first gets removed from the previous owner and then is inserted in the new one.
This is very convenient and delivered for free in the Python implementation, in C++ this is not and this should be took in consideration.
BaseObject::InsertTag()
Finally, one note about the code design: it could lead to unpredictable results, especially on more complex scenarios, re-ordering a list while iterating on the same list. I would rather suggest iterating on list and operate the reorder on a copy of such list.
Cheers, R
@r_gigante
Gotcha. Thanks for the warning. | https://plugincafe.maxon.net/topic/12216/move-tag-position-in-the-stack | CC-MAIN-2021-49 | refinedweb | 381 | 67.25 |
Environment:
Service Desk 7.4 and newer
The Breach Time attribute added to the Incident, Problem, Change, Call and associated Task objects is a hardcoded DateTime that displays when an item is due to breach. There are calculations functions to return the time to breach as an integer ( MinutesToBreach() ) or as a string in hh:mm:ss format ( TimeToBreach() ) which you can use on the Process object but you can't get the hardcoded Breach Time and you may want this if you have queries based on the Process object rather than Incident, Problem etc...
To overcome this you can create a calculation that takes the attribute from the child object on the fly. Perform the following steps:
1. Within Object Designer open the Process Management -> Process object.
2. Create a new attribute, name it Process Breach Time.
3. Set the data type to Datetime.
4. Set the calculation type to AfterRead. The calculation editor dialog will open.
5. Configure the formula as below:
import System static def GetAttributeValue(Process): return Process.BreachTime
The Breach Time attribute is not displayed in the attributes tree but typing it manually will work because the attribute is available and the same attribute name is used on all child objects of Process.
6. Press OK and save Object Designer.
You can now use the Process Breach Time attibute on queries based on the Process object and it will use the value from the items Breach Time attribute.
Note: Because this is an AfterRead calculation there is a potential for performance to be effected while the calculation is applied if a large number of items are being returned at once. You should attempt the above on a test environment and fully test what effects it may have before applying to a live system. | https://community.ivanti.com/docs/DOC-6841 | CC-MAIN-2017-34 | refinedweb | 298 | 61.36 |
summarizes.
doc/source
doc/build/html
For classes and functions written in Python, it is possible to tell sphinx to extract the documentation directly from the doc-string. For example, to get the documentation for LoadPDB(), you can use:
LoadPDB()
..:
In OST we call scripts/ programs ‘actions’. They are started by a
launcher found in your staging directory at stage/bin/ost. This little
guy helps keeping the shell environment in the right mood to carry out your
job. So usually you will start an action by
stage/bin/ost
$ stage/bin/ost --help
Starting new action do go for a dedicated branch for action-development.
There you can produce intermediate commits while other branches stay clean in
case you have to do some work there which needs to get public.
After preparing your repository its time to create a file for the action. That
is a bit different than for modules. Assuming we are sitting in the
repository’s root:
$ touch action/ost-awesome-action
$ chmod +x action/ost-awesome-action
Two things are important here: actions are prefixed with ost-, so they
are recognised by the ost launcher. Secondly, action files need to be
executable, which does not propagate if you do it after the first call to
make.
ost-
ost
make
To get the new action recognised by make to be placed in
stage/libexec/openstructure, it has to be registered with cmake in
actions/CMakeLists.txt:
stage/libexec/openstructure
cmake
actions/CMakeLists.txt
1
2
3
4
add_custom_target(actions ALL)
ost_action_init()
ost_action(ost-awesome-action actions)
Just add your action with its full filename with a call to ost_action at
the end of the file.
Now its time to fill your action with code. Instead of reading a lot more of
explanations, it should be easy to go by examples from the actions
directory. There are only two really important points:
actions
No shebang line (#! /usr/bin/python) in your action! Also no
#! /usr/bin/env python or anything like this. This may lead to funny side
effects, like calling a python interpreter from outside a virtual
environment or calling a different version. Basically it may mess up the
environment your action is running in. Actions are called by ost,
that’s enough to get everything just right.
#! /usr/bin/python
#! /usr/bin/env python
python
The code of your action belongs in the __main__ branch of the script.
Your action will have own function definitions, variables and all the bells
and whistles. Hiding behind __main__ keeps everything separated and
makes things easier when it gets to debugging. So just after
__main__
import alot
def functions_specific_to_your_action(...):
if __name__ == "__main__":
<put together what your action should do here>
start putting your action together.
Enter search terms or a module, class or function name.
Using External Programs within OpenStructure
table - Working with tabular data
table | https://openstructure.org/docs/1.10/contributing/ | CC-MAIN-2019-35 | refinedweb | 477 | 56.15 |
NPM modules packaged with a CommonJS module interface and served synchronously to the client.
This library allows you to run your Node.JS application on the client side using standard CommonJS module syntax. It supports loading client files from dependency NPM packages and easily branching between client and server modules when necessary.
In development mode, loaded package files will present error messages in the browser which match the filename and line number of the related server-side file.
In production mode, packages will be placed within a single closure with no leaking scope.
To play around with a demo repository which loads jQuery from NPM in a constrained namespace along with two other NPM modules (uuid-v4 and sillynames), visit.
Copyright 2012-2013 by Michelle Steigerwalt and licensed under the MIT license.
If you find this library useful, please let me know!
In your package.json, list your dependencies as you normally would, and add an additional configuration field called "client_dependencies", which is a list of module names.
{ "main": "app.js", "dependencies": { "client_require": "*", "uuid-v4": "*" } "client_dependencies": ['uuid-v4'] }
Type
npm install as usual to install the dependencies.
In your Node.js app, pass requests as they come in to client_require.handle.
var client_require = require('client_require'); var http = require('http'); var app = http.createServer(function(req,res) { //Let client_require try to handle this if it can. if (client_require.handle(req,res)) return; //Otherwise, handle it as usual. res.write("Hello, world!"); //Don't forget to add the script tag that loads all the other scripts! res.end('<script src="'+client_require.get_src+'"></script>'); }); app.listen(3000, 'localhost');
If you're using Connect, you can use the .connect() handler instead.
app.use(require('client_require').connect());
To load all your scripts in development and production mode, just require the
base include, which by default is
/js/client_require.js. It's best to place
this file at the end of your document, so the module can load all necessary
script files in a nonblocking manner.
<script src="/js/client_require.js"></script>
When client_require looks through your node_module, it will open up your
package.json file and look for a
client_require key, which should point to
where your main files live (and you're either using client/server
differentiation or aren't calling server-side Node modules).
If you don't have a
client_require key, but do have a
main key,
client_require will load the file specified (but no others which might be
required within the main module).
To change the default settings of client_require, you can use the
.set()
function.
var client_require = require('client_require'); client_require.set('web_root', '/assets/scripts/');
Defaults to
/js/.
This will be appended to all script srcs, and only requests with a path which starts with this string will be served.
Defaults to
client_require.js.
The main file which will then load all other necessary scripts.
Defaults to
process.env.PWD (the directory in which you type the
node
command to launch the webserver).
client_require will start by indexing all JavaScript files within this file and all dependent files listed in the package.json in this directory.
Defaults to
process.env.NODE_ENV or 'development'. If your server is in
development mode, all modules will be served as their own file. In production,
all files will be packaged into one JavaScript file.
Defaults to
true. When set to true, production code will be minified
using the NPM module for Uglify.
If you want to have separate versions of particular files for the client and the server, you can do so by placing the module in a directory called client/ or server/, respectively.
Example:
server/ app.js client/ app.js
This will create a module file at the root path
app.js. client/app.js will
be loaded on the client and server/app.js will be loaded on the server.
On the server-side, you must use the
require method exported by the library
to properly load server-side files.
When called as a function, this will return a Connect module, which can be attached to any Connect application.
app.use(client_require.connect());
You can pass a request object to client_require.handle within your HTTP request handler. If the request matches client_require's web_path, the handle method will return true, and a response will be sent once it's available.
if (client_require.handle(req,res)) return;
This is useful on the server-side, as the standard
require function is not
able to be overloaded. This will make sure you load server/foo.js when there
is no root foo.js available, which mimicks the client-side functionality.
Sets a configuration key to the provided value.
client_require.set('app_root', __dirname);
Returns the web-accessible path to the main application JavaScript, which will in turn load all other modules.
res.write('<script src="'+client_require.get_src()+'"></script>'); | https://www.npmjs.com/package/client_require | CC-MAIN-2016-07 | refinedweb | 801 | 58.99 |
Back to index
#include "nsRuleNetwork.h"
#include "nsFixedSizeAllocator.h"
#include "nsTemplateMatch.h"
#include "pldhash.h"
Go to the source code of this file.
If the set is currently.
Definition at line 209 of file nsTemplateMatchSet.h.
The set is implemented as a dual datastructure.
It is initially a simple array that holds storage for kMaxInlineMatches elements. Once that capacity is exceeded, the storage is re-used for a PLDHashTable header. The hashtable allocates its entries from the normal malloc() heap.
the InlineMatches structure is implemented such that its mCount variable overlaps with the PLDHashTable's `ops' member (which is a pointer to the hashtable's callback table). On a 32-bit architecture, we're safe assuming that the value for `ops' will be larger than kMaxInlineMatches when treated as an unsigned integer. And we'd have to get pretty unlucky on a 64-bit system for us to get screwed, I think.
Instrumentation (define NSTEMPLATEMATCHSET_METER) shows that almost all of the match sets contain fewer than seven elements.
Definition at line 232 of file nsTemplateMatchSet.h. | https://sourcecodebrowser.com/lightning-sunbird/0.9plus-pnobinonly/ns_template_match_set_8h.html | CC-MAIN-2017-51 | refinedweb | 176 | 52.66 |
Sagar Shroff wrote:Yeah i am using Tomcat . And i am aware that tomcat is not an ejb compliant app server.But i thought that ejb annotation was simply an abstract way of doing a JNDI (nothing Ejb specific) , the reason i thought so was because at the end of the day my servlet is going to be deployed in a Web container , so it is going to be managed by a Web container , so i thought that ejb complaint or not being ejb compliant wont make difference.
Regards,
Shroff.
dear Sagar,
even if you used JNDI to do lookup then also you wouldn't have got the reference to the bean. the reason is what Fritz pointed. there is no EJB CONTAINER. in other words there is no deploytime or runtime environment in which ejb's run. there wont be logical namespaces (java:app,java:module,java:global) available for the ejb since all this environment is provided by the ejb container.
gurpeet singh wrote:when you do jndi lookup from your SE client then you are actually connecting to the naming service of your container and then lookup names from there. you specify the connection properties through the jndi environment and then use container-specific implementation of global jndi names(which are not portable; also I am not sure I have read about portable global jndi names which are new feature of ejb 3.1 that allows to do lookup in a portable manner). | http://www.coderanch.com/t/612360/java-EJB-SCBCD/certification/Accessing-remote-Ejb | CC-MAIN-2014-52 | refinedweb | 246 | 58.42 |
Hi Jit,
Hope these couple of approaches might address your requirement. This is
just a high level idea.
1) Iterative forEach parallel='yes'
<bpel:forEach parallel='yes' ...>
initialize the counter here
<scope>
<partnerlink .. />
access the EPR array using the index counter and assign it
to the partnerlink.
<invoke .../>
</scope>
</bpel:forEach>
The forEach parallel loop runs an implicit <flow> for the embedded <scope
/> and that's how it runs parallel. You might have to use an array to hold
the EPR and use the counter value within the loop to access the specific
EPR during each iteration and assign it to the partnerlink. In order to
hold EPR values in an array you might have to use an XSLT transformation.
Instead of using a global partnerlink you might define and use a local
partner link within the forEach scope.
2) While loop with async communication and explicit correlation
<while ...>
<invoke /> This is a one way invoke with explicit correlation
</while>
<while ...>
<receive /> This receive should be with explicit correlation
</while>
Here, the first while loop does an sequential invoke, but since its a
one way invocation it doesn't wait for any response and it completes almost
immediately. The second while loop will wait for as many responses as the
invokes were made. Correlation values have to be unique across the
iterations.
Hope this helps.
regards,
sathwik
On Mon, Oct 24, 2016 at 12:04 PM, Sathwik B P <sathwik.bp@gmail.com> wrote:
> Hi,
>
> We will be happy to answer questions if there is any specific problems in
> executing the process model on ODE or question on the behaviour of ODE.
>
> We cannot answer questions about complete process solution models.
>
>
>
> *To answer this question,Do I need all sub processes to have same
> interface (namespace, operations and messages)? *
> Ans: Bpel activity definition is static in nature (Bpel Specification) and
> one cannot change it at runtime. Henceforth, invoking multiple sub process
> using the same Invoke activity definition would enforce you to have your
> sub process adhere to same interface. Only the endpoints of the partnerlink
> can be changed.
>
> regards,
> sathwik
>
>
> On Mon, Oct 24, 2016 at 6:15 AM, Raghvendra Srivastava <
> raghvendrasrivastava@gmail.com> wrote:
>
>> Hi Sathwik,
>> How are you doing?
>> I am also very interested in this use case. Please suggest a way to
>> accomplish this using ode.
>> Thanks,
>> Rag
>>
>> On Thursday, September 15, 2016, Jit K <jkfrm8@gmail.com> wrote:
>>
>> > It worked too. Thanks.
>> >
>> > H
>> > owever, this was just a part the solution I am trying to develop.
>> >
>> > I have a main process and bunch of sub processes. Each sub process is
>> > registered in a central repository with a unique name. Sub processes
>> may be
>> > added or removed as required (with appropriate addition or removal from
>> > central repository).
>> > The request message to the main process has a list of sub processes to
>> be
>> > invoked for that particular request. For example, request-1 may need to
>> > invoke sub-process-1 and sub-process-3 whereas request-2 may need to
>> invoke
>> > sub-process-2 and sub-process-3.
>> > Thus I want to invoke the specified sub processes. Sub processes should
>> > execute in parallel. At the end there should be a join to collate the
>> > results of all sub processes.
>> >
>> > Please suggest how can I achieve this?
>> > Do I need all sub processes to have same interface (namespace,
>> operations
>> > and messages)? Till now I was trying with the SAME Sub process (same
>> name,
>> > same interface) deployed at 2 different locations. Now I am trying with
>> > DIFFERENT sub processes (different names, same interface).
>> >
>> > Any kind of help is appreciated.
>> >
>> > Regards,
>> > JK
>> >
>> >
>>
>
> | http://mail-archives.eu.apache.org/mod_mbox/ode-user/201611.mbox/%3CCAKyGxMtkGLKgmhQE-pGjLVQPE0BVs3iPUdHWRvHu5uA1QZPSSA@mail.gmail.com%3E | CC-MAIN-2019-30 | refinedweb | 600 | 57.57 |
Oct 30, 2009 09:40 AM|uday sikarwar|LINK
hi all
please somebody help me.
i have been created a web application in asp.net 2.0. it works fine on local machine but
when i uploaded it on web server it supports asp.net 3.5 it give me this error:
The type or namespace name 'DatabaseUtility' could not found (are you missing a using directive or an assembly reference?)
public partial class Loginform : System.Web.UI.Page Line 13: { Line 14: DatabaseUtility dut = new DatabaseUtility(); Line 15: ClassMain cm = new ClassMain(); Line 16: SqlDataReader rd;
DatabaseUtility is a class store in app_code folder.
i think this is a permission issue application can not access app_code folder but not sure please help me.
thanks in advance
All-Star
54929 Points
Nov 04, 2009 02:10 AM|Thomas Sun – MSFT|LINK
Hi,
If your project is ASP.NET web application, please try to move that class to general folder, such as "Utilities".
The App_Code folder is designed for ASP.NET website project, and if we add class file to App_Code folder in ASP.NET web application, that class file's build action is "Content". You can manually change it to Compile action.
Thanks.
Nov 06, 2009 05:23 AM|uday sikarwar|LINK
but thomas i am not understanding that my application still run fine on previous server but when i deployed it on new server it give error.
please tell me difference between web application and web project. and where i find web application in vs 2005 PRO Edition
it still give same error.
Nov 06, 2009 06:10 PM|rakesh2kv|LINK
A web application project has a project file where as website project does not have one.
In web application project all of the classes except aspx are compiled into one where as in web site project each class
is compiled into its own. ofcourse you could add web deployment project to website project and make it a pre compiled one.
In a website project since you would see more like a folder tree structure .. in web application you would multiple projects.
the following should give more indepth idea on the differences:
Nov 06, 2009 06:12 PM|rakesh2kv|LINK
For the question, could you tell me on how are publishing the website. Are you deploying the source code or as a precompiled one.
I guess it is not finding where this class is..
All-Star
54929 Points
Nov 09, 2009 05:51 AM|Thomas Sun – MSFT|LINK
Hi,
Thanks for your response.
We need to make sure that we configure the website on the IIS correctly.
When we want to deploy ASP.NET website to server, we can precompile this website or xcopy the website files to the virtual directory on IIS, and then configure it, such as ASP.NET version etc.
For more information, see Deploying ASP.NET Applications ().
If your project is ASP.NET web application, I suggest you use Publish utility to precompile it.
Thanks.
Nov 09, 2009 02:02 PM|rakesh2kv|LINK
follow this article on how to create a web set up and deploy it
Member
317 Points
Nov 14, 2009 04:17 AM|anirudha gupta|LINK
i know this problem
the namespace is not found in asssambly of your asp.net project
so add namespace reference to your project then upload to server then he worked on server.
Regard
Anirudha Gupta
Mark As answer if i truely helped you
Member
540 Points
Nov 14, 2009 05:14 AM|Babunareshnarra|LINK
Make sure that all the references are updated to the server.
This error comes likely when the namespace in which the class file is missing or
may be the other namespaces or references used in the class file are missing please check this out.
Hope this helps.
Nov 16, 2009 06:57 AM|uday sikarwar|LINK
thank you
babu naresh
but i am not using any namespace in cs file.
my .cs file in the app_code folder and here i define a class like this
using statements;
databaseutility
{
functions()
{
..........
..........
}
}
tell me please
Nov 21, 2009 10:02 AM|uday sikarwar|LINK
thanks thomas sun
i have been read this tutorial and i have fixed my problem.
this is a virtual directory problem my application running properly.
thanks once again
None
0 Points
Aug 26, 2010 12:55 PM|uday sikarwar|LINK
In my case this error occured only on hosting server because on my hosting server i have not created virtual directory. if you have same issue that application run fine on development server and display this type of error on hosting server please contect you hosting provider for create virtual directory of your appliation.
if you want to see the deployment process read this artical.
other wise check namespace name in that class.
if this will help you "mark as an answer"
15 replies
Last post Aug 26, 2010 12:55 PM by uday sikarwar | http://forums.asp.net/t/1487100.aspx?The+type+or+namespace+name+could+not+found+are+you+missing+a+using+directive+or+an+assembly+reference+ | CC-MAIN-2015-06 | refinedweb | 824 | 71.44 |
The.
In other words, web pages are often not just files of HTML that are sent back, but are constructed as a request arrives. The Gadgeteer approach to web serving is to construct the HTML it serves in response to a web request coming from the browser.
To learn a little about using the Ethernet module, we are going to start with a much simpler project, involving just the Ethernet module and a multicolor LED. We are going to make a minimal web server that will display a page that says “Hello World!!” (see Figure 4-3).
Figure 4-4 shows the modules from the Visual Studio designer.
When making a web server, we need to connect our Gadgeteer to the Internet, or at the very least to our local network. If you have Broadband Internet, then you are likely to have a modem/switch that may provide you with wireless access to the Internet, but more importantly for this project, a set of RJ45 sockets on the back (often four of them) to which we can connect the Gadgeteer using an Ethernet patch lead.
While we are programming it, the Gadgeteer will also be connected to our computer, which will probably also be providing it power from the USB connection. Once the Gadgeteer is programmed we don’t need the USB connection anymore, and could power the Gadgeteer from an external power supply. All these connections are summarized in Figure 4-5.
The Gadgeteer Mainboard will be assigned an IP address on the local network. You will then be able to visit a page on the Gadgeteer from a browser on any computer or mobile Internet device connected to the same network.
It is actually remarkably easy to turn a Gadgeteer into a web server. So, without further ado, let’s have a look at some of the code.
We have already seen how useful it is to attach event handlers to objects. For instance, to attach a listener to a button, so that when it is pressed a method is run. The .NET Gadgeteer approach to web serving also makes good use of event handlers:
namespace HelloWebServer { public partial class Program { GT.Networking.WebEvent sayHello; void ProgramStarted() { ethernet.UseDHCP(); ethernet.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkUp); ethernet.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkDown); led.TurnBlue(); } void ethernet_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { led.TurnGreen(); string ipAddress = ethernet.NetworkSettings.IPAddress; WebServer.StartLocalServer(ipAddress, 80); sayHello = WebServer.SetupWebEvent("hello"); sayHello.WebEventReceived += new WebEvent.ReceivedWebEventHandler(sayHello_WebEventReceived); } void sayHello_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder) { string content = "<html><body><h1>Hello World!!</h1></body></html>"; byte[] bytes = new System.Text.UTF8Encoding().GetBytes(content); responder.Respond(bytes, "text/html"); } void ethernet_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state) { led.TurnRed(); } } }
The
ProgramStarted method first
tells the
ethernet module to use DHCP.
DHCP is a mechanism that automatically assigns an IP address to a device
when it is connected to the network. If you have a home network, chances
are it will be set up for DHCP.
A device’s Internet Protocol (IP) address uniquely identifies the device on the network, which is why it is important that the Gadgeteer does not end up with an IP address that is already in use.
IP addresses are strange looking numbers that come in four parts. A typical IP address for use inside the network (the case here) might look something like: 192.168.1.106 and as you can see from Figure 4-3 you can use this in a URL instead of a domain name.
ProgramStarted also attaches
handlers to the events
NetworkUp and
NetworkDown.
The handler for
NetworkUp sets
the LED to green and then starts a web server running determining the IP
address of the Gadgeteer.
In some early LED modules, the green and blue LEDs are swapped
over, and so the wrong color is displayed. If you have such an LED, then
you can fix it by adding this line to the start of the
ProgramStarted method:
led.GreenBlueSwapped = true;
To understand the rest of what
ethernet_NetworkUp does, we need to step back a
little and look at the top of the program where we define
sayHello:
GT.Networking.WebEvent sayHello;
The event
sayHello is a
WebEvent and to some extent, it is similar to
the idea of a web page. In this example, we always display the same thing
in the browser, but in a more complex example, we might set up several
WebEvents for different actions on the
web server.
The method
ethernet_NetworkUp
makes the web server aware of the
sayHello
WebEvent using the following line:
sayHello = WebServer.SetupWebEvent("hello");
The string “hello” associates the name “hello” with this web event.
That means that if we put “/hello” on the end of our URL in the browser,
it is this
WebEvent that will be
invoked. That is why we attach yet another handler, this time to the event
WebEventReceived of
sayHello.
The handler method needs to construct some HTML to be displayed on the browser. The HTML that we are going to return is:
<html><body><h1>Hello World!!</h1></body></html>
The bits between “<” and “>” are called tags and should come in matching beginning and ending tags. Notice how the end tags have a “/” right after the “<”.
A web page should always contain a <body> tag within an <html> tag. That just leaves the text “Hello World” inside the <h1> tag. The tag “h1” is used to indicate a level 1 heading, which is why our browser displays it in a large font (see Figure 4-3).
There is much more to HTML than the few tags we have looked at here. Search the Internet for “HTML Tutorial” for more information on writing HTML.
The
sayHello_WebEventReceived event handler is
supplied with an argument of
responder.
It is this that we must use to send the HTML back to the browser. The
method to do this is not unsurprisingly called
Respond:
void sayHello_WebEventReceived(string path, WebServer.HttpMethod method, Responder responder) { string content = "<html><body><h1>Hello World!!</h1></body></html>"; byte[] bytes = new System.Text.UTF8Encoding().GetBytes(content); responder.Respond(bytes, "text/html"); }
However,
Respond does not take a
string, but rather a byte array, so we need to do a little magic to
convert our string into a byte array:
byte[] bytes = new System.Text.UTF8Encoding().GetBytes(content);
The second argument to
Respond
tells the browser what kind of response to expect to be contained in the
byte array, and “text/html” is the standard way of saying it is HTML. In
other circumstances, for example, it could be an image. We will be sending
images later, when we combine this with our finger painting code.
We haven’t described the
ethernet_NetworkDown event handler. All it does
is set the LED color to red to show that we do not have a network
connection.
No credit card required | https://www.oreilly.com/library/view/getting-started-with/9781449330682/ch04s02.html | CC-MAIN-2019-43 | refinedweb | 1,159 | 56.45 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.