Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
# install DSPy: pip install dspy | |
import dspy | |
# Ollam is now compatible with OpenAI APIs | |
# | |
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call. | |
# If you do not include this you will get an error. | |
# | |
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete. | |
# At least with mistral. |
# vim:fileencoding=utf-8:foldmethod=marker | |
# Include theme | |
include ./theme.conf | |
# ===== Config ===== | |
font_family Menlo | |
font_size 15.0 |
import UIKit | |
extension UIViewController { | |
func nxv_addChildViewController(_ childVC: UIViewController, containerView: UIView) { | |
addChild(childVC) | |
containerView.addSubview(childVC.view) | |
containerView.translatesAutoresizingMaskIntoConstraints = false | |
childVC.view.translatesAutoresizingMaskIntoConstraints = false | |
Software development, especially mobile development has been improving rapidly. Nowadays, they are things that are unthinkable as of several years ago.
The world is moving to mobile. And as a (newbie) mobile software/iOS developer, I think there're always many thing for us to learn everyday.
Being able to keep track of what's new in technology today is really difficult, it's daunting, not to say an impossible task; but we can't help but have to keep being updated, unless we want to be left behind.
// reference: https://stackoverflow.com/a/43637969/1477298
While originally I was using Objective-C, I since switched so Swift and the original accepted answer did not suffice.
I ended up creating a UICollectionViewLayout subclass which provides the best (imo) experience as opposed to the other functions which alter content offset or something similar when the user has stopped scrolling.
class SnappingCollectionViewLayout: UICollectionViewFlowLayout {
override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint {
agvtool new-version -all $(TZ="Asia/Ho_Chi_Minh" date +%Y%m%d.%H%M) |
// https://kean.blog/post/swiftui-data-flow | |
struct SearchView: View { | |
@ObservedObject var viewModel: SearchViewModel | |
var body: some View { | |
VStack { | |
TextField("Search", text: $viewModel.query) | |
List(viewModel.songs) { | |
Text($0.name) | |
} |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
# This file contains the fastlane.tools configuration | |
# You can find the documentation at https://docs.fastlane.tools | |
# | |
# For a list of all available actions, check out | |
# | |
# https://docs.fastlane.tools/actions | |
# | |
# Uncomment the line if you want fastlane to automatically update itself | |
# update_fastlane |