Identity Card
问题描述 :
Do you own an ID card?You must have a identity card number in your family’s Household Register. From the ID card you can get specific personal information of everyone. The number has 18 bits,the first 17 bits contain special specially meanings:the first 6 bits represent the region you come from,then comes the next 8 bits which stand for your birthday.What do other 4 bits represent?You can Baidu or Google it.
Here is the codes which represent the region you are in.
However,in your card,maybe only 33 appears,0000 is replaced by other numbers.
Here is Samuel’s ID number<PHONE_NUMBER>10120036 can you tell where he is from?The first 2 numbers tell that he is from Zhengjiang Province,number 19891012 is his birthday date (yy/mm/dd).
Here is the codes which represent the region you are in.
However,in your card,maybe only 33 appears,0000 is replaced by other numbers.
Here is Samuel’s ID number<PHONE_NUMBER>10120036 can you tell where he is from?The first 2 numbers tell that he is from Zhengjiang Province,number 19891012 is his birthday date (yy/mm/dd).
输入:
Input will contain 2 parts:
A number n in the first line,n here means there is n test cases. For each of the test cases,there is a string of the ID card number.
A number n in the first line,n here means there is n test cases. For each of the test cases,there is a string of the ID card number.
输出:
Input will contain 2 parts:
A number n in the first line,n here means there is n test cases. For each of the test cases,there is a string of the ID card number.
A number n in the first line,n here means there is n test cases. For each of the test cases,there is a string of the ID card number.
样例输入:
1<PHONE_NUMBER>10120036
样例输出:
He/She is from Zhejiang,and his/her birthday is on 10,12,1989 based on the table.
#include <iostream> #include <string.h> using namespace std; int main() { int n; cin>>n; char a[18]; memset(a,0,sizeof(a)); while(n--) { cin>>a; if(a[0]=='3' && a[1]=='3') cout<<"He/She is from Zhejiang,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='1' && a[1]=='1') cout<<"He/She is from Beijing,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='7' && a[1]=='1') cout<<"He/She is from Taiwan,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='8' && a[1]=='1') cout<<"He/She is from Hong Kong,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='8' && a[1]=='2') cout<<"He/She is from Macao,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='5' && a[1]=='4') cout<<"He/She is from Tibet,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='2' && a[1]=='1') cout<<"He/She is from Liaoning,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; if(a[0]=='3' && a[1]=='1') cout<<"He/She is from Shanghai,and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<< a[9]<<" "<<"based on the table."; cout<<endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { int n,t; string home,a; cin>>n; for(int k = 0 ; k < n ; k++) { cin>>a; t = (a[0]-'0')*10+a[1]-'0'; switch(t) { case 11:home = "Beijing";break; case 31:home = "Shanghai";break; case 21:home = "Liaoning";break; case 33:home = "Zhejiang";break; case 54:home = "Tibet";break; case 71:home = "Taiwan";break; case 81:home = "Hong Kong";break; case 82:home = "Macao";break; default :break; } cout<<"He/She is from "<<home<<",and his/her birthday is on " <<a[10]<<a[11]<<","<<a[12]<<a[13]<<","<<a[6]<<a[7]<<a[8]<<a[9] <<" based on the table."<<endl; } return 0; }
解题转自：http://www.cnblogs.com/LOB104-zhanglei/articles/3188967.html
(adsbygoogle = window.adsbygoogle || []).push({});
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
哈哈，跟男朋友女朋友一起看，就看的懂了。
#!/usr/bin/env python
def cou(n):
arr =
i = 1
while(i<n):
arr.append(arr[i-1]+selfcount(i))
i+=1
return arr[n-1]
def selfcount(n):
count = 0
while(n):
if n%10 == 1:
count += 1
n /= 10
return count
very good solutions.
正有此意，欢迎更多的建议~
其实国内大部分公司对算法都不够重视。特别是中小型公司老板根本都不懂技术，也不懂什么是算法，从而也不要求程序员懂什么算法，做程序从来不考虑性能问题，只要页面能显示出来就是好程序，这是国内的现状，很无奈。
辛苦了，顶
这是研发类的题还是算法类？
This write-up presents the gentle in which we can notice the fact. this is extremely wonderful one and gives in depth info.
看见的晚了，只能提交一次唉
排版
沙发呢，我抢到了沙发
博主的C++功底真是好
顺利测试通过了，多谢
涨姿势了
这个系列很不错


Percentage Calculator
Percentage Calculator is a free online tool to calculate percentages.
What is
%
of
?
%
is what percent
of
?
%
What is the percentage increase/decrease
from
to
?
%


mice virus cDNA protein Valley encoding RVFV Rift []. cells vaccinated vaccination GN/GC immune vaccine DNA animals antibody {border-style fever vaccines immunisation px;} using #ffffff;} immunised protection clinical used genetic induced proteins responses sera challenge infected neutralising response titers Fever antibodies attenuated gene-gun antigen containing performed signs However, RVF [], complete observed study cell construct control infection nucleocapsid protective px; recombinant shown strong {font-family (aa [,]. antigens diluted displayed font-size glycoproteins negative previously proliferation spleen study, animal antigenic based challenge. double; expressed followed human important inactivated mice. purified sequences truncated use Î¼g/ml (Fig (N) PBS Puumala RVFV. analysed border-color border-width constructs culture described different effects gene hantavirus higher manuscript. obtained reactivity recent represent results samples solid; vaccines: viral virus, {font-style {font-weight â€" '-CACCATGGACAACTATCAAGAGCTT-' (Table (data BHK- Genetic Table Western ability associated blot bold case collected controls, courier; development em; evaluated group groups highly immunisations immunogenic incubated induce large media moribund mouse new primer protein, pt;} radioactivity resulted segment shown). similar specific strains test times vector â€"),


Notebooks
Story: The springbok's story
The springbok's story
Title
The springbok's story
Collection
Summary
Springbok will lead people to a lion. Their knowledge of distant things gained by their fine scent. In the Katkop dialect, by Dia!kwãin, from his parents (L V.-9. 4619-4651). Also, game knows the time of men's deaths, and as such their behaviour must be observed. The springbok tells people things if they understand its actions.
Comments
1) This story is found in Book V-9
Contributors
Date
20 April 1875 (started)
Categories
Custom and daily life, Portention
Keywords
game (and hunting observances) , game (senses or knows things) , game (its knowledge of things that happen elsewhere) , game (and death) , game (is a thing which knows our dying) , game (the nature and habits of) , game (and the hunting-ground's doings) , game (teachings about) , game (when it is obstinate) , game (understanding its actions) , game (tells people things) , game (must be observed) , teaching (understanding the actions of game) , teaching (the actions of the game) , teaching (about springbok) , teaching (game must be observed) , hunting (and the springbok's story) , hunting (the pursuing of game) , hunting (and understanding the actions of game) , hunting (game that takes people to their deaths) , hunting (game must be observed) , death (and the springbok's story) , death (the game knows or senses) , death (the game's presentiment of) , death (game leads people to) , understanding (the actions of the game) , understanding (observing the game) , understanding (and the springbok's story) , education (and understanding the actions of the game) , education (and observing the game) , education (and the springbok's story) , springbok (the springbok's story) , springbok (the hunting of) , springbok (when to leave them alone) , springbok (deceive people) , springbok (take people to a beast of prey) , springbok (the nature and habits of) , springbok (seem to die) , springbok (obstinate) , springbok (their cry) , springbok (want the lion to hear them) , springbok (their actions at sunset) , springbok (take people to their deaths) , springbok (their actions foretell things) , springbok (understanding their actions and knowing things) , springbok (their actions tell when lion is near) , springbok (teachings about) , springbok (sense and know things) , springbok (sense death at a place) , springbok (must be observed) , beasts of prey (and the springbok's story) , beasts of prey (and the actions of springbok) , beasts of prey (teachings about) , beasts of prey (and the actions of game) , beasts of prey (the game leads hunters to) , lions (and the springbok's story) , lions (the game leads hunters to) , lions (game knows when they are near) , lions (and the actions of game) , presentiment (of death) , presentiment (the game knows the time of a man's death) , presentiment (the game knows things and must be observed) , presentiment (and the springbok's story) , presentiment (the game's actions foretells things)
Story Pages
4619-4651


--- layout: main ---
Singapore 117417
Email us if your are interested to join!
Check out our profile!
Follow us for more updates!


Java Native Interface |
Documentation Contents |
JavaTM Native Interface (JNI) is a standard programming interface for writing Java native methods and embedding the JavaTM virtual machine* into native applications. The primary goal is binary compatibility of native method libraries across all Java virtual machine implementations on a given platform.
Other Information
*As used on this web site, the terms "Java virtual machine" or "JVM" mean a virtual machine for the Java platform.
| Copyright
© 2004 Sun Microsystems, Inc. All
Rights Reserved. Please send comments to<EMAIL_ADDRESS>|
|


{% extends "base.html" %} {% block header %} {% endblock %} {% block content %}
Reclaim Philly is a vacant property tracking application that aggregates known public data with crowd-sourced information to create a more complete, dynamic database of Philadelphia’s vacant properties.
Philadelphia has a vacant property crisis: A recent study commissioned by the Philadelphia Association of Community Development Corporations (PACDC) and the Philadelphia Redevelopment Authority estimates that there are at least 40,000 vacant properties in the city.
Reclaim Philly is a platform that will use web and mobile applications to aggregate existing publicly accessible data alongside citizen and community organization reported information (data and photos) about vacant properties in their neighborhoods. Reclaim Philly will be a centralized database that can not only map the instances of vacancy, but also pull from the other public data sets to create a complete profile of Philly's vacant land - ownership, parcel size, liens, crime, zoning, taxes, and more.
Reclaim Philly will also be a platform for people to connect and organize around vacant property in their community by providing information on how to access these vacant properties. This may be through Philadelphia’s system for vacant property disposition, petitioning for foreclosure for tax delinquency, or through new tools. We will partner with other groups engaged in short-term and long-term plans for reuse to further engage people about efforts to revitalize their neighborhoods and how they can help while also providing a resource to the media and reporters to see how vacancy and blight is affecting our City. Individuals will not only find a conduit for their desire to improve their neighborhoods but entire communities will now be able to plan around how these properties are reused.
While we are targeting all Philadelphians, we will provide local neighborhood groups with incentives to participate: the ability to define their area and download our data sets in map-ready forms (via standard or well documented formats/APIs). We hope that this will provide additional motivation to participate in areas that have limited access to mobile phones with app capability. We also plan to work to integrate it and make it compatible with key city systems to increase the value this data and tracking can provide to City government.
We know the time is right for Reclaim Philly because our City is experiencing a renewed spirit of community investment and concern for our vacant land. Reclaim Philly will be an innovative tool available to citizens, community groups, city government, and the press to help fully understand the scope of our City's vacant property problem for the first time and turn the vacant parcels from one our communities’ biggest problems into one our biggest assets.
The plan below is tentative and extremely prone to change based (we are a volunteer driven project, after all ) and the feedback we get.
The project grew out of a Code for America Hackathon in 2012 and is currently a work in progress between the Philadelphia Association of Community Development Corporations (PACDC) and volunteer programming and design professionals. Following Code for America's philosophy, we're developing the software as open source and hope to be able to enable other cities to take or build on our successful work.


--- layout: post date: 2011-12-29 time: "09:00:00" authors: ["Greg Wilson"] title: Yet Another Survey tags: ["Research"] ---
Prakash Prabhu and others recently published "A Survey of the Practice of Computational Science" based on information from 114 researchers at Princeton University. The emphasis is different from that of the survey Hannay and others (including me) did in 2008-09, but the findings are broadly similar.


Strappy is The AngularJS/Bootstrap/FontAwesome bootstrapper, brought to you by the folks at Lotpath. Check out the Readme for more info.


This Is My Engine in JavaScript
My ridicule attempt to do a minimalist engine
- Unity is too big
- GameMaker is expensive
- Godot feels 'strange'
So let's make another small and useless engine :-)
Crazy enough to try ?
- npm install
- npm run build
- npm start
This is a side project, that's why (among other things) it does not progress fast
Let's test a new methodology I just invented on this mini project. Because it's so hard to avoid procrastination on a side project
Step 1: program like a pig, as fast as possible, as if you were a freelance on the run, that the goal was just to do the bare minimum to get the money back from the contract and go to a far-off country where no one could ask you to be accountable for the crap you just programmed.
Step 2: Put yourself in the shoes of the guy who has just realized the trickery and who must find a way to arrange things to save his company
Side notes
https://videogamena.me/ game name idea = Neo Thief in the Salad Kingdom


Useful Tip of the Day: Don't call a sailor's chart a "map".
So what is a .map, in Ruby? It is an Enumerable method. Which means that it is something that is usable on data structures in order to apply code to do various things to the elements within said data structure. Map is used to apply a code block to each element and return an array with the applied code. It's easier to understand with an example.
There is a family of 4 traveling to Iowa to visit their cousin, but in order to be seated next to each other on the plane, their last names must to be added to the system
family = ["gomez", "morticia", "pugsley", "wednesday"]
family.map do |member|
member.capitalize!
member << " Addams"
end
Above, there is an array of names. The array then has .map called on it with 2 lines of code. For each element in the array, those 2 lines of code are applied. This results in the output array of:
# =>["Gomez Addams", "Morticia Addams", "Pugsley Addams", "Wednesday Addams"]
.map is extremely useful for adding or modifying each element in an array. It is very simple and effective to use on data structures without needed to code a method to iterate each element separately.


A lot of tyrolls in various forms to get your palettes...
The evening starts with tropical sounds, a sultry cocktail, followed by a menu seasoned by the “Spice Trail” cuisines of The Caribbean with a modern twist. African, Spanish, Taíno, and Middle Eastern (Jewish & Arabic) flavors come together to make up traditional, Dominican, dishes-paired with a glass of a "silky-white" wine from California. It ends with a creamy rum-dessert and stories, through "The Host's Questionnaire."
* Menus can be customized for your dinner-event. Please ask how you can upgrade the experience for your special night.
** I use only the freshest, locally sourced ingredients available.
*** Vegan, Vegetarian and Pescatarian options can be provided, while still experiencing the full flavors of my recipes-just let me know.
Hi, I am an Independent Pastry Chef in Paris. This week, I am testing my recipe on Chicken Paris Tyrolls. Join me to cook and eat in a amazing experience.
Contact the Chef


Home
Find
Top Artists
Top Tracks
Welcome to Lyrics Finder!
Find lyrics of your favourite song right here right now!
search


Landlords say they could spread a blaze and also block people from getting outside in an emergency.
Samantha Kruszczak, one of the residents at the block of flats in Windsor, Berkshire, had put up a wreath on her door.
She received a letter telling her to remove it within two days or see it confiscated.
The 51-year-old has been in the same flat for two decades and never had a problem with her artificial wreath made up of fake foliage, pine cones and berries before.
She said: ‘Merry B****y Christmas.
‘It’s been okay for the 20 years I’ve been here. I have my wreath up every year.
‘And its the same wreath I always use.
‘Bah Ffing Humbug.’

Another resident in another street in the royal town fumed: ‘It is ridiculous.
‘We have an artificial Christmas tree inside made of the same stuff.
‘But that’s okay. It doesn’t make any sense.’
The letters told tenants if their wreaths were confiscated, they would have to book an appointment within a month to get them back.
However, they would still not be able to put them back up and would have to pay a £10 fee.
If they wee not collected they would be disposed of.
Sandra Theckston, Assistant Director of Housing at the Radian Group said: ‘The festive period is a time to celebrate and we want all our residents to have a happy and safe Christmas.
‘Our policies are always designed in the best interests of customer safety, and our commitment to keeping communal areas clear applies at all times of the year including the holiday season.
‘This approach is based on the advice of fire and rescue services and ensures that communal areas are free of any items that could continue the spread of fire or impede safe evacuation of a building in the event of a fire.
‘We have, and continue to take, steps to communicate our policy to all our residents and appreciate their cooperation in helping to keep everyone safe by ensuring communal areas are kept clear all year round.’


Egyptian
Mythology
Mythology
When you get past the incest, genital mutilation and obsession with death, Ancient Egyptian mythology is actually quite cool. Egyptian Mythology was the belief structure and underlying form of ancient Egyptian culture from at least c. 4000 BCE (as evidenced by burial practices and tomb paintings) to 30 CE with the death of Cleopatra VII, the last of the Ptolemaic rulers of Egypt. Every aspect of life in ancient Egypt was informed by the stories which related the creation of the world and the sustaining of that world by the gods. Egyptian religious beliefs influenced other cultures through transmission via trade and became especially wide-spread after the opening of the Silk Road in 130 BCE as the Egyptian port city of Alexandria was an important commercial centre. The significance of Egyptian mythology to other cultures was in its development of the concept of an eternal life after death, benevolent deities, and reincarnation. Both Pythagoras and Plato of Greece were said to have been influenced by Egyptian beliefs in reincarnation and Roman religious culture borrowed as extensively from Egypt as it did from other civilizations. Human existence was understood by the Egyptians as only a small segment of an eternal journey presided over and orchestrated by supernatural forces in the forms of the many deities which comprised the Egyptian pantheon. According to the historian Bunson, Heh, called Huh in some eras, was one of the original gods of the Ogdoad [the eight deities worshipped during the Old Kingdom, 2575-2134 BCE] at Hermopolis and represented eternity – the goal and destiny of all human life in Egyptian religious beliefs, a stage of existence in which mortals could attain everlasting bliss (86). One’s earthly life was not, however, simply a prologue to something greater but was a part of the entire journey. The Egyptian concept of an afterlife was a mirror-world of one’s life on earth (specifically, one’s life in Egypt) and one needed to live that life well if one hoped to enjoy the rest of one’s eternal journey.


Employment
Student Production Manager
The Daily Tar HeelChapel Hill, NC
- Coordinate newsroom and ad production resources to create a daily newspaper
- Ensure quality control in print advertising
- Streamline communication betweeen newsroom and production office
Summer Design Editor
The Daily Tar HeelChapel Hill, NC
- Hired a staff of four designers to assist in the assembly of pages for the print newspaper
- Trained staffers to use InDesign
- Managed newsroom workflow using Gryphon, a content management software
University and Design Staffer
The Daily Tar HeelChapel Hill, NC
- Corresponded with staff and news sources through emails, meetings, and phone calls to write and publish over
18 news stories
- Assembled pages for the print edition of the newspaper using InDesign
Lifeguard
Aquatic Management GroupApex, NC
- Guaranteed the safety of pool patrons
- Collaborated with a team of 3 to maintain the pool facility


Starter Pack
Buy 200 credits for 99.99$ ONLY!
These purchases are not refundable!
Gambler Pack
Buy 500 credits for 199.99$ ONLY!
These purchases are not refundable!
Casino Pack
Buy 1000 credits for 399.99$ ONLY!
These purchases are not refundable!
High Stakes Pack
Buy 10,000 credits for 3999.99$ ONLY!
These purchases are not refundable!


| Fast Charging Tests |
Required: 2 of 4 Optional: 0 of 6 |
2 |
processing |
12/23/2015 |
|
| Maternity Leave Educational Tool Evaluation |
Required: 2 of 4 Optional: 6 of 6 |
5 |
published |
12/20/2014 |
|
| Annual Survey of Orange County 2000 |
Required: 1 of 4 Optional: 3 of 6 |
0 |
embargoed |
07/26/2015 |
|
| 14c dates from Taraco, Peru |
Required: 2 of 4 Optional: 1 of 6 |
1 |
embargoed |
10/27/2015 |
|
| Lensfree On-chip Microscopy for Telemedicine |
Required: 3 of 4 Optional: 4 of 6 |
0 |
published |
11/05/2014 |
|


Next: progn, Previous: prog, Up: Data and Control Flow Dictionary
prog1
first-form {form}* ⇒ result-1
prog2
first-form second-form {form}* ⇒ result-2
first-form—a form; evaluated as described below.
second-form—a form; evaluated as described below.
forms—an implicit progn; evaluated as described below.
result-1—the primary value resulting from the evaluation of first-form.
result-2—the primary value resulting from the evaluation of second-form.
prog1 evaluates first-form and then forms, yielding as its only value the primary value yielded by first-form.
prog2 evaluates first-form, then second-form, and then forms, yielding as its only value the primary value yielded by first-form.
(setq temp 1) ⇒ 1 (prog1 temp (print temp) (incf temp) (print temp)) |> 1 |> 2 ⇒ 1 (prog1 temp (setq temp nil)) ⇒ 2 temp ⇒ NIL (prog1 (values 1 2 3) 4) ⇒ 1 (setq temp (list 'a 'b 'c)) (prog1 (car temp) (setf (car temp) 'alpha)) ⇒ A temp ⇒ (ALPHA B C) (flet ((swap-symbol-values (x y) (setf (symbol-value x) (prog1 (symbol-value y) (setf (symbol-value y) (symbol-value x)))))) (let ((*foo* 1) (*bar* 2)) (declare (special *foo* *bar*)) (swap-symbol-values '*foo* '*bar*) (values *foo* *bar*))) ⇒ 2, 1 (setq temp 1) ⇒ 1 (prog2 (incf temp) (incf temp) (incf temp)) ⇒ 3 temp ⇒ 4 (prog2 1 (values 2 3 4) 5) ⇒ 2
prog1 and prog2 are typically used to evaluate one or more forms with side effects and return a value that must be computed before some or all of the side effects happen.
(prog1 {form}*) ≡ (values (multiple-value-prog1 {form}*)) (prog2 form1 {form}*) ≡ (let () form1 (prog1 {form}*))
Next: progn, Previous: prog, Up: Data and Control Flow Dictionary


| Icon | Command | Description |
|
Create New |
Create a new project, folder, or file. |
|
Save |
Save the content of the current editor. Disabled if the editor does not contain unsaved changes. |
|
Print |
Prints the content of the current editor. |
|
Build All |
Builds all projects. |
|
New C/C++ project |
Creates New C/C++ project. |
|
Create Folder |
Creates a folder within the current project. |
|
Create File |
Creates a file within the current project. |
|
Create C++ Class |
Creates a C++ class within the current project. |
|
Build selected |
Builds active configurations of selected projects. |
|
Manage configurations |
Displays Manage Build Configurations dialog. |
|
Debug |
Launches the Debug dialog box. |
|
Run |
Launches the Run dialog box |
|
External Tools |
Launches the External Tools dialog box |
|
Open Element |
Brings up the Open Element selection dialog to open an element in the editor.
The Open Elements selection dialog shows all elements existing in the workspace. |
|
Search |
Launches the C/C++ Search dialog box |
|
Add to working set |
Adds selected elements to a working set. |
|
Remove from working set |
Removes selected elements from a working set. |
|
Modify working set |
Modify workbench working set. |
|
Toggle Mark Occurrences |
Turns mark occurrences on and off in the C/C++ editor. |
|
Show Whitespace Characters |
Displays whitespace characters in the editor. |
|
Show Selected Element |
Show source of selected element only |
|
Next annotation |
Go to the next annotation in the editor. |
|
Previous annotation |
Go to the previous annotation in the editor. |
|
Go to Last Edit Location |
Returns editor view to the last line edited, if the file that was last edited was closed it will be re-opened. |
|
Back |
Navigates back through open files. |
|
Forward |
Navigates forward through open files. |


CHOWN
Section: User Commands (1)Updated: June 2012
Index Return to Main Contents
NAME
chown - change file owner and groupSYNOPSIS
chown [OPTION]... [OWNER][:[GROUP]] FILE...chown [OPTION]... --reference=RFILE FILE...
DESCRIPTION
This manual page documents the GNU version of chown. chown changes the user and/or group ownership of each given file. If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given file, and the files' group is not changed. If the owner is followed by a colon and a group name (or numeric group ID), with no spaces between them, the group ownership of the files is changed as well. If a colon but no group name follows the user name, that user is made the owner of the files and the group of the files is changed to that user's login group. If the colon and group are given, but the owner is omitted, only the group of the files is changed; in this case, chown performs the same function as chgrp. If only a colon is given, or if the entire operand is empty, neither the owner nor the group is changed.OPTIONS
Change the owner and/or group of each FILE to OWNER and/or GROUP. With --reference, change the owner and group of each FILE to those of RFILE.
- -c, --changes
- like verbose but report only when a change is made
- --dereference
- affect the referent of each symbolic link (this is the default), rather than the symbolic link itself
- -h, --no-dereference
- affect each symbolic link instead of any referenced file (useful only on systems that can change the ownership of a symlink)
- --from=CURRENT_OWNER:CURRENT_GROUP
- change the owner and/or group of each file only if its current owner and/or group match those specified here. Either may be omitted, in which case a match is not required for the omitted attribute.
- --no-preserve-root
- do not treat `/' specially (the default)
- --preserve-root
- fail to operate recursively on `/'
- -f, --silent, --quiet
- suppress most error messages
- --reference=RFILE
- use RFILE's owner and group rather than specifying OWNER:GROUP values
- -R, --recursive
- operate on files and directories recursively
- -v, --verbose
- output a diagnostic for every file processed
The following options modify how a hierarchy is traversed when the -R option is also specified. If more than one is specified, only the final one takes effect.
- -H
- if a command line argument is a symbolic link to a directory, traverse it
- -L
- traverse every symbolic link to a directory encountered
- -P
- do not traverse any symbolic links (default)
- --help
- display this help and exit
- --version
- output version information and exit
Owner is unchanged if missing. Group is unchanged if missing, but changed to login group if implied by a `:' following a symbolic OWNER. OWNER and GROUP may be numeric as well as symbolic.
EXAMPLES
- chown root /u
- Change the owner of /u to "root".
- chown root:staff /u
- Likewise, but also change its group to "staff".
- chown -hR root /u
- Change the owner of /u and subfiles to "root".
AUTHOR
Written by David MacKenzie and Jim Meyering.REPORTING BUGS
Report chown bugs to<EMAIL_ADDRESS>coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report chown translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
chown(2)The full documentation for chown is maintained as a Texinfo manual. If the info and chown programs are properly installed at your site, the command
- info coreutils aqchown invocationaq
should give you access to the complete manual.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:02 GMT, December 24, 2015


Coverage Summary for Class: BookieWatcher (org.apache.bookkeeper.client)
| Class |
|---|
| BookieWatcher |
1 /**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18 package org.apache.bookkeeper.client;
19
20 import java.util.List;
21 import java.util.Map;
22 import java.util.Set;
23
24 import org.apache.bookkeeper.client.BKException.BKNotEnoughBookiesException;
25 import org.apache.bookkeeper.net.BookieSocketAddress;
26
27 interface BookieWatcher {
28 Set<BookieSocketAddress> getBookies() throws BKException;
29 Set<BookieSocketAddress> getAllBookies() throws BKException;
30 Set<BookieSocketAddress> getReadOnlyBookies() throws BKException;
31
32 /**
33 * Create an ensemble with given ensembleSize and writeQuorumSize.
34 *
35 * @param ensembleSize
36 * Ensemble Size
37 * @param writeQuorumSize
38 * Write Quorum Size
39 * @return list of bookies for new ensemble.
40 * @throws BKNotEnoughBookiesException
41 */
42 List<BookieSocketAddress> newEnsemble(int ensembleSize, int writeQuorumSize,
43 int ackQuorumSize, Map<String, byte[]> customMetadata)
44 throws BKNotEnoughBookiesException;
45
46 /**
47 * Choose a bookie to replace bookie bookieIdx in existingBookies.
48 * @param existingBookies
49 * list of existing bookies.
50 * @param bookieIdx
51 * index of the bookie in the list to be replaced.
52 * @return the bookie to replace.
53 * @throws BKNotEnoughBookiesException
54 */
55 BookieSocketAddress replaceBookie(int ensembleSize, int writeQuorumSize, int ackQuorumSize,
56 Map<String, byte[]> customMetadata,
57 List<BookieSocketAddress> existingBookies, int bookieIdx,
58 Set<BookieSocketAddress> excludeBookies)
59 throws BKNotEnoughBookiesException;
60
61
62 /**
63 * Quarantine bookie so it will not be preferred to be chosen for new ensembles.
64 * @param bookie
65 */
66 void quarantineBookie(BookieSocketAddress bookie);
67 }


|
Dendro
5.01
Dendro in Greek language means tree. The Dendro library is a large scale (262K cores on ORNL's Titan) distributed memory adaptive octree framework. The main goal of Dendro is to perform large scale multiphysics simulations efficeiently in mordern supercomputers. Dendro consists of efficient parallel data structures and algorithms to perform variational ( finite element) methods and finite difference mthods on 2:1 balanced arbitary adaptive octrees which enables the users to perform simulations raning from black holes (binary black hole mergers) to blood flow in human body, where applications ranging from relativity, astrophysics to biomedical engineering.
|
a template for a bidirectional iterator for the basic_json class More...
#include <json.hpp>
Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| using | value_type = typename BasicJsonType::value_type |
| the type of the values when the iterator is dereferenced | |
| using | difference_type = typename BasicJsonType::difference_type |
| a type to represent differences between iterators | |
| using | pointer = typename std::conditional< std::is_const< BasicJsonType >::value, typename BasicJsonType::const_pointer, typename BasicJsonType::pointer >::type |
| defines a pointer to the type iterated over (value_type) | |
| using | reference = typename std::conditional< std::is_const< BasicJsonType >::value, typename BasicJsonType::const_reference, typename BasicJsonType::reference >::type |
| defines a reference to the type iterated over (value_type) | |
Public Member Functions | |
| iter_impl ()=default | |
| default constructor More... | |
| iter_impl (pointer object) noexcept | |
| constructor for a given JSON instance More... | |
| iter_impl (const iter_impl< typename std::remove_const< BasicJsonType >::type > &other) noexcept | |
| converting constructor More... | |
| iter_impl & | operator= (const iter_impl< typename std::remove_const< BasicJsonType >::type > &other) noexcept |
| converting assignment More... | |
| reference | operator* () const |
| return a reference to the value pointed to by the iterator More... | |
| pointer | operator-> () const |
| dereference the iterator More... | |
| iter_impl const | operator++ (int) |
| post-increment (it++) More... | |
| iter_impl & | operator++ () |
| pre-increment (++it) More... | |
| iter_impl const | operator-- (int) |
| post-decrement (it–) More... | |
| iter_impl & | operator-- () |
| pre-decrement (–it) More... | |
| bool | operator== (const iter_impl &other) const |
| comparison: equal More... | |
| bool | operator!= (const iter_impl &other) const |
| comparison: not equal More... | |
| bool | operator< (const iter_impl &other) const |
| comparison: smaller More... | |
| bool | operator<= (const iter_impl &other) const |
| comparison: less than or equal More... | |
| bool | operator> (const iter_impl &other) const |
| comparison: greater than More... | |
| bool | operator>= (const iter_impl &other) const |
| comparison: greater than or equal More... | |
| iter_impl & | operator+= (difference_type i) |
| add to iterator More... | |
| iter_impl & | operator-= (difference_type i) |
| subtract from iterator More... | |
| iter_impl | operator+ (difference_type i) const |
| add to iterator More... | |
| iter_impl | operator- (difference_type i) const |
| subtract from iterator More... | |
| difference_type | operator- (const iter_impl &other) const |
| return difference More... | |
| reference | operator[] (difference_type n) const |
| access to successor More... | |
| object_t::key_type | key () const |
| return the key of an object iterator More... | |
| reference | value () const |
| return the value of an iterator More... | |
Friends | |
| iter_impl | operator+ (difference_type i, const iter_impl &it) |
| addition of distance and iterator More... | |
a template for a bidirectional iterator for the basic_json class
This class implements a both iterators (iterator and const_iterator) for the basic_json class.
The class satisfies the following concept requirements:
| using nlohmann::detail::iter_impl< BasicJsonType >::iterator_category = std::bidirectional_iterator_tag |
The std::iterator class template (used as a base class to provide typedefs) is deprecated in C++17. The C++ Standard has never required user-defined iterators to derive from std::iterator. A user-defined iterator should provide publicly accessible typedefs named iterator_category, value_type, difference_type, pointer, and reference. Note that value_type is required to be non-const, even for constant iterators.
|
default |
default constructor
allow basic_json to access private members
|
inlineexplicitnoexcept |
constructor for a given JSON instance
| [in] | object | pointer to a JSON object for this iterator |
m_object != nullptr
.
|
inlinenoexcept |
converting constructor
| [in] | other | non-const iterator to copy from |
|
inline |
return the key of an object iterator
m_object != nullptr
.
|
inline |
comparison: not equal
m_object != nullptr
.
|
inline |
return a reference to the value pointed to by the iterator
m_object != nullptr
.
|
inline |
add to iterator
m_object != nullptr
.
|
inline |
post-increment (it++)
m_object != nullptr
.
|
inline |
pre-increment (++it)
m_object != nullptr
.
|
inline |
add to iterator
m_object != nullptr
.
|
inline |
subtract from iterator
m_object != nullptr
.
|
inline |
return difference
m_object != nullptr
.
|
inline |
post-decrement (it–)
m_object != nullptr
.
|
inline |
pre-decrement (–it)
m_object != nullptr
.
|
inline |
subtract from iterator
m_object != nullptr
.
|
inline |
dereference the iterator
m_object != nullptr
.
|
inline |
comparison: smaller
m_object != nullptr
.
|
inline |
comparison: less than or equal
m_object != nullptr
.
|
inlinenoexcept |
converting assignment
| [in,out] | other | non-const iterator to copy from |
|
inline |
comparison: equal
m_object != nullptr
.
|
inline |
comparison: greater than
m_object != nullptr
.
|
inline |
comparison: greater than or equal
m_object != nullptr
.
|
inline |
access to successor
m_object != nullptr
.
|
inline |
return the value of an iterator
m_object != nullptr
.
|
friend |
addition of distance and iterator
m_object != nullptr
.


Paged search
paging in mongodb driver is typically achieved by running two separate db queries; one for the count and another for the actual entities. it can also be done via a $facet
aggregation query, which is cumbersome to do using the driver. this library provides a convenient method for this exact use case via the PagedSearch
builder.
Example
var res = await DB.PagedSearch<Book>()
.Match(b => b.AuthorName == "Eckhart Tolle")
.Sort(b => b.Title, Order.Ascending)
.PageSize(10)
.PageNumber(1)
.ExecuteAsync();
IReadOnlyList<Book> books = res.Results;
long totalMatchCount = res.TotalCount;
int totalPageCount = res.PageCount;
specify the search criteria with the .Match()
method as you'd typically do. specify how to order the result set using the .Sort()
method. specify the size of a single page using .PageSize()
method. specify which page number to retrieve using PageNumber()
method and finally issue the command using ExecuteAsync()
to get the result of the facetted aggregation query.
the result is a value tuple consisting of the Results
,TotalCount
,PageCount
.
Note
if you do not specify a matching criteria, all entities will match. the default page size is 100 if not specified and the 1st page is always returned if you omit it.
Project results to a different type
if you'd like to change the shape of the returned entity list, use the PagedSearch<T, TProjection>
generic overload and add a .Project()
method to the chain like so:
var res = await DB.PagedSearch<Book, BookListing>()
.Sort(b => b.Title, Order.Ascending)
.Project(b => new BookListing
{
BookName = b.Title,
AuthorName = b.Author
})
.PageSize(25)
.PageNumber(1)
.ExecuteAsync();
IReadOnlyList<BookListing> listings = res.Results;
long totalMatchCount = res.TotalCount;
int totalPageCount = res.PageCount;
when projecting to different types as above, you may encounter a deserialization error thrown by the driver saying it can't convert ObjectId
values to string
in which case simply add a .ToString()
to the property being projected like so:
.Project(b => new BookListing
{
...
BookID = b.ID.ToString(),
...
})
Paging support for any fluent pipeline
you can add paged search to any fluent pipeline. the difference is, instead of specifying the search criteria with .Match()
, you start off by using the .WithFluent()
method like so:
var pipeline = DB.Fluent<Author>()
.Match(a => a.Name == "Author")
.SortBy(a => a.Name);
var res = await DB.PagedSearch<Author>()
.WithFluent(pipeline)
.Sort(a => a.Name, Order.Descending)
.PageNumber(1)
.PageSize(25)
.ExecuteAsync();
alternatively you can use the extension method on any fluent pipeline as well.
var res = await pipeline.PagedSearch()
.Sort(a => a.Name, Order.Descending)
.PageSize(25)
.PageNumber(1)
.ExecuteAsync();
it's specially useful when you need to page children of a relationship like so:
var res = await DB.Entity<Author>("AuthorID")
.Books
.ChildrenFluent()
.Match(b => b.Title.Contains("The"))
.PagedSearch()
.Sort(b => b.Title, Order.Ascending)
.PageNumber(1)
.PageSize(10)
.ExecuteAsync();


{% extends "base.html" %} {% load compress static hc_extras %} {% block content %}
{% site_name %} supports time-based one-time passwords (TOTP) as a second authentication factor. To use this method, you will need an authenticator app on your phone.
Step 1. Scan the QR code below using your authentication app, or enter the secret key manually.
Secret key: {{ secret }}
{{ secret }}
Step 2. Enter the six-digit code from your authenticator app below.


3 references to Value
System.Management.Automation (3)
engine\MshObject.cs (3)
2143
return new DynamicMetaObject(Expression.Call(CachedReflectionInfo.PSObject_Base, this.Expression), this.Restrictions, PSObject.Base(
Value
));
2148
return (from member in
Value
.Members select member.Name);
2153
var baseObject = PSObject.Base(
Value
);


---
layout: page
title: Python Workshop
subtitle: Introductory Programming Workshop
tags: [Python, Data Analysis, Scientific Programming]
---
{% include JB/setup %}
Features of Python
-
Easy to read and learn
-
Free and Open Source
-
Useful for scientific computing
-
Powerful interactive interpreter
-
Well documented
-
Extensive scientific libraries
Workshop Contents
- Basics of Python Programming
- Map, Filter, Reduce, Html Tag, Number in Python
- Python Keywords, String, List, Tuple, Dictionary, Python Loop and Statements
- PEP 8
- Decision making
- Python Functions, Lamda functions
- Python Classes
- Python Modules : functools,..
- Dynamic Programming : Recursion, Memoization
- Python I/O
- NumPy, SciPy, Matplotlib
Application of Python
- Numeric and Symbolic computation
- 2D/3D Plotting
- Useful for scientific computing
- User interfaces
- Machine learning & Image Processing
- Game development
- Web Development
- And Much More
COURSE DURATION : 26 HOURS
Python Tutorials


- getAdjacentElements(V) - Method in interface com.rawva.structures.graphs.Graph
-
Returns a set containing all elements that are adjacent to this element.
- getAdjacentElements(V) - Method in class com.rawva.structures.graphs.WeightedHashGraph
-
Returns a set containing all elements that are adjacent to this element.
- getElementCounts(Collection<E>) - Static method in class com.rawva.util.CollectionUtils
-
Returns a map containing the frequency of each element in the specified
collection.
- getHead() - Method in class com.rawva.structures.graphs.DirectedEdge
-
Returns the head of this edge.
- getHead() - Method in interface com.rawva.structures.graphs.Graph.Edge
-
Returns the head of this edge.
- getHead() - Method in class com.rawva.structures.graphs.UndirectedEdge
-
Returns the head of this edge.
- getLeastFrequentElement(Collection<E>) - Static method in class com.rawva.util.CollectionUtils
-
Returns the element that occurs the least frequently in the specified
collection.
- getMostFrequentCharacter(String) - Static method in class com.rawva.util.StringUtils
-
Returns the character that occurs the most frequently in the specified
string.
- getMostFrequentElement(Collection<E>) - Static method in class com.rawva.util.CollectionUtils
-
Returns the element that occurs the most frequently in the specified
collection.
- getNumberOfEdges() - Method in interface com.rawva.structures.graphs.Graph
-
Returns the number of edges in this graph.
- getNumberOfEdges() - Method in class com.rawva.structures.graphs.WeightedHashGraph
-
Returns the number of edges in this graph.
- getNumberOfVertices() - Method in interface com.rawva.structures.graphs.Graph
-
Returns the number of elements (vertices) in this graph.
- getNumberOfVertices() - Method in class com.rawva.structures.graphs.WeightedHashGraph
-
Returns the number of elements (vertices) in this graph.
- getTail() - Method in class com.rawva.structures.graphs.DirectedEdge
-
Returns the tail of this edge.
- getTail() - Method in interface com.rawva.structures.graphs.Graph.Edge
-
Returns the tail of this edge.
- getTail() - Method in class com.rawva.structures.graphs.UndirectedEdge
-
Returns the tail of this edge.
- getVertices() - Method in interface com.rawva.structures.graphs.Graph
-
Returns the set of elements (vertices) in this graph.
- getVertices() - Method in class com.rawva.structures.graphs.WeightedHashGraph
-
Returns the set of elements (vertices) in this graph.
- getWeight(V, V) - Method in interface com.rawva.structures.graphs.WeightedGraph
-
Returns the weight of the edge from tail to head if the edge exists and
has an associated weight, or null otherwise.
- getWeight(V, V) - Method in class com.rawva.structures.graphs.WeightedHashGraph
-
Returns the weight of the edge from tail to head if the edge exists and
has an associated weight, or null otherwise.
- Graph<V> - Interface in com.rawva.structures.graphs
-
A Graph is a collection that, in addition to storing objects, can store pairs
of objects to represent associations between two objects.
- Graph.Edge<V> - Interface in com.rawva.structures.graphs
-
An edge is a pair of objects (o1, o2), signifying some association
between o1 and o2.


Class AV.Query
AV.Query defines a query that is used to fetch AV.Objects. The
most common use case is finding all objects that match a query through the
find
method. For example, this sample code fetches all objects
of class MyClass
. It calls a different function depending on
whether the fetch succeeded or not.
var query = new AV.Query(MyClass); query.find({ success: function(results) { // results is an array of AV.Object. }, error: function(error) { // error is an instance of AV.Error. } });
A AV.Query can also be used to retrieve a single object whose id is
known, through the get method. For example, this sample code fetches an
object of class MyClass
and id myId
. It calls a
different function depending on whether the fetch succeeded or not.
var query = new AV.Query(MyClass); query.get(myId, { success: function(object) { // object is an instance of AV.Object. }, error: function(object, error) { // error is an instance of AV.Error. } });
A AV.Query can also be used to count the number of objects that match
the query without retrieving all of those objects. For example, this
sample code counts the number of objects of the class MyClass
var query = new AV.Query(MyClass); query.count({ success: function(number) { // There are number instances of MyClass. }, error: function(error) { // error is an instance of AV.Error. } });
Defined in: av.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
AV.Query(objectClass)
Creates a new avoscloud AV.Query for the given AV.Object subclass.
|
| Method Attributes | Method Name and Description |
|---|---|
|
addAscending(key)
Also sorts the results in ascending order by the given key.
|
|
|
addDescending(key)
Also sorts the results in descending order by the given key.
|
|
| <static> |
AV.Query.and(var_args)
Constructs a AV.Query that is the AND of the passed in queries.
|
|
ascending(key)
Sorts the results in ascending order by the given key.
|
|
|
collection(items, options)
Returns a new instance of AV.Collection backed by this query.
|
|
|
containedIn(key, values)
Add a constraint to the query that requires a particular key's value to
be contained in the provided list of values.
|
|
|
contains(key, substring)
Add a constraint for finding string values that contain a provided
string.
|
|
|
containsAll(key, values)
Add a constraint to the query that requires a particular key's value to
contain each one of the provided list of values.
|
|
|
count(options)
Counts the number of objects that match this query.
|
|
|
descending(key)
Sorts the results in descending order by the given key.
|
|
|
destroyAll(options)
Delete objects retrieved by this query.
|
|
| <static> |
AV.Query.doCloudQuery(cql,, pvalues,, options)
Retrieves a list of AVObjects that satisfy the CQL.
|
|
doesNotExist(key)
Add a constraint for finding objects that do not contain a given key.
|
|
|
doesNotMatchKeyInQuery(key, queryKey, query)
Add a constraint that requires that a key's value not match a value in
an object returned by a different AV.Query.
|
|
|
doesNotMatchQuery(key, query)
Add a constraint that requires that a key's value not matches a
AV.Query constraint.
|
|
|
each(callback, options)
Iterates over each result of a query, calling a callback for each one.
|
|
|
endsWith(key, suffix)
Add a constraint for finding string values that end with a provided
string.
|
|
|
equalTo(key, value)
Add a constraint to the query that requires a particular key's value to
be equal to the provided value.
|
|
|
exists(key)
Add a constraint for finding objects that contain the given key.
|
|
|
find(options)
Retrieves a list of AVObjects that satisfy this query.
|
|
|
first(options)
Retrieves at most one AV.Object that satisfies this query.
|
|
|
get(objectId, options)
Constructs a AV.Object whose id is already known by fetching data from
the server.
|
|
|
greaterThan(key, value)
Add a constraint to the query that requires a particular key's value to
be greater than the provided value.
|
|
|
greaterThanOrEqualTo(key, value)
Add a constraint to the query that requires a particular key's value to
be greater than or equal to the provided value.
|
|
|
include(key)
Include nested AV.Objects for the provided key.
|
|
|
lessThan(key, value)
Add a constraint to the query that requires a particular key's value to
be less than the provided value.
|
|
|
lessThanOrEqualTo(key, value)
Add a constraint to the query that requires a particular key's value to
be less than or equal to the provided value.
|
|
|
limit(n)
Sets the limit of the number of results to return.
|
|
|
matches(key, regex, modifiers)
Add a regular expression constraint for finding string values that match
the provided regular expression.
|
|
|
matchesKeyInQuery(key, queryKey, query)
Add a constraint that requires that a key's value matches a value in
an object returned by a different AV.Query.
|
|
|
matchesQuery(key, query)
Add a constraint that requires that a key's value matches a AV.Query
constraint.
|
|
|
near(key, point)
Add a proximity based constraint for finding objects with key point
values near the point given.
|
|
|
notContainedIn(key, values)
Add a constraint to the query that requires a particular key's value to
not be contained in the provided list of values.
|
|
|
notEqualTo(key, value)
Add a constraint to the query that requires a particular key's value to
be not equal to the provided value.
|
|
| <static> |
AV.Query.or(var_args)
Constructs a AV.Query that is the OR of the passed in queries.
|
|
select(keys)
Restrict the fields of the returned AV.Objects to include only the
provided keys.
|
|
|
sizeEqualTo(key, value)
Add a constraint to the query that requires a particular
array key's length to be equal to the provided value.
|
|
|
skip(n)
Sets the number of results to skip before returning any results.
|
|
|
startsWith(key, prefix)
Add a constraint for finding string values that start with a provided
string.
|
|
|
toJSON()
Returns a JSON representation of this query.
|
|
|
withinGeoBox(key, southwest, northeast)
Add a constraint to the query that requires a particular key's
coordinates be contained within a given rectangular geographic bounding
box.
|
|
|
withinKilometers(key, point, maxDistance)
Add a proximity based constraint for finding objects with key point
values near the point given and within the maximum distance given.
|
|
|
withinMiles(key, point, maxDistance)
Add a proximity based constraint for finding objects with key point
values near the point given and within the maximum distance given.
|
|
|
withinRadians(key, point, maxDistance)
Add a proximity based constraint for finding objects with key point
values near the point given and within the maximum distance given.
|
- Parameters:
- objectClass
- - An instance of a subclass of AV.Object, or a AV className string.
- Parameters:
- {String} key
- The key to order by
- Returns:
- {AV.Query} Returns the query so you can chain this call.
- Parameters:
- {String} key
- The key to order by
- Returns:
- {AV.Query} Returns the query so you can chain this call.
var compoundQuery = AV.Query.and(query1, query2, query3);will create a compoundQuery that is an 'and' of the query1, query2, and query3.
- Parameters:
- {...AV.Query} var_args
- The list of queries to AND.
- Returns:
- {AV.Query} The query that is the AND of the passed in queries.
- Parameters:
- {String} key
- The key to order by.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- items
- options
- Returns:
- {AV.Collection}
- Parameters:
- {String} key
- The key to check.
- {Array} values
- The values that will match.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the string to match is stored in.
- {String} substring
- The substring that the value must contain.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check. This key's value must be an array.
- {Array} values
- The values that will match.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {Object} options
- A Backbone-style options object.
- Returns:
- {AV.Promise} A promise that is resolved with the count when the query completes.
- Parameters:
- {String} key
- The key to order by.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {Object} options
- Standard options object with success and error callbacks.
- Returns:
- {AV.Promise} A promise that is fulfilled when the save completes.
- Parameters:
- {String} cql,
- A CQL string, see CQL Guide.
- {Array} pvalues,
- An array contains placeholder values.
- {Object} options
- A Backbone-style options object,it's optional.
- Returns:
- {AV.Promise} A promise that is resolved with the results when the query completes,it's optional.
- Parameters:
- {String} key
- The key that should not exist
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that contains the value that is being excluded.
- {String} queryKey
- The key in the objects returned by the query to match against.
- {AV.Query} query
- The query to run.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the contains the object to match the query.
- {AV.Query} query
- The query that should not match.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- callback
- {Function} Callback that will be called with each result of the query.
- options
- {Object} An optional Backbone-like options object with success and error callbacks that will be invoked once the iteration has finished.
- Returns:
- {AV.Promise} A promise that will be fulfilled once the iteration has completed.
- Parameters:
- {String} key
- The key that the string to match is stored in.
- {String} suffix
- The substring that the value must end with.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- value
- The value that the AV.Object must contain.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that should exist.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {Object} options
- A Backbone-style options object.
- Returns:
- {AV.Promise} A promise that is resolved with the results when the query completes.
- Parameters:
- {Object} options
- A Backbone-style options object.
- Returns:
- {AV.Promise} A promise that is resolved with the object when the query completes.
- Parameters:
- objectId
- The id of the object to be fetched.
- {Object} options
- A Backbone-style options object.
- Parameters:
- {String} key
- The key to check.
- value
- The value that provides an lower bound.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- value
- The value that provides an lower bound.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The name of the key to include.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- value
- The value that provides an upper bound.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- value
- The value that provides an upper bound.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {Number} n
- the number of results to limit to.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the string to match is stored in.
- {RegExp} regex
- The regular expression pattern to match.
- modifiers
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that contains the value that is being matched.
- {String} queryKey
- The key in the objects returned by the query to match against.
- {AV.Query} query
- The query to run.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the contains the object to match the query.
- {AV.Query} query
- The query that should match.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the AV.GeoPoint is stored in.
- {AV.GeoPoint} point
- The reference AV.GeoPoint that is used.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- {Array} values
- The values that will not match.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key to check.
- value
- The value that must not be equalled.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
var compoundQuery = AV.Query.or(query1, query2, query3);will create a compoundQuery that is an or of the query1, query2, and query3.
- Parameters:
- {...AV.Query} var_args
- The list of queries to OR.
- Returns:
- {AV.Query} The query that is the OR of the passed in queries.
- Parameters:
- {Array} keys
- The names of the keys to include.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The array key to check.
- value
- The length value.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {Number} n
- the number of results to skip.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the string to match is stored in.
- {String} prefix
- The substring that the value must start with.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Returns:
- {Object}
- Parameters:
- {String} key
- The key to be constrained.
- {AV.GeoPoint} southwest
- The lower-left inclusive corner of the box.
- {AV.GeoPoint} northeast
- The upper-right inclusive corner of the box.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the AV.GeoPoint is stored in.
- {AV.GeoPoint} point
- The reference AV.GeoPoint that is used.
- {Number} maxDistance
- Maximum distance (in kilometers) of results to return.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the AV.GeoPoint is stored in.
- {AV.GeoPoint} point
- The reference AV.GeoPoint that is used.
- {Number} maxDistance
- Maximum distance (in miles) of results to return.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.
- Parameters:
- {String} key
- The key that the AV.GeoPoint is stored in.
- {AV.GeoPoint} point
- The reference AV.GeoPoint that is used.
- maxDistance
- Maximum distance (in radians) of results to return.
- Returns:
- {AV.Query} Returns the query, so you can chain this call.


Serbian minister urged to quit amid claims PhD was plagiarised
Sinisa Mali denies any wrongdoing but Belgrade University has declared his paper annulled.
Serbia’s finance minister is facing calls to resign after a university claimed he plagiarised parts of his PhD thesis.
Belgrade University, arguably Serbia’s most prestigious place of learning, said in a statement that Sinisa Mali “literally took over texts, or entire paragraphs, from the texts of other authors without listing the names of the authors”.
University dean Ivanka Popovic told state broadcaster RTS that Mr Mali’s 2013 paper, which focuses on restructuring and privatisation, will be annulled.
Mr Mali has denied the accusation.
He said: “I know I didn’t do it.
“Right now, I am interested in Serbia’s budget (for 2020) and to do the job Serbian citizens pay me for.”
But the accusation has prompted calls for the resignation of Mr Mali, who is a close ally of President Aleksandar Vucic and previously served as the mayor of the capital Belgrade.
An anti-government movement has called a protest rally for Monday.


Sir Gustav Athebaldt:
I have just received Martien's report. I have given compensation to the families of the dead Dwarves, but it still pains me to see good men in my employ meet their end under my watch. Today is truly a sad day....
At least their suffering was not in vaun: the first part of my plan has been completed. Now we must move on to the next.
"What's next?"


Title: HTML entry link stuff Date: 2019-02-13 15:28:13-08:00 Entry-ID: 497 UUID: 158e7a37-d3f6-5e3e-9faa-56cfd5c3fad5
Local rawr link, smaller rawr, and links to entry by ID and filename. Also a static resource. .....While we're here, does src
work on things that aren't <img>
? Nope!
We should also be able to support non-image assets, such as:
and inline assets should work too:


Views
What is a view?
Views are files that present data to the browser. These files enable the separation of logic and presentation for your application. Views are typically html, javascript, or css but can contain variables passed into them from the controller.
Creating a view
In FuelPHP, Views are located in the APPPATH/views directory. Views can be located in subdirectories. Views are named by their directory path from the fuel/app/views and the file name, so a view file located fuel/app/views/user/join.php would be named user/join.
Example:

<title><?php echo $title; ?></title>

Welcome, <?php echo $username; ?>.

Using views
Views in the Fuel framework are very flexible. You can create a single view and nest views within other views. This can be done multiple ways.
Example View (fuel/app/views/home/index.php):

<title><?php echo $title; ?></title>

Welcome, <?php echo $username; ?>.

Method 1 (using example view above):
class Controller_Home extends Controller
{
public function action_index()
{
$data = array(); //stores variables going to views
$data['username'] = 'Joe14';
$data['title'] = 'Home';
//assign the view to browser output
return View::forge('home/index', $data);
}
}
Method 2 (using example view above):
class Controller_Home extends Controller
{
public function action_index()
{
//create the view
$view = View::forge('home/index');
//assign variables for the view
$view->username = 'Joe14';
$view->title = 'Home';
//another way to assign variables for the view
$view->set('username', 'Joe14');
$view->set('title', 'Home');
//assign the view to browser output
return $view;
}
}
Security
Views use output encoding to sanitize anything you pass to them. In a default installation, the security method Security::htmlentities() is defined as output filter. You can modify the filters in your applications config.php file. If you want to pass something unfiltered, you can use the method set($name, $value, false).
class Controller_Example extends Controller
{
public function action_index()
{
$view = \View::forge('example');
// add it filtered, outputs: not bold because filtered
$view->title = 'not bold because filtered';
// add it unfiltered, outputs:  bold because unfiltered
$view->set('title', ' bold because unfiltered', false);
// or use the set_safe() method, which is identical to set() but defaults to 'false'
$view->set_safe('title', ' bold because unfiltered');
return $view;
}
}
If you don't want your View to work like this, you can pass false as third argument View::forge()
Now anything added to this View object will be unfiltered. If you then do want some values filtered, you can use
set($name, $value, true).
You can also globally disable the output filter by setting the application
configuration value security.auto_filter_output to false. For security reasons it is highly recommended
that you don't do this!
Note on objects: Unless the passed object is of the type View, Presenter or Closure, it is
expected to have a __toString() method and forced to be a string when output filtering is enabled. If you want
to pass it anyway, you need to use set($name, $value, false), but don't forget to filter what you
use!
View & Presenters are expected to contain HTML and take care of their own filtering which is why they're
not sanitized. Closures cannot be sanitized, and you should take care to ensure this is done within them if
necessary.
Lazy rendering
When instantiating a view object, only the environment needed to generate output is setup. The view file is not being read, no variables will be interpreted, and no output will be rendered.
This only happens when you explicitly call the render()
method on the view object or when you
cast the view object to a string (which happens automatically when you echo it). This means no views are processed
until it's absolutely needed. It also means that Fuel doesn't keep rendered views in memory until it is time to
send them to the browser.
Nesting Views
Views can also be nested to contain other views. This can be done multiple ways.
Example Views
fuel/app/views/layout.php

<?php echo $head; ?>

<?php echo $header; ?>
<?php echo $content; ?>
<?php echo $footer; ?>

fuel/app/views/head.php
<title><?php echo $title; ?></title>
fuel/app/views/header.php

<?php echo $site_title; ?>

fuel/app/views/content.php

<?php echo $title; ?>

Welcome <?php echo $username; ?>

fuel/app/views/footer.php

© Copyright <?php echo date('Y');?> <?php echo $site_title; ?>

Method 1 (using example views above and lazy rendering):
class Controller_Home extends Controller
{
public function action_index()
{
// create the layout view
$view = View::forge('layout');
// assign global variables so all views have access to them
$view->set_global('username', 'Joe14');
$view->set_global('title', 'Home');
$view->set_global('site_title', 'My Website');
//assign views as variables, lazy rendering
$view->head = View::forge('head');
$view->header = View::forge('header');
$view->content = View::forge('content');
$view->footer = View::forge('footer');
// return the view object to the Request
return $view;
}
}
Method 2 (using example views above and forced rendering):
class Controller_Home extends Controller
{
public function action_index()
{
//assign variables
$data = array();
$data['title'] = 'Home';
$data['site_title'] = 'My Website';
$data['username'] = 'Joe14';
//assign views as variables, forced rendering
$views = array();
$views['head'] = View::forge('head', $data)->render();
$views['header'] = View::forge('header', $data)->render();
$views['content'] = View::forge('content', $data)->render();
$views['footer'] = View::forge('footer', $data)->render();
// return the rendered HTML to the Request
return View::forge('layout', $views)->render();
}
}
Method 3 (using example views above, no global data, lazy rendering):
class Controller_Home extends Controller
{
public function action_index()
{
// create the layout view
$view = View::forge('layout');
//local view variables, lazy rendering
$view->head = View::forge('head', array('title' => 'Home'));
$view->header = View::forge('header', array('site_title' => 'My Website'));
$view->content = View::forge('content', array('username' => 'Joe14', 'title' => 'Home'));
$view->footer = View::forge('footer', array('site_title' => 'My Website'));
// return the view object to the Request
return $view;
}
}
See the View Class in the classes section for View's function descriptions.
Passing functions to views
To pass a View specific function from your code to your View, you use an anonymous function or Closures:
// Controller action
public function action_index()
{
// construct a view object
$view = \View::forge('page/index');
// set a closure that returns a value
$view->somevar = function() { return "somevalue"; };
// this works the same
$view->set('othervar', function() { return "othervalue"; });
// for closures with arguments, use set_safe to prevent encoding
$view->set_safe('echo_upper', function($string) { echo strtoupper($string); });
}
// Which you can then use in your view:
echo $somevar, $othervar; // Outputs: "somevalue" "othervalue"
$echo_upper('this string'); // Outputs: "THIS STRING"
Closures are also treated like variables when it comes to filtering.
If you have a closure that returns a value, use the set()
method, so the
value will be encoded according to your filtering setting. If you have a closure that
will be used as a modifier, like in the example above, or you have a closure that returns
a value that should not be encoded, use the set_safe()
method, or pass false
as the third parameter of set()
.
For legacy applications that expect a closure to never be filtered, edit your applications config.php configuration file, add the following key:
/**
* Whether to filter closures as well
*/
'filter_closures' => false,
Wrap your view in a layout
To wrap your view in a layout easily, we provide a Template Controller.


{% if user.is_authenticated %}
Hello
{{ user.username }}
[sign out]
{% if aniv %}
It has been
90 Day, 04 Hour, 03 Minute, 22 Second
since our first kiss.
It has been
90 Day, 04 Hour, 03 Minute, 22 Second
since we were announce husband and wife.
{% endif %}
{% block content %}{% endblock %}
{% else %}
[sign in]
{% endif %}


const ( // TagDefault is the tag name for a default value of a field as recognized // by RegisterFlags. TagDefault = "def" // TagHelp is the tag name for a help message of a field as recognized // by RegisterFlags. TagHelp = "help" // TagOpt is the tag name for a one character option of a field as recognized // by RegisterFlags. For example, a value of "d" reserves "-d" for the // command line argument. TagOpt = "opt" // TagSkip is the tag name which causes the field to be skipped by // RegisterFlags. TagSkip = "skip" // TagHide is the tag name which causes the field to be hidden TagHide = "hide" )
SecretTag to tag a field as secret as in password, token
const SecretTag = "mask"
var ( // ErrNotImplemented used to return errors for functions not implemented ErrNotImplemented = errors.New("NOT YET IMPLEMENTED") )
RevocationReasonCodes is a map between string reason codes to integers as defined in RFC 5280
var RevocationReasonCodes = map[string]int{ "unspecified": ocsp.Unspecified, "keycompromise": ocsp.KeyCompromise, "cacompromise": ocsp.CACompromise, "affiliationchanged": ocsp.AffiliationChanged, "superseded": ocsp.Superseded, "cessationofoperation": ocsp.CessationOfOperation, "certificatehold": ocsp.CertificateHold, "removefromcrl": ocsp.RemoveFromCRL, "privilegewithdrawn": ocsp.PrivilegeWithdrawn, "aacompromise": ocsp.AACompromise, }
URLRegex is the regular expression to check if a value is an URL
var URLRegex = regexp.MustCompile("(ldap|http)s*://(\\S+):(\\S+)@")
func B64Decode(str string) (buf []byte, err error)
B64Decode base64 decodes a string
func B64Encode(buf []byte) string
B64Encode base64 encodes bytes
func BCCSPKeyRequestGenerate(req *csr.CertificateRequest, myCSP bccsp.BCCSP) (bccsp.Key, crypto.Signer, error)
BCCSPKeyRequestGenerate generates keys through BCCSP somewhat mirroring to cfssl/req.KeyRequest.Generate()
func BccspBackedSigner(caFile, keyFile string, policy *config.Signing, csp bccsp.BCCSP) (signer.Signer, error)
BccspBackedSigner attempts to create a signer using csp bccsp.BCCSP. This csp could be SW (golang crypto) PKCS11 or whatever BCCSP-conformant library is configured
func CheckHostsInCert(certFile string, hosts ...string) error
CheckHostsInCert checks to see if host correctly inserted into certificate
func CmdRunBegin(v *viper.Viper)
CmdRunBegin is called at the beginning of each cobra run function
func ConfigureBCCSP(optsPtr **factory.FactoryOpts, mspDir, homeDir string) error
ConfigureBCCSP configures BCCSP, using
func CopyMissingValues(src, dst interface{})
CopyMissingValues checks the dst interface for missing values and replaces them with value from src config struct. This does a deep copy of pointers.
func CreateClientHome() (string, error)
CreateClientHome will create a home directory if it does not exist
func CreateToken(csp bccsp.BCCSP, cert []byte, key bccsp.Key, method, uri string, body []byte) (string, error)
CreateToken creates a JWT-like token. In a normal JWT token, the format of the token created is:
<algorithm,claims,signature>
where each part is base64-encoded string separated by a period. In this JWT-like token, there are two differences: 1) the claims section is a certificate, so the format is:
<certificate,signature>
2) the signature uses the private key associated with the certificate,
and the signature is across both the certificate and the "body" argument, which is the body of an HTTP request, though could be any arbitrary bytes.
@param cert The pem-encoded certificate @param key The pem-encoded key @param method http method of the request @param uri URI of the request @param body The body of an HTTP request
func DecodeToken(token string) (*x509.Certificate, string, string, error)
DecodeToken extracts an X509 certificate and base64 encoded signature from a token
func ErrorContains(t *testing.T, err error, contains, msg string, args ...interface{})
ErrorContains will check to see if an error occurred, if so it will check that it contains the appropriate error message
func Fatal(format string, v ...interface{})
Fatal logs a fatal message and exits
func FatalError(t *testing.T, err error, msg string, args ...interface{})
FatalError will check to see if an error occured if so it will cause the test cases exit
func FileExists(name string) bool
FileExists checks to see if a file exists
func FlagString(v *viper.Viper, flags *pflag.FlagSet, name, short string, def string, desc string)
FlagString sets up a flag for a string, binding it to its name
func GenECDSAToken(csp bccsp.BCCSP, cert []byte, key bccsp.Key, method, uri string, body []byte) (string, error)
GenECDSAToken signs the http body and cert with ECDSA using EC private key
func GetBCCSP(opts *factory.FactoryOpts, homeDir string) (bccsp.BCCSP, error)
GetBCCSP returns BCCSP
func GetCertificateDuration(cert *x509.Certificate) time.Duration
GetCertificateDuration returns the validity duration for a certificate
func GetCertificateDurationFromFile(file string) (time.Duration, error)
GetCertificateDurationFromFile returns the validity duration for a certificate in a file.
func GetCommandLineOptValue(optName string, remove bool) string
GetCommandLineOptValue searches the command line arguments for the specified option and returns the following value if found; otherwise it returns "". If **remove** is true and it is found, the option and its value are removed from os.Args. For example, if command line is:
fabric-ca client enroll -config myconfig.json
GetCommandLineOptValue("-config",true) returns "myconfig.json" and changes os.Args to
fabric-ca client enroll
func GetDefaultBCCSP() bccsp.BCCSP
GetDefaultBCCSP returns the default BCCSP
func GetDefaultConfigFile(cmdName string) string
GetDefaultConfigFile gets the default path for the config file to display in usage message
func GetECPrivateKey(raw []byte) (*ecdsa.PrivateKey, error)
GetECPrivateKey get *ecdsa.PrivateKey from key pem
func GetEnrollmentIDFromPEM(cert []byte) (string, error)
GetEnrollmentIDFromPEM returns the EnrollmentID from a PEM buffer
func GetEnrollmentIDFromX509Certificate(cert *x509.Certificate) string
GetEnrollmentIDFromX509Certificate returns the EnrollmentID from the X509 certificate
func GetMaskedURL(url string) string
GetMaskedURL returns masked URL. It masks username and password from the URL if present
func GetRSAPrivateKey(raw []byte) (*rsa.PrivateKey, error)
GetRSAPrivateKey get *rsa.PrivateKey from key pem
func GetSerialAsHex(serial *big.Int) string
GetSerialAsHex returns the serial number from certificate as hex format
func GetServerAddr() string
GetServerAddr returns the server's address
func GetServerPort() string
GetServerPort returns the server's listening port
func GetServerProtocol() string
GetServerProtocol returns the server's protocol
func GetServerURL() string
GetServerURL returns the server's URL
func GetSignerFromCert(cert *x509.Certificate, csp bccsp.BCCSP) (bccsp.Key, crypto.Signer, error)
GetSignerFromCert load private key represented by ski and return bccsp signer that conforms to crypto.Signer
func GetSignerFromCertFile(certFile string, csp bccsp.BCCSP) (bccsp.Key, crypto.Signer, *x509.Certificate, error)
GetSignerFromCertFile load skiFile and load private key represented by ski and return bccsp signer that conforms to crypto.Signer
func GetSliceFromList(split string, delim string) []string
GetSliceFromList will return a slice from a list
func GetUser(v *viper.Viper) (string, string, error)
GetUser returns username and password from CLI input
func GetX509CertificateFromPEM(cert []byte) (*x509.Certificate, error)
GetX509CertificateFromPEM get an X509 certificate from bytes in PEM format
func GetX509CertificateFromPEMFile(file string) (*x509.Certificate, error)
GetX509CertificateFromPEMFile gets an X509 certificate from a file
func GetX509CertificatesFromPEM(pemBytes []byte) ([]*x509.Certificate, error)
GetX509CertificatesFromPEM returns X509 certificates from bytes in PEM format
func HTTPRequestToString(req *http.Request) string
HTTPRequestToString returns a string for an HTTP request for debuggging
func HTTPResponseToString(resp *http.Response) string
HTTPResponseToString returns a string for an HTTP response for debuggging
func Hostname() string
Hostname name returns the hostname of the machine
func ImportBCCSPKeyFromPEM(keyFile string, myCSP bccsp.BCCSP, temporary bool) (bccsp.Key, error)
ImportBCCSPKeyFromPEM attempts to create a private BCCSP key from a pem file keyFile
func InitBCCSP(optsPtr **factory.FactoryOpts, mspDir, homeDir string) (bccsp.BCCSP, error)
InitBCCSP initializes BCCSP
func IsSubsetOf(small, big string) error
IsSubsetOf returns an error if there is something in 'small' that is not in 'big'. Both small and big are assumed to be comma-separated strings. All string comparisons are case-insensitive. Examples: 1) IsSubsetOf('a,B', 'A,B,C') returns nil 2) IsSubsetOf('A,B,C', 'B,C') returns an error because A is not in the 2nd set.
func ListContains(list, find string) bool
ListContains looks through a comma separated list to see if a string exists
func LoadX509KeyPair(certFile, keyFile string, csp bccsp.BCCSP) (*tls.Certificate, error)
LoadX509KeyPair reads and parses a public/private key pair from a pair of files. The files must contain PEM encoded data. The certificate file may contain intermediate certificates following the leaf certificate to form a certificate chain. On successful return, Certificate.Leaf will be nil because the parsed form of the certificate is not retained.
This function originated from crypto/tls/tls.go and was adapted to use a BCCSP Signer
func MakeFileAbs(file, dir string) (string, error)
MakeFileAbs makes 'file' absolute relative to 'dir' if not already absolute
func MakeFileNamesAbsolute(files []*string, home string) error
MakeFileNamesAbsolute makes all file names in the list absolute, relative to home
func Marshal(from interface{}, what string) ([]byte, error)
Marshal to bytes
func NormalizeFileList(files []string, homeDir string) ([]string, error)
NormalizeFileList provides absolute pathing for the list of files
func NormalizeStringSlice(slice []string) []string
NormalizeStringSlice checks for seperators
func ParseObj(obj interface{}, cb func(*Field) error, tags map[string]string) error
ParseObj parses an object structure, calling back with field info for each field
func RandomString(n int) string
RandomString returns a random string
func Read(r io.Reader, data []byte) ([]byte, error)
Read reads from Reader into a byte array
func ReadFile(file string) ([]byte, error)
ReadFile reads a file
func RegisterFlags(v *viper.Viper, flags *pflag.FlagSet, config interface{}, tags map[string]string) error
RegisterFlags registers flags for all fields in an arbitrary 'config' object. This method recognizes the following field tags: "def" - the default value of the field; "opt" - the optional one character short name to use on the command line; "help" - the help message to display on the command line; "skip" - to skip the field.
func RemoveQuotes(str string) string
RemoveQuotes removes outer quotes from a string if necessary
func SetDefaultServerPort()
SetDefaultServerPort overrides the default CFSSL server port by adding the "-port" option to the command line if it was not already present.
func StrContained(str string, strs []string) bool
StrContained returns true if 'str' is in 'strs'; otherwise return false
func StructToString(si interface{}) string
StructToString converts a struct to a string. If a field has a 'secret' tag, it is masked in the returned string
func Unmarshal(from []byte, to interface{}, what string) error
Unmarshal from bytes
func ValidateAndReturnAbsConf(configFilePath, homeDir, cmdName string) (string, string, error)
ValidateAndReturnAbsConf checks to see that there are no conflicts between the configuration file path and home directory. If no conflicts, returns back the absolute path for the configuration file and home directory.
func VerifyToken(csp bccsp.BCCSP, token string, method, uri string, body []byte, compMode1_3 bool) (*x509.Certificate, error)
VerifyToken verifies token signed by either ECDSA or RSA and returns the associated user ID
func ViperUnmarshal(cfg interface{}, stringSliceFields []string, vp *viper.Viper) error
ViperUnmarshal is a work around for a bug in viper.Unmarshal This can be removed once https://github.com/spf13/viper/issues/327 is fixed and vendored.
func WriteFile(file string, buf []byte, perm os.FileMode) error
WriteFile writes a file
ECDSASignature forms the structure for R and S value for ECDSA
type ECDSASignature struct { R, S *big.Int }
Field is a field of an arbitrary struct
type Field struct { Name string Path string Type reflect.Type Kind reflect.Kind Leaf bool Depth int Tag reflect.StructTag Value interface{} Addr interface{} Hide string }


ChromeVox user preferences are persisted using HTML5 local storage and are initialized from previously saved preferences at start-up. Persisted user preferences include:
ChromeVox user settings are surfaced to the user via an options page. This user interface is rendered in HTML, and being a web page can be navigated with ChromeVox providing spoken output. In addition, oft-used settings such as speech-rate and pitch can be quickly adjusted using keyboard short-cuts.


Thaddeus of Vitovnica said Our life depends on the kind of thoughts we nurture. If our thoughts are peaceful, calm, meek, and kind, then that is what our life is like.
My first project was for a friend of my wife, they ran JADE Realty Group, Inc. I started out helping setup their computer system, network and accounting software. Their acconting software was not designed for property management so I created a custom database application for them. Their website was my first venture into web design. JADERealty.com is still active but I no longer monitor or update it.
Next came Half Pint Ranch. My neighbor and best friend moved back to his home state of Colorado where he bought a 65-acre ranch east of Denver. He raised miniature Hereford cattle, goats, sheep, chickens and a few pigs. I built his website HalfPintRanch.com to advertise his cattle, goat milk & cheese and fresh eggs. The website is not longer active but you can view a copy at HalfPint.
I currently volunteer for the Orlando Ski and Travel Club as their webmaster, OrlandoSkiandTravelClub.com. They use Wild Apricot, a membership management software. Wild Apricot host their website and provides a WYSIWYG editor. I use HTML and CSS to improve and add features. Check them out at WildApricot.com.


usbutils-012
Installation of USB Utils
Install USB Utils by running the
following commands:
./autogen.sh --prefix=/usr --datadir=/usr/share/hwdata &&
make
This package does not come with a test suite.
Now, as the root
user:
make install
To install the usb.ids
data file,
using Wget-1.20.3, run, as the root
user:
install -dm755 /usr/share/hwdata/ &&
wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids
The script lsusb.py
displays information in a more easily readable form than
lsusb. To find the
options, use lsusb.py
-h. One form of use recommended by the developer is
lsusb.py -ciu.
Configuring USB Utils
The usb.ids
data file is constantly
being updated. To get a current version of this file, using
Wget-1.20.3, periodically run again, as the
root
user:
wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids
You should update the /usr/share/hwdata/usb.ids
file periodically.
If you've installed Fcron-3.2.1 and completed the
section on periodic jobs, execute the following commands, as
the root
user, to create a
weekly cron job:
cat > /etc/cron.weekly/update-usbids.sh << "EOF" &&
#!/bin/bash
/usr/bin/wget http://www.linux-usb.org/usb.ids -O /usr/share/hwdata/usb.ids
EOF
chmod 754 /etc/cron.weekly/update-usbids.sh
Contents
Installed Programs:
lsusb, lsusb.py, usb-devices, and
usbhid-dump
Installed Libraries:
None
Installed Directories:
None
Short Descriptions
|
lsusb
|
is a utility for displaying information about all USB
buses in the system and all devices connected to them,
but not in human friendly form.
|
|
lsusb.py
|
displays information about all USB buses in the system
and all devices connected to them in reasonable human
friendly form.
|
|
usb-devices
|
is a shell script that displays details of USB buses and
devices connected to them. It is designed to be used if
/proc/bus/usb/devices is not available on your system.
|
|
usbhid-dump
|
is used to dump report descriptors and streams from HID
(human interface device) interfaces of USB devices.
|
Last updated on 2020-02-16 18:46:23 -0800


Per semplificare la configurazione del progetto usiamo jspm.io:
npm install jspm -g
jspm init Package.json file does not exist, create it? [yes]: yes Would you like jspm to prefix the jspm package.json properties under jspm? [yes]: yes Enter server baseURL (public folder path) [./]: ./ Enter jspm packages folder [.\jspm_packages]: .\jspm_packages Enter config file path [.\config.js]: .\config.js Configuration file config.js doesn't exist, create it? [yes]: yes Enter client baseURL (public folder URL) [/]: ./ Which ES6 transpiler would you like to use, Traceur or Babel? [traceur]: Babel
import greet from './greet'; import {gen as Ciao} from './gen';
export function greet(..){...}
export function* gen(n) { for(let i=0;i<n;i++) yield `ciao ${i}`; }
<EMAIL_ADDRESS>/*"babelOptions": { "optional": [ "runtime" ] },*/
<EMAIL_ADDRESS>--> jspm_packages\npm
jspm bundle-sfx entry bundle.js


Bloomberg News to make editorial changes for owner's presidential run
WASHINGTON: Bloomberg News on Sunday (Nov 24) outlined several editorial changes it will make as it adjusts to a novel situation – covering its owner as he runs for president.
Former New York mayor Michael Bloomberg confirmed he is joining the crowded field of Democrats seeking to take on his fellow New York billionaire, President Donald Trump, just three months before the first primary.
READ: Bloomberg formally announces US presidential candidacy
"There is no point in trying to claim that covering this presidential campaign will be easy," said John Micklethwait, editor-in-chief of Bloomberg's namesake news agency, in a staff email. He cited the company's policy of not writing about itself or direct competitors.
Micklethwait outlined a few editorial changes the agency will make but stressed it would make campaign coverage decisions on a case-by-case basis, rather than following an "exhaustive rulebook".
"The place where Mike has had the most contact with Editorial is Bloomberg Opinion: our editorials have reflected his views," Micklethwait wrote. As a result, the company will end its policy of unsigned editorials.
They will also suspend the editorial board, in part because several board members will take leaves of absence to join Bloomberg's campaign.
Micklethwait said he intends for the company to cover the campaign's news "in much the same way as we have done before", with the exception that articles will explicitly state that Bloomberg News' owner is a candidate.
In the email, Micklethwait added that they will not investigate Bloomberg's family or foundations - the same would go for his Democratic rivals - but would publish or summarise investigative pieces on all Democratic candidates.
"Bloomberg News has handled these conflicts before," Micklethwait wrote, pointing to Bloomberg's mayoral campaign when the media agency adopted similar coverage policies.
Bloomberg is poised to run as a centrist, and analysts suspect that he could take away some of the support enjoyed by fellow moderate Joe Biden.
Some believe that his "self-made man" image and support for fighting global warming makes him the best challenger for Trump.


'''A few miscellaneous functions and objects used by the datastream and datastrline too long (95 > 79 characters)
eamdiff modules.
'''
import re
import sys
import time
import json
import numpy as np
import datetime as dt
# regex for checking netcdf file names
ncfname_re = \
re.compile('^([a-z]{3})([a-z0-9]*)([A-Z]\d+)\.([a-z]\d).'
line break before binary operator
+missing whitespace around operator
'(\d{4})(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d)\.(cdf|nc)$')
expected 2 blank lines, found 1
def file_time(fname):
'''Return time in netcdf file name as a datetime object
'''
match = ncfname_re.match(fname)
return dt.datetime(*map(int, match.groups()[4:10])) if match else None
expected 2 blank lines, found 1
def file_datastream(fname):
'''return the datstream substring from a filename'''
match = ncfname_re.match(fname)
return ''.join(match.groups()[:4])
expected 2 blank lines, found 1
def store_difference(func):
'''Decorator that causes difference() methods to store and reuse their result.
'''
def difference(self):
if not hasattr(self, '_difference'):
setattr(self, '_difference', func(self))
return self._difference
return difference
expected 2 blank lines, found 1
def json_section(self, contents):
'''Returns a json section object with the specified contents.
'''
sec = {
'type': 'section',
'name': self.name,
'contents': contents
}
if hasattr(self, 'difference'):
sec['difference'] = self.difference()
elif hasattr(self, '_difference'):
sec['difference'] = self._difference
return sec
expected 2 blank lines, found 1
def JEncoder(obj):
''' Defines a few default behaviours when the json encoder doesn't know whaline too long (82 > 79 characters)
t to do
'''
try:
if np.isnan(obj):
return None
elif obj // 1 == obj:
return int(obj)
else:
return float(obj)
except:
try:
return str(obj)
except:
raise TypeError('Object of type {0} with value of {1} is not JSON sline too long (93 > 79 characters)
erializable' the backslash is redundant between brackets
\
continuation line under-indented for visual indent
.format(type(obj), repr(obj)))
expected 2 blank lines, found 1
def shared_times(old_ftimes, new_ftimes):
'''Yeilds time intervals shared by both the old and new files, in order.
Parameters:
old_ftimes list of old file times as TimeInterval objects
new_fties list of new file times as TimeInterval objects
Yeilds:
yeilds the tuple:
beg beginning of the shared time interval
end end of the shared time interval
old_i index of interval in old_ftimes that overlaps this shared inline too long (85 > 79 characters)
terval
new_i index of interval in new_ftimes that overlaps this shared inline too long (85 > 79 characters)
terval
'''
old_itr = iter(enumerate(old_ftimes))
new_itr = iter(enumerate(new_ftimes))
old_i, old_f = next(old_itr, (None, None))
new_i, new_f = next(new_itr, (None, None))
while old_f and new_f:
beg = max(old_f.beg, new_f.beg)
end = min(old_f.end, new_f.end)
if beg < end:
yield beg, end, old_i, new_i
if old_f.end < new_f.end:
old_i, old_f = next(old_itr, (None, None))
elif old_f.end > new_f.end:
new_i, new_f = next(new_itr, (None, None))
else:
old_i, old_f = next(old_itr, (None, None))
new_i, new_f = next(new_itr, (None, None))


I chose to focus on the enumerable method '#map' for this week's blog post. I encountered #map multiple times this week while researching methods to use with arrays and hashes, and decided to dedicate my blog post to it because it is extremely useful when working with enumerables.
The function of #map is to return a new array with the results of running 'block' for every element in enum (it works exactly like the #collect method, only the name is different). #Map seems very simple, but it is very useful if you want to perform some type of work on the elements in enum. It is important to note that .map leaves the original array unchanged, but .map! alters the original array.
The syntax for #map is as follows for arrays: map { |obj| block } → array. For hashes, the syntax is similar, but in that case you have two inputs to work with for your block: map {|k, v| block using k or v}.
Below are some practical use cases for .map. Array = [1, 2, 3, 4] Array.map {|x| x * x} #returns {1, 4, 9, 16} Arr = ["ohio", "florida", "iowa"] Arr.map {|z| z.capitalize #returns ["Ohio", "Florida", "Iowa"] Hash1 = [['bananas', 2], ['oranges', 6]] Hash1.map {|k, v| v.to_s} #returns [['bananas', '2'], ['oranges', '6']] Hash1.map {|k, v| k.capitalize} #returns [['Bananas', 2], ['Oranges', 6]]
As you can see above, .map allows you to perform a function on every element (or just one of a key/value pair in the case of a hash) across an entire enum. The concept of mapping is also helpful when working with other Ruby methods. Take #sort_by, for example (syntax: sort_by { |obj| block } → array). The description of the #sort_by method is as follows: "Sorts enum using a set of keys generated by mapping the values in enum through the given block." What this means is that the #sort_by function is using the same basic premise of #map - it applies the argument in the block position to every element in the enum, only #sort_by goes one step further and returns the resulting array in orderafter it has been sorted.


Easy money transfer in one click
We are providing your transaction details
Send your money easily from anywhere


Resource Type: nis
- Defined in:
- lib/puppet/type/nis.rb
- Providers:
-
nis
Overview
Manage the configuration of the NIS client for Oracle Solaris
Properties
-
domainname
The NIS domainname
-
ensure
(defaults to: present)
The basic property that the resource should be in.
Supported values:- present
- absent
-
securenets
Array of array entries for /var/yp/securenets. Each entry is a string; host entries are in the format '
' network entries are in the format ' / ' ['<IP_ADDRESS>','<IP_ADDRESS>/<IP_ADDRESS>'] -
use_broadcast
Send a broadcast datagram requesting needed bind information for a specific NIS server.
Supported values:- true
- false
-
use_ypsetme
Only allow root on the client to change the binding to a desired server.
Supported values:- true
- false
-
ypservers
The hosts or IP addresses to use as NIS servers. Specify multiple entries as an array
Parameters
-
name (namevar)
The symbolic name for the NIS domain and client settings to use. Name can only be the literal value 'current'
Supported values:- current