index
int64
0
1.03k
original
stringlengths
12
7.84k
translated
stringlengths
11
7.53k
original_reply
stringlengths
15
17.7k
translated_reply
stringlengths
12
11k
0
Can brain cells move? By movement I mean long distance migration (preferably within the brain only).
Beyin hücreleri hareket edebilir mi? Hareketten kastım uzun mesafeli göç (tercihen sadece beyin içinde).
The question is relatively broad and one should take into account that the brain not only consists of neurons, but also glial cells (supportive cells) and pre-mitotic neuronal stem cells. Furthermore, as critical fellow-scientists have indicated, developmental stage is very important, as the developing embryonic brain is very different from the adult brain. However, after sifting through various publications, the answer to the question is actually remarkably simple: Yes, brain cells migrate. In the adult brain glial cells migrate in the brain (Klämbt, 2009). Glial cells are involved in a myriad of functions, but a notable example of migrating glial cells are the oligodendrocytes that migrate relative long distances to find their target axons onto which they wrap themselves to form the insulating myelin sheath (Tsai and Miller, 2002). Neuronal stem cells migrate over long distances in response to injury (Imitola et al., 2004) and they migrate from specific stem-cell locations (e.g., hippocampus and subventricular zone) to other regions (Clarke, 2003). Post-mitotic, but non-differentiated neurons have been shown to migrate in the adult brain in fish (Scott et al., 2012), and in mammals and non-human primates as well (Sawada et al., 2011). Not surprisingly, glial cells, stem cells and neurons also migrate during embryonic development. Most notably, post-mitotic neurons destined to fulfill peripheral functions have to migrate over relatively long distances from the neural crest to their target locations (Neuroscience, 2nd ed, Neuronal Migration).
Soru nispeten geniş ve beynin sadece nöronlardan değil, aynı zamanda glia hücrelerinden (destekleyici hücreler) ve mitoz öncesi nöronal kök hücrelerden oluştuğu dikkate alınmalıdır. Ayrıca, eleştirel meslektaş bilim insanlarının belirttiği gibi, gelişmekte olan embriyonik beyin yetişkin beyinden çok farklı olduğu için gelişimsel aşama çok önemlidir. Ancak, çeşitli yayınlar incelendikten sonra, sorunun cevabı aslında oldukça basittir: Evet, beyin hücreleri göç eder. Yetişkin beyinde glia hücreleri beyinde göç eder (Klämbt, 2009). Glia hücreleri çok sayıda işlevde yer alır, ancak göç eden glia hücrelerinin dikkate değer bir örneği, kendilerini yalıtım miyelin kılıfını oluşturmak için sardıkları hedef aksonlarını bulmak için nispeten uzun mesafeler göç eden oligodendrositlerdir (Tsai ve Miller, 2002). Nöronal kök hücreler, yaralanmaya yanıt olarak uzun mesafeler göç eder (Imitola ve ark., 2004) ve belirli kök hücre konumlarından (örn., hipokampus ve subventriküler bölge) diğer bölgelere göç eder (Clarke, 2003). Mitoz sonrası ancak farklılaşmamış nöronların balıkta (Scott ve ark., 2012) ve memelilerde ve insan olmayan primatlarda da (Sawada ve ark., 2011) yetişkin beyinde göç ettiği gösterilmiştir. Şaşırtıcı olmayan bir şekilde, glia hücreleri, kök hücreler ve nöronlar da embriyonik gelişim sırasında göç eder. En önemlisi, periferik işlevleri yerine getirmeye yönelik mitoz sonrası nöronların nöral kretten hedef konumlarına nispeten uzun mesafeler göç etmesi gerekir (Nörobilim, 2. baskı, Nöronal Göç).
1
In our computer systems lecture we were introduced to the MIPS processor. It was (re)developed over the course of the term and has in fact been quite easy to understand. It uses a RISC design, that is its elementary commands are regularly encoded and there are only few of them in order to keep the wires simple. It was mentioned that CISC follows a different philosophy. I looked briefly at the x86 instruction set and was shocked. I can not image how anyone would want to build a processor that uses so complex a command set! So I figure there have to be good arguments why large portions of the processor market use CISC architectures. What are they?
Bilgisayar sistemleri dersimizde MIPS işlemcisine giriş yaptık. Dönem boyunca (yeniden) geliştirildi ve aslında anlaşılması oldukça kolaydı. Basit komutlarının düzenli olarak kodlandığı ve kabloları basit tutmak için yalnızca birkaç tane olan bir RISC tasarımı kullanır. CISC'in farklı bir felsefe izlediği belirtildi. x86 komut setine kısaca baktım ve şok oldum. Bu kadar karmaşık bir komut seti kullanan bir işlemciyi kimin inşa etmek istediğini hayal edemiyorum! Bu nedenle, işlemci pazarının büyük bir kısmının neden CISC mimarilerini kullandığına dair iyi argümanlar olması gerektiğini düşünüyorum. Bunlar nelerdir?
There is a general historical trend. In the olden days, memories were small, and so programs were perforce small. Also, compilers were not very smart, and many programs were written in assembler, so it was considered a good thing to be able to write a program using few instructions. Instruction pipelines were simple, and processors grabbed one instruction at a time to execute it. The machinery inside the processor was quite complex anyway; decoding instructions was not felt to be much of a burden. In the 1970s, CPU and compiler designers realized that having such complex instructions was not so helpful after all. It was difficult to design processors in which those instructions were really efficient, and it was difficult to design compilers that really took advantage of these instructions. Chip area and compiler complexity was better spent on more generic pursuits such as more general-purpose registers. The Wikipedia article on RISC explains this in more detail. MIPS is the ultimate RISC architecture, which is why it's taught so often. The x86 family is a bit different. It was originally a CISC architecture meant for systems with very small memory (no room for large instructions), and has undergone many successive versions. Today's x86 instruction set is not only complicated because it's CISC, but because it's really a 8088 with a 80386 with a Pentium possibly with an x86_64 processor. In today's world, RISC and CISC are no longer the black-and-white distinction they might have been once. Most CPU architectures have evolved to different shades of grey. On the RISC side, some modern MIPS variants have added multiplication and division instructions, with a non-uniform encoding. ARM processors have become more complex: many of them have a 16-bit instruction set called Thumb in addition to the “original” 32-bit instructions, not to mention Jazelle to execute JVM instructions on the CPU. Modern ARM processors also have SIMD instructions for multimedia applications: some complex instructions do pay after all. On the CISC side, all recent processors are to some extent RISC inside. They have microcode to define all these complex macro instructions. The sheer complexity of the processor makes the design of each model take several years, even with a RISC design, what with the large number of components, with pipelining and predictive execution and whatnot. So why do the fastest processors remain CISC outside? Part of it, in the case of the x86 (32-bit and 64-bit) family, is historical compatibility. But that's not the whole of it. In the early 2000s, Intel tried pushing the Itanium architecture. Itanium is an extreme case of complex instructions (not really CISC, though: its design has been dubbed EPIC). It even does away with the old-fashioned idea of executing instructions in sequence: all instructions are executed in parallel until the next barrier. One of the reasons Itanium didn't take is that nobody, whether at Intel or elsewhere, could write a decent compiler for it. Now a good old mostly-sequential processor like x86_64, that's something we understand.
Genel bir tarihsel eğilim vardır. Eskiden bellekler küçüktü ve bu nedenle programlar da küçük olmak zorundaydı. Ayrıca derleyiciler çok akıllı değildi ve birçok program derleyici dilinde yazılmıştı, bu nedenle birkaç komut kullanarak bir program yazabilmek iyi bir şey olarak kabul ediliyordu. Komut hatları basitti ve işlemciler bir seferde bir komutu alıp yürütüyordu. İşlemcinin içindeki makineler zaten oldukça karmaşıktı; komutların kodunu çözmek çok da büyük bir yük olarak görülmüyordu. 1970'lerde CPU ve derleyici tasarımcıları bu kadar karmaşık komutların o kadar da faydalı olmadığını fark ettiler. Bu komutların gerçekten verimli olduğu işlemcileri tasarlamak zordu ve bu komutlardan gerçekten yararlanan derleyicileri tasarlamak zordu. Çip alanı ve derleyici karmaşıklığı, daha genel amaçlı kayıtlar gibi daha genel amaçlı arayışlara daha iyi harcanıyordu. RISC hakkındaki Wikipedia makalesi bunu daha ayrıntılı bir şekilde açıklıyor. MIPS, çok sık öğretilmesinin nedeni olan nihai RISC mimarisidir. x86 ailesi biraz farklıdır. Başlangıçta çok küçük belleğe sahip sistemler için tasarlanmış bir CISC mimarisiydi (büyük komutlar için yer yoktu) ve birçok ardışık sürümden geçti. Günümüzün x86 komut seti yalnızca CISC olduğu için değil, aynı zamanda bir x86_64 işlemciyle muhtemelen bir Pentium ile bir 80386 ile bir 8088 olduğu için de karmaşıktır. Günümüz dünyasında RISC ve CISC artık bir zamanlar olabilecekleri siyah beyaz ayrım değildir. Çoğu CPU mimarisi farklı gri tonlarına dönüştü. RISC tarafında, bazı modern MIPS varyantları, tekdüze olmayan bir kodlama ile çarpma ve bölme komutları ekledi. ARM işlemcileri daha karmaşık hale geldi: Birçoğunun "orijinal" 32 bitlik komutlara ek olarak Thumb adında 16 bitlik bir komut seti var, CPU'da JVM komutlarını yürütmek için Jazelle'den bahsetmiyorum bile. Modern ARM işlemcilerinde ayrıca multimedya uygulamaları için SIMD komutları vardır: Sonuçta bazı karmaşık komutlar işe yarar. CISC tarafında, tüm yeni işlemciler bir dereceye kadar içeride RISC'tir. Tüm bu karmaşık makro komutları tanımlamak için mikro kodları vardır. İşlemcinin karmaşıklığı, RISC tasarımıyla bile, çok sayıda bileşen, boru hattı ve tahmine dayalı yürütme ve benzeri şeylerle her modelin tasarımının birkaç yıl sürmesine neden olur. Peki en hızlı işlemciler neden dışarıda CISC olmaya devam ediyor? Bunun bir kısmı, x86 (32 bit ve 64 bit) ailesi durumunda, tarihsel uyumluluktur. Ama hepsi bu değil. 2000'lerin başında Intel, Itanium mimarisini zorlamaya çalıştı. Itanium, karmaşık komutların aşırı bir örneğidir (gerçekten CISC değil: tasarımı EPIC olarak adlandırılmıştır). Hatta komutları sırayla yürütme konusundaki eski moda fikrini ortadan kaldırır: tüm komutlar bir sonraki engele kadar paralel olarak yürütülür. Itanium'un tutmamasının nedenlerinden biri, Intel'de veya başka bir yerde hiç kimsenin bunun için düzgün bir derleyici yazamamış olmasıdır. Şimdi x86_64 gibi iyi eski, çoğunlukla sıralı bir işlemci, anladığımız bir şey.
2
View tabular file such as CSV from command line, having horizontal and vertical scrolling would be great.
CSV gibi tablolu dosyaları komut satırından görüntülemek, yatay ve dikey kaydırma özelliği harika olurdu.
Sure, please take a look at csvkit. It provides a set of tools that adhere to the UNIX philosophy (meaning they are small, simple, single-purposed and can be combined). Here is an example that extracts the ten most populated cities in Germany from the free Maxmind World Cities database and displays the result in a console-readable format: ```$ csvgrep -e iso-8859-1 -c 1 -m "de" worldcitiespop | csvgrep -c 5 -r "\d+" | csvsort -r -c 5 -l | csvcut -c 1,2,4,6 | head -n 11 | csvlook ----------------------------------------------------- | line_number | Country | AccentCity | Population | ----------------------------------------------------- | 1 | de | Berlin | 3398362 | | 2 | de | Hamburg | 1733846 | | 3 | de | Munich | 1246133 | | 4 | de | Cologne | 968823 | | 5 | de | Frankfurt | 648034 | | 6 | de | Dortmund | 594255 | | 7 | de | Stuttgart | 591688 | | 8 | de | Düsseldorf | 577139 | | 9 | de | Essen | 576914 | | 10 | de | Bremen | 546429 | ----------------------------------------------------- ``` Csvkit is platform independent because it is written in Python.
Elbette, lütfen csvkit'e göz atın. UNIX felsefesine uyan bir dizi araç sağlar (yani küçük, basit, tek amaçlıdır ve birleştirilebilirler). İşte Almanya'daki en kalabalık on şehri ücretsiz Maxmind Dünya Şehirleri veritabanından çıkaran ve sonucu konsolda okunabilir bir biçimde görüntüleyen bir örnek: ```$ csvgrep -e iso-8859-1 -c 1 -m "de" worldcitiespop | csvgrep -c 5 -r "\d+" | csvsort -r -c 5 -l | csvcut -c 1,2,4,6 | head -n 11 | csvlook ----------------------------------------------------- | satır_numarası | Ülke | AccentCity | Nüfus | ----------------------------------------------------- | 1 | de | Berlin | 3398362 | | 2 | de | Hamburg | 1733846 | | 3 | de | Munich | 1246133 | | 4 | de | Cologne | 968823 | | 5 | de | Frankfurt | 648034 | | 6 | de | Dortmund | 594255 | | 7 | de | Stuttgart | 591688 | | 8 | de | Düsseldorf | 577139 | | 9 | de | Essen | 576914 | | 10 | de | Bremen | 546429 | ----------------------------------------------------- ``` Csvkit, Python ile yazıldığı için platformdan bağımsızdır.
3
Slater type orbitals (STO) are considered to be more accurate than gaussian type orbitals (GTO) for atomic and molecular QM calculations because - among other reasons - they decay with $e^{-\alpha r}$ as $r \to \infty$. But GTOs are more popular because they are easier to calculate with. GTOs decay with $e^{-\alpha r^2}$, so its adequate to sometimes add diffuse functions to the GTO basis set to compensate for gaussian decay behaviour. Also, exact hydrogen wavefunctions decay exponentially, so the motivation for STOs. I understand that the only boundary requirement for solving the Schrödinger equation for atoms and molecules in free space is that the wavefunction goes zero as $r \to \infty$, but there are no a priori requirements for the way it decays as it does so. My question is: do we have theoretical (ab initio) and/or experimental reasons to believe that all atomic and molecular wavefunctions decay like $e^{-\alpha r}$ as $r \to \infty$.
Slater tipi orbitallerinin (STO), atomik ve moleküler QM hesaplamaları için Gauss tipi orbitallerden (GTO) daha doğru olduğu düşünülür çünkü -diğer nedenlerin yanı sıra- $r \to \infty$ iken $e^{-\alpha r}$ ile azalırlar. Ancak GTO'lar hesaplanması daha kolay olduğu için daha popülerdir. GTO'lar $e^{-\alpha r^2}$ ile azalır, bu nedenle Gauss azalma davranışını telafi etmek için GTO baz setine bazen dağınık fonksiyonlar eklemek yeterlidir. Ayrıca, kesin hidrojen dalga fonksiyonları üstel olarak azalır, bu nedenle STO'lar için motivasyon. Serbest uzaydaki atomlar ve moleküller için Schrödinger denklemini çözmek için tek sınır koşulunun dalga fonksiyonunun $r \to \infty$ iken sıfıra gitmesi olduğunu anlıyorum, ancak bu şekilde azalması için önceden belirlenmiş bir koşul yoktur. Soru şu: Tüm atomik ve moleküler dalga fonksiyonlarının $r \to \infty$ iken $e^{-\alpha r}$ gibi azaldığına inanmak için teorik (ab initio) ve/veya deneysel nedenlerimiz var mı?
I'll answer this question from the theoretical side. The exponential behavior follows simply from the Schrödinger equation. Consider the one-electron Schrödinger equation: $$ (-\frac{1}{2}\nabla^2 + V(\mathbf{r}))\psi(\mathbf{r}) = \epsilon\psi(\mathbf{r}), \epsilon < 0 $$ At spatial points that are very far away from the nucleus, $V(\mathbf{r})\approx 0$, so that the asymptotic solution is given by $$ -\frac{1}{2}\nabla^2\psi(\mathbf{r}) = \epsilon\psi(\mathbf{r}), \epsilon < 0 $$ This differential equation has basic solutions of the form $$ \psi(\mathbf{r}) = Ce^{-\sqrt{-2\epsilon}\mathbf{k}\cdot\mathbf{r}} $$ for some unit vector $\mathbf{k}$. The real asymptotic behavior of $\psi(\mathbf{r})$ is thus a linear combination of these basic solutions. The linear combination may bring a polynomial prefactor to the exponential, but will never alter the exponent. Thus we have not only proved the exponential behavior, but also derived the correct exponent $\alpha = \sqrt{-2\epsilon}$. For a multi-electronic, non-interacting system, the overall decay rate is governed by the slowest decaying orbital, i.e. the HOMO. Of course, the real wavefunction can only be described by a multi-electron Schrödinger equation. But we can work on the equivalent Kohn-Sham system and show that the Kohn-Sham wavefunction decays at a rate given by the Kohn-Sham HOMO energy. By Janak's theorem, the Kohn-Sham HOMO energy is just the negative of the ionization potential of the exact system. To see this, consider a huge ensemble of $N$ identical, non-interacting molecules. If we remove one electron from the ensemble and let the hole delocalize evenly between all the molecules, then as $N\to +\infty$, the electron removal has a negligible impact on the electron density of any molecule (and therefore the Kohn-Sham potential of each molecule). Therefore under the Kohn-Sham framework we see that removing such an electron costs an energy of $-\epsilon_{\mathrm{HOMO}}$ (it does not matter whether the HOMO refers to that of the ensemble or that of a molecule, since their orbital energies are equal), since the electron is taken from an energy level whose energy is $\epsilon_{\mathrm{HOMO}}$ and the Hamiltonian is not changed in this process. On the other hand, from the perspective of the real system it is clear that the energy cost is equal to the first ionization energy of one of the molecules, $I$. Therefore we have $\epsilon_{\mathrm{HOMO}} = -I$, which means that the Kohn-Sham wavefunction decays like (again up to a possible polynomial prefactor; the precise determination of this polynomial prefactor is a much more difficult question) $$ \psi(\mathbf{r}) = Ce^{-\sqrt{2I}\mathbf{k}\cdot\mathbf{r}} $$ Although the Kohn-Sham wavefunction is fictional, its density is equal to the true multielectronic density, and in order for the true density to have the same asymptotic behavior as the Kohn-Sham density, the true wavefunction must have the same asymptotic behavior as the Kohn-Sham wavefunction. Q.E.D.
Bu soruyu teorik açıdan cevaplayacağım. Üstel davranış Schrödinger denkleminin basit bir sonucudur. Tek elektronlu Schrödinger denklemini ele alalım: $$ (-\frac{1}{2}\nabla^2 + V(\mathbf{r}))\psi(\mathbf{r}) = \epsilon\psi(\mathbf{r}), \epsilon < 0 $$ Çekirdekten çok uzaktaki uzaysal noktalarda, $V(\mathbf{r})\approx 0$ olur, böylece asimptotik çözüm şu şekilde verilir: $$ -\frac{1}{2}\nabla^2\psi(\mathbf{r}) = \epsilon\psi(\mathbf{r}), \epsilon < 0 $$ Bu diferansiyel denklemin şu formda temel çözümleri vardır: $$ \psi(\mathbf{r}) = Ce^{-\sqrt{-2\epsilon}\mathbf{k}\cdot\mathbf{r}} $$ Burada $\mathbf{k}$ birim vektördür. $\psi(\mathbf{r})$'nin gerçek asimptotik davranışı bu temel çözümlerin doğrusal birleşimidir. Doğrusal birleşim üstele polinom ön ek getirebilir ancak üste hiçbir zaman etki etmez. Bu nedenle sadece üstel davranışı kanıtlamakla kalmadık, aynı zamanda doğru üs $\alpha = \sqrt{-2\epsilon}$'yi de türettik. Çok elektronlu, etkileşimsiz bir sistem için genel bozunma hızı en yavaş bozunan orbital, yani HOMO tarafından yönetilir. Elbette gerçek dalga fonksiyonu yalnızca çok elektronlu bir Schrödinger denklemiyle tanımlanabilir. Ancak eşdeğer Kohn-Sham sistemi üzerinde çalışabilir ve Kohn-Sham dalga fonksiyonunun Kohn-Sham HOMO enerjisiyle verilen bir oranda bozunduğunu gösterebiliriz. Janak'ın teoremine göre, Kohn-Sham HOMO enerjisi tam sistemin iyonlaşma potansiyelinin negatifidir. Bunu görmek için $N$ özdeş, etkileşimsiz molekülün büyük bir topluluğunu ele alalım. Topluluktan bir elektronu çıkarırsak ve deliğin tüm moleküller arasında eşit şekilde dağılmasına izin verirsek, $N\to +\infty$ olduğunda, elektronun çıkarılması herhangi bir molekülün elektron yoğunluğu üzerinde ihmal edilebilir bir etkiye sahiptir (ve bu nedenle her molekülün Kohn-Sham potansiyeli). Bu nedenle Kohn-Sham çerçevesi altında, böyle bir elektronun çıkarılmasının $-\epsilon_{\mathrm{HOMO}}$ enerjisine mal olduğunu görürüz (HOMO'nun topluluğun HOMO'suna mı yoksa bir molekülün HOMO'suna mı atıfta bulunduğu önemli değildir, çünkü yörünge enerjileri eşittir), çünkü elektron, enerjisi $\epsilon_{\mathrm{HOMO}}$ olan bir enerji seviyesinden alınır ve Hamiltonyen bu işlemde değiştirilmez. Öte yandan, gerçek sistemin perspektifinden, enerji maliyetinin moleküllerden birinin ilk iyonlaşma enerjisine, $I$ eşit olduğu açıktır. Bu nedenle $\epsilon_{\mathrm{HOMO}} = -I$ olur, bu da Kohn-Sham dalga fonksiyonunun şu şekilde bozunduğu anlamına gelir (yine olası bir polinom ön ekine kadar; bu polinom ön ekinin kesin olarak belirlenmesi çok daha zor bir sorudur): $$ \psi(\mathbf{r}) = Ce^{-\sqrt{2I}\mathbf{k}\cdot\mathbf{r}} $$ Kohn-Sham dalga fonksiyonu kurgusal olsa da, yoğunluğu gerçek çok elektronlu yoğunluğa eşittir ve gerçek yoğunluğun Kohn-Sham yoğunluğu ile aynı asimptotik davranışa sahip olması için gerçek dalga fonksiyonunun Kohn-Sham dalga fonksiyonu ile aynı asimptotik davranışa sahip olması gerekir. Q.E.D.
4
Explain what "git reset" does. I come from a SVN background and Git is a whole new paradigm. I got mercurial easily, but Git is much more technical. I think ```git reset``` is close to ```hg revert```, but it seems there are differences. Please include detailed explanations about: * the options ```--hard```, ```--soft``` and ```--merge```; * the strange notation you use with ```HEAD``` such as ```HEAD^``` and ```HEAD~1```; * concrete use cases and work flows; * consequences on the working copy, the ```HEAD``` and your global stress level.
"git reset"in ne yaptığını açıklayın. SVN geçmişinden geliyorum ve Git tamamen yeni bir paradigmadır. Mercurial'ı kolayca anladım ancak Git çok daha teknik. ```git reset```in ```hg revert```e yakın olduğunu düşünüyorum ancak aralarında farklar varmış gibi görünüyor. Lütfen aşağıdakiler hakkında ayrıntılı açıklamalar ekleyin: * ```--hard```, ```--soft``` ve ```--merge``` seçenekleri; * ```HEAD^``` ve ```HEAD~1``` gibi ```HEAD``` ile kullandığınız garip gösterim; * somut kullanım durumları ve iş akışları; * çalışma kopyası, ```HEAD``` ve genel stres seviyeniz üzerindeki sonuçlar.
Remember that in ```git``` you have: * the ```HEAD``` pointer, which tells you what commit you're working on * the working tree, which represents the state of the files on your system * the staging area (also called the index), which "stages" changes so that they can later be committed together > Please include detailed explanations about: ```--hard```, ```--soft``` and ```--merge```; In increasing order of dangerous-ness: * ```--soft``` moves ```HEAD``` but doesn't touch the staging area or the working tree. * ```--mixed``` moves ```HEAD``` and updates the staging area, but not the working tree. * ```--merge``` moves ```HEAD```, resets the staging area, and tries to move all the changes in your working tree into the new working tree. * ```--hard``` moves ```HEAD``` and adjusts your staging area and working tree to the new ```HEAD```, throwing away everything. > concrete use cases and workflows; * Use ```--soft``` when you want to move to another commit and patch things up without "losing your place". It's pretty rare that you need this. ``` # git reset --soft example touch foo // Add a file, make some changes. git add foo // git commit -m "bad commit message" // Commit... D'oh, that was a mistake! git reset --soft HEAD^ // Go back one commit and fix things. git commit -m "good commit" // There, now it's right. ``` -- * Use ```--mixed``` (which is the default) when you want to see what things look like at another commit, but you don't want to lose any changes you already have. * Use ```--merge``` when you want to move to a new spot but incorporate the changes you already have into that the working tree. * Use ```--hard``` to wipe everything out and start a fresh slate at the new commit.
```git```'te şunlara sahip olduğunuzu unutmayın: * Hangi komit üzerinde çalıştığınızı söyleyen ```HEAD``` işaretçisi * Sisteminizdeki dosyaların durumunu temsil eden çalışma ağacı * Değişiklikleri daha sonra birlikte komitlenebilmeleri için "hazırlayan" hazırlama alanı (aynı zamanda dizin olarak da adlandırılır) > Lütfen ```--hard```, ```--soft``` ve ```--merge``` hakkında ayrıntılı açıklamalar ekleyin; Tehlikelilik sırasına göre artan şekilde: * ```--soft``` ```HEAD```'i hareket ettirir ancak hazırlama alanına veya çalışma ağacına dokunmaz. * ```--mixed``` ```HEAD```'i hareket ettirir ve hazırlama alanını günceller, ancak çalışma ağacını güncellemez. * ```--merge``` ```HEAD```'i hareket ettirir, hazırlama alanını sıfırlar ve çalışma ağacınızdaki tüm değişiklikleri yeni çalışma ağacına taşımaya çalışır. * ```--hard``` ```HEAD```'i hareket ettirir ve hazırlama alanınızı ve çalışma ağacınızı yeni ```HEAD```'e göre ayarlar ve her şeyi atar. > Somut kullanım durumları ve iş akışları; * "Yerini kaybetmeden" başka bir komite geçmek ve şeyleri düzeltmek istediğinizde ```--soft``` kullanın. Buna ihtiyacınız olması oldukça nadirdir. ``` # git reset --soft example touch foo // Bir dosya ekleyin, bazı değişiklikler yapın. git add foo // git commit -m "bad commit message" // Komit edin... D'oh, bu bir hataydı! git reset --soft HEAD^ // Bir komit geri dönün ve şeyleri düzeltin. git commit -m "good commit" // İşte, şimdi doğru. ``` -- * Başka bir komitteki şeylerin nasıl göründüğünü görmek istediğinizde ancak halihazırda yaptığınız değişiklikleri kaybetmek istemediğinizde ```--mixed```'i (varsayılan olan) kullanın. * Yeni bir noktaya geçmek ancak halihazırda yaptığınız değişiklikleri çalışma ağacına dahil etmek istediğinizde ```--merge```'i kullanın. * Her şeyi silmek ve yeni komitte yeni bir sayfa açmak için ```--hard```'ı kullanın.
5
I am looking to use Java to get the MD5 checksum of a file. How is it done?
Bir dosyanın MD5 kontrol toplamını almak için Java kullanmak istiyorum. Bu nasıl yapılır?
The com.google.common.hash API offers: * A unified user-friendly API for all hash functions * Seedable 32- and 128-bit implementations of murmur3 * md5(), sha1(), sha256(), sha512() adapters, change only one line of code to switch between these, and murmur. * goodFastHash(int bits), for when you don't care what algorithm you use * General utilities for HashCode instances, like combineOrdered / combineUnordered Read the User Guide (IO Explained, Hashing Explained). For your use-case ```Files.hash()``` computes and returns the digest value for a file. For example a sha-1 digest calculation (change SHA-1 to MD5 to get MD5 digest) ```HashCode hc = Files.asByteSource(file).hash(Hashing.sha1()); "SHA-1: " + hc.toString(); ``` Note that crc32 is much faster than md5, so use crc32 if you do not need a cryptographically secure checksum. Note also that md5 should not be used to store passwords and the like since it is to easy to brute force, for passwords use bcrypt, scrypt or sha-256 instead. For long term protection with hashes a Merkle signature scheme adds to the security and The Post Quantum Cryptography Study Group sponsored by the European Commission has recommended use of this cryptography for long term protection against quantum computers (ref). Note that crc32 has a higher collision rate than the others. What part of Files.hash as stated above does not cover Files.hash ?
com.google.common.hash API'si şunları sunar: * Tüm karma işlevleri için birleştirilmiş kullanıcı dostu bir API * murmur3'ün 32 ve 128 bitlik ekilebilir uygulamaları * md5(), sha1(), sha256(), sha512() bağdaştırıcıları, bunlar arasında geçiş yapmak için yalnızca bir kod satırını değiştirin ve murmur. * hangi algoritmayı kullandığınızı önemsemediğiniz zamanlar için goodFastHash(int bit) * combineOrdered / combineUnordered gibi HashCode örnekleri için genel yardımcı programlar Kullanım Kılavuzunu (IO Açıklaması, Karma Açıklaması) okuyun. Kullanım durumunuz için ```Files.hash()``` bir dosyanın özet değerini hesaplar ve döndürür. Örneğin bir sha-1 özet hesaplaması (MD5 özeti almak için SHA-1'i MD5 olarak değiştirin) ```HashCode hc = Files.asByteSource(file).hash(Hashing.sha1()); "SHA-1: " + hc.toString(); ``` crc32'nin md5'ten çok daha hızlı olduğunu unutmayın, bu nedenle kriptografik olarak güvenli bir toplam kontrolüne ihtiyacınız yoksa crc32'yi kullanın. Ayrıca md5'in kaba kuvvet uygulamasının kolay olması nedeniyle parola ve benzerlerini depolamak için kullanılmaması gerektiğini, bunun yerine parolalar için bcrypt, scrypt veya sha-256 kullanılması gerektiğini unutmayın. Uzun vadeli koruma için karma işlevlerle bir Merkle imza şeması güvenliği artırır ve Avrupa Komisyonu tarafından desteklenen Post Kuantum Kriptografi Çalışma Grubu, kuantum bilgisayarlara karşı uzun vadeli koruma için bu kriptografinin kullanılmasını önermiştir (ref). crc32'nin diğerlerine göre daha yüksek bir çakışma oranına sahip olduğunu unutmayın. Yukarıda belirtildiği gibi Files.hash'in hangi kısmı Files.hash'i kapsamaz?
6
What are the primary objections Democrats have to a border wall?
Demokratların sınır duvarına yönelik temel itirazları nelerdir?
It's not clear to me that Democrats are opposed to border-wall construction (your one source suggests they are fine with border walls/fences where necessary), so much as they opposed to some of the plans for full-border walls that have been put forth so far. Recently, in response to reports that the spending bill would include funding for a border wall, 5 Democratic senators released a letter voicing concerns over the cost, the effectiveness, and the legal issues of constructing it. We are also concerned with reports that there may be an effort to include funding for a very expensive new wall along the southern border with Mexico and a “deportation force.” According to non-partisan experts, the proposed new border wall could cost as much as $25 million per mile and raises considerable issues that have not been resolved by the Congress or the Department of Homeland Security. First, many experts believe that such a border wall will not work. Second, there is real concern that the Administration, put simply, has no plan to build the border wall. For example, the Administration has not detailed how to 1) use eminent domain and other procedures to acquire land from private landowners and Native American tribes, 2) design the wall, 3) locate the wall, 4) construct the wall, and 5) require Mexico to pay for the wall given the President’s clear and repeated promises that he would force Mexico to do so. Finally, there are objections to the construction of a wall from Democratic and Republican members of Congress that represent border states. Given these and other concerns, we believe it would be inappropriate to insist on the inclusion of such funding in a must-pass appropriations bill that is needed for the Republican majority in control of the Congress to avert a government shutdown so early in President Trump’s Administration. [...] Senator Charles Schumer Senator Richard Durbin Senator Patty Murray Senator Debbie Stabenow Senator Patrick Leahy Based on this letter, it appears their main objections to a full border wall are currently the cost-benefit ratio and the legal issues of taking land from Americans to build it on; objections that may not be unique to Democrats.
Demokratların sınır duvarı inşasına karşı oldukları bana açık değil (tek kaynağınız, gerektiğinde sınır duvarları/çitleri konusunda sorunları olmadığını öne sürüyor), şimdiye kadar ortaya atılan tam sınır duvarı planlarından bazılarını karşı çıkıyorlar. Yakın zamanda, harcama tasarısının bir sınır duvarı için finansman içereceğine dair haberlere yanıt olarak, 5 Demokrat senatör, maliyet, etkinlik ve inşaatının yasal sorunları konusunda endişelerini dile getiren bir mektup yayınladı. Ayrıca, Meksika ile güney sınırına çok pahalı yeni bir duvar ve bir "sınır dışı etme gücü" için finansman sağlama çabası olabileceğine dair haberlerden de endişe duyuyoruz. Tarafsız uzmanlara göre, önerilen yeni sınır duvarı mil başına 25 milyon dolara mal olabilir ve Kongre veya İç Güvenlik Bakanlığı tarafından çözülmemiş önemli sorunları gündeme getiriyor. Birincisi, birçok uzman böyle bir sınır duvarının işe yaramayacağına inanıyor. İkincisi, İdare'nin basitçe sınır duvarını inşa etmek için bir planı olmadığı konusunda gerçek bir endişe var. Örneğin, İdare, 1) özel toprak sahiplerinden ve Kızılderili kabilelerinden arazi edinmek için eminent domain ve diğer prosedürleri nasıl kullanacağını, 2) duvarı nasıl tasarlayacağını, 3) duvarı nasıl konumlandıracağını, 4) duvarı nasıl inşa edeceğini ve 5) Meksika'yı Başkan'ın Meksika'yı bunu yapmaya zorlayacağına dair açık ve tekrarlanan vaatleri göz önüne alındığında duvarın bedelini ödemeye nasıl zorlayacağını detaylandırmadı. Son olarak, sınır eyaletlerini temsil eden Demokrat ve Cumhuriyetçi Kongre üyelerinin duvarın inşasına itirazları var. Bu ve diğer endişeler göz önüne alındığında, Başkan Trump'ın İdaresi'nin başlarında bir hükümet kapanmasını önlemek için Kongre'nin kontrolündeki Cumhuriyetçi çoğunluğun ihtiyaç duyduğu, mutlaka kabul edilmesi gereken bir ödenek tasarısına böyle bir finansmanın dahil edilmesinde ısrar etmenin uygunsuz olacağına inanıyoruz. [...] Senatör Charles Schumer Senatör Richard Durbin Senatör Patty Murray Senatör Debbie Stabenow Senatör Patrick Leahy Bu mektuba dayanarak, tam bir sınır duvarına yönelik temel itirazlarının şu anda maliyet-fayda oranı ve onu inşa etmek için Amerikalılardan arazi alma konusundaki yasal sorunlar olduğu anlaşılıyor; bu itirazlar Demokratlara özgü olmayabilir.
7
I'm converting a video to GIF file with ```ffmpeg```: ```ffmpeg \ -i input.flv \ -ss 00:00:00.000 \ -pix_fmt rgb24 \ -r 10 \ -s 320x240 \ -t 00:00:10.000 \ output.gif ``` It works great, but output gif file has a very low quality. Any ideas how can I improve quality of converted gif?
Bir videoyu ```ffmpeg``` ile GIF dosyasına dönüştürüyorum: ```ffmpeg \ -i input.flv \ -ss 00:00:00.000 \ -pix_fmt rgb24 \ -r 10 \ -s 320x240 \ -t 00:00:10.000 \ output.gif ``` Harika çalışıyor, ancak çıktı gif dosyasının kalitesi çok düşük. Dönüştürülen gif'in kalitesini nasıl iyileştirebileceğime dair herhangi bir fikriniz var mı?
If you would prefer to avoid intermediate image files, the commands provided by LordNeckBeard can be piped between ```ffmpeg``` and ImageMagick's ```convert``` so that no intermediate files are required: ```ffmpeg -i input.flv -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - output.gif ``` The ```-f image2pipe``` tells ffmpeg to split the video into images and make it suitable to be piped out, and ```-vcodec ppm``` specifies the output format to be ppm (for some reason if the format is png, either ```convert``` does not read all the images from the pipe, or ffmpeg does not output them all). The ```-``` for both commands specifies that a pipe will be used for output and input respectively. To optimize the result without saving a file, you can pipe the output from ```convert``` to a second ```convert``` command: ```ffmpeg -i input.flv -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - gif:- | convert -layers Optimize - output.gif ``` The ```gif:-``` tells ```convert``` to pipe its output as gif formatted data and ```-layers Optimize``` tells the second ```convert``` to perform ```optimize-frame``` and ```optimize-transparancy``` methods (see the ImageMagick Introduction to Animation Optimization). Note that the output from the ```-layers Optimize``` may not always provide a smaller file size, so you may want to try converting to a gif without optimization first to be sure. Remember that during this whole process everything is in memory so you may need sufficient memory if the images are quite large.
Ara görüntü dosyalarından kaçınmayı tercih ederseniz, LordNeckBeard tarafından sağlanan komutlar, ara dosyalara gerek kalmayacak şekilde ```ffmpeg``` ve ImageMagick'in ```convert``` komutları arasında yönlendirilebilir: ```ffmpeg -i input.flv -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - output.gif ``` ```-f image2pipe```, ffmpeg'e videoyu görüntülere bölmesini ve yönlendirilmeye uygun hale getirmesini söyler ve ```-vcodec ppm```, çıktı biçimini ppm olarak belirtir (nedense biçim png ise, ```convert``` ya borudaki tüm görüntüleri okumaz ya da ffmpeg hepsini çıktı olarak vermez). Her iki komut için de ```-```, sırasıyla çıktı ve girdi için bir boru kullanılacağını belirtir. Sonucu bir dosya kaydetmeden optimize etmek için, ```convert```'ten gelen çıktıyı ikinci bir ```convert``` komutuna yönlendirebilirsiniz: ```ffmpeg -i input.flv -vf scale=320:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 10 -loop 0 - gif:- | convert -layers Optimize - output.gif ``` ```gif:-```, ```convert```'e çıktısını gif biçimli veri olarak yönlendirmesini söyler ve ```-layers Optimize```, ikinci ```convert```'e ```optimize-frame``` ve ```optimize-transparancy``` yöntemlerini gerçekleştirmesini söyler (ImageMagick Animasyon Optimizasyonuna Giriş bölümüne bakın). ```-layers Optimize```'dan gelen çıktının her zaman daha küçük bir dosya boyutu sağlamayabileceğini unutmayın, bu nedenle emin olmak için önce optimizasyon olmadan bir gif'e dönüştürmeyi denemek isteyebilirsiniz. Tüm bu süreç boyunca her şeyin bellekte olduğunu ve görüntüler oldukça büyükse yeterli belleğe ihtiyacınız olabileceğini unutmayın.
8
Tor can only handle TCP connections, but DNS is a UDP protocol. How does Tor route DNS requests over its TCP based network? Why can the same approach not be used to route all UDP traffic over Tor?
Tor yalnızca TCP bağlantılarını işleyebilir, ancak DNS bir UDP protokolüdür. Tor, DNS isteklerini TCP tabanlı ağı üzerinden nasıl yönlendirir? Aynı yaklaşım neden tüm UDP trafiğini Tor üzerinden yönlendirmek için kullanılamaz?
Tor clients do not, in general, directly do DNS requests. When you open a connection through the tor network you usually ask your client (on its socks ports) to connect you to a hostname and port, say www.example.com:80. Your tor client, once it has created a circuit, will send that hostname and port to the exit node in its RELAY_BEGIN cell. The exit node will then do a DNS resolve and open a TCP connection to the target. Once that's established it will tell your client that the connection is open, and for informational purposes will also tell your client what address that hostname resolved to. Tor, in addition to that, has some sort of "remote DNS resolve" protocol built in. This support allows clients to query for certain resource types, like IPv4 or IPv6 addresses. Here too, the exit node does the actual DNS packet sending and receiving and just relays the answer to the client. No UDP packets are actually ever routed from the client. There's also a proposal to add more full featured DNS support to Tor. So far it hasn't been implemented. Tor Protocol Specification references * 6.2. Opening streams and transferring data * 6.4. Remote hostname lookup * Proposal 219 - Support for full DNS and DNSSEC resolution in Tor
Tor istemcileri genel olarak doğrudan DNS istekleri yapmaz. Tor ağı üzerinden bir bağlantı açtığınızda genellikle istemcinizden (socks portlarında) sizi bir ana makine adına ve porta bağlamasını istersiniz, örneğin www.example.com:80. Tor istemciniz bir devre oluşturduktan sonra bu ana makine adını ve portu çıkış düğümüne RELAY_BEGIN hücresinde gönderir. Çıkış düğümü daha sonra bir DNS çözümlemesi yapar ve hedefe bir TCP bağlantısı açar. Bu bağlantı kurulduktan sonra istemcinize bağlantının açık olduğunu söyler ve bilgi amaçlı olarak istemcinize bu ana makine adının çözümlendiği adresi de söyler. Tor, buna ek olarak, dahili olarak bir tür "uzaktan DNS çözümleme" protokolüne sahiptir. Bu destek, istemcilerin IPv4 veya IPv6 adresleri gibi belirli kaynak türlerini sorgulamasına olanak tanır. Burada da çıkış düğümü gerçek DNS paketini gönderme ve alma işlemini yapar ve yalnızca yanıtı istemciye iletir. Hiçbir UDP paketi aslında istemciden yönlendirilmez. Tor'a daha fazla tam özellikli DNS desteği ekleme önerisi de var. Şimdiye kadar uygulanmadı. Tor Protokolü Spesifikasyonu referansları * 6.2. Akışları açma ve veri aktarma * 6.4. Uzak ana makine adı araması * Öneri 219 - Tor'da tam DNS ve DNSSEC çözümlemesi desteği
9
Why does this throw ```NullPointerException``` ```public static void main(String[] args) throws Exception { Boolean b = true ? returnsNull() : false; // NPE on this line. System.out.println(b); } public static Boolean returnsNull() { return null; } ``` while this doesn't ```public static void main(String[] args) throws Exception { Boolean b = true ? null : false; System.out.println(b); // null } ``` ? The solution is by the way to replace ```false``` by ```Boolean.FALSE``` to avoid ```null``` being unboxed to ```boolean``` --which isn't possible. But that isn't the question. The question is why? Are there any references in JLS which confirms this behaviour, especially of the 2nd case?
Bu neden ```NullPointerException``` fırlatıyor? ```public static void main(String[] args) throws Exception { Boolean b = true ? returnsNull() : false; // Bu satırda NPE. System.out.println(b); } public static Boolean returnsNull() { return null; } ``` bu yapmazken ```public static void main(String[] args) throws Exception { Boolean b = true ? null : false; System.out.println(b); // null } ``` ? Çözüm, ```null```'un ```boolean```'e dönüştürülmesini önlemek için ```false```'u ```Boolean.FALSE``` ile değiştirmektir --ki bu mümkün değildir. Ama soru bu değil. Soru neden? Bu davranışı, özellikle 2. durum için doğrulayan JLS'de herhangi bir referans var mı?
The difference is that the explicit type of the ```returnsNull()``` method affects the static typing of the expressions at compile time: ```E1: `true ? returnsNull() : false` - boolean (auto-unboxing 2nd operand to boolean) E2: `true ? null : false` - Boolean (autoboxing of 3rd operand to Boolean) ``` See Java Language Specification, section 15.25 Conditional Operator ? : * For E1, the types of the 2nd and 3rd operands are ```Boolean``` and ```boolean``` respectively, so this clause applies: If one of the second and third operands is of type boolean and the type of the other is of type Boolean, then the type of the conditional expression is boolean. Since the type of the expression is ```boolean```, the 2nd operand must be coerced to ```boolean```. The compiler inserts auto-unboxing code to the 2nd operand (return value of ```returnsNull()```) to make it type ```boolean```. This of course causes the NPE from the ```null``` returned at run-time. * For E2, types of the 2nd and 3rd operands are `````` (not ```Boolean``` as in E1!) and ```boolean``` respectively, so no specific typing clause applies (go read 'em!), so the final "otherwise" clause applies: Otherwise, the second and third operands are of types S1 and S2 respectively. Let T1 be the type that results from applying boxing conversion to S1, and let T2 be the type that results from applying boxing conversion to S2. The type of the conditional expression is the result of applying capture conversion (§5.1.10) to lub(T1, T2) (§15.12.2.7). * S1 == `````` (see §4.1) * S2 == ```boolean``` * T1 == box(S1) == `````` (see last item in list of boxing conversions in §5.1.7) * T2 == box(S2) == `Boolean * lub(T1, T2) == ```Boolean``` So the type of the conditional expression is ```Boolean``` and the 3rd operand must be coerced to ```Boolean```. The compiler inserts auto-boxing code for the 3rd operand (```false```). The 2nd operand doesn't need the auto-unboxing as in ```E1```, so no auto-unboxing NPE when ```null``` is returned. This question needs a similar type analysis: Java conditional operator ?: result type
Fark, ```returnsNull()``` yönteminin açık türünün derleme zamanında ifadelerin statik yazımını etkilemesidir: ```E1: `true ? returnsNull() : false` - boolean (2. işlenen otomatik olarak boolean'a dönüştürülür) E2: `true ? null : false` - Boolean (3. işlenen otomatik olarak Boolean'a dönüştürülür) ``` Java Dil Spesifikasyonuna, 15.25 Koşullu İşleç ? : bölümüne bakın: * E1 için 2. ve 3. işlenenlerin türleri sırasıyla ```Boolean``` ve ```boolean```'dır, bu nedenle şu madde uygulanır: İkinci ve üçüncü işlenenlerden biri boolean türündeyse ve diğerinin türü Boolean türündeyse, koşullu ifadenin türü boolean'dır. İfadenin türü ```boolean``` olduğundan, 2. işlenen ```boolean```'a dönüştürülmelidir. Derleyici, 2. işlenen (```returnsNull()```'un dönüş değeri) ```boolean``` türünde yapmak için otomatik dönüştürme kodu ekler. Bu elbette çalışma zamanında döndürülen ```null```'dan NPE'ye neden olur. * E2 için 2. ve 3. işlenenlerin türleri sırasıyla `````` (E1'deki gibi ```Boolean``` değil!) ve ```boolean```'dır, bu nedenle belirli bir yazım maddesi uygulanmaz (gidip okuyun!), bu nedenle son "aksi takdirde" maddesi uygulanır: Aksi takdirde, ikinci ve üçüncü işlenenler sırasıyla S1 ve S2 türündedir. T1, S1'e kutulama dönüşümü uygulanarak elde edilen tür olsun ve T2, S2'ye kutulama dönüşümü uygulanarak elde edilen tür olsun. Koşullu ifadenin türü, lub(T1, T2) (§15.12.2.7) üzerine yakalama dönüşümü (§5.1.10) uygulanarak elde edilen sonuçtur. * S1 == `````` (bkz. §4.1) * S2 == ```boolean``` * T1 == box(S1) == `````` (bkz. §5.1.7'deki kutulama dönüşümlerinin listesindeki son öğe) * T2 == box(S2) == `Boolean * lub(T1, T2) == ```Boolean``` Bu nedenle koşullu ifadenin türü ```Boolean```'dır ve 3. işlenen ```Boolean```'a dönüştürülmelidir. Derleyici, 3. işlenen (```false```) için otomatik kutulama kodu ekler. 2. işlenen, ```E1```'deki gibi otomatik dönüştürmeye ihtiyaç duymaz, bu nedenle ```null``` döndürüldüğünde otomatik dönüştürme NPE'si olmaz. Bu soru benzer bir tür analizi gerektirir: Java koşullu işleç ?: sonuç türü
10
How do DOS games like DOOM benefit from a PCI graphics card?
DOOM gibi DOS oyunları bir PCI grafik kartından nasıl faydalanır?
DOOM itself doesn’t do anything special to benefit from PCI graphics cards. It runs faster with PCI graphics cards (and VLB, AGP, and PCI Express cards) than with ISA graphics cards because the supporting bus is faster, so reads from and writes to video memory take less time. PCI goes to great lengths to preserve backwards compatibility with ISA-based VGA, providing support for “VGA compatible” adapters so that they can appear in memory at the same locations and use the same I/O ports as ISA VGA cards. So accesses to the VGA registers and to the VGA buffer (at 0xA0000) go directly to the main PCI VGA compatible adapter in the system, with no change required in the operating system or programs running on it. (This is the reason why there’s a specific “VGA compatible controller” device type in PCI. Such shenanigans are impossible for other device types in PCI, which is why PCI sound cards have so much trouble providing compatibility with programs written for ISA sound cards.) A faster bus and/or faster video memory immediately leads to higher performance in video-intensive programs because software doesn’t need to be careful about how it accesses video memory (except on CGA, and on all platforms with vertical blank synchronisation if it cares about tearing). So ```REP MOVSW``` or ```REP MOVSD``` with no waiting in software, once the program decides to write a frame, is perfectly fine, and will go faster and faster as the underlying hardware improves. On platforms where this can’t work in hardware (e.g. on an 8088 with a VGA card), the hardware takes care of specifics — for example on an 8088 the bus unit will split up 16-bit accesses. Your question is specific to DOOM but other DOS games are in a similar situation. Later games tended to rely on VBE (often using UniVBE) to access video modes beyond those provided by VGA, but they mostly didn’t use anything beyond video-mode setup and framebuffer configuration (see also Were any DOS games (or software) known to use VBE/AF?), so improved video speed came mostly from bus speed increases, faster video memory, and speed increases in the cards themselves (which was already a factor in the ISA era, compare most Trident cards to Tseng cards for example). For an excellent explanation of the intricacies of VGA programming and its memory layout, see Fabien Sanglard’s Game Engine Black Book series. The DOOM update loop is shown on page 185 of the DOOM book; it doesn’t use any assembly language (unlike the renderer, see pp. 290 and following), but it does have one perhaps surprising feature given the 32-bit nature of the code: VGA updates are done 16 bits at a time. Section 2.3 of the same book, pp. 59 and following, describes some of the improvements to VGA adapters around the time DOOM was released, in particular the switch to the VESA Local Bus on 486s. The benchmark table on page 287 shows the importance of the bus.
DOOM'un kendisi PCI grafik kartlarından faydalanmak için özel bir şey yapmaz. ISA grafik kartlarına göre PCI grafik kartlarıyla (ve VLB, AGP ve PCI Express kartlarıyla) daha hızlı çalışır çünkü destekleyen veri yolu daha hızlıdır, bu nedenle video belleğinden okuma ve yazma işlemleri daha az zaman alır. PCI, ISA tabanlı VGA ile geriye dönük uyumluluğu korumak için büyük çaba sarf eder ve "VGA uyumlu" bağdaştırıcılar için destek sağlayarak, bunların bellekte aynı konumlarda görünmelerini ve ISA VGA kartlarıyla aynı G/Ç bağlantı noktalarını kullanmalarını sağlar. Bu nedenle VGA kayıtlarına ve VGA arabelleğine (0xA0000'de) erişimler, işletim sisteminde veya üzerinde çalışan programlarda herhangi bir değişiklik gerektirmeden doğrudan sistemdeki ana PCI VGA uyumlu bağdaştırıcısına gider. (PCI'da belirli bir "VGA uyumlu denetleyici" aygıt türünün olmasının nedeni budur. Bu tür oyunlar PCI'daki diğer aygıt türleri için imkansızdır, bu nedenle PCI ses kartlarının ISA ses kartları için yazılmış programlarla uyumluluk sağlamada çok fazla sorunu vardır.) Daha hızlı bir veri yolu ve/veya daha hızlı video belleği, yazılımın video belleğine nasıl eriştiği konusunda dikkatli olması gerekmediği için (CGA hariç ve yırtılmayı önemsiyorsa dikey boş senkronizasyonu olan tüm platformlarda) video yoğun programlarda hemen daha yüksek performansa yol açar. Bu nedenle, program bir kare yazmaya karar verdiğinde, yazılımda beklemeden ```REP MOVSW``` veya ```REP MOVSD``` mükemmeldir ve temel donanım geliştikçe daha da hızlanacaktır. Bunun donanımda çalışamadığı platformlarda (örneğin VGA kartlı bir 8088'de), donanım ayrıntılarla ilgilenir; örneğin 8088'de veri yolu birimi 16 bitlik erişimleri böler. Sorunuz DOOM'a özeldir ancak diğer DOS oyunları da benzer bir durumdadır. Daha sonraki oyunlar, VGA'nın sağladıklarının ötesindeki video modlarına erişmek için VBE'ye (genellikle UniVBE kullanarak) güvenme eğilimindeydi, ancak çoğunlukla video modu kurulumu ve çerçeve arabelleği yapılandırmasının ötesinde bir şey kullanmadılar (ayrıca VBE/AF kullandığı bilinen herhangi bir DOS oyunu (veya yazılımı) var mıydı?), bu nedenle gelişmiş video hızı çoğunlukla veri yolu hızındaki artışlardan, daha hızlı video belleğinden ve kartların kendilerindeki hız artışlarından kaynaklandı (bu, ISA döneminde zaten bir faktördü, örneğin çoğu Trident kartını Tseng kartlarıyla karşılaştırın). VGA programlamasının incelikleri ve bellek düzeni hakkında mükemmel bir açıklama için Fabien Sanglard'ın Game Engine Black Book serisine bakın. DOOM güncelleme döngüsü, DOOM kitabının 185. sayfasında gösterilmiştir; kodun 32 bit doğasına rağmen herhangi bir derleme dili kullanmaz (işleyici gibi, bkz. s. 290 ve sonrası), ancak belki de şaşırtıcı bir özelliğe sahiptir: VGA güncellemeleri bir seferde 16 bit yapılır. Aynı kitabın 2.3 bölümü, s. 59 ve sonrası, DOOM'un piyasaya sürüldüğü sırada VGA bağdaştırıcılarındaki bazı gelişmeleri, özellikle 486'larda VESA Yerel Veri Yoluna geçişi açıklar. 287. sayfadaki kıyaslama tablosu, veri yolunun önemini göstermektedir.
11
I need to be able to open a document using its default application in Windows and Mac OS. Basically, I want to do the same thing that happens when you double-click on the document icon in Explorer or Finder. What is the best way to do this in Python?
Windows ve Mac OS'ta varsayılan uygulamasını kullanarak bir belgeyi açabilmem gerekiyor. Temel olarak, Explorer veya Finder'da belge simgesine çift tıkladığınızda olan şeyi yapmak istiyorum. Bunu Python'da yapmanın en iyi yolu nedir?
```open``` and ```start``` are command-interpreter things for Mac OS/X and Windows respectively, to do this. To call them from Python, you can either use ```subprocess``` module or ```os.system()```. Here are considerations on which package to use: * You can call them via ```os.system```, which works, but... Escaping: ```os.system``` only works with filenames that don't have any spaces or other shell metacharacters in the pathname (e.g. ```A:\abc\def\a.txt```), or else these need to be escaped. There is ```shlex.quote``` for Unix-like systems, but nothing really standard for Windows. Maybe see also python, windows : parsing command lines with shlex * MacOS/X: ```os.system("open " + shlex.quote(filename))``` * Windows: ```os.system("start " + filename)``` where properly speaking ```filename``` should be escaped, too. * You can also call them via ```subprocess``` module, but... For Python 2.7 and newer, simply use ```subprocess.check_call(['open', filename]) ``` In Python 3.5+ you can equivalently use the slightly more complex but also somewhat more versatile ```subprocess.run(['open', filename], check=True) ``` If you need to be compatible all the way back to Python 2.4, you can use ```subprocess.call()``` and implement your own error checking: ```try: retcode = subprocess.call("open " + filename, shell=True) if retcode < 0: print >>sys.stderr, "Child was terminated by signal", -retcode else: print >>sys.stderr, "Child returned", retcode except OSError, e: print >>sys.stderr, "Execution failed:", e ``` Now, what are the advantages of using ```subprocess```? * Security: In theory, this is more secure, but in fact we're needing to execute a command line one way or the other; in either environment, we need the environment and services to interpret, get paths, and so forth. In neither case are we executing arbitrary text, so it doesn't have an inherent "but you can type ```'filename ; rm -rf /'```" problem, and if the file name can be corrupted, using ```subprocess.call``` gives us little additional protection. * Error handling: It doesn't actually give us any more error detection, we're still depending on the ```retcode``` in either case; but the behavior to explicitly raise an exception in the case of an error will certainly help you notice if there is a failure (though in some scenarios, a traceback might not at all be more helpful than simply ignoring the error). * Spawns a (non-blocking) subprocess: We don't need to wait for the child process, since we're by problem statement starting a separate process. To the objection "But ```subprocess``` is preferred." However, ```os.system()``` is not deprecated, and it's in some sense the simplest tool for this particular job. Conclusion: using ```os.system()``` is therefore also a correct answer. A marked disadvantage is that the Windows ```start``` command requires you to pass in ```shell=True``` which negates most of the benefits of using ```subprocess```.
```open``` ve ```start``` sırasıyla Mac OS/X ve Windows için komut yorumlayıcı öğeleridir. Bunları Python'dan çağırmak için ```subprocess``` modülünü veya ```os.system()``` kullanabilirsiniz. Hangi paketi kullanacağınıza dair hususlar şunlardır: * ```os.system``` ile çağırabilirsiniz, bu işe yarar ancak... Kaçış: ```os.system``` yalnızca yol adında boşluk veya başka kabuk metakarakterleri olmayan dosya adlarıyla çalışır (ör. ```A:\abc\def\a.txt```) veya bunların kaçırılması gerekir. Unix benzeri sistemler için ```shlex.quote``` vardır ancak Windows için gerçekten standart bir şey yoktur. Ayrıca bkz. python, windows: shlex ile komut satırlarını ayrıştırma * MacOS/X: ```os.system("open " + shlex.quote(filename))``` * Windows: ```os.system("start " + filename)``` burada ```filename``` de kaçırılmalıdır. * ```subprocess``` modülüyle de çağırabilirsiniz ancak... Python 2.7 ve daha yenisi için basitçe kullanın ```subprocess.check_call(['open', filename]) ``` Python 3.5+'ta eşdeğer olarak biraz daha karmaşık ancak biraz daha çok yönlü olanı kullanabilirsiniz ```subprocess.run(['open', filename], check=True) ``` Python 2.4'e kadar uyumlu olmanız gerekiyorsa ```subprocess.call()``` kullanabilir ve kendi hata denetiminizi uygulayabilirsiniz: ```try: retcode = subprocess.call("open " + filename, shell=True) if retcode < 0: print >>sys.stderr, "Child was terminated by signal", -retcode else: print >>sys.stderr, "Child returned", retcode except OSError, e: print >>sys.stderr, "Execution failed:", e ``` Peki, ```subprocess``` kullanmanın avantajları nelerdir? * Güvenlik: Teoride bu daha güvenlidir ancak aslında bir komut satırını bir şekilde yürütmemiz gerekir; her iki ortamda da yorumlamak, yolları almak vb. için ortama ve servislere ihtiyacımız vardır. Her iki durumda da keyfi metin yürütmüyoruz, bu nedenle doğal olarak "ancak ```'filename ; rm -rf /'``` yazabilirsiniz" sorunu yoktur ve dosya adı bozulabiliyorsa ```subprocess.call``` kullanmak bize çok az ek koruma sağlar. * Hata işleme: Aslında bize daha fazla hata algılama sağlamaz, her iki durumda da ```retcode```'a bağımlıyız; ancak bir hata durumunda açıkça bir istisna oluşturma davranışı, bir hata olup olmadığını fark etmenize kesinlikle yardımcı olacaktır (ancak bazı senaryolarda bir geri izleme hatayı görmezden gelmekten daha faydalı olmayabilir). * (Engellemeyen) bir alt işlem oluşturur: Ayrı bir işlem başlattığımız için alt işlem için beklememize gerek yoktur. "Ancak ```subprocess``` tercih edilir" itirazına. Ancak, ```os.system()``` kullanım dışı bırakılmamıştır ve bir anlamda bu özel iş için en basit araçtır. Sonuç: ```os.system()``` kullanmak da doğru bir cevaptır. Windows ```start``` komutunun ```subprocess``` kullanmanın faydalarının çoğunu ortadan kaldıran ```shell=True```'yu geçirmenizi gerektirmesi belirgin bir dezavantajdır.
12
Why does PRC devalue its currency on purpose, but Turkey is worried about the devaluation of its currency?
Çin neden kasten para birimini devalüe ediyor ama Türkiye para biriminin devalüasyonundan endişe ediyor?
Trade surplus/deficit Devaluing one's currency means mostly one thing: It becomes more expensive to import products from abroad, while one's own products become comparably cheaper to buy on the world market. That means a country which exports lots of goods wants to devalue their currency while a country which imports lots of goods does not. In 2016, Turkey imported goods worth US $186 billion and exported goods worth US $156 billion. That means they had a trade deficit of 19%. However, China only imported goods worth US $1.23 trillion and exported goods worth US $2.27 trillion in 2016. That means they had a trade surplus of 84%. Which is why China wants to devalue their currency while Turkey does not. Debt management Another reason to devalue one's currency is that it reduces any debts denoted in that currency. If a country has a problem of too much public and private debt, then an easy way to get rid of it is to cause a hyperinflation. China happens to have a debt-to-gdp ratio of 47.6% while Turkey only has one of 28.3%. When you look at the private debt (debt of private citizens and companies in the country), you see the same picture. Private debit in Turkey was 170% of GDP, while China's is rumored to be over 300%. Which is why reducing debt through causing inflation seems more attractive to China than to Turkey. Foreign investor relations So why don't all countries get rid of their debt by adding a few zeroes to their bank notes? Because inflating your currency is a surefire way to drive away any foreign investors. Nobody will invest money into your country when that money might be worth nothing in a few years. Investors want stable currencies. Again, we observe the same difference in motivation between Turkey and China here. Turkey is actively inviting foreign investors, but China is quite reluctant to allow foreign economic influence in their country.
Ticaret fazlası/açığı Bir ülkenin para birimini devalüe etmesi genellikle tek bir anlama gelir: Yurtdışından ürün ithal etmek daha pahalı hale gelirken, kendi ürünlerinin dünya pazarında satın alınması nispeten daha ucuz hale gelir. Bu, çok fazla mal ihraç eden bir ülkenin para birimini devalüe etmek isterken, çok fazla mal ithal eden bir ülkenin bunu istemediği anlamına gelir. Türkiye 2016 yılında 186 milyar ABD Doları değerinde mal ithal etmiş ve 156 milyar ABD Doları değerinde mal ihraç etmiştir. Bu, %19'luk bir ticaret açığı olduğu anlamına gelir. Ancak Çin, 2016 yılında yalnızca 1,23 trilyon ABD Doları değerinde mal ithal etmiş ve 2,27 trilyon ABD Doları değerinde mal ihraç etmiştir. Bu, %84'lük bir ticaret fazlası olduğu anlamına gelir. Çin'in para birimini devalüe etmek istemesinin, Türkiye'nin ise istememesinin nedeni budur. Borç yönetimi Bir ülkenin para birimini devalüe etmesinin bir başka nedeni de, bu para birimiyle ifade edilen borçları azaltmasıdır. Bir ülkenin çok fazla kamu ve özel borcu varsa, bundan kurtulmanın kolay bir yolu hiperenflasyona neden olmaktır. Çin'in GSYİH'ye oranı %47,6 iken Türkiye'nin yalnızca %28,3'tür. Ülkedeki özel borca (ülkedeki özel vatandaşların ve şirketlerin borcu) baktığınızda aynı tabloyu görürsünüz. Türkiye'de özel borç GSYİH'nın %170'iyken, Çin'in %300'ün üzerinde olduğu söyleniyor. Bu nedenle enflasyona neden olarak borcu azaltmak, Çin'e Türkiye'den daha çekici geliyor. Yabancı yatırımcı ilişkileri Peki neden tüm ülkeler banknotlarına birkaç sıfır ekleyerek borçlarından kurtulmuyor? Çünkü para biriminizi enflasyon etmek, yabancı yatırımcıları uzaklaştırmanın kesin bir yoludur. Hiç kimse, birkaç yıl içinde değersiz hale gelebilecek bir ülkeye para yatırmaz. Yatırımcılar istikrarlı para birimleri ister. Yine burada Türkiye ve Çin arasında aynı motivasyon farkını gözlemliyoruz. Türkiye aktif olarak yabancı yatırımcıları davet ediyor ancak Çin, ülkesine yabancı ekonomik etki girmesine oldukça isteksiz.
13
Is it worth patenting an algorithm if I don't have the money to defend against infringements?
İhlallere karşı savunmak için param yoksa bir algoritmayı patent almaya değer mi?
This is a great question, with no one right answer. The strength of a patent comes from the ability to enforce it. If the patent owner cannot enforce it for whatever reason (such as a lack of funding), the patent is effectively toothless. But your competitors will likely not know that. They may therefore be dissuaded from infringing simply by the existence of a patent and the assumption that you would sue. Such a chilling effect on competition may be valuable to you. In addition, if there is infringement, you may be able to get a licensing agreement without the need for litigation. This can be a very lucrative business model, and so may justify the cost of patenting. And if litigation seems likely, there is a nascent field of litigation funding. While your funders will take quite a great deal of the damages, you may at least get something out of the end of it. Finally, even if you can't sue, someone else could. You might therefore get quite some value from selling it off at some point. There are a number of tech businesses where most of their value comes from their IP portfolio. On the whole therefore it depends how you see yourself proceeding. If you're unsure, it may pay to err on the side of patenting: once you disclose or use your invention publicly, you're generally barred from patenting it later (but for a short grace period in some countries), whereas it's easy to abandon a patent (or application) later down the track if you wish.
Bu harika bir soru ve tek bir doğru cevabı yok. Bir patentin gücü, onu uygulama yeteneğinden gelir. Patent sahibi, ne sebeple olursa olsun (örneğin fon eksikliği gibi) patenti uygulayamıyorsa, patent fiilen etkisizdir. Ancak rakipleriniz muhtemelen bunu bilmeyecektir. Bu nedenle, yalnızca bir patent varlığı ve dava açacağınız varsayımıyla ihlal etmekten caydırılabilirler. Rekabet üzerindeki böyle bir caydırıcı etki sizin için değerli olabilir. Ayrıca, ihlal varsa, dava açmaya gerek kalmadan bir lisans anlaşması yapabilirsiniz. Bu çok kazançlı bir iş modeli olabilir ve bu nedenle patent alma maliyetini haklı çıkarabilir. Ve dava açma olasılığı varsa, yeni bir dava fonlama alanı vardır. Finansörleriniz tazminatın büyük bir kısmını alırken, siz de en azından bunun sonundan bir şeyler elde edebilirsiniz. Son olarak, dava açamasanız bile, başkası açabilir. Bu nedenle, onu bir noktada satarak oldukça fazla değer elde edebilirsiniz. Değerlerinin çoğu IP portföylerinden gelen bir dizi teknoloji işi vardır. Bu nedenle, genel olarak nasıl ilerleyeceğinizi görmenize bağlıdır. Emin değilseniz, patent almaktan yana hata yapmak faydalı olabilir: İcadınızı açıkladıktan veya kamuya açık bir şekilde kullandıktan sonra, genellikle daha sonra patent almaktan men edilirsiniz (ancak bazı ülkelerde kısa bir süre için), oysa daha sonra bir patenti (veya başvuruyu) terk etmek isterseniz kolaydır.
14
"I have a ```String[]``` with values like so: ```public static final String[] VALUES = new String[] {""AB"",""BC"",""CD"",""AE""}; ``` Given ```String s```, is there a good way of testing whether ```VALUES``` contains ```s```?" How do I determine whether an array contains a particular value in Java?
"Şu şekilde değerleri olan bir ```String[]```'im var: ```public static final String[] VALUES = new String[] {""AB"",""BC"",""CD"",""AE""}; ``` Verilen ```String s``` için, ```VALUES```'in ```s```'yi içerip içermediğini test etmenin iyi bir yolu var mı?" Java'da bir dizinin belirli bir değeri içerip içermediğini nasıl belirlerim?
Four Different Ways to Check If an Array Contains a Value: * Using ```List```: ```public static boolean useList(String[] arr, String targetValue) { return Arrays.asList(arr).contains(targetValue); } ``` * Using ```Set```: ```public static boolean useSet(String[] arr, String targetValue) { Set set = new HashSet(Arrays.asList(arr)); return set.contains(targetValue); } ``` * Using a simple loop: ```public static boolean useLoop(String[] arr, String targetValue) { for (String s: arr) { if (s.equals(targetValue)) return true; } return false; } ``` * Using ```Arrays.binarySearch()```: The code below is wrong, it is listed here for completeness. ```binarySearch()``` can ONLY be used on sorted arrays. You will find the result is weird below. This is the best option when array is sorted. ```public static boolean binarySearch(String[] arr, String targetValue) { return Arrays.binarySearch(arr, targetValue) >= 0; } ``` Quick Example: ```String testValue="test"; String newValueNotInList="newValue"; String[] valueArray = { "this", "is", "java" , "test" }; Arrays.asList(valueArray).contains(testValue); // returns true Arrays.asList(valueArray).contains(newValueNotInList); // returns false ```
Bir Dizinin Bir Değer İçerip İçermediğini Kontrol Etmenin Dört Farklı Yolu: * ```List``` Kullanarak: ```public static boolean useList(String[] arr, String targetValue) { return Arrays.asList(arr).contains(targetValue); } ``` * ```Set``` Kullanarak: ```public static boolean useSet(String[] arr, String targetValue) { Set set = new HashSet(Arrays.asList(arr)); return set.contains(targetValue); } ``` * Basit bir döngü kullanarak: ```public static boolean useLoop(String[] arr, String targetValue) { for (String s: arr) { if (s.equals(targetValue)) return true; } return false; } ``` * ```Arrays.binarySearch()``` Kullanarak: Aşağıdaki kod yanlıştır, bütünlük için burada listelenmiştir. ```binarySearch()``` YALNIZCA sıralanmış dizilerde kullanılabilir. Aşağıda sonucun garip olduğunu göreceksiniz. Dizi sıralandığında bu en iyi seçenektir. ```public static boolean binarySearch(String[] arr, String targetValue) { return Arrays.binarySearch(arr, targetValue) >= 0; } ``` Hızlı Örnek: ```String testValue="test"; String newValueNotInList="newValue"; String[] valueArray = { "this", "is", "java" , "test" }; Arrays.asList(valueArray).contains(testValue); // true döner Arrays.asList(valueArray).contains(newValueNotInList); // false döner ```
15
Does Java casting introduce overhead? Or the compiler just resolves everything and there is no cost at run time? Is this a general things, or there are different cases?
Java dökümü ek yük getirir mi? Yoksa derleyici her şeyi çözer ve çalışma zamanında maliyet olmaz mı? Bu genel bir şey mi, yoksa farklı durumlar mı var?
There are 2 types of casting in Java: Implicit casting, when you cast from a type to a wider type, which is done automatically and there is no overhead: ```String s = "Cast"; Object o = s; // implicit casting ``` Explicit casting, when you go from a wider type to a more narrow one. For this case, you must explicitly use casting like that: ```Object o = someObject; String s = (String) o; // explicit casting ``` In this second case, there is overhead in runtime, because the two types must be checked and in case that casting is not feasible, JVM must throw a ClassCastException. Taken from JavaWorld: The cost of casting > Casting is used to convert between types -- between reference types in particular, for the type of casting operation in which we're interested here. Upcast operations (also called widening conversions in the Java Language Specification) convert a subclass reference to an ancestor class reference. This casting operation is normally automatic, since it's always safe and can be implemented directly by the compiler. Downcast operations (also called narrowing conversions in the Java Language Specification) convert an ancestor class reference to a subclass reference. This casting operation creates execution overhead, since Java requires that the cast be checked at runtime to make sure that it's valid. If the referenced object is not an instance of either the target type for the cast or a subclass of that type, the attempted cast is not permitted and must throw a java.lang.ClassCastException.
Java'da 2 tür döküm vardır: Türden daha geniş bir türe döküm yaptığınızda otomatik olarak yapılan ve ek yükü olmayan örtük döküm: ```String s = "Cast"; Object o = s; // örtük döküm ``` Daha geniş bir türden daha dar bir türe geçtiğinizde açık döküm. Bu durumda, dökümü şu şekilde açıkça kullanmanız gerekir: ```Object o = someObject; String s = (String) o; // açık döküm ``` Bu ikinci durumda, çalışma zamanında ek yük vardır, çünkü iki tür kontrol edilmelidir ve dökümün mümkün olmaması durumunda JVM bir ClassCastException fırlatmalıdır. JavaWorld'den alınmıştır: Dökümün maliyeti > Döküm, türler arasında dönüştürmek için kullanılır -- özellikle de burada ilgilendiğimiz döküm işlemi türü için referans türleri arasında. Yukarı döküm işlemleri (Java Dil Belirtiminde genişletme dönüşümleri olarak da adlandırılır) bir alt sınıf referansını bir üst sınıf referansına dönüştürür. Bu döküm işlemi normalde otomatiktir, çünkü her zaman güvenlidir ve doğrudan derleyici tarafından uygulanabilir. Aşağı döküm işlemleri (Java Dil Belirtiminde daraltma dönüşümleri olarak da adlandırılır) bir üst sınıf referansını bir alt sınıf referansına dönüştürür. Bu döküm işlemi, yürütme ek yükü oluşturur, çünkü Java, geçerli olduğundan emin olmak için dökümün çalışma zamanında kontrol edilmesini gerektirir. Referans verilen nesne, döküm için hedef türün veya bu türün bir alt sınıfının bir örneği değilse, denenen döküm izin verilmez ve bir java.lang.ClassCastException fırlatmalıdır.
16
How can I copy a string (e.g "hello") to the System Clipboard in C#, so next time I press CTRL+V I'll get "hello"?
C# dilinde bir dizeyi (örneğin "merhaba") Sistem Panosuna nasıl kopyalayabilirim, böylece bir sonraki CTRL+V tuşuna bastığımda "merhaba"yı alabilirim?
There are two classes that lives in different assemblies and different namespaces. * WinForms: use following namespace declaration, make sure ```Main``` is marked with ```[STAThread]``` attribute: ```using System.Windows.Forms; ``` * WPF: use following namespace declaration ```using System.Windows; ``` * console: add reference to ```System.Windows.Forms```, use following namespace declaration, make sure ```Main``` is marked with ```[STAThread]``` attribute. Step-by-step guide in another answer ```using System.Windows.Forms; ``` To copy an exact string (literal in this case): ```Clipboard.SetText("Hello, clipboard"); ``` To copy the contents of a textbox either use TextBox.Copy() or get text first and then set clipboard value: ```Clipboard.SetText(txtClipboard.Text); ``` See here for an example. Or... Official MSDN documentation or Here for WPF. Remarks: * Clipboard is desktop UI concept, trying to set it in server side code like ASP.Net will only set value on the server and has no impact on what user can see in they browser. While linked answer lets one to run Clipboard access code server side with ```SetApartmentState``` it is unlikely what you want to achieve. * If after following information in this question code still gets an exception see &quot;Current thread must be set to single thread apartment (STA)&quot; error in copy string to clipboard * This question/answer covers regular .NET, for .NET Core see - .Net Core - copy to clipboard?
Farklı derlemelerde ve farklı ad alanlarında yaşayan iki sınıf vardır. * WinForms: aşağıdaki ad alanı bildirimini kullanın, ```Main```'in ```[STAThread]``` özniteliğiyle işaretlendiğinden emin olun: ```using System.Windows.Forms; ``` * WPF: aşağıdaki ad alanı bildirimini kullanın ```using System.Windows; ``` * konsol: ```System.Windows.Forms```'a başvuru ekleyin, aşağıdaki ad alanı bildirimini kullanın, ```Main```'in ```[STAThread]``` özniteliğiyle işaretlendiğinden emin olun. Başka bir yanıtta adım adım kılavuz ```using System.Windows.Forms; ``` Tam bir dizeyi (bu durumda değişmez) kopyalamak için: ```Clipboard.SetText("Merhaba, pano"); ``` Bir metin kutusunun içeriğini kopyalamak için TextBox.Copy()'yi kullanın veya önce metni alın ve ardından pano değerini ayarlayın: ```Clipboard.SetText(txtClipboard.Text); ``` Bir örnek için buraya bakın. Veya... Resmi MSDN belgeleri veya WPF için buraya. Açıklamalar: * Pano, masaüstü kullanıcı arayüzü kavramıdır, ASP.Net gibi sunucu tarafı kodunda ayarlamayı denemek yalnızca sunucudaki değeri ayarlar ve kullanıcının tarayıcısında görebilecekleri üzerinde hiçbir etkisi yoktur. Bağlantılı yanıt, birinin ```SetApartmentState``` ile pano erişim kodunu sunucu tarafında çalıştırmasına izin verse de, elde etmek istediğiniz şey bu değildir. * Bu sorudaki bilgileri takip ettikten sonra kod hala bir istisna alıyorsa, panoya dize kopyalama işleminde "Geçerli iş parçacığı tek iş parçacığı dairesine (STA) ayarlanmalıdır" hatası görün. * Bu soru/yanıt normal .NET'i kapsar, .NET Core için bkz. - .Net Core - panoya kopyalama?
17
I want to put a draft watermark using the below script but the problem is that the watermark don't come over the images and I want it to come over it. ```\usepackage{draftwatermark} \SetWatermarkText{DRAFT} \SetWatermarkScale{1} ```
Aşağıdaki betiği kullanarak bir taslak filigranı koymak istiyorum ancak sorun şu ki filigran görüntülerin üzerine gelmiyor ve üzerine gelmesini istiyorum. ```\usepackage{draftwatermark} \SetWatermarkText{DRAFT} \SetWatermarkScale{1} ```
The problem is that the ```draftwatermark``` places the material in the background, so other elements (for example, figures and listings) might cover the included material; to prevent this, instead of using the ```draftwatermark``` package, you can use the ```xwatermark``` package; the starred variant of ```\newwatermark``` places the material in the foreground which seems to be what you need. A little example: First, with the unstarred variant (material on the background, so a figure will be placed on top of it): ```\documentclass{article} \usepackage[printwatermark]{xwatermark} \usepackage{xcolor} \usepackage{graphicx} \usepackage{lipsum} \newwatermark[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT} \begin{document} \lipsum[1-2] \begin{figure}[!ht] \centering \includegraphics[width=3cm]{example-image-a} \end{figure} \lipsum[1-2] \end{document} ``` And now, with the starred variant (material on the foreground, so it will appear on top of figures): ```\documentclass{article} \usepackage[printwatermark]{xwatermark} \usepackage{xcolor} \usepackage{graphicx} \usepackage{lipsum} \newwatermark*[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT} \begin{document} \lipsum[1-2] \begin{figure}[!ht] \centering \includegraphics[width=3cm]{example-image-a} \end{figure} \lipsum[1-2] \end{document} ```
Sorun, ```draftwatermark```'ın materyali arka plana yerleştirmesi, bu nedenle diğer öğeler (örneğin, şekiller ve listeler) eklenen materyali kapatabilir; bunu önlemek için ```draftwatermark``` paketini kullanmak yerine ```xwatermark``` paketini kullanabilirsiniz; ```\newwatermark```'ın yıldızlı değişkeni materyali ön plana yerleştirir, bu da ihtiyacınız olan şey gibi görünüyor. Küçük bir örnek: İlk olarak, yıldızsız değişkenle (arka plandaki materyal, bu nedenle bir şekil onun üzerine yerleştirilecektir): ```\documentclass{article} \usepackage[printwatermark]{xwatermark} \usepackage{xcolor} \usepackage{graphicx} \usepackage{lipsum} \newwatermark[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT} \begin{document} \lipsum[1-2] \begin{figure}[!ht] \centering \includegraphics[width=3cm]{example-image-a} \end{figure} \lipsum[1-2] \end{document} ``` Ve şimdi, yıldızlı değişkenle (ön plandaki materyal, bu nedenle şekillerin üzerinde görünecektir): ```\documentclass{article} \usepackage[printwatermark]{xwatermark} \usepackage{xcolor} \usepackage{graphicx} \usepackage{lipsum} \newwatermark*[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT} \begin{document} \lipsum[1-2] \begin{figure}[!ht] \centering \includegraphics[width=3cm]{example-image-a} \end{figure} \lipsum[1-2] \end{document} ```
18
Understanding the Rails Authenticity Token
Rails Orijinallik Jetonunu Anlamak
What is CSRF? The Authenticity Token is a countermeasure to Cross-Site Request Forgery (CSRF). What is CSRF, you ask? It's a way that an attacker can potentially hijack sessions without even knowing session tokens. Scenario: * Visit your bank's site, log in. * Then visit the attacker's site (e.g. sponsored ad from an untrusted organization). * Attacker's page includes form with same fields as the bank's "Transfer Funds" form. * Attacker knows your account info, and has pre-filled form fields to transfer money from your account to attacker's account. * Attacker's page includes Javascript that submits form to your bank. * When form gets submitted, browser includes your cookies for the bank site, including the session token. * Bank transfers money to attacker's account. * The form can be in an iframe that is invisible, so you never know the attack occurred. * This is called Cross-Site Request Forgery (CSRF). CSRF solution: * Server can mark forms that came from the server itself * Every form must contain an additional authentication token as a hidden field. * Token must be unpredictable (attacker can't guess it). * Server provides valid token in forms in its pages. * Server checks token when form posted, rejects forms without proper token. * Example token: session identifier encrypted with server secret key. * Rails automatically generates such tokens: see the authenticity_token input field in every form.
CSRF Nedir? Orijinallik Belirteci, Siteler Arası İstek Sahteciliği'ne (CSRF) karşı bir önlemdir. CSRF nedir diye sorabilirsiniz? Bir saldırganın oturum belirteçlerini bilmeden bile oturumları ele geçirebileceği bir yoldur. Senaryo: * Bankanızın sitesini ziyaret edin, oturum açın. * Ardından saldırganın sitesini ziyaret edin (ör. güvenilmeyen bir kuruluştan sponsorlu reklam). * Saldırganın sayfası, bankanın "Para Transferi" formu ile aynı alanlara sahip bir form içerir. * Saldırgan hesap bilgilerinizi bilir ve hesabınızdan saldırganın hesabına para transfer etmek için önceden doldurulmuş form alanlarına sahiptir. * Saldırganın sayfası, formu bankanıza gönderen Javascript içerir. * Form gönderildiğinde, tarayıcı oturum belirteci de dahil olmak üzere banka sitesi için çerezlerinizi içerir. * Banka, saldırganın hesabına para aktarır. * Form, görünmez bir iframe içinde olabilir, böylece saldırının gerçekleştiğini asla bilemezsiniz. * Buna Siteler Arası İstek Sahteciliği (CSRF) denir. CSRF çözümü: * Sunucu, sunucudan gelen formları işaretleyebilir * Her form, gizli bir alan olarak ek bir kimlik doğrulama belirteci içermelidir. * Belirteç tahmin edilemez olmalıdır (saldırgan tahmin edemez). * Sunucu, sayfalarındaki formlarda geçerli belirteç sağlar. * Sunucu, form gönderildiğinde belirteci kontrol eder, uygun belirteci olmayan formları reddeder. * Belirteç örneği: sunucu gizli anahtarıyla şifrelenmiş oturum tanımlayıcısı. * Rails otomatik olarak bu tür belirteçler oluşturur: her formda authenticity_token giriş alanına bakın.
19
Why is FIFA against adding instant replay to the game?
FIFA neden oyuna anında tekrar eklemeye karşı?
There are a few fundamental considerations: * Uncertainty is a part of the game. The referee and linesmen are the arbiters of the action. Instant replay would limit their authority. * Football is global. Many places do not have access to the technology necessary to implement instant replay. * Football is a fast-paced game with few opportunities for stoppage. Instant replay would unnecessarily slow the pace. In 2008, FiFA President Sepp Blatter said: "Let it be as it is and let's leave [football] with errors. The television companies will have the right to say [the referee] was right or wrong, but still the referee makes the decision – a man, not a machine." Blatter and others at FIFA have repeatedly argued against using instant replay. But lately, FIFA has begun to come around on the idea. At FIFA's Congress in São Paulo prior to the 2014 World Cup, Blatter proposed allowing managers 2 challenges per game, much like the NFL handles challenges today. Although it's not quite "instant replay," in 2012 FIFA approved two different goal-line technologies to improve referee accuracy: "Hawk-Eye" -- which uses visual triangulation to determine ball location -- and "GoalRef" -- which uses a microchip in the ball and magnetic sensors within goalposts. (Many say FIFA approved the technologies in response to Frank Lampard's snubbed "goal" against Germany in the 2010 World Cup.) In 2013, FIFA announced it would use GoalControl, a German competitor to Hawk-Eye, at the Confederations Cup, basically a rehearsal for the World Cup. After a successful run at that tournament, FIFA announced it would implement GoalControl at the 2014 World Cup. The Guardian provides a pretty helpful FAQ on the technology. FIFA may choose to implement further changes to approved goal-line technology and referee rules when it meets again after the World Cup.
Birkaç temel husus vardır: * Belirsizlik oyunun bir parçasıdır. Hakem ve çizgi hakemleri, eylemin hakemleridir. Anında tekrar oynatma yetkilerini sınırlayacaktır. * Futbol küreseldir. Birçok yerde anında tekrar oynatmayı uygulamak için gerekli teknolojiye erişim yoktur. * Futbol, durma fırsatlarının az olduğu hızlı tempolu bir oyundur. Anında tekrar oynatma gereksiz yere hızı yavaşlatacaktır. 2008'de FIFA Başkanı Sepp Blatter şöyle demiştir: "Olduğu gibi kalsın ve [futbolu] hatalarıyla bırakalım. Televizyon şirketleri [hakemin] haklı ya da haksız olduğunu söyleme hakkına sahip olacak, ancak yine de karar veren hakemdir - bir makine değil, bir adam." Blatter ve FIFA'daki diğerleri, anında tekrar oynatma kullanımına karşı defalarca tartıştılar. Ancak son zamanlarda FIFA fikre yaklaşmaya başladı. 2014 Dünya Kupası'ndan önce São Paulo'daki FIFA Kongresi'nde Blatter, menajerlerin oyunda 2 meydan okumaya izin verilmesini önerdi, tıpkı NFL'nin bugün meydan okumaları ele aldığı gibi. Tam olarak "anında tekrar oynatma" olmasa da 2012'de FIFA, hakem doğruluğunu artırmak için iki farklı gol çizgisi teknolojisini onayladı: Topun yerini belirlemek için görsel üçgenleme kullanan "Hawk-Eye" ve gol direkleri içinde bir mikroçip ve manyetik sensörler kullanan "GoalRef". (Birçoğu FIFA'nın teknolojileri, Frank Lampard'ın 2010 Dünya Kupası'nda Almanya'ya karşı atılan "golünün" reddedilmesine yanıt olarak onayladığını söylüyor.) 2013 yılında FIFA, Dünya Kupası için temelde bir prova olan Konfederasyonlar Kupası'nda Hawk-Eye'ın Alman rakibi GoalControl'ü kullanacağını duyurdu. Bu turnuvada başarılı bir koşunun ardından FIFA, 2014 Dünya Kupası'nda GoalControl'ü uygulayacağını duyurdu. The Guardian, teknoloji hakkında oldukça faydalı bir SSS sağlıyor. FIFA, Dünya Kupası'ndan sonra tekrar bir araya geldiğinde onaylanmış gol çizgisi teknolojisinde ve hakem kurallarında daha fazla değişiklik yapmayı seçebilir.
20
If we should encrypt the message rather than the method of transfer, why do we care about wifi security? Is this just security theatre?
Mesajı aktarım yönteminden ziyade şifrelersek, neden wifi güvenliğiyle ilgileniyoruz? Bu sadece güvenlik tiyatrosu mu?
Network encryption protects against different set of threats than application layer encryption like TLS. In particular, network encryption like Wifi encryption are primarily designed to protect from a local attacker from being able to watch network patterns (by recording who you're making connections with, and discovering what devices are on the local network), observing/tampering of low level messages like ARP/DNS, and protecting network broadcasts from devices that aren't supposed to be in the network, and from tampering or selective interference. TLS doesn't protect the low level TCP/IP packets, which leaks information like the IP address of the machine you're connecting with, and the TLS handshake also by design leaks a number of information about the connection like Server Name Indication (SNI) header. The side effect of needing to do all this is that Wifi hardware already need to have enough code and processing power to handle encryption, so it becomes easier to just encrypt all wifi packets rather than selectively figuring out what needs protection or not. This come also with the side benefit that unsecured HTTP connection will still be at least marginally protected, even if at least to protect users of the infrastructure from each other, but not from the infrastructure provider. Network encryption is designed to protect the network, not the service. Application encryption is designed to protect the connection to the service, but it doesn't protect the network. They complement each other, but neither completely makes the other unnecessary.
Ağ şifrelemesi, TLS gibi uygulama katmanı şifrelemesinden farklı bir tehdit kümesine karşı koruma sağlar. Özellikle Wifi şifrelemesi gibi ağ şifrelemesi, öncelikle yerel bir saldırganın ağ modellerini izlemesini (kiminle bağlantı kurduğunuzu kaydederek ve yerel ağdaki hangi cihazları keşfederek), ARP/DNS gibi düşük seviyeli mesajları gözlemlemesini/kurcalamasını ve ağda olmaması gereken cihazlardan gelen ağ yayınlarını korumasını ve kurcalama veya seçici parazitten korumak için tasarlanmıştır. TLS, bağlantı kurduğunuz makinenin IP adresi gibi bilgileri sızdıran düşük seviyeli TCP/IP paketlerini korumaz ve TLS el sıkışması da tasarım gereği Sunucu Adı Göstergesi (SNI) başlığı gibi bağlantı hakkında bir dizi bilgi sızdırır. Tüm bunları yapma ihtiyacının yan etkisi, Wifi donanımının şifrelemeyi işlemek için zaten yeterli koda ve işlem gücüne sahip olması gerektiğidir, bu nedenle neyin korunması gerektiğini veya gerekmediğini seçici olarak belirlemek yerine tüm wifi paketlerini şifrelemek daha kolay hale gelir. Bu, güvenli olmayan HTTP bağlantısının bile en azından altyapının kullanıcılarını birbirinden korumak için olsa bile yine de marjinal olarak korunacağı yan faydayla birlikte gelir, ancak altyapı sağlayıcısından değil. Ağ şifrelemesi, hizmeti değil, ağı korumak için tasarlanmıştır. Uygulama şifrelemesi, hizmete olan bağlantıyı korumak için tasarlanmıştır, ancak ağı korumaz. Birbirlerini tamamlarlar, ancak hiçbiri diğerini tamamen gereksiz kılmaz.
21
Applying filter in scipy.signal: Use lfilter or filtfilt?
Scipy.signal'de filtre uygulama: lfilter mı yoksa filtfilt mi kullanılmalı?
* ```filtfilt``` is zero-phase filtering, which doesn't shift the signal as it filters. Since the phase is zero at all frequencies, it is also linear-phase. Filtering backwards in time requires you to predict the future, so it can't be used in "online" real-life applications, only for offline processing of recordings of signals. * ```lfilter``` is causal forward-in-time filtering only, similar to a real-life electronic filter. It can't be zero-phase. It can be linear-phase (symmetrical FIR), but usually isn't. Usually it adds different amounts of delay at different frequencies. An example and image should make it obvious. Although the magnitude of the frequency response of the filters is identical (top left and top right), the zero-phase lowpass lines up with the original signal, just without high frequency content, while the minimum phase filtering delays the signal in a causal way: ```from __future__ import division, print_function import numpy as np from numpy.random import randn from numpy.fft import rfft from scipy import signal import matplotlib.pyplot as plt b, a = signal.butter(4, 0.03, analog=False) # Show that frequency response is the same impulse = np.zeros(1000) impulse[500] = 1 # Applies filter forward and backward in time imp_ff = signal.filtfilt(b, a, impulse) # Applies filter forward in time twice (for same frequency response) imp_lf = signal.lfilter(b, a, signal.lfilter(b, a, impulse)) plt.subplot(2, 2, 1) plt.semilogx(20*np.log10(np.abs(rfft(imp_lf)))) plt.ylim(-100, 20) plt.grid(True, which='both') plt.title('lfilter') plt.subplot(2, 2, 2) plt.semilogx(20*np.log10(np.abs(rfft(imp_ff)))) plt.ylim(-100, 20) plt.grid(True, which='both') plt.title('filtfilt') sig = np.cumsum(randn(800)) # Brownian noise sig_ff = signal.filtfilt(b, a, sig) sig_lf = signal.lfilter(b, a, signal.lfilter(b, a, sig)) plt.subplot(2, 1, 2) plt.plot(sig, color='silver', label='Original') plt.plot(sig_ff, color='#3465a4', label='filtfilt') plt.plot(sig_lf, color='#cc0000', label='lfilter') plt.grid(True, which='both') plt.legend(loc="best") ```
* ```filtfilt``` sıfır fazlı filtrelemedir, filtreleme sırasında sinyali kaydırmaz. Faz tüm frekanslarda sıfır olduğundan, aynı zamanda doğrusal fazlıdır. Zamanda geriye doğru filtreleme, geleceği tahmin etmenizi gerektirir, bu nedenle "çevrimiçi" gerçek yaşam uygulamalarında kullanılamaz, yalnızca sinyal kayıtlarının çevrimdışı işlenmesi için kullanılabilir. * ```lfilter``` yalnızca gerçek hayattaki bir elektronik filtreye benzer şekilde nedensel ileri zaman filtrelemesidir. Sıfır fazlı olamaz. Doğrusal fazlı (simetrik FIR) olabilir, ancak genellikle öyle değildir. Genellikle farklı frekanslarda farklı miktarlarda gecikme ekler. Bir örnek ve resim bunu açıkça göstermelidir. Filtrelerin frekans tepkisinin büyüklüğü aynı olsa da (sol üst ve sağ üst), sıfır fazlı düşük geçiş orijinal sinyalle hizalanır, sadece yüksek frekans içeriği olmadan, minimum faz filtrelemesi ise sinyali nedensel bir şekilde geciktirir: ```from __future__ import division, print_function import numpy as np from numpy.random import randn from numpy.fft import rfft from scipy import signal import matplotlib.pyplot as plt b, a = signal.butter(4, 0.03, analog=False) # Frekans tepkisinin aynı olduğunu göster impuls = np.zeros(1000) impuls[500] = 1 # Filtreyi zamanda ileri ve geri uygular imp_ff = signal.filtfilt(b, a, impuls) # Filtreyi zamanda iki kez ileri uygular (aynı frekans tepkisi için) imp_lf = signal.lfilter(b, a, signal.lfilter(b, a, impuls)) plt.subplot(2, 2, 1) plt.semilogx(20*np.log10(np.abs(rfft(imp_lf)))) plt.ylim(-100, 20) plt.grid(True, which='both') plt.title('lfilter') plt.subplot(2, 2, 2) plt.semilogx(20*np.log10(np.abs(rfft(imp_ff)))) plt.ylim(-100, 20) plt.grid(True, which='both') plt.title('filtfilt') sig = np.cumsum(randn(800)) # Brown gürültüsü sig_ff = signal.filtfilt(b, a, sig) sig_lf = signal.lfilter(b, a, signal.lfilter(b, a, sig)) plt.subplot(2, 1, 2) plt.plot(sig, color='silver', label='Orijinal') plt.plot(sig_ff, color='#3465a4', label='filtfilt') plt.plot(sig_lf, color='#cc0000', label='lfilter') plt.grid(True, which='both') plt.legend(loc="best") ```
22
What do different people in the department expect from a postdoc? By different people I mean the advisor, graduate students and PhD students. I know it mainly depends on the job description but there are few basic things that a postdoc must be expected to do. How aggressive (proactive) must one be? This question is important since a postdoc cannot just wait for the adviser to give him/her inputs. Rather the postdoc must take the project(s) as another PhD research of his own but be completely accountable to the adviser in terms of what he/she is doing and how is he/she doing that. The above are my thoughts. My question is divided into the following sub-parts: * What would you as a professor expect from your postdoc? * What preparation one must do to rise to the expected level? * Is the preparation merely restricted to having sound academic record and experience?
Bölümdeki farklı kişiler bir postdoktordan ne bekler? Farklı kişiler derken danışman, lisansüstü öğrenciler ve doktora öğrencilerini kastediyorum. Bunun esas olarak iş tanımına bağlı olduğunu biliyorum ancak bir postdoktorun yapması beklenen birkaç temel şey var. Ne kadar agresif (proaktif) olunmalı? Bu soru önemlidir çünkü bir postdoktor sadece danışmanın kendisine girdi vermesini bekleyemez. Aksine, postdoktor projeyi kendi doktora araştırması gibi ele almalı ancak ne yaptığını ve nasıl yaptığını konusunda danışmana karşı tamamen sorumlu olmalıdır. Yukarıdakiler benim düşüncelerim. Sorularım aşağıdaki alt bölümlere ayrılmıştır: * Bir profesör olarak postdoktorunuzdan ne beklersiniz? * Beklenen seviyeye yükselmek için ne gibi hazırlıklar yapılmalıdır? * Hazırlık sadece sağlam bir akademik geçmişe ve deneyime sahip olmakla mı sınırlıdır?
You'll very quickly learn that being an academic involves more than just writing research papers. Your time as a postdoc is when you can start learning about these other aspects, while building your own profile. A postdoc needs to do the following: * Build a publication record. This will involve both what you are paid to do and your own line of research. * Get involved with supervising students. Help with the PhDs in the lab, and get involved in supervising masters students. * Get involved with obtaining funding. This can either be by helping your employer or (ideally) obtaining your own funding. * Build an international reputation. * Start collaborating with external parties. * Gain some teaching experience. This is absolutely crucial if you want a faculty position. * Learn how to manage projects and a lab. This includes overseeing the progress of projects, allocating your time (and others), presenting results at meetings and writing deliverables. If you are in a lab setting, you will need to learn how to fix/calibrate/maintain critical equipment and software so that you can start your own lab some day, and you will need to become proficient in teaching more junior members on how to use that equipment. * Start to devise a strategic research plan. While it is fun to do opportunistic research, solving a problem that comes along or investigating any idea that pops into your head, a better long term strategy is to formulate an interesting long term research plan and follow it, building result upon result. Be as proactive as humanly possible, without being annoying. Talk to everyone in the department, especially people whose research interests are close to your. Go to conferences and sit down and work with interesting people (not necessarily the superstars).
Akademik olmanın sadece araştırma makaleleri yazmaktan daha fazlasını içerdiğini çok çabuk öğreneceksiniz. Doktora sonrası dönem, kendi profilinizi oluştururken bu diğer yönleri öğrenmeye başlayabileceğiniz zamandır. Bir doktora sonrası şunları yapmalıdır: * Bir yayın kaydı oluşturun. Bu, hem yapmak için para aldığınız şeyi hem de kendi araştırma alanınızı içerecektir. * Öğrencilerin denetlenmesine katılın. Laboratuvardaki doktora öğrencilerine yardım edin ve yüksek lisans öğrencilerinin denetlenmesine katılın. * Finansman sağlamaya katılın. Bu, ya işverenize yardım ederek ya da (ideal olarak) kendi finansmanınızı sağlayarak yapılabilir. * Uluslararası bir itibar oluşturun. * Dış taraflarla işbirliği yapmaya başlayın. * Biraz öğretim deneyimi kazanın. Bir fakülte pozisyonu istiyorsanız bu kesinlikle çok önemlidir. * Projeleri ve bir laboratuvarı nasıl yöneteceğinizi öğrenin. Bu, projelerin ilerlemesini denetlemek, zamanınızı (ve başkalarının zamanını) ayırmak, toplantılarda sonuçları sunmak ve teslim edilebilirleri yazmak gibi şeyleri içerir. Bir laboratuvar ortamındaysanız, bir gün kendi laboratuvarınızı kurabilmeniz için kritik ekipman ve yazılımları nasıl tamir edeceğinizi/kalibre edeceğinizi/bakımını yapacağınızı öğrenmeniz gerekecektir ve daha genç üyelere bu ekipmanı nasıl kullanacaklarını öğretmede yetkin olmanız gerekecektir. * Stratejik bir araştırma planı geliştirmeye başlayın. Fırsatçı araştırmalar yapmak, ortaya çıkan bir sorunu çözmek veya aklınıza gelen herhangi bir fikri araştırmak eğlenceli olsa da, daha iyi bir uzun vadeli strateji, ilginç bir uzun vadeli araştırma planı formüle etmek ve bunu takip etmek, sonuç üzerine sonuç oluşturmaktır. Can sıkıcı olmadan, insan olarak mümkün olduğunca proaktif olun. Bölümdeki herkesle konuşun, özellikle de araştırma ilgi alanları size yakın olan kişilerle. Konferanslara gidin ve ilginç insanlarla (mutlaka süperstarlar değil) oturup çalışın.
23
Can someone explain to me what the ```contentInset``` property in a ```UIScrollView``` instance is used for? And maybe provide an example?
Birisi bana ```UIScrollView``` örneğinde ```contentInset``` özelliğinin ne için kullanıldığını açıklayabilir mi? Ve belki bir örnek verebilir mi?
While jball's answer is an excellent description of content insets, it doesn't answer the question of when to use it. I'll borrow from his diagrams: ``` _|←_cW_→_|_↓_ | | --------------- |content| ↑ ↑ |content| contentInset.top cH |content| ↓ |content| contentInset.bottom |content| ↓ --------------- |content| -------------↑- ``` That's what you get when you do it, but the usefulness of it only shows when you scroll: ``` _|←_cW_→_|_↓_ |content| ← content is still visible --------------- |content| ↑ ↑ |content| contentInset.top cH |content| ↓ |content| contentInset.bottom |content| ↓ --------------- _|_______|___ ↑ ``` That top row of content will still be visible because it's still inside the frame of the scroll view. One way to think of the top offset is "how much to shift the content down the scroll view when we're scrolled all the way to the top" To see a place where this is actually used, look at the build-in Photos app on the iphone. The Navigation bar and status bar are transparent, and the contents of the scroll view are visible underneath. That's because the scroll view's frame extends out that far. But if it wasn't for the content inset, you would never be able to have the top of the content clear that transparent navigation bar when you go all the way to the top.
jball'un cevabı içerik girintileri hakkında mükemmel bir açıklama olsa da, ne zaman kullanılacağı sorusunu cevaplamıyor. Onun diyagramlarından ödünç alacağım: ``` _|←_cW_→_|_↓_ | | --------------- |içerik| ↑ ↑ |içerik| contentInset.top cH |içerik| ↓ |içerik| contentInset.bottom |içerik| ↓ --------------- |içerik| -------------↑- ``` Bunu yaptığınızda elde ettiğiniz şey budur, ancak bunun kullanışlılığı yalnızca kaydırdığınızda ortaya çıkar: ``` _|←_cW_→_|_↓_ |içerik| ← içerik hala görünür --------------- |içerik| ↑ ↑ |içerik| contentInset.top cH |içerik| ↓ |içerik| contentInset.bottom |içerik| ↓ --------------- _|_______|___ ↑ ``` İçeriğin en üst sırası hala görünür olacak çünkü hala kaydırma görünümünün çerçevesinin içinde. Üst ofseti düşünmenin bir yolu, "en üste kaydırıldığımızda içeriği kaydırma görünümünde ne kadar aşağı kaydıracağımız"dır. Bunun gerçekten kullanıldığı bir yeri görmek için, iPhone'daki yerleşik Fotoğraflar uygulamasına bakın. Gezinme çubuğu ve durum çubuğu şeffaftır ve kaydırma görünümünün içerikleri altında görünür. Bunun nedeni, kaydırma görünümünün çerçevesinin o kadar uzağa uzanmasıdır. Ancak içerik girintisi olmasaydı, en üste gittiğinizde içeriğin üst kısmının o şeffaf gezinme çubuğunu asla temizleyemezdiniz.
24
How is arc defined in TikZ?
TikZ'de yay nasıl tanımlanır?
```\draw (x,y) arc (start:stop:radius);``` draws an arc * with radius ```radius``` * starts from ```(x,y)``` * with center ```(x-r*cos(start), y-r*sin(start))``` and * ends at ```(x-r*cos(start)+r*cos(stop), y-r*sin(start)+r*sin(stop))```. For example, ``` \draw[red] (0,0) arc (30:60:3); ``` draws an arc * of radius ```3``` * starting from ```(0,0)``` * with center ```(0-3*cos(30),0-3*sin(30))``` and * ending at ```(0-3*cos(30)+3*cos(60),0-3*sin(30)+3*sin(60))```. ```\draw[blue] (0,0) -- ++(30+180:3) -- +(60:3); ``` draw a blue line to the arc to make a complete sector. Minimal Working Example ```\documentclass[tikz,border=12pt]{standalone} \begin{document} \foreach \start/\stop in {30/60,45/90,135/180,0/180,45/315} { \begin{tikzpicture} \draw[lightgray,ultra thin] (-6,-6) grid (6,6); \draw[red] (0,0) arc (\start:\stop:3); \draw[blue] (0,0) -- ++(\start+180:3) -- +(\stop:3); \node[anchor=north] at (0,6) {$(\start:\stop:3)$}; \end{tikzpicture} } \end{document} ```
```\draw (x,y) arc (start:stop:radius);``` bir yay çizer * ```radius``` yarıçapıyla * ```(x,y)``` noktasından başlar * ```(x-r*cos(start), y-r*sin(start))``` merkezlidir ve * ```(x-r*cos(start)+r*cos(stop), y-r*sin(start)+r*sin(stop))``` noktasında biter. Örneğin, ``` \draw[red] (0,0) arc (30:60:3); ``` bir yay çizer * ```3``` yarıçaplı * ```(0,0)``` noktasından başlar * ```(0-3*cos(30),0-3*sin(30))``` merkezlidir ve * ```(0-3*cos(30)+3*cos(60),0-3*sin(30)+3*sin(60))``` noktasında biter. ```\draw[blue] (0,0) -- ++(30+180:3) -- +(60:3); ``` tam bir sektör oluşturmak için yaydan mavi bir çizgi çizer. Minimum Çalışma Örneği ```\documentclass[tikz,border=12pt]{standalone} \begin{document} \foreach \start/\stop in {30/60,45/90,135/180,0/180,45/315} { \begin{tikzpicture} \draw[lightgray,ultra thin] (-6,-6) grid (6,6); \draw[red] (0,0) arc (\start:\stop:3); \draw[blue] (0,0) -- ++(\start+180:3) -- +(\stop:3); \node[anchor=north] at (0,6) {$(\start:\stop:3)$}; \end{tikzpicture} } \end{document} ```
25
How to connect mysql workbench to running mysql inside docker?
Mysql workbench'ü docker içinde çalışan mysql'e nasıl bağlayabilirim?
By default after deployment MySQL has following connection restrictions: ```mysql> select host, user from mysql.user; +-----------+---------------+ | host | user | +-----------+---------------+ | localhost | healthchecker | | localhost | mysql.session | | localhost | mysql.sys | | localhost | root | +-----------+---------------+ 4 rows in set (0.00 sec) ``` Apparently, for the security purposes you will not be able to connect to it outside of the docker image. If you need to change that to allow root to connect from any host (say, for development purposes), do: * Start your mysql image with all port mappings required: ```docker run -p 3306:3306 --name=mysql57 -d mysql/mysql-server:5.7``` or, if the complete port mapping is required: ```docker run -p 3306:3306 -p 33060:33060 --name=mysql57 -d mysql/mysql-server:5.7 ``` * If this is the fresh installation - grab the default password: ```docker logs mysql57 2>&1 | grep GENERATED``` * Connect using ```mysql``` client directly to the mysqld in docker: ```docker exec -it mysql57 mysql -uroot -p``` * If this is the fresh installation you will be asked to change the password using ```ALTER USER``` command. Do it. * Run SQL: ```update mysql.user set host = '%' where user='root';``` * Quit the ```mysql``` client. * Restart the container: ```docker restart mysql57``` Now you will be able to connect from MySQL Workbench to ```host: `0.0.0.0` port: `3306` ``` After all the changes the query will show: ```select host, user from mysql.user; +-----------+---------------+ | host | user | +-----------+---------------+ | % | root | | localhost | healthchecker | | localhost | mysql.session | | localhost | mysql.sys | +-----------+---------------+ ```
MySQL'in varsayılan olarak dağıtımdan sonra aşağıdaki bağlantı kısıtlamaları vardır: ```mysql> select host, user from mysql.user; +-----------+---------------+ | host | user | +-----------+---------------+ | localhost | healthchecker | | localhost | mysql.session | | localhost | mysql.sys | | localhost | root | +-----------+---------------+ 4 rows in set (0.00 sec) ``` Görünüşe göre, güvenlik amaçları doğrultusunda docker görüntüsünün dışından bağlantı kuramayacaksınız. Bunu, root'un herhangi bir host'tan bağlanmasına izin verecek şekilde değiştirmeniz gerekiyorsa (örneğin, geliştirme amaçları için), şunları yapın: * Gerekli tüm bağlantı eşlemeleriyle mysql görüntünüzü başlatın: ```docker run -p 3306:3306 --name=mysql57 -d mysql/mysql-server:5.7``` veya, tam bağlantı eşlemesi gerekiyorsa: ```docker run -p 3306:3306 -p 33060:33060 --name=mysql57 -d mysql/mysql-server:5.7 ``` * Bu yeni bir kurulumsa - varsayılan parolayı alın: ```docker logs mysql57 2>&1 | grep GENERATED``` * ```mysql``` istemcisini kullanarak doğrudan docker'daki mysqld'ye bağlanın: ```docker exec -it mysql57 mysql -uroot -p``` * Bu yeni bir kurulumsa, ```ALTER USER``` komutunu kullanarak parolayı değiştirmeniz istenecektir. Yapın. * SQL'i çalıştırın: ```update mysql.user set host = '%' where user='root';``` * ```mysql``` istemcisinden çıkın. * Konteyneri yeniden başlatın: ```docker restart mysql57``` Artık MySQL Workbench'ten şu şekilde bağlantı kurabileceksiniz: ```host: `0.0.0.0` port: `3306` ``` Tüm değişikliklerden sonra sorgu şu şekilde görünecektir: ```select host, user from mysql.user; +-----------+---------------+ | host | user | +-----------+---------------+ | % | root | | localhost | healthchecker | | localhost | mysql.session | | localhost | mysql.sys | +-----------+---------------+ ```
26
Can meat spoil outside the fridge if it's baked into bread as a filling?
Et, ekmeğin içine dolgu olarak konulursa buzdolabının dışında bozulur mu?
There are two differences between your buns and a tin can. First, your buns were heated to a core temperature of under 100°C. Yes, your oven was probably set way higher, but the water content in your filling prevents it from getting hotter than boiling water. Commercial canning is done in the vicinity of 120-130°C, which is possible because the cans are cooked under pressure. So unlike in a can, most pathogens were destroyed, but not necessarily all of them. For human consumption, that’s perfectly fine as long as the remaining ones don’t get the time-temperature combo to regrow. Second, a bread dough may be dense (although the aim is usually something different), but by no means airtight. Interestingly, wrapping meat in dense dough was used as preservation method in medieval times - the “ancestor” of today’s pork pies and pastries. But while the hard flour crust (not intended to be eaten originally) did form a protective layer and usually extended the shelf life more or less, it was by no means food safe judged by modern standards - although some pies were stored for months. But your fluffy buns are truly not a protective layer. Which means you should refrigerate your buns, but also that you get to enjoy the whole dish.
Çöreklerinizle bir teneke kutu arasında iki fark vardır. Birincisi, çörekleriniz 100°C'nin altındaki bir çekirdek sıcaklığına kadar ısıtıldı. Evet, fırınınız muhtemelen çok daha yükseğe ayarlanmıştı, ancak dolgunuzdaki su içeriği kaynar sudan daha sıcak olmasını engeller. Ticari konserveleme, kutuların basınç altında pişirilmesi mümkün olduğu için 120-130°C civarında yapılır. Yani bir kutunun aksine, çoğu patojen yok edildi, ancak hepsi değil. İnsan tüketimi için, kalanların yeniden büyümesi için zaman-sıcaklık kombinasyonunu elde etmedikleri sürece bu tamamen iyidir. İkincisi, bir ekmek hamuru yoğun olabilir (amaç genellikle farklı olsa da), ancak hiçbir şekilde hava geçirmez değildir. İlginç bir şekilde, eti yoğun hamura sarmak orta çağlarda bir koruma yöntemi olarak kullanılıyordu - günümüzün domuz böreklerinin ve hamur işlerinin "atası". Ancak sert un kabuğu (aslen yenmek için tasarlanmamıştır) koruyucu bir tabaka oluşturmuş ve genellikle raf ömrünü az çok uzatmış olsa da, modern standartlara göre hiçbir şekilde gıda güvenli değildi - bazı börekler aylarca saklansa da. Ancak kabarık çörekleriniz gerçekten koruyucu bir tabaka değildir. Bu, çöreklerinizi soğutmanız gerektiği, ancak aynı zamanda tüm yemeğin tadını çıkarmanız gerektiği anlamına gelir.
27
I'm wondering how the XML Schema specification handles these cases: ``` ``` No maxOccurs given -> Is this the cardinality [1..1]? ``` ``` I suppose this is simply invalid? ``` ``` Is this the cardinality [0..2] or [1..2]? Is there an "official" definition on how the XML Schema spec handles these cases?
XML Şeması spesifikasyonunun bu durumları nasıl işlediğini merak ediyorum: ``` ``` maxOccurs verilmemiş -> Bu [1..1] kardinalitesi midir? ``` ``` Sanırım bu sadece geçersiz? ``` ``` Bu [0..2] mi yoksa [1..2] kardinalitesi midir? XML Şeması spesifikasyonunun bu durumları nasıl işlediğine dair "resmi" bir tanım var mı?
New, expanded answer to an old, commonly asked question... Default Values * Occurrence constraints ```minOccurs``` and ```maxOccurs``` default to ```1```. Common Cases Explained ``` ``` means ```A``` is required and must appear exactly once. ``` ``` means ```A``` is optional and may appear at most once. ``` ``` means ```A``` is required and may repeat an unlimited number of times. ``` ``` means ```A``` is optional and may repeat an unlimited number of times. See Also * W3C XML Schema Part 0: Primer In general, an element is required to appear when the value of minOccurs is 1 or more. The maximum number of times an element may appear is determined by the value of a maxOccurs attribute in its declaration. This value may be a positive integer such as 41, or the term unbounded to indicate there is no maximum number of occurrences. The default value for both the minOccurs and the maxOccurs attributes is 1. Thus, when an element such as comment is declared without a maxOccurs attribute, the element may not occur more than once. Be sure that if you specify a value for only the minOccurs attribute, it is less than or equal to the default value of maxOccurs, i.e. it is 0 or 1. Similarly, if you specify a value for only the maxOccurs attribute, it must be greater than or equal to the default value of minOccurs, i.e. 1 or more. If both attributes are omitted, the element must appear exactly once. * W3C XML Schema Part 1: Structures Second Edition ```<element maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 > ```
Eski, sıkça sorulan bir soruya yeni, genişletilmiş cevap... Varsayılan Değerler * Oluşum kısıtlamaları ```minOccurs``` ve ```maxOccurs``` varsayılan olarak ```1```'dir. Ortak Durumlar Açıklandı ``` ``` ```A```'nın gerekli olduğu ve tam olarak bir kez görünmesi gerektiği anlamına gelir. ``` ``` ```A```'nın isteğe bağlı olduğu ve en fazla bir kez görünebileceği anlamına gelir. ``` ``` ```A```'nın gerekli olduğu ve sınırsız sayıda tekrarlanabileceği anlamına gelir. ``` ``` ```A```'nın isteğe bağlı olduğu ve sınırsız sayıda tekrarlanabileceği anlamına gelir. Ayrıca Bakınız * W3C XML Şeması Bölüm 0: Giriş Genel olarak, bir öğenin ```minOccurs``` değeri 1 veya daha fazla olduğunda görünmesi gerekir. Bir öğenin görünebileceği maksimum tekrar sayısı, bildirimindeki ```maxOccurs``` özniteliğinin değeriyle belirlenir. Bu değer, 41 gibi pozitif bir tam sayı veya maksimum oluşum sayısının olmadığını belirtmek için sınırsız terimi olabilir. Hem ```minOccurs``` hem de ```maxOccurs``` özniteliklerinin varsayılan değeri 1'dir. Bu nedenle, ```comment``` gibi bir öğe ```maxOccurs``` özniteliği olmadan bildirildiğinde, öğe bir kereden fazla görünemez. Yalnızca ```minOccurs``` özniteliği için bir değer belirtiyorsanız, bunun ```maxOccurs```'un varsayılan değerinden küçük veya ona eşit olduğundan emin olun, yani 0 veya 1'dir. Benzer şekilde, yalnızca ```maxOccurs``` özniteliği için bir değer belirtiyorsanız, bunun ```minOccurs```'un varsayılan değerinden büyük veya ona eşit olması gerekir, yani 1 veya daha fazla. Her iki öznitelik de atlanırsa, öğe tam olarak bir kez görünmelidir. * W3C XML Şeması Bölüm 1: Yapılar İkinci Baskı ```<element maxOccurs = (nonNegativeInteger | unbounded) : 1 minOccurs = nonNegativeInteger : 1 > ```
28
Were there any flying dinosaurs?
Uçan dinozorlar var mıydı?
Birds are both flying dinosaurs and flying reptiles. Yes, that's potentially confusing. To understand the apparent contradiction, you have to understand how modern classification of organisms works (phylogenetic systematics). Under the old (Linnean) classification system, Reptilia (reptiles) was an order and Aves (birds) was a separate order. Phylogenetic systematics, which has completely replaced the Linnean system, views all organisms as interrelated in a nested set of monophyletic groups (clades). It's like a set of venn diagrams, where all organisms fall into a giant circle and then successively smaller circles classify more and more specific groups. The clade Reptilia includes snakes, lizards, crocodiles, and lots of extinct groups, including dinosaurs. So all dinosaurs are reptiles. The clade Dinosauria includes all the extinct dinosaurs (Stegosaurus, Triceratops, sauropods, etc.), including theropod dinosaurs, which include well known dinosaurs like Tyrannosaurus and Allosaurus. Based on a mountain on anatomical evidence, including lots of transitional fossils, living birds are a sub-group of theropod dinosaurs. So all birds (Aves) are theropod dinosaurs (Dinosauria: Theropoda). All dinosaurs are reptiles. Therefore, birds are dinosaurs and reptiles. They are just more closely related to dinosaurs than to other reptiles. The tricky part is that most people have an intuitive idea of what "reptiles" and "dinosaurs" are. To a systematist, whose job it is to classify organisms, these terms don't mean the same thing as they do to most people. Systematists think about groups like Reptilia and Dinosauria and how those groups are related to one another. So they have no problem saying that birds are dinosaurs and reptiles, because birds are nested within both of those groups. A few words about pterosaurs Along with birds and bats, pterosaurs are the other clade of vertebrates capable of powered, flapping flight. Pterosaurs fall within Reptilia (and Diapsida and Archosauria) along with Dinosauria, which includes birds. There are a lot of other extinct lineages in the tree that are not shown, e.g., ornithodirans that are not dinosaurs and not pterosaurs. Pterosaurs and birds share anatomical features that all reptiles, diapsids, archosaurs, and ornithodirans have, which is how we know that they are more closely related to each other than to other groups, like crocodiles. But their flight structures evolved independently and are anatomically distinct fro one another. So pterosaurs are flying reptiles but not flying dinosaurs. These images might help you understand the above explanation.
Kuşlar hem uçan dinozorlar hem de uçan sürüngenlerdir. Evet, bu kafa karıştırıcı olabilir. Görünürdeki çelişkiyi anlamak için organizmaların modern sınıflandırmasının nasıl çalıştığını (filogenetik sistematik) anlamanız gerekir. Eski (Linne) sınıflandırma sisteminde, Reptilia (sürüngenler) bir takımdı ve Aves (kuşlar) ayrı bir takımdı. Linne sisteminin yerini tamamen alan filogenetik sistematik, tüm organizmaları monofiletik grupların (kladlar) iç içe geçmiş bir kümesinde birbirine bağlı olarak görür. Bu, tüm organizmaların dev bir daireye düştüğü ve daha sonra giderek daha küçük dairelerin daha spesifik grupları sınıflandırdığı bir Venn diyagramları kümesi gibidir. Reptilia kladı yılanları, kertenkeleleri, timsahları ve dinozorlar da dahil olmak üzere birçok soyu tükenmiş grubu içerir. Yani tüm dinozorlar sürüngendir. Dinosauria kladı, Tyrannosaurus ve Allosaurus gibi iyi bilinen dinozorları içeren teropod dinozorlar da dahil olmak üzere tüm soyu tükenmiş dinozorları (Stegosaurus, Triceratops, sauropodlar vb.) içerir. Çok sayıda geçiş fosili de dahil olmak üzere anatomik kanıtlara dayanan bir dağa göre, yaşayan kuşlar teropod dinozorların bir alt grubudur. Yani tüm kuşlar (Aves) teropod dinozorlardır (Dinosauria: Theropoda). Tüm dinozorlar sürüngendir. Bu nedenle kuşlar dinozor ve sürüngendir. Sadece diğer sürüngenlerden ziyade dinozorlarla daha yakından ilişkilidirler. İşin püf noktası, çoğu insanın "sürüngenler" ve "dinozorlar"ın ne olduğuna dair sezgisel bir fikre sahip olmasıdır. Görevi organizmaları sınıflandırmak olan bir sistematist için bu terimler çoğu insan için ifade ettikleri anlamı ifade etmez. Sistematistler Reptilia ve Dinosauria gibi grupları ve bu grupların birbirleriyle nasıl ilişkili olduğunu düşünürler. Bu nedenle kuşların dinozor ve sürüngen olduğunu söylemekte bir sorunları yoktur çünkü kuşlar bu grupların her ikisinin içinde yer alır. Pterozorlar hakkında birkaç söz Kuşlar ve yarasalarla birlikte pterozorlar, güçlü, çırpınan uçuş yeteneğine sahip diğer omurgalı kladıdır. Pterozorlar, kuşları içeren Dinosauria ile birlikte Reptilia'ya (ve Diapsida ve Archosauria'ya) girer. Ağaçta gösterilmeyen, örneğin dinozor olmayan ve pterozor olmayan ornitodinler gibi birçok başka soyu tükenmiş soy vardır. Pterozorlar ve kuşlar, tüm sürüngenlerin, diapsidlerin, arkozorların ve ornitodinlerin sahip olduğu anatomik özellikleri paylaşırlar; bu, timsahlar gibi diğer gruplara göre birbirleriyle daha yakından ilişkili olduklarını bilmemizi sağlar. Ancak uçuş yapıları bağımsız olarak evrimleşmiştir ve anatomik olarak birbirinden farklıdır. Yani pterozorlar uçan sürüngenlerdir ancak uçan dinozorlar değildir. Bu görseller yukarıdaki açıklamayı anlamanıza yardımcı olabilir.
29
Say, a table ```car``` has one-to-one relationship to tables ```electric_car```, ```gas_car```, and ```hybrid_car```. If a ```car``` is ```electric_car```, it can no longer appear in ```gas_car``` or a ```hybrid_car```, etc. Is it a bad practice to have several mutually exclusive one-to-one relationships in database design?
Diyelim ki ```car``` tablosu ```electric_car```, ```gas_car``` ve ```hybrid_car``` tablolarıyla bire bir ilişkiye sahip. Bir ```car``` ```electric_car``` ise, artık ```gas_car``` veya ```hybrid_car``` içinde görünemez, vb. Veritabanı tasarımında karşılıklı olarak birbirini dışlayan birden fazla bire bir ilişkiye sahip olmak kötü bir uygulama mıdır?
The different types of cars are an instance of a general problem that surfaces over and over again in data modeling. It is called "generalization/specialization" in ER modeling, and "superclass/subclass" in object modeling. An object modeler uses the inheritance features built into the object model to solve the problem quite easily. The subclasses simply extend the superclass. The relational modeler is faced with a problem. how to design the tables so as to emulate the benefits that one would get from inheritance? The simplest technique is called single table inheritance. Data about all types of cars are grouped into a single table for cars. There is a column, car_type, that groups together all the cars of a single type. No car can belong to more than one type. If a column is irrelevant to, say, electric cars, it will be left NULL in the rows that pertain to electric cars. This simple solution works well for the smaller and simpler cases. The presence of a lot of NULLs adds a tiny bit to storage overhead, and a little bit to retrieval overhead. The developer may have to learn SQL three-valued logic if boolean tests are done on nullable columns. This can be baffling at first, but one gets used to it. There is another technique, called class table inheritance. In this design, there are separate tables for gas_car, electric_car, and hybrid_car, in addition to a combined table, car, for all of them. When you want all of the data about a specific kind of car, you join the car table with the appropriate specialized table. There are fewer NULLs in this design, but you do more joining. This technique works better in the larger and more complex cases. There is a third technique called shared primary key. This technique is often used in conjunction with class table inheritance. The specialized tables for the subclasses have, as their primary key, a copy of the primary key of the corresponding entry in the car table. This id column can be declared to be both the primary key and a foreign key. This involves a little extra programming when new cars are to be added, but it makes the joins simple, easy, and fast. Superclasses and subclasses happen all the time in the real world. Don't be afraid. But do test your initial design for performance. If your first attempt is simple and sound, you'll be able to tweak it to speed it up.
Farklı araba türleri, veri modellemede tekrar tekrar ortaya çıkan genel bir sorunun bir örneğidir. ER modellemede "genelleme/uzmanlaşma" ve nesne modellemede "üst sınıf/alt sınıf" olarak adlandırılır. Bir nesne modelleyicisi, sorunu çözmek için nesne modeline yerleştirilmiş kalıtım özelliklerini oldukça kolay bir şekilde kullanır. Alt sınıflar üst sınıfı basitçe genişletir. İlişkisel modelleyici bir sorunla karşı karşıyadır. Kalıtımın sağlayacağı faydaları taklit etmek için tablolar nasıl tasarlanır? En basit teknik tek tablo kalıtımı olarak adlandırılır. Her türden araba hakkındaki veriler, arabalar için tek bir tabloda gruplandırılır. Tek bir türdeki tüm arabaları bir araya getiren bir car_type sütunu vardır. Hiçbir araba birden fazla türe ait olamaz. Bir sütun, örneğin elektrikli arabalar için alakasızsa, elektrikli arabalarla ilgili satırlarda NULL bırakılır. Bu basit çözüm, daha küçük ve daha basit durumlar için iyi çalışır. Çok sayıda NULL'un varlığı, depolama yüküne biraz ve alma yüküne biraz ekler. Geliştirici, boş bırakılabilir sütunlarda mantıksal testler yapılırsa SQL üç değerli mantığını öğrenmek zorunda kalabilir. Bu ilk başta şaşırtıcı olabilir, ancak alışılır. Sınıf tablo kalıtımı adı verilen başka bir teknik vardır. Bu tasarımda, tümü için birleşik bir tablo olan car'ın yanı sıra gas_car, electric_car ve hybrid_car için ayrı tablolar vardır. Belirli bir araba türüyle ilgili tüm verileri istediğinizde, araba tablosunu uygun uzmanlaşmış tabloyla birleştirirsiniz. Bu tasarımda daha az NULL vardır, ancak daha fazla birleştirme yaparsınız. Bu teknik, daha büyük ve daha karmaşık durumlarda daha iyi çalışır. Paylaşılan birincil anahtar adı verilen üçüncü bir teknik vardır. Bu teknik genellikle sınıf tablo kalıtımıyla birlikte kullanılır. Alt sınıflar için uzmanlaşmış tablolar, birincil anahtarları olarak araba tablosundaki karşılık gelen girdinin birincil anahtarının bir kopyasına sahiptir. Bu id sütunu hem birincil anahtar hem de yabancı anahtar olarak ilan edilebilir. Bu, yeni arabalar eklendiğinde biraz ekstra programlama içerir, ancak birleştirmeleri basit, kolay ve hızlı hale getirir. Üst sınıflar ve alt sınıflar gerçek dünyada her zaman olur. Korkmayın. Ancak ilk tasarımınızı performans açısından test edin. İlk denemeniz basit ve sağlamsa, hızlandırmak için ayarlayabilirsiniz.
30
I see a low use of Mathematica in Kaggle competitions. Why would one use the Wolfram Language versus R, Python, or Julia for machine learning? Besides prettier plots and the Manipulate function, do we have something that is useful for ML that other languages are lacking?
Kaggle yarışmalarında Mathematica'nın düşük kullanımını görüyorum. Makine öğrenimi için Wolfram Dili yerine R, Python veya Julia'yı kullanmanın nedeni ne olabilir? Daha güzel grafikler ve Manipulate fonksiyonunun yanı sıra, diğer dillerde olmayan ve ML için yararlı bir şeyimiz var mı?
Mathematica doesn't have the depth of algorithm support that is present in R or Python. Julia has much more limited algorithm support but does exhibit a good turn of speed. The few algorithms that Mathematica does support are not particularly well exposed for the type of tweaking needed to win Kaggle competitions. Mathematica, as of version 10, supports the following classifiers: "LogisticRegression", "Markov", "NaiveBayes", "NearestNeighbors", "NeuralNetwork", "RandomForest", "SupportVectorMachine". Whilst it does offer one ensemble method, RandomForest, it lacks both Bagging and any flavour of boosting, such as Adaboost. These latter general ensemble methods allow you to leverage the power of a base classifier, either built-in or, of greater utility when exploring performance improvements, of your own design. This limits significantly the potential for creating novel methods within the existing machine learning framework. Mathematica's strengths lay with it's expressive, compact, language, strong visualisation capabilities and easy parallelization. These make it very efficient to explore new strategies and combinations of ML algorithms you may already have implemented. A less often mentioned benefit is that use of Mathematica in a functional programming style tends to lead to fewer bugs in the final code.
Mathematica, R veya Python'da bulunan algoritma desteğinin derinliğine sahip değildir. Julia'nın algoritma desteği çok daha sınırlıdır ancak iyi bir hız sergiler. Mathematica'nın desteklediği birkaç algoritma, Kaggle yarışmalarını kazanmak için gereken ince ayar türü için özellikle iyi bir şekilde ortaya konmamıştır. Mathematica, sürüm 10 itibariyle şu sınıflandırıcıları destekler: "LogisticRegression", "Markov", "NaiveBayes", "NearestNeighbors", "NeuralNetwork", "RandomForest", "SupportVectorMachine". Bir topluluk yöntemi olan RandomForest'ı sunarken, hem Bagging'den hem de Adaboost gibi herhangi bir güçlendirme türünden yoksundur. Bu son genel topluluk yöntemleri, ister yerleşik ister performans iyileştirmelerini keşfederken daha büyük bir yardımcı program olan kendi tasarımınız olsun, bir temel sınıflandırıcı gücünden yararlanmanıza olanak tanır. Bu, mevcut makine öğrenimi çerçevesi içinde yeni yöntemler oluşturma potansiyelini önemli ölçüde sınırlar. Mathematica'nın güçlü yönleri, etkileyici, kompakt dili, güçlü görselleştirme yetenekleri ve kolay paralelliktir. Bunlar, halihazırda uygulamış olabileceğiniz yeni stratejileri ve ML algoritmalarının kombinasyonlarını keşfetmeyi çok verimli hale getirir. Daha az bahsedilen bir fayda, Mathematica'nın işlevsel bir programlama stiliyle kullanılmasının, nihai kodda daha az hataya yol açma eğiliminde olmasıdır.
31
I'm using wp_nav_menu and am trying to create custom output for the sub-level drop downs. I came across the "items_wrap" argument but there's really not much information as to what it is, how it works, and what kind of things can be done with it. What exactly is "%1$s" and "%2$s"? (Can anyone explain it in layman's terms?)
wp_nav_menu kullanıyorum ve alt seviye açılır menüler için özel çıktı oluşturmaya çalışıyorum. "items_wrap" argümanına rastladım ancak ne olduğu, nasıl çalıştığı ve onunla ne gibi şeyler yapılabileceği konusunda pek fazla bilgi yok. "%1$s" ve "%2$s" tam olarak nedir? (Bunu herkes basit bir şekilde açıklayabilir mi?)
The parameter ```'items_wrap'``` for ```wp_nav_menu()``` defaults to: ```'%3$s' ``` This a a template that is parsed with ```sprintf()```: ```$nav_menu .= sprintf( $args->items_wrap , esc_attr( $wrap_id ) // %1$s , esc_attr( $wrap_class ) // %2$s , $items // %3$s ); ``` The numbered placeholders – ```%1$s```, ```%2$s```, ```%3$s``` – refer to the arguments after the first argument in ```sprintf()```. The percent sign marks a placeholder, the number the position and the type ```s``` means it should be treated as a string. Do not change the type unless you really know what you do. :) * ```$wrap_id``` is the parameter ```'menu_id'``` if you have it set, else it is ```'menu-' . $menu->slug```. * ```$wrap_class``` is the parameter ```'menu_class'``` if you have it set, else it is empty. * ```$items``` is a string of the inner content of the menu. Let’s say you don’t need a ```class```. Just omit the second string: ```wp_nav_menu( array( 'items_wrap' => '%3$s' ) ); ``` If you don’t need the ```class``` and the ```id```, and you want another container (because you used a custom walker): ```wp_nav_menu( array( 'items_wrap' => '%3$s' ) ); ``` The main point is: You have to use the numbers for the replacements given in ```wp_nav_menu()```. ```%3$s``` is always the list of items.
```'wp_nav_menu()'``` için ```'items_wrap'``` parametresi varsayılan olarak şu şekildedir: ```'%3$s' ``` Bu, ```sprintf()``` ile ayrıştırılan bir şablondur: ```$nav_menu .= sprintf( $args->items_wrap , esc_attr( $wrap_id ) // %1$s , esc_attr( $wrap_class ) // %2$s , $items // %3$s ); ``` Numaralandırılmış yer tutucular – ```%1$s```, ```%2$s```, ```%3$s``` – ```sprintf()``` içindeki ilk argümandan sonraki argümanları ifade eder. Yüzde işareti bir yer tutucuyu, sayı konumu ve ```s``` türü bir dize olarak işlenmesi gerektiği anlamına gelir. Ne yaptığınızı gerçekten bilmiyorsanız türü değiştirmeyin. :) * ```$wrap_id```, ayarladıysanız ```'menu_id'``` parametresidir, aksi takdirde ```'menu-' . $menu->slug``` olur. * ```$wrap_class```, ayarladıysanız ```'menu_class'``` parametresidir, aksi takdirde boştur. * ```$items```, menünün iç içeriğinin bir dizesidir. Diyelim ki bir ```class```'a ihtiyacınız yok. İkinci dizeyi atlayın: ```wp_nav_menu( array( 'items_wrap' => '%3$s' ) ); ``` ```class```'a ve ```id```'ye ihtiyacınız yoksa ve başka bir kapsayıcı istiyorsanız (özel bir yürütücü kullandığınız için): ```wp_nav_menu( array( 'items_wrap' => '%3$s' ) ); ``` Ana nokta: ```wp_nav_menu()``` içinde verilen değiştirmeler için sayıları kullanmanız gerekir. ```%3$s``` her zaman öğelerin listesidir.
32
I've noticed that people on YouTube and even on TV would sometimes say things like "I used to take lots of coke a few years ago" or "I used to smoke weed daily until this and that" or "Yea, I smoke weed every once in a while," or "I used to pirate games a lot when I was a bit younger" or "I used pirated Windows and Photoshop until I got a job," etc., etc.. Basically they are confessing to a crime, on public record, couldn't anyone come after them? They've already confessed - technically all that would have to be done is a trial. How do people publicly admit to criminal activity and not typically get arrested?
YouTube'da ve hatta televizyonda insanların bazen "Birkaç yıl önce çok fazla kokain alıyordum" veya "Şu zamana kadar her gün ot içiyordum" veya "Evet, ara sıra ot içiyorum" veya "Biraz daha gençken çok fazla korsan oyun oynuyordum" veya "İş bulana kadar korsan Windows ve Photoshop kullandım" gibi şeyler söylediklerini fark ettim. Temel olarak, kamuya açık bir şekilde bir suçu itiraf ediyorlar, peşlerinden kimse gelemez mi? Zaten itiraf etmişler - teknik olarak yapılması gereken tek şey bir duruşma. İnsanlar nasıl kamuoyuna suç faaliyetlerini itiraf edebiliyor ve genellikle tutuklanmıyor?
Unless the Youtube Video shows them committing a crime, then no, they couldn't be arrested and tried for a crime. Them saying it, not under oath, is just hearsay that has no evidentiary value unless there is already other evidence they have committed a crime. In that case, its an admission. But there must be other, either circumstantial, or actual physical evidence of a crime. Past intoxication is not a crime, either. Possession of drugs, if caught with them is. But saying you got high is not. People have walked into police stations and confessed to murders. But with no evidence, no body, no name of a missing person, they can't even be held after the holding period for investigatory purposes expires. If the video shows them committing assault, or breaking and entering (there actually are idiots who post this stuff), the video is actual evidence of a crime and it is often used against them. The statements can be used to begin an investigation, but people don't usually confess to anything worth pursuing even an investigation. The fact that someone says they used to do something criminal is not enough. For all you ( meaning anyone ) knows, the statute of limitations has expired because they "pirated games" 10 years ago. Your comment is right on.
Youtube Videosu onları suç işlerken göstermiyorsa, hayır, tutuklanamaz ve suçtan yargılanamazlar. Yemin etmeden söyledikleri, zaten bir suç işlediklerine dair başka kanıtlar olmadığı sürece delil değeri olmayan sadece duyumdan ibarettir. Bu durumda, bir itiraftır. Ancak suçun başka dolaylı veya fiili fiziksel kanıtları olmalıdır. Geçmişte sarhoş olmak da suç değildir. Uyuşturucu bulundurmak, eğer üzerlerinde yakalanırsa suçtur. Ancak uyuşturucu kullandığınızı söylemek suç değildir. İnsanlar polis karakollarına girip cinayetleri itiraf ettiler. Ancak delil, ceset, kayıp bir kişinin adı olmadan, soruşturma amaçlı tutma süresi dolduktan sonra bile tutulamazlar. Video onları saldırı veya hırsızlık yaparken gösteriyorsa (gerçekten de bu tür şeyleri yayınlayan aptallar var), video suçun fiili kanıtıdır ve genellikle onlara karşı kullanılır. İfadeler bir soruşturma başlatmak için kullanılabilir, ancak insanlar genellikle bir soruşturmayı bile hak edecek bir şeyi itiraf etmezler. Birinin eskiden suç işlediğini söylemesi yeterli değildir. Siz (herkes anlamına gelir) bildiğiniz kadarıyla, 10 yıl önce "oyun korsanlığı" yaptıkları için zamanaşımı süresi dolmuştur. Yorumunuz çok doğru.
33
Did two dissenting Supreme Court justices agree that Trump was "absolutely immune" to the Manhattan DA's subpoena?
İki muhalif Yüksek Mahkeme yargıcı, Trump'ın Manhattan Bölge Savcısı'nın celbine "kesinlikle dokunulmaz" olduğu konusunda hemfikir miydi?
If you are interested in the gory details, please see the full decision in Trump v. Vance. The first half of the linked document contains the Court's majority opinion and the concurring opinion of Justices Kavanaugh and Gorsuch, followed by the separate dissenting opinions of Justices Thomas and Alito. Based on a quick read, it's apparent that Justice Thomas agrees with the general court's opinion that a sitting President &quot;is not entitled to absolute immunity from issuance of [a] subpoena&quot;. Thomas dissents on the grounds that the President &quot;may be entitled to relief against [a subpoena's] enforcement&quot; based on his special status as president. Thomas argues (agreeing with the president) that the case should be vacated and returned to the lower court, so that the President can argue that his duties to the nation take up all of his time and attention and he thus deserves relief from the subpoena. Justice Alito makes a stronger dissent. While he agrees that a sitting President is not absolutely immune from a state subpoena, he argues that such a subpoena should not be enforced unless it meets a stringent legal test, such that: * It does not interfere with the President's execution of his duties of office, and * It carries a weight of urgency — e.g., subpoenaing information related to suspected treason — as a guarantee it is not merely issued to harass. In the absence of those conditions, in Alito's opinion, the President is only subject to the constitutional process of impeachment and trial in Congress. So no, neither dissenting Justice suggests that the President is absolutely immune from this kind of subpoena. Instead, they are concerned that the issuance of such subpoenas might negatively impact on the President's ability to perform the duties of the office, and argue that the President might legitimately be granted varying degrees of relief from such legal actions at a court's discretion.
Kanlı ayrıntılarla ilgileniyorsanız lütfen Trump v. Vance'deki tam karara bakın. Bağlantılı belgenin ilk yarısı Mahkemenin çoğunluk görüşünü ve Yargıçlar Kavanaugh ve Gorsuch'un katılımcı görüşünü içerir, ardından Yargıçlar Thomas ve Alito'nun ayrı muhalif görüşleri gelir. Hızlı bir okumaya dayanarak, Yargıç Thomas'ın genel mahkemenin, görevdeki bir Başkanın "[bir] celbin çıkarılmasından mutlak dokunulmazlığa sahip olmadığı" yönündeki görüşüne katıldığı açıktır. Thomas, Başkanın başkan olarak özel statüsüne dayanarak "[bir celbin] uygulanmasına karşı koruma hakkına sahip olabileceği" gerekçesiyle muhalefet ediyor. Thomas, davanın bozulması ve alt mahkemeye geri gönderilmesi gerektiğini (başkanla aynı fikirde olarak) savunuyor, böylece Başkan görevlerinin tüm zamanını ve dikkatini aldığını ve bu nedenle celpten muaf tutulmayı hak ettiğini savunabilir. Yargıç Alito daha güçlü bir muhalefet sergiliyor. Görevdeki bir Başkanın bir eyalet celbinden mutlak surette muaf olmadığını kabul ederken, böyle bir celbin şu gibi sıkı bir yasal testi karşılamadığı sürece uygulanmaması gerektiğini savunuyor: * Başkanın görevlerini yerine getirmesine müdahale etmez ve * Acil bir ağırlık taşır - örneğin, şüpheli vatana ihanetle ilgili bilgilerin celbedilmesi - yalnızca taciz amacıyla çıkarılmadığının bir garantisi olarak. Alito'nun görüşüne göre, bu koşulların yokluğunda Başkan yalnızca Kongre'de anayasal azil ve yargılama sürecine tabidir. Yani hayır, muhalif Yargıçlardan hiçbiri Başkanın bu tür bir celpten mutlak surette muaf olduğunu öne sürmüyor. Bunun yerine, bu tür celplerin çıkarılmasının Başkanın görevlerini yerine getirme yeteneği üzerinde olumsuz bir etki yaratabileceğinden endişe duyuyorlar ve Başkanın bir mahkemenin takdirine bağlı olarak bu tür yasal işlemlerden meşru olarak çeşitli derecelerde muafiyet verilebileceğini savunuyorlar.
34
Just curious, given how heavily from Tolkien D&D drew, and the fact that games like Wizardry used Hobbits, is there a good design reason why Gygax and company used Halflings (a term that also appears in Tolkien) vice Hobbits as the term for our little friends?
Sadece meraktan, D&D'nin Tolkien'den ne kadar çok şey aldığını ve Wizardry gibi oyunların Hobbitleri kullandığını göz önünde bulundurarak, Gygax ve ekibinin küçük dostlarımız için Hobbitler yerine Yarımlar (Tolkien'de de geçen bir terim) terimini kullanmasının iyi bir tasarım nedeni var mı?
Halflings were originally called hobbits prior to a legal challenge. According to Gary Gygax himself, it was due to a legal claim on &quot;hobbit&quot; by a company who purchased the merchandising rights on Tolkien's works in 1976: TSR was served with papers threatening damages to the tune of half a mil by the Saul Zantes (sp?) division of Elan Merchandising on behalf of the tolkien Estate. The main objection was to the boardgame we were publishing, The Battle of Five Armies. The author of that game had given us a letter from his attorney claiming the work was grandfathered because it was published after the copyrights for JRRT's works had lapsed and before any renewals were made. The action also demanded we remove balrog, dragon, dwarf, elf, ent, goblin, hobbit, orc, and warg from the D&D game. Although only balrog and warg were unique names we agreed to hobbit as well, kept the rest, of course. The boardgame was dumped, and thus the suit was settled out of court at that. Halflings were originally called &quot;hobbits&quot; in the Dungeons & Dragons box set first released in 1974. Later printings changed this to &quot;halfling&quot;. According to The Acaeum, this change occurred between the fifth printing (Dec 1975 - Apr 1976) and sixth printing (1977), with the six printing being marked the Original Collector's Edition. However, Tim Kask has said that box sets were generally thrown together with whichever printings of the books were on hand, so the distinctions between printings are inexact. The Acaeum notes at least one box set shipped having the revised booklets but no Original Collector's Edition mark. Due to an oversight, a single reference to &quot;hobbit&quot; remained on page 6 of Men & Magic, which was fixed in the 2013 Deluxe reprint and PDF copies. According to Wikipedia, J.R.R. Tolkien sold the film, stage, and merchandising rights to The Hobbit and Lord of the Rings to United Artists in 1968, who sold them in turn to Saul Zaentz in 1976. Zaents would go on to produce the 1978 Lord of the Rings animated movie.
Hobbitler, yasal bir itirazdan önce başlangıçta hobbit olarak adlandırılıyordu. Gary Gygax'in kendisine göre, bunun nedeni 1976'da Tolkien'in eserlerinin ticari haklarını satın alan bir şirketin "hobbit" kelimesi üzerinde yasal hak iddia etmesiydi: TSR'ye, Elan Merchandising'in Saul Zantes (sp?) bölümü tarafından Tolkien Vakfı adına yarım milyon dolarlık tazminat davası açıldı. Ana itiraz, yayınladığımız masaüstü oyunu Beş Ordunun Savaşı'naydı. O oyunun yazarı bize, avukatından, JRRT'nin eserlerinin telif hakları sona erdikten ve yenilenmeden önce yayınlandığı için eserin büyükbabadan kalma olduğunu iddia eden bir mektup vermişti. Dava ayrıca balrog, ejderha, cüce, elf, ent, goblin, hobbit, ork ve warg'ı D&D oyunundan kaldırmamızı talep ediyordu. Sadece balrog ve warg benzersiz isimler olmasına rağmen hobbit'i de kabul ettik, geri kalanı elbette koruduk. Masaüstü oyunu çöpe atıldı ve böylece dava mahkeme dışında çözüldü. Hobbitler ilk olarak 1974'te piyasaya sürülen Dungeons & Dragons kutu setinde "hobbitler" olarak adlandırıldı. Daha sonraki baskılarda bu "yarı insan" olarak değiştirildi. The Acaeum'a göre, bu değişiklik beşinci baskı (Aralık 1975 - Nisan 1976) ile altıncı baskı (1977) arasında gerçekleşti ve altıncı baskı Orijinal Koleksiyoncu Sürümü olarak işaretlendi. Ancak Tim Kask, kutu setlerinin genellikle eldeki kitapların hangi baskılarıyla bir araya getirildiğini, bu nedenle baskılar arasındaki ayrımların kesin olmadığını söyledi. The Acaeum, en az bir kutu setinin gözden geçirilmiş kitapçıkları içermesine rağmen Orijinal Koleksiyoncu Sürümü işareti olmadığını belirtiyor. Bir gözden kaçırma nedeniyle, 2013 Deluxe yeniden baskısında ve PDF kopyalarında düzeltilen Men & Magic'in 6. sayfasında "hobbit" kelimesine tek bir referans kaldı. Wikipedia'ya göre, J.R.R. Tolkien, The Hobbit ve Yüzüklerin Efendisi'nin film, sahne ve ticari haklarını 1968'de United Artists'e sattı ve onlar da 1976'da Saul Zaentz'e sattı. Zaents, 1978 Yüzüklerin Efendisi animasyon filmini yapmaya devam edecekti.
35
My USB drive used to be originally 8GB when I bought it. I'm trying to reformatted in Windows 7 by right clicking on the drive and selecting ```Format...```. But the capacity only shows 250MB. Is there something I can do to get the original size back? Maybe it got partitioned in a weird way? The flash drive is a SanDisk Cruzer Micro 8GB.
USB sürücüm ilk aldığımda 8 GB idi. Windows 7'de sürücüye sağ tıklayıp ```Biçimlendir...``` seçeneğini seçerek yeniden biçimlendirmeye çalışıyorum. Ancak kapasite yalnızca 250 MB olarak görünüyor. Orijinal boyutu geri almak için yapabileceğim bir şey var mı? Belki de garip bir şekilde bölümlenmiştir? Flash sürücü bir SanDisk Cruzer Micro 8GB'dir.
The command line procedure is not simple, but it is the most likely thing to work. When re-formatting the "drive" you're actually only formatting a partition on the drive. You need to use the diskpart utility to remove the partitions and create 1 single partition covering the full volume. ```diskpart``` can be a bit dangerous, because if you pick the wrong disk or partition, you can remove data or partitions that are extremely, EXTREMELY important and lose all data on your machine. Proceed with extreme caution! Open up a command prompt as administrator (open the start menu, type ```cmd``` and press Enter.) Type ```diskpart``` and press Enter. You'll end up with a new prompt that looks like this: ```DISKPART> ``` Type ```list disk ``` and you'll get a listing of all drives on your machine. Type ```select disk # ``` to select a disk, where ```#``` is the number of the disk Windows screw-balled. Usually, the device is disk 1, but it's always best to make sure. Then type ```list partition ``` to get a listing of all partitions on the disk. If you're sure you have the right disk/partition, you can then repeat typing ```select partition # delete partition ``` until all partitions are removed from that drive (you may need to type ```delete partition override``` for protected partitions). Once the drive is empty, exit diskpart and remove the drive. Wait at least 5 minutes, then re-insert the drive. DO NOT CLICK FORMAT – this will most likely re-create the problem. Instead, enter diskpart again, and select the disk. Then type ```create partition primary ``` Once you have created the partition, exit ```diskpart``` and, in the command promt, type ```diskmgmt.msc ``` This will provide a reliable way to create a FAT32 partition. On the drive you would like to format (NEVER TOUCH DISK 0!), right click and select ```format```. The ```allocation unit size``` option should be default, and the ```File System``` option should be set to ```FAT32```. The format may take a while, depending on the disk size, be patient. This should fix partition troubles on any readable USB flash drive.
Komut satırı prosedürü basit değildir ancak işe yarama olasılığı en yüksek olanıdır. "Sürücüyü" yeniden biçimlendirirken aslında sürücüdeki yalnızca bir bölümü biçimlendirirsiniz. Bölümleri kaldırmak ve tüm birimi kapsayan tek bir bölüm oluşturmak için diskpart yardımcı programını kullanmanız gerekir. ```diskpart``` biraz tehlikeli olabilir çünkü yanlış disk veya bölümü seçerseniz son derece, SON DERECE önemli olan verileri veya bölümleri kaldırabilir ve makinenizdeki tüm verileri kaybedebilirsiniz. Son derece dikkatli ilerleyin! Yönetici olarak bir komut istemi açın (başlat menüsünü açın, ```cmd``` yazın ve Enter'a basın.) ```diskpart``` yazın ve Enter'a basın. Şuna benzer yeni bir istemle karşılaşırsınız: ```DISKPART> ``` Şunu yazın ```list disk ``` ve makinenizdeki tüm sürücülerin bir listesini alırsınız. Şunu yazın ```select disk # ``` bir disk seçmek için, burada ```#``` Windows'un bozduğu diskin numarasıdır. Genellikle cihaz disk 1'dir ancak emin olmak her zaman en iyisidir. Ardından şunu yazın ```list partition ``` diskteki tüm bölümlerin bir listesini almak için. Doğru disk/bölüme sahip olduğunuzdan eminseniz, tüm bölümler o sürücüden kaldırılıncaya kadar ```select partition # delete partition ``` yazmayı tekrarlayabilirsiniz (korumalı bölümler için ```delete partition override``` yazmanız gerekebilir). Sürücü boşaldığında diskpart'tan çıkın ve sürücüyü çıkarın. En az 5 dakika bekleyin, ardından sürücüyü yeniden takın. BİÇİMLENDİR'e TIKLAMAYIN – bu büyük olasılıkla sorunu yeniden oluşturacaktır. Bunun yerine diskpart'a tekrar girin ve diski seçin. Ardından şunu yazın ```create partition primary ``` Bölümü oluşturduktan sonra ```diskpart```'tan çıkın ve komut isteminde şunu yazın ```diskmgmt.msc ``` Bu, FAT32 bölümü oluşturmanın güvenilir bir yolunu sağlayacaktır. Biçimlendirmek istediğiniz sürücüde (ASLA DİSK 0'A DOKUNMAYIN!), sağ tıklayın ve ```format```'ı seçin. ```Tahsis birimi boyutu``` seçeneği varsayılan olmalı ve ```Dosya Sistemi``` seçeneği ```FAT32``` olarak ayarlanmalıdır. Biçimlendirme, disk boyutuna bağlı olarak biraz zaman alabilir, sabırlı olun. Bu, okunabilir herhangi bir USB flash sürücüdeki bölüm sorunlarını gidermelidir.
36
I am a Tor developer. I understand that the .onion address is a public key of sorts, but not much more than that (I can vaguely guess, though). When nobody knows the IP of the .onion address, how do requests reach it? Are they bounced between nodes in the P2P network till someone decrypts it with the corresponding private key?
Ben bir Tor geliştiricisiyim. .onion adresinin bir tür açık anahtar olduğunu anlıyorum, ancak bundan fazlasını değil (tahmin edebiliyorum). Kimse .onion adresinin IP'sini bilmiyorsa, istekler ona nasıl ulaşıyor? Karşılık gelen özel anahtarla biri şifresini çözene kadar P2P ağındaki düğümler arasında sıçrıyorlar mı?
Up to at least October 2013 the hidden services work like this: * A hidden service calculates its key pair (private and public key, asymmetric encryption). * Then the hidden service picks some relays as its introduction points. * It tells its public key to those introduction points over Tor circuits. * After that the hidden-service creates a hidden service descriptor, containing its public key and what its introduction points are. * The hidden service signs the hidden service descriptor with its private key. * It then uploads the hidden service descriptor to a distributed hash table (DHT). * Clients learn the .onion address from a hidden service out-of-band. (e.g. public website) (A $hash.onion is a 16 character name derived from the service's public key.) * After retrieving the .onion address the client connects to the DHT and asks for that $hash. * If it exists the client learns about the hidden service's public key and its introduction points. * The client picks a relay at random to build a circuit to it, to tell it a one-time secret. The picked relay acts as rendezvous point. * The client creates a introduce message, containing the address of the rendezvous point and the one-time secret, before encrypting the message with the hidden service's public key. * The client sends its message over a Tor circuit to one of the introduction points, demanding it to be forwarded to the hidden service. * The hidden service decrypts the introduce message with its private key to learn about the rendezvous point and the one-time secret. * The hidden service creates a rendezvous message, containing the one-time secret and sends it over a circuit to the rendezvous point. * The rendezvous point tells the client that a connection was established. * Client and hidden service talk to each other over this rendezvous point. All traffic is end-to-end encrypted and the rendezvous point just relays it back and forth. Note that each of them, client and hidden service, build a circuit to the rendezvous point; at three hops per circuit this makes six hops in total.
En azından Ekim 2013'e kadar gizli hizmetler şu şekilde çalıştı: * Gizli bir hizmet anahtar çiftini (özel ve genel anahtar, asimetrik şifreleme) hesaplar. * Ardından gizli hizmet, giriş noktaları olarak bazı röleleri seçer. * Genel anahtarını bu giriş noktalarına Tor devreleri üzerinden söyler. * Bundan sonra gizli hizmet, genel anahtarını ve giriş noktalarının ne olduğunu içeren bir gizli hizmet tanımlayıcısı oluşturur. * Gizli hizmet, gizli hizmet tanımlayıcısını özel anahtarıyla imzalar. * Ardından gizli hizmet tanımlayıcısını dağıtılmış bir karma tabloya (DHT) yükler. * İstemciler, .onion adresini gizli bir hizmetten bant dışı öğrenir. (ör. genel web sitesi) (Bir $hash.onion, hizmetin genel anahtarından türetilen 16 karakterlik bir addır.) * .onion adresini aldıktan sonra istemci DHT'ye bağlanır ve o $hash'i ister. * Varsa istemci, gizli hizmetin genel anahtarı ve giriş noktaları hakkında bilgi edinir. * İstemci, kendisine bir devre kurmak için rastgele bir röle seçer ve ona tek seferlik bir sır söyler. Seçilen röle buluşma noktası görevi görür. * İstemci, buluşma noktasının adresini ve tek seferlik sırrı içeren bir tanıtım mesajı oluşturur ve mesajı gizli hizmetin genel anahtarıyla şifreler. * İstemci, mesajını Tor devresi üzerinden giriş noktalarından birine gönderir ve gizli hizmete iletilmesini talep eder. * Gizli hizmet, buluşma noktası ve tek seferlik sır hakkında bilgi edinmek için tanıtım mesajını özel anahtarıyla şifresini çözer. * Gizli hizmet, tek seferlik sırrı içeren bir buluşma mesajı oluşturur ve bir devre üzerinden buluşma noktasına gönderir. * Buluşma noktası, istemciye bir bağlantı kurulduğunu söyler. * İstemci ve gizli hizmet, bu buluşma noktası üzerinden birbirleriyle konuşur. Tüm trafik uçtan uca şifrelenir ve buluşma noktası yalnızca onu ileri geri iletir. İstemci ve gizli hizmetin her birinin buluşma noktasına bir devre kurduğunu unutmayın; devre başına üç atlama ile bu toplamda altı atlama yapar.
37
I have been offered a PhD position by an inexperienced professor in a great institution in Europe. Despite the fact that the institution is very strong in my area, since the position was offered by this particular professor, I would have to commit myself to working with him for my thesis. This professor is young, and relatively inexperienced, but I enjoy the things he works on, and we seem to get along well. My question is, would having an inexperienced advisor hurt my growth as a scientist, or my career in general? Will I have the time during my PhD to also work on the side with other, more renowned professors in the department, or is one usually focused in a single research project?
Avrupa'da harika bir kurumda deneyimsiz bir profesör tarafından bana doktora pozisyonu teklif edildi. Kurumun benim alanımda çok güçlü olmasına rağmen, pozisyon bu profesör tarafından teklif edildiğinden, tezim için onunla çalışmaya kendimi adamam gerekecek. Bu profesör genç ve nispeten deneyimsiz, ancak üzerinde çalıştığı şeylerden hoşlanıyorum ve iyi anlaştığımız anlaşılıyor. Sormak istediğim şu: Deneyimsiz bir danışman olması, bir bilim insanı olarak gelişimime veya genel olarak kariyerime zarar verir mi? Doktora çalışmam sırasında bölümdeki diğer daha ünlü profesörlerle de yan yana çalışma zamanım olacak mı, yoksa genellikle tek bir araştırma projesine mi odaklanılıyor?
An inexperienced advisor can hurt your career by being relatively unknown. This means they may not have access to the same network and that their recommendation letters do not carry the same weight. Inexperience in supervision may, for example, lead to unrealistic expectations. Or an inexperienced advisor can be very good for your career, by quickly rising to fame with the awesome publications the two of you will write together and being fresh in everybody's memory when writing recommendation letters. They may spend plenty of time on working with you. An experienced advisor can hurt your career by being never there. They may already have made their name, have extremely high expectations from PhD students, to the level of cause them to be overly stressed and quit. Or they may be very good for your career, as dedicated as can be to PhD students, prioritising them above most other duties, having realistic expectations from PhD students, and having great influence when writing recommendation letters. Bottom line: an experienced advisor may be better for you than an inexperienced one, but that certainly does not have to be the case. And keep in mind: a very good/famous scientist is not always a very good PhD advisor.
Deneyimsiz bir danışman, nispeten bilinmediği için kariyerinize zarar verebilir. Bu, aynı ağa erişimlerinin olmayabileceği ve tavsiye mektuplarının aynı ağırlığı taşımayacağı anlamına gelir. Örneğin, denetim konusunda deneyimsizlik gerçekçi olmayan beklentilere yol açabilir. Ya da deneyimsiz bir danışman, ikinizin birlikte yazacağı harika yayınlarla hızla ün kazanarak ve tavsiye mektupları yazarken herkesin hafızasında taze olarak kalarak kariyeriniz için çok iyi olabilir. Sizinle çalışmaya bolca zaman ayırabilirler. Deneyimli bir danışman, hiç orada olmamakla kariyerinize zarar verebilir. Zaten bir isim yapmış olabilirler, doktora öğrencilerinden son derece yüksek beklentileri olabilir, onları aşırı strese sokacak ve bırakmalarına neden olacak düzeyde olabilir. Ya da doktora öğrencilerine olabildiğince adanmış, onları diğer görevlerin çoğundan önceliklendiren, doktora öğrencilerinden gerçekçi beklentileri olan ve tavsiye mektupları yazarken büyük etkiye sahip oldukları için kariyeriniz için çok iyi olabilirler. Sonuç olarak: Deneyimli bir danışman, deneyimsiz bir danışmandan sizin için daha iyi olabilir, ancak bu kesinlikle böyle olmak zorunda değildir. Ve unutmayın: Çok iyi/ünlü bir bilim insanı her zaman çok iyi bir doktora danışmanı değildir.
38
Is there a phrase that means "too important" and "attracting too much attention"?
"Çok önemli" ve "çok fazla dikkat çeken" anlamına gelen bir deyim var mı?
There is the term "overdominant": From Collins dictionary: >overdominant [adjective] excessively dominant To begin with, the design aspect is the most striking and arguably remains overdominant. [Times, Sunday Times (2010)] Here is an example: > [Steps must be taken to prevent any one] religious or ethnic group being overdominant. Otherwise, we will see a repeat of the unfortunate history of much of the 20th Century... Other possible terms that have similar meaning include "overpowered", "obtrusive" and "preponderant".
"Aşırı baskın" terimi vardır: Collins sözlüğünden: >aşırı baskın [sıfat] aşırı derecede baskın Başlangıçta, tasarım yönü en çarpıcı olanıdır ve tartışmasız bir şekilde aşırı baskın olmaya devam etmektedir. [Times, Sunday Times (2010)] İşte bir örnek: >[Herhangi bir] dini veya etnik grubun aşırı baskın olmasını önlemek için adımlar atılmalıdır. Aksi takdirde, 20. Yüzyılın büyük bir bölümünün talihsiz tarihinin bir tekrarını göreceğiz... Benzer anlama sahip diğer olası terimler arasında "güçlü", "müdahaleci" ve "ağırlıklı" sayılabilir.
39
This guy claims that Olympic powerlifters working in the 1-6 rep range can increase strength without increasing muscle size. > Trained Olympic lifters, for example, were shown over a two-year period to have significant strength increases with barely noticeable increases in muscle mass (Hakkinen et al, 1988). I had a similar experience when I used AST's Max-OT principals. My strength went up like crazy, but I gained very little size. Obviously, traditional strength training with low volume and low sets (1-6 reps, 3 or less sets) is not the best approach. Strength training does cause hypertrophy (Hakkinen et al, 1985), but it won't cause maximum hypertrophy. What is the scientific explanation for this? Is the inverse true? That is, can a buff guy (with lots of prominent muscle) actually be weak?
Bu adam, 1-6 tekrar aralığında çalışan Olimpik güç kaldırıcıların kas kütlesini artırmadan güçlerini artırabileceğini iddia ediyor. > Örneğin, eğitimli Olimpik haltercilerin iki yıllık bir süre boyunca kas kütlesinde neredeyse fark edilebilir artışlar olmaksızın önemli güç artışları gösterdiği gösterildi (Hakkinen ve ark., 1988). AST'nin Max-OT ilkelerini kullandığımda benzer bir deneyim yaşadım. Gücüm çılgınlar gibi arttı ama çok az boyut kazandım. Açıkçası, düşük hacimli ve düşük setli (1-6 tekrar, 3 veya daha az set) geleneksel güç antrenmanı en iyi yaklaşım değildir. Güç antrenmanı hipertrofiye neden olur (Hakkinen ve ark., 1985), ancak maksimum hipertrofiye neden olmaz. Bunun bilimsel açıklaması nedir? Tersi doğru mu? Yani, kaslı bir adam (çok belirgin kaslara sahip) aslında zayıf olabilir mi?
Certainly there is a correlation between muscle mass and strength, but there is more to the story. Two reasons why muscle mass and strength may not be completely congruous are: * Muscle fiber density * Muscle utilization Density: Your muscles are composed of four different types of fibers (slow-twitch, and three forms of fast-twitch). These fibers have different profiles in terms of force applied and recovery time. Slow twitch fibers, for example, recover quickly but have less force as there are fewer muscle fibers per bundle, compared with the fast-twitch fibers. Extra water in the form of glycogen can also cause muscles to take up more volume with the same amount of actual muscle. This glycogen can be a ready source of energy for the muscles, but isn't going to increase their maximum theoretical force for a single heavy lift (per Olympic competition) where endurance through a long set isn't at issue. Utilization: The average person is able to utilize 20-30% of their total theoretical muscle strength when trying their hardest. (Ref. Tsatsouline, Power To The People) Top lifters use perhaps 50% of their theoretical strength. Olympic and powerlifting-style training focuses on training the neural pathways to utilize a greater percentage of the available muscle mass. Since muscle fibers contract all internal cells (the all-or-nothing principal), this training is focused on convincing a greater proportion of fiber bundles to contract during a lift. Can a buff guy be weak? Well, it depends on your definition of buff. A cut guy can be weak (compared to a strength athlete), because muscle definition is more about having low body fat covering the muscle than it is about having large muscles. A bodybuilder with decent volume won't be able to lift as much as a comparable powerlifter because he/she doesn't train for strength per se. It seems worth noting that Olympic/power lifters also want to minimize their size (except for the heavyweights) because it affects their weight class in competition, so there is an added incentive to train for neural utilization over additional muscle mass.
Elbette kas kütlesi ve güç arasında bir korelasyon vardır, ancak hikaye bundan ibaret değildir. Kas kütlesi ve gücün tamamen örtüşmemesinin iki nedeni şunlardır: * Kas lifi yoğunluğu * Kas kullanımı Yoğunluk: Kaslarınız dört farklı lif türünden oluşur (yavaş kasılan ve üç hızlı kasılan form). Bu lifler, uygulanan kuvvet ve iyileşme süresi açısından farklı profillere sahiptir. Örneğin, yavaş kasılan lifler hızla iyileşir ancak hızlı kasılan liflerle karşılaştırıldığında demet başına daha az kas lifi olduğundan daha az kuvvete sahiptir. Glikojen formundaki ekstra su, kasların aynı miktarda gerçek kasla daha fazla hacim kaplamasına da neden olabilir. Bu glikojen, kaslar için hazır bir enerji kaynağı olabilir, ancak uzun bir set boyunca dayanıklılığın sorun olmadığı tek bir ağır kaldırma (Olimpiyat yarışması başına) için maksimum teorik kuvvetlerini artırmayacaktır. Kullanım: Ortalama bir kişi, elinden gelenin en iyisini yaparken toplam teorik kas gücünün %20-30'unu kullanabilir. (Ref. Tsatsouline, Power To The People) En iyi halterciler teorik güçlerinin belki de %50'sini kullanırlar. Olimpiyat ve güç kaldırma tarzı antrenman, mevcut kas kütlesinin daha büyük bir yüzdesini kullanmak için sinir yollarını eğitmeye odaklanır. Kas lifleri tüm iç hücreleri kasıldığından (ya hep ya hiç prensibi), bu eğitim, bir kaldırma sırasında daha fazla lif demetinin kasılmasını sağlamaya odaklanır. Kaslı bir adam zayıf olabilir mi? Bu, kaslı tanımınıza bağlıdır. Keskin bir adam zayıf olabilir (bir güç sporcusuna kıyasla), çünkü kas tanımlaması büyük kaslara sahip olmaktan çok kası kaplayan düşük vücut yağına sahip olmakla ilgilidir. İyi bir hacme sahip bir vücut geliştirmeci, güç için antrenman yapmadığı için karşılaştırılabilir bir güç kaldırıcı kadar kaldıramaz. Olimpiyat/güç kaldırıcıların da (ağır sikletler hariç) boyutlarını en aza indirmek istediklerini belirtmekte fayda var çünkü bu, yarışmadaki kilo sınıflarını etkiliyor, bu nedenle ek kas kütlesi yerine sinirsel kullanım için antrenman yapmanın ek bir teşviki var.
40
What are the major concerns about planting trees to create carbon offsets?
Karbon dengelemesi oluşturmak için ağaç dikmeyle ilgili temel endişeler nelerdir?
Here are some common concerns about using tree planting projects to create carbon offsets: * The scheme actually has a net positive effect, both in the short and long-term/ How effective a tree planting scheme is in capturing and storing carbon dioxide, is for a large part determined by what happens to the trees after they are planted. When trees mature and are harvested for wood that's used in construction, then the captured carbon dioxide is stored for a long time (until the wood decomposes or is burned). However, if no trees are replanted after harvesting this will have had a one-time effect only. Also when wood is burned (for energy or in a wild fire), or if trees die quickly and decompose, then their captured carbon is released again. Of course all trees die eventually even when they are not harvested, this is part of the natural cycle, but a mature forest can store a lot more carbon than a young, newly-planted forest so it's important to keep a forest intact as much as possible. * The wrong type(s) of trees are planted in the wrong location. In the past there were bad offsetting schemes that planted non-native trees, or planted trees in a location where they would change water flows and thus change local ecosystems in a negative way. Some offsetting schemes planted thousands of trees of the same species, resulting in a large monoculture. Such a monoculture hinders biodiversity, is susceptible to diseases and can even damage local communities. There have also been reports that planting trees above a certain latitude can have a net warming effect by changing the albedo and trapping heat. * Buying offsets reduces the incentive for people to reduce their emissions. Reducing emissions is much more effective than offsetting. Buying carbon offsets can lead to people thinking they are doing the right thing, whereas they had better spent their time and effort in reducing their emissions. Of course this point goes for all offsetting-schemes and is not specifically for planting trees. * There are more effective ways of reducing carbon emissions than planting trees. Nowadays many offsetting schemes invest in development of renewable energy sources (in developing countries) instead of planting trees, simply because it is a more effective and cheaper way to reduce emissions.
İşte ağaç dikme projelerini karbon dengelemesi oluşturmak için kullanma konusunda bazı yaygın endişeler: * Planın kısa ve uzun vadede net bir olumlu etkisi var. Bir ağaç dikme planının karbondioksiti yakalama ve depolamada ne kadar etkili olduğu, büyük ölçüde ağaçların dikildikten sonra ne olduğuna bağlıdır. Ağaçlar olgunlaştığında ve inşaatta kullanılan kereste için hasat edildiğinde, yakalanan karbondioksit uzun bir süre depolanır (ahşap çürüyene veya yanana kadar). Ancak hasattan sonra ağaçlar yeniden dikilmezse bunun yalnızca bir kerelik bir etkisi olacaktır. Ayrıca ahşap yakıldığında (enerji için veya orman yangınında) veya ağaçlar hızla ölür ve çürürse, yakaladıkları karbon tekrar salınır. Elbette tüm ağaçlar hasat edilmeseler bile sonunda ölür, bu doğal döngünün bir parçasıdır, ancak olgun bir orman, yeni dikilmiş genç bir ormandan çok daha fazla karbon depolayabilir, bu nedenle bir ormanı mümkün olduğunca sağlam tutmak önemlidir. * Yanlış türde ağaçlar yanlış yere dikiliyor. Geçmişte, yerel olmayan ağaçlar diken veya ağaçları su akışlarını değiştirecekleri ve böylece yerel ekosistemleri olumsuz yönde değiştirecekleri bir yere diken kötü dengeleme planları vardı. Bazı dengeleme planları, aynı türden binlerce ağaç dikerek büyük bir monokültürle sonuçlandı. Böyle bir monokültür biyolojik çeşitliliği engeller, hastalıklara karşı hassastır ve hatta yerel topluluklara zarar verebilir. Belirli bir enlemin üzerinde ağaç dikmenin albedo'yu değiştirerek ve ısıyı hapsederek net bir ısınma etkisine sahip olabileceğine dair raporlar da var. * Dengeleme satın almak, insanların emisyonlarını azaltma teşvikini azaltır. Emisyonları azaltmak, dengelemeden çok daha etkilidir. Karbon dengelemesi satın almak, insanların doğru şeyi yaptıklarını düşünmelerine neden olabilir, oysa zamanlarını ve çabalarını emisyonlarını azaltmaya harcamaları daha iyi olur. Elbette bu nokta tüm dengeleme planları için geçerlidir ve özellikle ağaç dikmek için değildir. * Karbon emisyonlarını azaltmanın ağaç dikmekten daha etkili yolları var. Günümüzde birçok dengeleme planı, emisyonları azaltmanın daha etkili ve ucuz bir yolu olduğu için ağaç dikmek yerine (gelişmekte olan ülkelerde) yenilenebilir enerji kaynaklarının geliştirilmesine yatırım yapıyor.
41
I am wondering how to generate uniformly distributed points on the surface of the 3-d unit sphere? Also after generating those points, what is the best way to visualize and check whether they are truly uniform on the surface $x^2+y^2+z^2=1$?
3 boyutlu birim kürenin yüzeyinde düzgün dağılmış noktaların nasıl oluşturulacağını merak ediyorum. Ayrıca bu noktaları oluşturduktan sonra, $x^2+y^2+z^2=1$ yüzeyinde gerçekten düzgün olup olmadıklarını görselleştirmenin ve kontrol etmenin en iyi yolu nedir?
A standard method is to generate three standard normals and construct a unit vector from them. That is, when $X_i \sim N(0,1)$ and $\lambda^2 = X_1^2 + X_2^2 + X_3^2$, then $(X_1/\lambda, X_2/\lambda, X_3/\lambda)$ is uniformly distributed on the sphere. This method works well for $d$-dimensional spheres, too. In 3D you can use rejection sampling: draw $X_i$ from a uniform$[-1,1]$ distribution until the length of $(X_1, X_2, X_3)$ is less than or equal to 1, then--just as with the preceding method--normalize the vector to unit length. The expected number of trials per spherical point equals $2^3/(4 \pi / 3)$ = 1.91. In higher dimensions the expected number of trials gets so large this rapidly becomes impracticable. There are many ways to check uniformity. A neat way, although somewhat computationally intensive, is with Ripley's K function. The expected number of points within (3D Euclidean) distance $\rho$ of any location on the sphere is proportional to the area of the sphere within distance $\rho$, which equals $\pi\rho^2$. By computing all interpoint distances you can compare the data to this ideal. General principles of constructing statistical graphics suggest a good way to make the comparison is to plot variance-stabilized residuals $e_i(d_{[i]} - e_i)$ against $i = 1, 2, \ldots, n(n-1)/2=m$ where $d_{[i]}$ is the $i^\text{th}$ smallest of the mutual distances and $e_i = 2\sqrt{i/m}$. The plot should be close to zero.
Standart bir yöntem üç standart normal üretmek ve bunlardan bir birim vektör oluşturmaktır. Yani, $X_i \sim N(0,1)$ ve $\lambda^2 = X_1^2 + X_2^2 + X_3^2$ olduğunda, $(X_1/\lambda, X_2/\lambda, X_3/\lambda)$ küre üzerinde düzgün olarak dağıtılır. Bu yöntem $d$ boyutlu küreler için de iyi çalışır. 3B'de reddetme örneklemesi kullanabilirsiniz: $(X_1, X_2, X_3)$'ün uzunluğu 1'den küçük veya ona eşit olana kadar $X_i$'yi uniform$[-1,1]$ dağılımından çizin, ardından -tıpkı önceki yöntemde olduğu gibi- vektörü birim uzunluğa normalleştirin. Küresel nokta başına beklenen deneme sayısı $2^3/(4 \pi / 3)$ = 1,91'e eşittir. Daha yüksek boyutlarda beklenen deneme sayısı o kadar büyük olur ki bu hızla uygulanamaz hale gelir. Tekdüzeliği kontrol etmenin birçok yolu vardır. Hesaplama açısından biraz yoğun olsa da düzgün bir yol Ripley'nin K fonksiyonudur. Küre üzerinde herhangi bir konumdan (3B Öklid) mesafe $\rho$ içindeki beklenen nokta sayısı, mesafe $\rho$ içindeki kürenin alanıyla orantılıdır ve bu da $\pi\rho^2$'ye eşittir. Tüm nokta arası mesafeleri hesaplayarak verileri bu ideal ile karşılaştırabilirsiniz. İstatistiksel grafikler oluşturmanın genel ilkeleri, karşılaştırmayı yapmanın iyi bir yolunun varyans sabitlenmiş artıklar $e_i(d_{[i]} - e_i)$'yi $i = 1, 2, \ldots, n(n-1)/2=m$ için çizmek olduğunu gösterir, burada $d_{[i]}$ karşılıklı mesafelerin $i^\text{th}$ en küçüğüdür ve $e_i = 2\sqrt{i/m}$'dir. Grafik sıfıra yakın olmalıdır.
42
In Shutter Island, at the end of the movie Teddy had a chat with Chuck, in that scene Teddy told to Chuck as, Which would be worse: To live as a monster, or to die as a good man? What's the implicit meaning of this dialogue? Who's the monster as Teddy mentioned? And, who's a good man?
Shutter Island filminde filmin sonunda Teddy, Chuck ile bir sohbet eder ve o sahnede Teddy, Chuck'a şöyle der: Hangisi daha kötü olurdu: Canavar olarak yaşamak mı yoksa iyi bir adam olarak ölmek mi? Bu diyaloğun örtük anlamı nedir? Teddy'nin bahsettiği canavar kimdir? Ve iyi adam kimdir?
To Live as a Monster If he accepts his guilt and becomes sane he will become the Monster. His delusions are his brains way of removing this guilt and hiding the fact that he ignored his family, did not act on his wife's mental illness, allowed her to murder their children and then murdered her. By accepting what the doctors are telling him he will need to go on living in the knowledge that he allowed terrible things to happen and did terrible things. The doctors will be able to treat him without a lobotomy but he will be fully aware of the crimes he committed. To die as a good man In his delusion he is a good man. He truly believes that he is on the side of law and order and that he is doing right. If he chooses to continue to believe this he will be lobotomised and will no longer have relevant brain function to question what he did or did not do. The death is not literal as the other answer suggests. It is about the fact that if he continues to believe he is this good man he will be lobotomised and effectively "die" believing in this. He will not die in a literal sense until later, but he will do so in the belief he was a good man. What is most exciting and cathartic about this decision is that this appears to be a moment of lucidity where he understands what has happened and is not in thrall of his delusions. He at this point of lucidity makes the decision that he can not live with his crimes and would prefer to lie to his doctor as he knows this will result in his lobotomy. By making the statement to his doctor he makes him aware of this also and by virtue of this you could also argue that he is being a good man by electing to be punished as well as the belief in his delusion that he is good.
Canavar Olarak Yaşamak Suçunu kabul eder ve aklı başına gelirse Canavar olacaktır. Yanılsamaları, beyninin bu suçluluk duygusunu ortadan kaldırma ve ailesini görmezden geldiği, eşinin akıl hastalığına müdahale etmediği, çocuklarını öldürmesine izin verdiği ve sonra da onu öldürdüğü gerçeğini gizleme yoludur. Doktorların söylediklerini kabul ederek, korkunç şeylerin olmasına izin verdiği ve korkunç şeyler yaptığı bilinciyle yaşamaya devam etmesi gerekecektir. Doktorlar onu lobotomi yapmadan tedavi edebileceklerdir ancak işlediği suçların tamamen farkında olacaktır. İyi Bir Adam Olarak Ölmek Yanılsamasında iyi bir adamdır. Gerçekten de kanun ve düzenin yanında olduğuna ve doğru olanı yaptığını düşünmektedir. Buna inanmaya devam etmeyi seçerse lobotomi yapılacak ve yaptıklarını veya yapmadıklarını sorgulayacak ilgili beyin fonksiyonlarına sahip olmayacaktır. Diğer cevabın öne sürdüğü gibi ölüm gerçek değildir. Eğer iyi bir adam olduğuna inanmaya devam ederse lobotomi yapılacak ve buna inanarak etkili bir şekilde "öleceği" gerçeğiyle ilgilidir. Gerçek anlamda daha sonra ölecektir ancak iyi bir adam olduğuna inanarak ölecektir. Bu kararla ilgili en heyecan verici ve arındırıcı olan şey, bunun olanları anladığı ve yanılsamalarının esiri olmadığı bir berraklık anı gibi görünmesidir. Bu berraklık noktasında suçlarıyla yaşayamayacağına karar verir ve doktoruna yalan söylemeyi tercih eder çünkü bunun lobotomiyle sonuçlanacağını bilir. Doktoruna açıklama yaparak onu da bundan haberdar eder ve bu nedenle iyi bir adam olduğuna dair yanılsamasına inanmasının yanı sıra cezalandırılmayı seçerek de iyi bir adam olduğunu savunabilirsiniz.
43
To set the minimal distance between flexbox items I'm using ```margin: 0 5px``` on ```.item``` and ```margin: 0 -5px``` on container. For me it seems like a hack, but I can't find any better way to do this. ```#box { display: flex; width: 100px; margin: 0 -5px; } .item { background: gray; width: 50px; height: 50px; margin: 0 5px; }``` ``` ```
Flexbox öğeleri arasındaki minimum mesafeyi ayarlamak için ```.item``` üzerinde ```margin: 0 5px``` ve kapsayıcı üzerinde ```margin: 0 -5px``` kullanıyorum. Bana bir hile gibi görünüyor, ancak bunu yapmanın daha iyi bir yolunu bulamıyorum. ```#box { display: flex; width: 100px; margin: 0 -5px; } .item { background: gray; width: 50px; height: 50px; margin: 0 5px; }```
This solution will work for all cases even if there are multiple rows or any number of elements. But the count of the section should be same you want 4 in first row and 3 is second row it won't work that way the space for the 4th content will be blank the container won't fill. We are using ```display: grid;``` and its properties. ```#box { display: grid; width: 100px; grid-gap: 5px; /* Space between items */ grid-template-columns: repeat(4,1fr); /* Decide the number of columns(4) and size(1fr | 1 Fraction | you can use pixels and other values also) */ } .item { background: gray; width: 100%; /* width is not necessary only added this to understand that width works as 100% to the grid template allocated space **DEFAULT WIDTH WILL BE 100%** */ height: 50px; }``` ``` ``` The Downside of this method is in Mobile Opera Mini will not be supported and in PC this works only after IE10. Note for complete browser compatability including IE11 please use Autoprefixer OLD ANSWER Don't think of it as an old solution, it's still one of the best if you only want single row of elements and it will work with all the browsers. This method is used by CSS sibling combination, so you can manipulate it many other ways also, but if your combination is wrong it may cause issues also. ```.item+.item{ margin-left: 5px; } ``` The below code will do the trick. In this method, there is no need to give ```margin: 0 -5px;``` to the ```#box``` wrapper. A working sample for you: ```#box { display: flex; width: 100px; } .item { background: gray; width: 22px; height: 50px; } .item+.item{ margin-left: 5px; }``` ``` ```
Bu çözüm, birden fazla satır veya herhangi bir sayıda öğe olsa bile tüm durumlar için çalışır. Ancak bölüm sayısı aynı olmalıdır, ilk satırda 4 ve ikinci satırda 3 istiyorsanız bu şekilde çalışmaz, 4. içerik için boşluk boş kalır ve kapsayıcı dolmaz. ```display: grid;``` ve özelliklerini kullanıyoruz. ```#box { display: grid; width: 100px; grid-gap: 5px; /* Öğeler arasındaki boşluk */ grid-template-columns: repeat(4,1fr); /* Sütun sayısına (4) ve boyuta (1fr | 1 Kesir | piksel ve diğer değerleri de kullanabilirsiniz) karar verin */ } .item { background: gray; width: 100%; /* genişlik gerekli değildir, yalnızca genişliğin ızgara şablonuna ayrılan alana %100 olarak çalıştığını anlamak için eklenmiştir **STANDART GENİŞLİK %100 OLACAKTIR** */ height: 50px; }``` ``` ``` Bu yöntemin dezavantajı, Mobil Opera Mini'de desteklenmemesidir ve PC'de yalnızca IE10'dan sonra çalışır. IE11 dahil olmak üzere tam tarayıcı uyumluluğu için lütfen Autoprefixer'ı kullanın ESKİ CEVAP Bunu eski bir çözüm olarak düşünmeyin, yalnızca tek bir öğe satırı istiyorsanız hala en iyilerden biridir ve tüm tarayıcılarla çalışır. Bu yöntem CSS kardeş kombinasyonu tarafından kullanılır, bu nedenle onu başka birçok şekilde de değiştirebilirsiniz, ancak kombinasyonunuz yanlışsa sorunlara da neden olabilir. ```.item+.item{ margin-left: 5px; } ``` Aşağıdaki kod işe yarayacaktır. Bu yöntemde ```#box``` sarmalayıcıya ```margin: 0 -5px;``` verilmesine gerek yoktur. Sizin için çalışan bir örnek: ```#box { display: flex; width: 100px; } .item { background: gray; width: 22px; height: 50px; } .item+.item{ margin-left: 5px; }``` ``` ```
44
Is there a Git for data? The key improvement I'd want is to Diff/Merge more intelligently. e.g. in CSV rather than line vs line comparison, it would do cell vs cell. And ordering is usually not significant, e.g. rows in a CSV, whereas Git does care and presents the user with 'conflicts'.
Veriler için bir Git var mı? İstediğim en önemli geliştirme, daha akıllıca Farklılaştırma/Birleştirme yapmaktır. Örneğin, satır satır karşılaştırma yerine CSV'de hücre hücre karşılaştırma yapar. Ve sıralama genellikle önemli değildir, örneğin bir CSV'deki satırlar, Git ise önem verir ve kullanıcıya 'çatışmalar' sunar.
Please note that ```git``` has two configuration commands: ```git config filter..clean git config filter..smudge ``` The ```clean``` filter can be used e.g. to sort all records in a CSV file except the top row, thus making re-ordering irrelevant. Quoting ```gitattributes(5)``` : A filter driver consists of a clean command and a smudge command, either of which can be left unspecified. Upon checkout, when the smudge command is specified, the command is fed the blob object from its standard input, and its standard output is used to update the worktree file. Similarly, the clean command is used to convert the contents of worktree file upon checkin. A missing filter driver definition in the config is not an error but makes the filter a no-op passthru. The content filtering is done to massage the content into a shape that is more convenient for the platform, filesystem, and the user to use. The key phrase here is &quot;more convenient&quot; and not &quot;turning something unusable into usable&quot;. In other words, the intent is that if someone unsets the filter driver definition, or does not have the appropriate filter program, the project should still be usable.
Lütfen ```git```'in iki yapılandırma komutu olduğunu unutmayın: ```git config filter..clean git config filter..smudge ``` ```clean``` filtresi, örneğin bir CSV dosyasındaki tüm kayıtları en üst satır hariç sıralamak için kullanılabilir, böylece yeniden sıralama önemsiz hale gelir. ```gitattributes(5)```'ten alıntı: Bir filtre sürücüsü, her ikisi de belirtilmemiş bırakılabilen bir temizleme komutu ve bir bulaştırma komutundan oluşur. Ödeme sırasında, bulaştırma komutu belirtildiğinde, komuta standart girdisinden blob nesnesi beslenir ve standart çıktısı çalışma ağacı dosyasını güncellemek için kullanılır. Benzer şekilde, temizleme komutu, check-in sırasında çalışma ağacı dosyasının içeriğini dönüştürmek için kullanılır. Yapılandırmadaki eksik bir filtre sürücüsü tanımı bir hata değildir ancak filtreyi bir işlem geçirmeyen geçiş yapar. İçerik filtrelemesi, içeriği platform, dosya sistemi ve kullanıcı için kullanımı daha uygun bir şekle dönüştürmek için yapılır. Buradaki anahtar ifade "daha uygun"dur ve "kullanılamaz bir şeyi kullanılabilir hale getirmek" değildir. Başka bir deyişle, amaç, birisi filtre sürücüsü tanımını ayarlarsa veya uygun filtre programına sahip değilse, projenin yine de kullanılabilir olmasıdır.

LIMA-TR

This is the Turkish Translation of LIMA.

Gemini-1.0-Pro used most of the time and GPT-3.5-Turbo used where Gemini refused to translate some prompts.

Usage

from datasets import load_dataset
dataset = load_dataset("beratcmn/lima-tr")

License

If the source data of LIMA has a stricter license than CC BY-NC-SA, the LIMA dataset follows the same. Otherwise, it follows the CC BY-NC-SA license.

Downloads last month
39
Edit dataset card

Models trained or fine-tuned on beratcmn/lima-tr