How can 8-bit processor support more than 256 bytes of RAM?

Question: If a 32-bit processor can handle approximately 4 GiB of RAM (i.e. \$2^{32} = 4 294 967 296\$) bytes, why does my Arduino Mega 2560 have 8 KiB of SRAM, if being a 8-bit processor allows it to handle just 256 bytes (\$2^8\$)? Or am I reading the following page wrong?
http://www.atmel.com/devices/atmega2560.aspx?tab=parameters
Comment: Surely any turing-complete machine is capable of addressing almost any size of ram, given enough time.
Comment: Actually the number of bits in a processor name can only be used for an up-front estimation of the internal data width. The 8088 is a 16-bit processor because of its 16-bit registers but has an 8-bit data bus and a 20-bit address bus. The 68000 is a 32-bit processor mostly called 16/32-bit because of its 32-bit registers but has a 16-bit data bus and a 24-bit address bus. Small ARM implementations are 32-bit processors (32-bit registers and data-bus) but even if they use 32 bits for addresses they can't address a total of 4 GB.
Comment: I've added the correct SI prefixes for these units. \$2^{30}\$ is gibi (Gi) and \$2^{10}\$ is kibi (Ki).
Comment: It's worth mentioning that many 8 bitters (particularly Motorola derivatives) support a so-called _zero-page_, which was instruction set support for handling the first 256 addressable bytes in the memory map slightly faster. So the most time-critical hardware registers etc would be mapped into the first 256 bytes for this performance reason. This is the reason why you'll find hardware registers mapped from address zero on lots of architectures.
Comment: calling something an 8-bit, 16-bit, 32-bit etc is lets say a marketing term, engineers use it to but understand that doesnt mean everything in that processor is that wide.  some folks use the size of the instruction, very often the size of the general purpose registers is used, sometimes the bus.  you have the program counter which isnt always accessible or usable in instructions so that can be as wide as they want.  then as with many of the AVR type processors there is a multi register or paging scheme or both to get a wider load/store address for data transactions.
Answer: Most 8 bit CPUs have 16 bit address buses allowing them to address 64kbytes, precisely because 256 bytes really isn't enough to do very much! It just means they need to load two bytes instead of one, each time they need to load an address. Slightly slower but tolerable considering their size.
(And yes there are many exceptions, mostly developed when 64k became too small, but we're talking about the basic idea here).
Comment: In fact most of the 8-bit microcontrollers I've encountered don't have 16-bit address
Comment: @Brian Drummond Am I correct: Controller will write lower 8 bits first then upper 8 bits and then Latch the address bus. This is how it will access 16bit address bus!
Comment: Or upper 8 bits then lower 8 bits, but basically yes, that's the idea.
Comment: Some Micro-controllers like the PIC18 have a segment register that allows them to expand their address space beyond what can be encoded in the 16-bit instruction set.  Additionally the use of IO pins as chip selects on external RAM banks can be used to expand memory.
Answer: The address bus and data bus are separated so they may have different sizes. For any specific address bus sizes there are a lot of techniques to address more memory than the register bit width

The most common way is increasing the address bus width somehow by

using multiple registers for the address

AVR has R26..R31 that can be paired into 16-bit X, Y and Z data addressing registers to allow maximum 64KB of RAM. Those in turn can be paired with RAMPX, RAMPY, RAMPZ to access higher RAM addresses in even bigger versions. It also has SPH for the high bytes of the stack pointer in addition to SPL in variants with more than 256 bytes of RAM1
Intel 8080 and Zilog Z80 are 8-bit CPUs, but they have register pairs like H & L, B & C, D & E that can be used together as a 16-bit address register

using a single big special register bigger than the natural size for addressing

Intel 8051 is an 8-bit microcontroller, i.e. it has 8-bit data address. However it uses 16-bit instruction address and has 2 16-bit registers: PC and DPTR for addressing in instruction space.
AVR has a 16 or 22-bit PC register

using a special register for the high part of the address. When addressing some memory, by default the 8 low bits of the address will be taken from the 8-bit immediate or 8-bit register on an 8-bit microcontroller, whereas the high bits will be replaced by the other address register's value.

A special case of this is segmented memory, which is used by the 16-bit x86. In this technique the memory is divided into multiple segments of size 64KB (216 bytes). Normal access is inside a single segment by default so they can use 16-bit address for near data. Data that are further apart must be addressed specifically by segment value, therefore 2 registers must be used for far addressing.
The PIC microcontroller, whose baseline and mid-range series may have 13 or 14-bit address, is another example. When using call or goto instruction, 8 or 9 low bits of the address is indicated by the immediate and the remaining is taken from the current program counter. So accessing anything not far around the current segment uses only 1 instruction, while further addresses will need 2 instructions (to set the high bits).
Another example is the MIPS architecture which also combines the lower 26-bit immediate address with the high 6 bits from PC while unconditionally jumping.

Another way to achieve this is memory banking. This is a useful method still being used in some architectures nowadays. In this model, memory is divided into multiple banks. Each time you can only address a specific bank. There are often a global bank or address range that are always visible at anytime, but for other parts you must switch bank when needed.

Intel 8051 uses memory banking for the registers. It has 32 registers but only 8 of them are visible at a time.
x86 PAE and ARM LPAE, with bigger physical address space mapped to a small virtual address space
Another application for this is the Address Windowing Extensions on Windows which can be used by 32-bit x86 apps in PAE mode in order to access more than 2/3GB of memory. It's not exactly like a memory bank on microcontrollers but can be seen as such, because the big address range can be think of small windows/banks that is small enough to fit in the app's address space. If the app needs to use data in some window it will map that window into its current address space.
DOS also has some types of bank switching like expanded memory or extended memory due to its limited range of addressable memory.

There is also a not quite common technique but can be found in the Intel 8051. As a microcontroller with 8-bit data address, it can have at most 256 addresses. Half of the space (the high part) is used for special function registers (SFR), limiting the real RAM addressable to only 128 bytes. However modern 8051 series' manufacturers found a clever way to overcome this by seperating memory access. Direct addressing will access the SFR while indirect addressing though the registers will access the high part of RAM which means now you have 256 + 128 = 384 addressable bytes.

1 https://en.wikipedia.org/wiki/Atmel_AVR_instruction_set#Memory_addressing_instructions

The smallest cores have ≤256 bytes of data address space (meaning ≤128 bytes of RAM after I/O ports and other reserved addresses are removed) and ≤8192 bytes (8 KiB) of program ROM. These have only an 8-bit stack pointer (in SPL), and only support the 12-bit relative jump/call instructions RJMP/RCALL. (Because the AVR program counter counts 16-bit words, not bytes, a 12-bit offset is sufficient to address 213 bytes of ROM.)
Additional memory addressing capabilities are present as required to access available resources:

Models with >256 bytes of data address space (≥256 bytes of RAM) have a 16-bit stack pointer, with the high half in the SPH register.
Models with >8 KiB of ROM add the 2-word (22-bit) JUMP and CALL instructions. (Some early models suffer an erratum if a skip instruction is followed by a 2-word instruction.)
Models with >64 KiB of ROM add the ELPM instruction and corresponding RAMPZ register. LPM instructions zero-extend the ROM address in Z; ELPM instructions prepend the RAMPZ register for high bits. This is not the same thing as the more general LPM instruction; there exist "classic" models with only the zero-operand form of ELPM (ATmega103 and at43usb320). When auto-increment is available (most models), it updates the entire 24-bit address including RAMPZ.
(Rare) models with >128 KiB of ROM have a 3-byte program counter. Subroutine calls and returns use an additional byte of stack space, there is a new EIND register to provide additional high bits for indireect jumps and calls, and there are new extended instructions EIJMP and EICALL which use EIND:Z as the destination address. (The previous IJMP and ICALL instructions use zero-extended Z.)
(Rare) models with >64 KiB of RAM address space extend the 16-bit RAM addressing limits with RAMPX, RAMPY, RAMPZ and RAMPD registers. These provide additional high bits for addressing modes which use the X, Y, or Z register pairs, respectively, or the direct addressing instructions LDS/STS. Unlike ROM access, there are no distinct "extended" instructions; instead the RAMP registers are used unconditionally.
Answer: Databus lines (pins) and address lines (pins) are completely separate. Simply put, databus lines determine maximum number of bits that can be transferred one at a time (and stored on the memory) whereas address lines determine maximum number of memory "cells" that can be selected.
It was mostly a marketing thing that 32-bit x86 CPUs couldn't address more than 4GB of RAM. I remember somewhere that there were A33-34 pins on Pentium 4 CPUs.
Comment: You are correct - PAE allowed the use of more RAM, but as it wasn't available on desktop Windows not many people ever used it.
Comment: @Kaz ARM 32-bit has a similar feature called LPAE, which allows the operating system to address more than 32 bits of address
Comment: [PAE](http://en.wikipedia.org/wiki/Physical_Address_Extension) is the name of the feature. Also, 64-bit processors can't address 64 exabytes, as \$2^{64}\$ would suggest.
Comment: x86 CPU's cannot address more than 4GB without significant complications in the operating system which do not port to other architectures.
Answer: Nearly all 8-bit processors have some ability to form a 16-bit address from a low-order part and a high-order part.  On some processors including the original 8080, there are registers dedicated to holding the upper and lower part of an address (although from a programmer's standpoint there may be some registers like the 8080's stack pointer which don't offer instructions to address them separately).  In some other processors, there aren't registers devoted to the upper or lower half of an address, but addresses are assembled "on the fly".  For example, on the 6502, the instruction "LDA $1234,X" loads the accumulator with the address formed by adding $1234 to the 8-bit X register [suppose it contains $F0].  The execution of that instruction would proceed in 4 or 5 steps:
Finish up register write from previous instruction (if any) and load opcode ($BD)
Fetch first operand byte following opcode ($34) while decoding instruction
Fetch second operand byte ($12) while adding previously-fetched byte to X register
Read memory at address formed by concatenating second operand byte to ALU result [i.e. $1224].  Feed second operand byte into ALU to add zero or one depending upon whether previous add generated a carry
Read memory at address formed by replacing upper half with ALU result [$1334]

The transfer of the read byte to the accumulator will overlap the fetching of the next instruction.  Additionally, for many operations, if step 3 didn't generate a carry, step 4 would have read the correct address and execution could skip directly from step 4 to the next instruction, bypassing step 5.
If one examines the sequence of operations, one will notice that a little-endian architecture has a definite advantage over a big-endian one, in that in most cases (albeit not the one shown), even though the ALU takes a cycle to perform an addition, it's possible to read a byte from the computed address without waiting for the ALU result, since normally the high byte that was fetched will be the high byte of the target operand.  On a big-endian machine with an 8-bit ALU, an indexed load would take at least 5 cycles (since the the lower half of the address wouldn't be read until step 3, and would thus be computed in step 4).
Comment: I remember seeing some ads for computers with 8-bit processors and 1 megabyte of memory.  This was done by using two 8-bit registers on the CPU plus one 8-bit register not on the CPU to form the entire address.
Comment: @user6030: There are many ways of accomplishing such things.  Typically parts of the address space will be "fixed" and others will be bank-selectable.  Some devices work out nicely for programmers; many others, not so much.
Answer: I will answer this question specifically for the AVR controllers you mentioned. The basic principle also holds true for many other 8-bit architectures.
AVRs are 8-bit cores. This means they have 8-bit Registers. However, 8 bits are not enough to access a usable amount of memory. Therefore, the AVR core is able to use a specific set of registers combined as 16 bit pointer registers. The registers r30 and r31 (also aliased as ZL and ZH) are an example for this. Together they form the Z Pointer.
In assembly reading a byte at address 0x1234 would looks like this:
ldi ZL, 0x34 ; Load r30 (ZL) with low byte of address
ldi ZH, 0x12 ; Load r31 (ZH) with high byte of address
ld r16, Z    ; Load byte to r16

The AVR family has 3 register pairs that can be used for this. They are specifically designed in hardware to allow such operations.
When programming in a higher level language like C, the compiler handles this stuff.

Note: Some AVRs even support bigger memory sizes than 64k. These controllers have a special function register in which additional bits of the address are written before the access. The address therefore consists of following bits  (MSB to LSB):
Special function register (usually only 1 bit is used), ZH (8bit), ZL (8bit). This results in a total address of 17 bit and allows accessing 128 kiB of RAM.
Answer: It's often true that there is some relationship between addressable memory size and internal register size, though the relationship varies for different reasons. 256 bytes of address space was considered too small even in the very early days of microprocessors, so most eight bit processors produced 16 bit (two byte) addresses, which addressed 64 kilobytes. With bank switching, though (essentially using certain I/O lines to produce even more address lines), it was possible to have much more.
In the first 16 and 32 bit processors, there weren't always enough pins on the device to reach all the space that their internal address registers could address.  For example, on the Motorola 68000, there were only enough address pins (24) to address 16 megabytes of RAM, though the internal address registers were 32 bits wide.
Answer: Wikipedia explains it pretty well:

Eight-bit CPUs use an 8-bit data bus and can therefore access 8 bits
  of data in a single machine instruction. The address bus is typically
  a double octet wide (i.e. 16-bit), due to practical and economical
  considerations. This implies a direct address space of only 64 KB on
  most 8-bit processors.
Answer: Atmel's 8 bit AVR's actually use a 16 bit data address. The have numerous other 16 bit registers and even some 16 bit timers. Since it is only an 8 bit processor, it usually uses two clock cycles to load a 16 bit register.
Answer: The notion that the "bit width" of a processor establishes the maximum amount of RAM the processor can address is one of the most pervasive myths in computing. In fact the industry history is just littered with CPUs for which this relationship did not hold.
HP 21MX, HP 1000: 16-bit CPU, memory to 16 MB
PDP-11: 16-bit CPU, memory to 4 MB
VAX-11/780: 32-bit CPU, memory to 512 MB
etc., etc.


How much memory and bandwidth does bitcoind take up on a CentOS Linux system?

Question: I'm thinking about installing bitcoind on my web server that runs on CentOS. How much memory and bandwidth might it take up and would it affect my other sites on my server?
Comment: Are you sure that [CPU mining is worth it?](http://bitcoin.stackexchange.com/q/59/3930)
Comment: not mining... just installing for ecommerce site
Answer: I run bitcoind 0.8.3 on a VPS. In May and June, the VPS used between 250 and 300 GB of bandwith per month. Most of that (~98%) was incoming traffic.
I'm not sure if all traffic is due to bitcoind. Of course, we ran updates on the server. But it is only used for bitcoind. No other webservices are active.
Comment: That seems extremely high, given that the transactions recorded in the block chain typically amount to just a few megabytes per day.
Comment: It's not high at all.  My bitcoind-only server generated 154gb of outbound traffic *in the last 7 days*.  12.73gb inbound traffic. I have 89 connections right now, and I've had over 150 in the past. If you're a stable, well-connected node, you will use a lot of bandwidth.
Comment: So clearly it's not just the bandwidth consumed in passively receiving the blocks, but the one spent in retransmitting them as well plus the wasted one in receiving/rebroadcasting blocks that ultimately get orphaned...
Comment: You have it set to way more than the default number of connections, which I believe is 8. I understand there is some debate over the benefits of doing that.


`gulp serve` gets stuck on "[BS] Reloading files that match: *.js"

Question: I'm creating a site with yeoman using the yeogurt generator. After running yo yeogurt and going through the options, it finishes successfully with no errors and tells me I should now run gulp serve. However, when I do, it gets stuck on the last line of the output below:
[16:08:16] Using gulpfile ~/myproj/gulpfile.js
[16:08:16] Starting 'imagemin'...
[16:08:16] Starting 'copy'...
[16:08:16] Starting 'jade'...
[16:08:16] Starting 'sass'...
[16:08:16] Finished 'sass' after 124 ms
[16:08:16] Starting 'browserify'...
[16:08:16] Starting 'browserSync'...
[16:08:16] Finished 'browserSync' after 9.69 ms
[16:08:16] Starting 'watch'...
[16:08:16] Finished 'watch' after 39 ms
[16:08:16] gulp-imagemin: Minified 0 images
[16:08:16] Finished 'imagemin' after 355 ms
[BS] Access URLs:
 -----------------------------------------
       Local: http://localhost:3000/./
    External: http://192.168.1.115:3000/./
 -----------------------------------------
          UI: http://localhost:3001
 UI External: http://192.168.1.115:3001
 -----------------------------------------
[BS] Serving files from: tmp
[BS] Reloading Browsers...
[16:08:16] Finished 'jade' after 492 ms
[16:08:16] Finished 'copy' after 495 ms
[BS] 1 file changed (main.css)
[16:08:17] 715847 bytes written (0.71 seconds)
./src/_scripts/main.js was browserified: 0.754s
[BS] Reloading files that match: *.js

I'm having a hard time tracking down this error.
Answer: For posterity: it wasn't 'stuck' at all. It had run successfully and the server was active on port 3000. I was just used to Gulp opening the browser window for you when the server starts, but with Yeogurt, it doesn't do that unless you add the --open flag.


Push-up Range of Motion

Question: What is the normal range of motion (in degrees) expected from the most proximal joint during the push-up movement i.e. shoulder for pushup?
Answer: Push-Ups are Actually Quite Complex
There's quite a bit going on during a proper push-up.  Just looking at Horizontal Abduction / Adduction at the Shoulder or (GH Joint) is only a tiny piece of the picture. This may sound strange however the push-up technically isn't a beginner exercise. A properly done push-up is much more advanced than most people think.

Most people can perform a ton of faulty push-ups. But when performed
the right way, even the fittest individuals can struggle. The exercise
requires significant strength, function, stability, core
stabilization, postural control, proprioception, and kinesthetic
awareness.  Understanding the interplay of joints involved is more
important than simply "how far to go down".

Hips
When it comes to hip positioning, it's better to be too high than too low. Too high simply indicates over-activation of the muscles that resist extension forces. In reality, this places you into a more difficult push-up position, not an easier one. It may not be an ideal position, but at least it's not dangerous.
In contrast, low or sagging hips (the most common problem) indicates lack of innervation to the right musculature, placing greater strain on the spine. This precipitates a lazy push-up position with an overly shortened range of motion that's very easy to cheat through, allowing people to crank out dozens of ugly reps. So if in doubt, keeps the hips higher.

Elbows
The flared elbow position (arms at 70 to 90 degrees from the torso) can produce both acute and chronic injury to the joints and tissues. Fortunately, many coaches now recommend the 45-degree arm angle, but this is still incorrect.
Although 45 degrees represents an improvement compared to extreme-elbow flare, it's not ideal. The shoulders and scapula still have additional room to move into a more centrated and packed position. When the scapulae fully retract, depress, and medially rotate towards the spine as they should, the arm and elbow position will be much closer to the torso – a 10 to 20 degree angle.

Shoulders
Proper elbow and shoulder position are directly related: one affects the other. Retracting and depressing the shoulders while having the scapulae medially rotate towards the spine will produce a "big chest" or "chest out" position.
Keeping the chest out helps to ensure proper scapulohumeral rhythm, shoulder joint centration, and ideal osteokinematics of the glenohumeral joint. Lack of "big chest" positioning tends to promote the opposite by pulling the shoulders out of their ideal alignment.

Depth
A good push-up involves a motion where the body finishes millimeters above the floor. This is obviously more challenging, but it produces significant gains in functional hypertrophy because you're actually stimulating strength gains rather than simply cheating your way through the exercise.
Because of the rotational movement, you'll be leading with the upper chest and head, not the lower chest, ab area, or hips. So, if there's any portion of the body that will touch the floor, it'll be the upper most extremities and nowhere else. However, with proper technique, you actually won't quite touch the floor. The locked-in osteokinematics produce a highly stable joint structure, making it almost impossible to go excessively deep and reach the ground.

Sources

Dr Joel Seedman - https://www.advancedhumanperformance.com
Answer: It really depends on what sort of push-up you're doing, but if you're doing the traditional "hands under shoulders, elbows to the sides" pushup, the angle goes from a bit less than 90 degrees at the top (actual angle dependent on your height and arm length, but with your arms perpendicular to the ground) to about 0 degrees with your nose or chest touching the floor and your elbows at your sides.

Push-up Range of Motion


How can I run a complete application from RAM?

Question:
Possible Duplicate:
Can I use all my RAM for application data?

When I do some stuff in background (unpacking, compiling, backup, etc.) my hdd is under load and for example, Firefox and Chromium take very long to start and react very slow.
While my hdd is under load I have still plenty of free RAM and free CPU.
How can I copy the whole Firefox or Chromium including all dependencies into RAM?
I don't care about persistence, I just want to view some websites, videos, etc.
There are instructions putting the cache into /dev/shm, but that didn't speed up so much. Getting the profile into the RAM drive might also be easy... But how to get the binaries with all dependencies into RAM?
Answer: You do not need to copy all dependencies in the RAM, since, Modern application doesn't load all of it's function at the same time. They load them from disk, when necessary.
Yes, The system may use HDD sometimes to make room for sufficient RAM, So, that it can load another application which may require more RAM. So, it uses a feature called "Swapping".
"Swapping" is good, since it enables you to load more applications at the same time. But it uses hard disk, which is a slow process.
So, if you believe that, you have sufficient RAM for not using swapping at all, you can disable swapping altogether.
To temporarily disable swapping: run this sudo swapoff -a in a terminal and hit enter.
If you want to disable swapping permenantly do this:

Open a terminal and run sudo gedit /etc/fstab
Carefully delete the line which contains word swap. save and exit gedit.
Restart and Login again.

Note: You should make a backup of /etc/fstab file, so that if somethings go wrong, you can restore that.
To backup: sudo cp /etc/fstab /etc/fstab.backup
To restore: sudo cp /etc/fstab.backup /etc/fstab
Hope this will help
Answer: Memory management is handled by the OS it self. It schedule all the process to give same amount of time to execute. That's the basic of an multiprocessing OS.
Also how many data of an process loaded to RAM is decided by the application. If a application require a memory more than available memory than OS handles it by writing some part of it to virtual page (SWAP space in linux system). (Search for Paging technique of OS). So if you are plenty of memory be sure the OS is using it properly as requested by the application.
So basically you can't copy anything to RAM. (Also what is RAM drive?). Writing to RAM is done by OS.
I doubt in one statement that there are plenty free CPU while the background task is running. Possibly you have misunderstood something.
Last thing you can use to change priority of the process so the CPU gives more time to that process. renice or nice is the command. But the possibility of system freez/crash , unstable behavior is expected when you change priority.
Comment: A RAM drive is a "block of RAM that the OS treats as if it were a block device or disk". Here's how to get them working on Linux: http://www.cyberciti.biz/faq/howto-create-linux-ram-disk-filesystem/
Answer: The linux kernel automatically loads in-use files into RAM, so there wouldn't be any specific benefit to doing what you ask.  When you are compiling or doing other heavy-load processes, what you describe is a CPU bottleneck (processing power). The best solution would be to play around with the priorities given to each job - specifically setting the "background" jobs to take up less CPU, at the expense of taking more time to complete.
That would be accomplished using the 'nice' command:
http://manpages.ubuntu.com/manpages/oneiric/man2/nice.2.html
Answer:
Start any applications before starting intensive processes (compiling). That way they will be already loaded in RAM and should respond faster.
Decrease swappiness to avoid using swap, thus reducing disk usage. Note that changing swappiness does not disable the swap file, just makes the kernel be more conservative when deciding to move things to swap. A very low swappiness will make the kernel not use swap unless you're absolutely, positively out of RAM. http://en.wikipedia.org/wiki/Swappiness
Start your intensive processes using nice and ionice to lower their CPU and I/O priority, this should keep the interactive apps more responsive. Read man nice and man ionice to understand what these two utilities do.
nice -n 19 ionice -c2 -n7 your-intensive.process


Dataset for human-level artificial intelligence

Question: I think a human-centric multi-modal dataset (i.e.: head mounted binocular cameras, steroes mics, text transciption, skeletal pose, skin area contact) would be a great starting point for building human-level artificial intelligence. Do you know if such a dataset exists or if there are open data efforts to build one. (It'd be terrible if Tesla or another private company were the first to become an AI superpower in this domain. It's unlikely they'd release any data)
Answer: https://en.wikipedia.org/wiki/List_of_datasets_for_machine-learning_research list many AI datasets. Note that private companies have released plenty of very useful AI datasets.


How to make web applications running in jetty available as fast as possible after jetty restart?

Question: If you have many applications in your jetty server instance, then restarting the server may take a couple of minutes. How can you make applications boot faster after jetty restart?
Answer: This may be a poor man's solution but today I came up with this solution:
Move all webapps to the temp folder.
mv /opt/jetty/webapps/* /opt/webapps.tmp/
Restart 'empty' jetty server and wait for the process to finish.
service jetty restart & wait %1
Copy applications back
mv /opt/webapps.tmp/* /opt/jetty/webapps/
This way server restarts in much shorter time, mine does in 1-2 seconds, and each application will become available right after they are loaded by jetty in contrast to all applications becoming available at the same time when each and every application has been loaded.
You could prioritize loading of the application by changing the script stating which applications to copy first and sleep the script for a jetty scan interval in between copying.


Is it fine to write something that has no relation to my local life or language or culture?

Question: I am writing a novel (well, I have started to), with a fantasy middle ages and magic sort of background and English, Greek and meaningless names. I am from India, but my story feels 'European'. Should I continue as it is? Or make some changes?
Answer: It's fine to write whatever you want. Go for it and see where it leads you! At this point, focus on establishing a writing habit and learning what works. If you need a guide, I highly recommend this book by the Gotham Writers' Workshop: Writing Fiction: The Practical Guide from New York's Acclaimed Creative Writing School.
Also, if you're a young writer, take a minute to imagine in your mind's eye, putting on a thick skin, the pelt of a courageous animal, like a tiger or a wolf. Parents, schoolteachers, friends, siblings, writers, and other non-writers, despite their best intentions, sometimes say things that will discourage you. The pelt will soften the blow, allow gentle constructive criticism to enter, and enable you to carry on.
Many famous writers who work in English come from non-English speaking backgrounds and cultures. They often bring a unique perspective to their subjects and a fresh use of the language. These two articles provide some great examples of that:

New York Times: Using the Foreign to Grasp the Familiar
Rawlangs: Multilingualism and literature: 10 authors who write in other languages

Everyone who sets their stories in a fictional culture, or a realistic culture that existed almost one thousand years ago, is writing about a foreign language and culture.
I hope this helps. Keep on writing!
Answer: It's fine to write about something from a language and culture very different from your own.
However, you might get warnings not to do it from some quarters because it is harder to do well than writing a language and culture you know well, especially if your intended readers are people who probably know more about that culture than you do.
For you to do well, it helps to read lots of fiction and nonfiction from and about the culture on which your world is based. You want to get an understanding of the people, worldview, language, and values of that culture so that your fictional version will ring true.
For example, you mention that your world is a medieval European fantasy world and that your characters have English and Greek names. Be careful with that; England and Greece are culturally rather different. Western readers will probably tolerate a fantasy world with a heroic peasant named Tom and a mystical sorcerer named Euripides. But we might chuckle at a world with a heroic peasant named Euripides and a mystical sorcerer named Tom— I, for one, wouldn't be able to stop thinking of Tim the Enchanter.
Reading some history books about medieval Europe will let you get a feel for the names that were common in different countries at different times and among different kinds of people. Doing this will also help you if you want to make up names; you'll develop an ear for what sounds and combinations of sounds were used in the languages these cultures spoke, and you won't name the princess of a country rather like Italy something like Klitschko or Liliuokalani.
You don't have to become a scholar of medieval European history. J.R.R. Tolkien spent years as a professor of Anglo-Saxon language, history, and culture before he wrote The Lord of the Rings, but you don't need quite that level of commitment. Just a few books for background is a good start. And you also don't have to imitate actual history slavishly. You just have to develop a feel for what's ridiculous or obviously wrong enough to break the reader's immersion.
Answer: Just because it's in a fantasy world with a European flavor doesn't mean that it's true European and has to be regionally or historically accurate. It's good to study up on medieval Europe so you can include subtle touches to give it a European look  and feel, but you don't have to go overboard.
I'm American, and I'm working on a world that has a medieval Indian style. The characters look and dress like Indians. It's full of bright vivid Indian colors. But there are also elements of Japanese modern dance, Afro-Haitian music, Maori mythology, and medieval European style warfare.
There's such a mix of cultures and customs in my world that I don't think anyone will criticize me for not portraying one particular culture accurately. By weaving together several things from several cultures, I've managed to create my own unique world and I am the expert on what is accurate for my culture.
In a fantasy world, it's more important to make the world your own than to perfectly mimic an existing world.
Comment: Stu, when I first read your comment, I thought you meant to put the comment somewhere else, but maybe you were taking to me and I just didn't catch on at first. The story I was referring to was a sequel to the one in currently writing. I'm not formally writing up a draft for it yet, but I am doing tons of research for it. I'm accurate with each piece I appropriate for my work. Someone might think it's in India at first and say, "That dance isn't a traditional Indian dance. It shouldn't be there." It's not an Indian dance. It's Butoh, which is Japanese. And I know a ton about Butoh. Make sense!
Comment: I had a little more to say. Basically, if you scramble enough things up, and you are accurate in their portrayal, you have made a unique world with its own unique rules and it would be hard for someone else to correct you.  And in not sure what you mean by the publishing company. Nobody in my family owns one! Hehe
Comment: Sorry, I deleted it. I'm not sure what I was talking about. Quoting my 6-yr-old: "But Daddy, my brain wasn't working right!"
Comment: I can totally relate. I thought you were accusing me of being Christopher Paolini!
Answer: I'm reminded of an article I read once by Isaac Asimov, a well-known science fiction writer. He said that the first fiction story he wrote was set in a small town. Friends told them that this was a bad idea, because he had lived his whole life in New York City and knew nothing about small towns. But, he said, he never learned that lesson, because he went on to write many stories set on other planets, and he had never been to another planet, either.
It's more difficult to write about things outside your own experience. If you wrote a story set in your home town, presumably you know all sorts of things about your home town off the top of your head, from the climate to the geography to the social customs, etc. But if you write a story set in another country, you would have to do research to learn these things, or you could put in something totally out of place.
Like, I saw a TV show once about a murder that happened in a town where some of my family live, so I've visited it many times. They had "recreations" of many incidents from the crime and the investigation. One was a scene in the parking lot of the high school. In their recreation, the high school is surrounded by a thick forest. Which is kind of odd, because the town is in the middle of the desert and the high school has only a few scraggly trees around. As someone who has been to the town, this immediately struck me as totally out of place.
Maybe in that case you get away with it because the forest wasn't relevant to the story, it was just visible in the background. It would be far worse if someone said that the killer fled into the forest and climbed a tree to hide from the police.
Etc. Of course this doesn't mean that you can't do it, just that you have to do a little extra work. And pray that you don't casually make a false assumption.
Answer: Sure, go ahead.  However, you might want to think about adding some Indian cultures into the mix, just to make it interesting.  But then again, this is your book, and of course you can write it however you want.  I wrote an entire book with made-up traditions that make no sense in the current world, so do whatever you feel like.


No Internet Media Player

Question: I just received a Raspberry Pi Zero and would like some assistance.
I am looking for a lightweight way to play a movie from a USB flash drive and stream the video/audio via HDMI to a TV. I will be doing this without connecting my device to a network/internet.
What OS/application do you recommend?
Answer: If you are looking for an OS - check out OpenELEC and scroll down to the Raspberry Pi section. Burn the image to a microSD card as per the installation instructions, insert and run. This OS is intended to be a full-fledged media server, with little to no access to the underlying OS, but it will do exactly what you want.
Alternatively, you might want to look at a generic OS like Raspbian Jessie, and install Kodi. This does the same as OpenELEC, but runs just like a normal application, so you will retain access to the command shell.
Kodi (and the Kodi used in OpenELEC) are full fledged media players, so this might not meet your "Lightweight" criteria. If you really want to go lightweight, just use the built-in omxplayer application shipping with Raspbian Jessie. Insert your flash drive, open up a terminal window, change directory to the USB drive's folder where the video is and type omxplayer video.mp4 (substitute the real filename for video.mp4). This will pass audio and video via HDMI (unless you have put an override in using raspi-config, in which case you need to use raspi-config again to set the audio output back to Auto or Force HDMI).
Comment: Thanks for the input. I'm going to try omxplayer on Raspbian.
Answer: How comfortable are you with Linux? Windows IOT won't have a graphical interface, so that's probably not what you're looking for.  If you're comfortable with Linux, Raspbian Jessie, should work well for you. Don't use Lite for this use case. It too is missing a GUI.  If you're less comfortable with Linux in general, NOOBS would probably be the best place to start.

No Internet Media Player


How many reports on YouTube does it take for a comment to be reviewed by YouTube?

Question: Title question. By reviewed I mean looked at to see if it breaks YouTube's guidelines.
Answer: It takes exactly one report to take down the comment evaluated as inappropriate. The issue here is the time interval of getting it done. There is a priority queue meaning that comments with more reports are getting evaluated sooner than those with just a few or one report/flag.


Confidence interval on R-squared

Question: I know that it is possible when you realize a multiple linear regression to calculate the confidence interval on the R-squared and on the adjusted R-squared. Does somebody know how to do it with R?
Answer: You probably can be served by the CI.Rsq function in the psychometric package. The equation is provided in the help. An alternative would be bootstrapping the CI.
Comment: I believe this requires n>60 or so - wonder if there is a more general or exact solution?
Troels
Comment: I'm not sure recommendations for n > 60 for the CI are really any different from recommendations of n for the regression in the first place. Poor parameter estimates lead to poor CI estimates. That will be true regardless of how they are calculated. A more complex approach would be to bootstrap the model directly but there's not enough information in the question to help with that.

Confidence interval on R-squared


How to construct quality long sentences?

Question: I want to construct long sentences, for fiction. I do use subordinate conjunctions and coordinate conjunctions, and I also understand different kind of phrases, and grammatical rules. But I still struggle to string the phrases and clauses together in an effective way. Are there any tips to construct long sentences? And really make it beautiful (By arranging different grammatical elements in different ways). (I don't like semicolons, and i don't want to use it). Give me examples too. I will understand better.
Comment: This question might be better suited to https://writing.stackexchange.com/users/30561/.
Comment: I think this question is probably too broad for ELL.
Comment: I see that this has since been cross-posted: https://writing.stackexchange.com/questions/37540/how-to-construct-quality-long-sentences
Answer: The best way to learn this is simply to read well written books. Once you have mastered the building blocks (listed in your question), read glorious prose.
I would concentrate on slightly older books that people still read, or books that have won prizes like the man booker prize, or the womens prize for fiction.
Best seller lists aren't very reliable as indicators of quality writing.
But be warned there is a good middle ground between

This is Paul. Paul has a ball. Paul likes the ball

and Dickens (from a tale of two cities) I once remember trying to read Dickens and one whole page was a single sentence.

It was the best of times, it was the worst of times, it was the age of
  wisdom, it was the age of foolishness, it was the epoch of belief, it
  was the epoch of incredulity, it was the season of Light, it was the
  season of Darkness, it was the spring of hope, it was the winter of
  despair, we had everything before us, we had nothing before us, we
  were all going direct to Heaven, we were all going direct the other
  way – in short, the period was so far like the present period, that
  some of its noisiest authorities insisted on its being received, for
  good or for evil, in the superlative degree of comparison only.


Is it possible to play whole notes (in Andante tempo) in bowed strings instruments?

Question: Well, I've heard sound would faint in bowed strings instruments if note played is too long, and player runs out of bow. Is this true? and at which tempo would this occur?
Comment: At some point you learn to smoothly reverse the bow so you can hold a note for as long as you want.
Answer: It depends on the dynamic you are playing in, but you can maintain a good tone at a slow pace with practice. Louder volumes require more bow and limits the duration you can hold one bow stroke.
Practicing playing from frog to tip while keeping a steady count teaches your arm how fast it needs to go to maintain the bow for the duration required.
As commented by Todd, if you end up with a duration too long for you, changing the bow discretely on a beat is an acceptable technique.
I'm sure there are players that can hold a whole note at Grave without loss of tone.


Regular Expression Anything But A SSN

Question: I have the following regex code in c#.
^((?!(\d{3}-?\d{2}-?\d{4})).)*$")

They only thing I care about is the textbox doesn't match a ssn.  [###-##-####]
How do i make the regex match everything except SSN?
Answer: Why not just do a regex for an SSN, and then do an if (! m.Success)?
Edit: There are two reasons I'd do it this way:
1) Most importantly, it will be much easier for someone else to read. Even someone who hasn't seen many regexes will be able to read the straight matches-SSN regex. And of course, sometimes that "someone else" is you in six months.
2) Secondly, the more complex a regex becomes, the more likely it is that it matches something you don't expect. For this reason, I think it's best to use a simpler regex if you can.
Answer: ^(?!(\d{3}-?\d{2}-?\d{4})$).*

this worked for me at
http://regexpal.com/

Regular Expression Anything But A SSN


In the Facebook iOS SDK, what does the tryFBAppAuth parameter do in autorizeWithFBAppAuth?

Question: I wanted to use the iOS UI view dialog window for SSO and some answers stated to set both trySafariAuth and tryFBAppAuth to No.  "trySafariAuth" is a pretty obvious one, but what does the tryFBAppAuth parameter control and why would I set that to NO?
Answer: tryFBAppAuth when set to true is a flag which indicates to try and obtain access token from Facebook application (if installed on the device). This is basically a SSO. trySafariAuth set to NO is enough to have iOS login dialog instead of Safari one.
hope this helps
Comment: so would the access token property in the Facebook object be set to nil if I set that flag to "NO"?
Answer: The tryFBAppAuth == YES will attempt to get the user's login credentials from the Facebook app, if it is installed. A user is usually logged into that app, so it will return that current user's credentials. If that app is not available or otherwise cannot return such credentials, then...
If trySafariAuth == YES then the Safari browser will be called up to prompt the user for login credentials.
Otherwise, if the credentials have not been returned from either method, then a popup dialog will appear that collects the user's login credentials (like apps used to do).


how can I do a task that I don't like it?

Question: I'm a junior software engineer (new graduate) and I have only 5 months in my current job (first).
While I did the interviews with my manager he told me many things that are not true (in other words he cheated me to accept the post and came to his society).
Listen to such words I refused an other opportunity of job in other company more famous than the one where I work now and with more advantages than I get now.
I chosen the current society for only one reason: learn more and more because in a startup with 20 persons I have more chance to enhance my profile and my acknowledgment.
At the beginning, he asked me to do a task (it's not a task of an engineer).
I did it but the deadline is not fixed because the manger extend it every month.
After 4 months, I ask him for a meeting and I told him that I'm bored of this task and I want to do a real job of an engineer containing design and a real study of project to struggle the problems and resolving it before coding.
He told me that I don't have the right to intervene in the architecture of the society and of the project and I'm a beginner and I don't have the right to discuss about that.
The result of the meeting I was changed from the current to another project more boring than the first one because the program was bad written.
I want to quit because I can't continue to work like that but I'm afraid if they told other companies bad news about me and they don't accept me in the future interviews.
Can anyone advise me ?
Comment: So what is your actual question? Have a look at the [help] for the types of question we can and can't answer here. We can't really give you the kind of personalised career advice you seem to be looking for.
Comment: It sounds like you don't want to pay your dues and work your way up the ranks like everyone else?
Answer: If you are not happy with your job, and you can't get it to change, then you look for a position elsewhere until you find something better. Make sure that you read your employment contract carefully. It is very unlikely that anyone would bother to tell stories about you.
Now I'm not sure what you mean by "I was changed from the current to another project more boring than the first one because the program was bad written". So is this a software development job, where you are asked to maintain a badly written program? Do you find this boring? You could look at it as a challenge - turn a badly written program into a well written one. Ask yourself: The job that you are asked to do, is that something that needs to be done by a software engineer? If the answer is yes, then who do you think should do it, if you don't want to do it?


Are all billionaires also millionaires?

Question: Are all billionaires also millionaires? In other words, should the definition of millionaire be taken to include billionaires, or exclude them?
Comment: Please add dictionary definitions, 107, linked and attributed. // Would you say "He's a millionaire ... perhaps even a billionaire" is incorrect?
Comment: Would you say that an octogenarian is _also_ a septuagenarian_ ?
Comment: @Nigel J Would most people say that a square is a rectangle? That a shrimp and a prawn are similar?  When precising definitions may well be involved, one has to define terms, not assume a particular definition.
Comment: What does the dictionary say? The definition I looked at didn't place an upper limit on a millionaire's wealth.
Comment: It was not a good decision to close this question.
Answer: No, billionaires are not called "millionaires", even though by definition they may actually be millionaires.  The relevant conversational principle is the maxim of quantity:

Grice's Maxims. The maxim of quantity, where one tries to be as informative as one possibly can, and gives as much information as is needed, and no more. ... The maxim of manner, when one tries to be as clear, as brief, and as orderly as one can in what one says, and where one avoids obscurity and ambiguity.

(by googling "maxim of quantity")
Comment: Billionaires wouldn't normally be ***called*** millionaires, but they'd probably be included in an accurate count of "total millionaires" unless that counting exercise involved producing a separate tally for "total billionaires".
Comment: @FF The maxim of adapting to the register being used. To most people, squares aren't rectangles.
Comment: I went to an LCC junior school in London from 1959, where I was taught the difference between a rectangle and an oblong.
Comment: @EdwinAshworth - Anyone with a basic highschool education should know that squares *are* rectangles mathematically, but in non-maths contexts I believe you're right that most people would assume that references to "rectangles" would not include squares.  (So in other words the answer is "maybe"?)
Comment: @nnnnnn No; the answer is to either agree (defining if necessary) or fully understand  the prevailing usage in the situation in which you're conversing, or (if you're lecturing, writing a book ...) explain your terminology. Then stick to it for the duration. The answer is not 'maybe', but 'yes' or 'no'. But we can't say which until the context is spelled out.
Answer: It is a distinction that is made and should be made.  To do otherwise is to deceive.
To say that Michael Bloomberg is a millionaire when he actually has a net worth over 50 billion dollars is such a misrepresentation that it would probably be considered a lie.
Also being a billionaire means you have passed a threshold.
https://www.harpersbazaar.com/uk/culture/culture-news/a25166069/jk-rowling-earnings-worth/
According to the 2018 Sunday Times Rich List, Rowling's net worth is estimated at around 700 million. She famously lost her billionaire status, due to the amount of money she's donated to charity.

Are all billionaires also millionaires?


My HP trackpoint is sending keystrokes, how can I disable it?

Question: I am running Debian stretch (with a newer kernel, 4.14) on an HP 8460p.  The trackpoint (pointing stick), when pushed left or right, seems to send a very long stream of F9 or F10 keys, possibly along with other keys, preventing me from using the keyboard until I unjam it by switching VTs.  How can I disable the trackpoint functionality?  It doesn't seem to have an associated xinput device, and the properties on "SynPS/2 Synaptics TouchPad" or "AT Translated Set 2 keyboard" don't mention any trackpoint settings.
<code># xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                id=11   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ HP HD Webcam [Fixed]: HP HD Web           id=9    [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                            id=12   [slave  keyboard (3)]

# dpkg -l | grep xserver-xorg-input
ii  xserver-xorg-input-evdev        1:2.10.5-1     amd64        X.Org X server -- evdev input driver
ii  xserver-xorg-input-synaptics    1.9.0-1+b1     amd64        Synaptics TouchPad driver for X.Org server
</code>
Answer: Turn the laptop off (do not reboot), keep it off briefly, then turn it back on, at which point hopefully a
<code>⎜   ↳ PS/2 Generic Mouse                        id=11   [slave  pointer  (2)]
</code>
xinput device will reappear and trackpoint movements are no longer sent as keystrokes.


test if 5% difference is significant

Question: I have a dataset that contains 20000 chess matches. According to these matches, white won 50% of the games while black won 45%. I want to test if this 5% difference is significant. How can I do that? I couldn't be sure which testing method to use.
Answer: The white won 10000 matches out of 20000.
The black won 9000 matches out of 20000.
You can carry out a two-proportion z-test. For instance in R:
result <- prop.test(x = c(10000, 9000), n = c(20000, 20000))

Output:
2-sample test for equality of proportions with continuity correction

data:  c(10000, 9000) out of c(20000, 20000)
X-squared = 100.05, df = 1, p-value < 2.2e-16
alternative hypothesis: two.sided
95 percent confidence interval:
 0.04017471 0.05982529
sample estimates:
prop 1 prop 2
  0.50   0.45

The p-value is < 2.2e-16 so the difference is statistically significant.
(You can replace 20000 by 19000 if you only want to consider the matches won by either the white or black).
Comment: I suppose it depends how you interpret the OP's question. The purpose of the two-proportion z-test with equally likely outcomes as $H_0$  is to ["determine whether the difference between two proportions is significant"](https://stattrek.com/hypothesis-test/difference-in-proportions.aspx), which is what was requested. (+1) for the alternative interpretation.
Comment: Your test has rejected because 'data' $(10000, 9000)$ are not consistent with 50-50 white/black wins. You have not tested whether the actual hypothetical proportions are 50-45 were closely matched. (+1) anyhow, for suggesting `prop.test`. [The R procedure `prop.test` assumes equally likely outcomes as $H_0,$ unless different hypothetical values are specified as parameters of the procedure. ]
Answer: Suppose you have data for 10,000 matches. I use R to
simulate results according to your 50% (1=white), 45% (2=black), 5% (3=draw) hypothesis.
set.seed(131)
x = sample(1:3, 10000, rep=T, p=(.50,.45,.05))
table(x)
x
   1    2    3
5029 4499  472

In prop.test you can specify the hypothetical probabilities, as shown below.
prop.test(c(5029,4499,472), c(10000, 10000, 10000),
          c(.5,.45,.05))

    3-sample test for given proportions
    without continuity correction

data:  c(5029, 4499, 472) out of c(10000, 10000, 10000),
  null probabilities c(0.5, 0.45, 0.05)
X-squared = 1.9873, df = 3, p-value = 0.575
alternative hypothesis: two.sided
null values:
prop 1 prop 2 prop 3
  0.50   0.45   0.05
sample estimates:
prop 1 prop 2 prop 3
0.5029 0.4499 0.0472

So the observed proportions were $0.5029, 0.4499, 0.0472,$ which are sufficiently close to the
hypothetical proportions $.50, .45, .05$ to be
considered consistent with the null hypothesis.
Over the long run, deviations (from hypothetical proportions) as large as seen in our simulation
occur with probability about $.58,$ and so are
not considered unusual.
Testing at the 5% level of significance (rejecting
when the P-value is smaller the 0.05), we can
expect this simulation experiment to give values
inconsistent with the null hypothesis only 5% of the time.

test if 5% difference is significant


How can a DHCP OFFER message be unicast?

Question:
Why is a DHCP OFFER message is destined to IP: 10.0.0.21 (which was assigned to my PC by DHCP server later) before even the system configured it? When the host is still asking for an IP address, how can server send a unicast message? The host's IP address will still be 0.0.0.0 So, can anyone explain this?
Answer: While an address of 0.0.0.0 can be used as a source address for DHCP, it shouldn't be used as a destination address on the network. The server can send a unicast message since it knows the host's MAC address. Remember that all traffic delivered to the host is on layer-2, so the important address is the MAC address.
This is important because a DHCP server may not be on the same LAN as the requesting host. A DHCP Offer may need to be routed, via layer-3, back to the network where the requesting host is connected.

Edit:
Thanks to richarb for providing the link to Clarifications and Extensions for the Bootstrap Protocol:

3.1.1 The BROADCAST flag
Normally, BOOTP servers and relay agents attempt to deliver
BOOTREPLY messages directly to a client using unicast delivery.
The IP destination address (in the IP header) is set to the BOOTP
'yiaddr' address and the link-layer destination address is set to
the BOOTP 'chaddr' address.  Unfortunately, some client
implementations are unable to receive such unicast IP datagrams
until they know their own IP address (thus we have a "chicken and
egg" issue).  Often, however, they can receive broadcast IP
datagrams (those with a valid IP broadcast address as the IP
destination and the link-layer broadcast address as the link-layer
destination).
If a client falls into this category, it SHOULD set (to 1) the
newly-defined BROADCAST flag in the 'flags' field of BOOTREPLY
messages it generates.  This will provide a hint to BOOTP servers and
relay agents that they should attempt to broadcast their BOOTREPLY
messages to the client.
If a client does not have this limitation (i.e., it is perfectly
able to receive unicast BOOTREPLY messages), it SHOULD NOT set the
BROADCAST flag (i.e., it SHOULD clear the BROADCAST flag to 0).
  DISCUSSION:

     This addition to the protocol is a workaround for old host
     implementations.  Such implementations SHOULD be modified so
     that they may receive unicast BOOTREPLY messages, thus making
     use of this workaround unnecessary.  In general, the use of
     this mechanism is discouraged.

Comment: @Eddie A client can set the broadcast flag in the BOOTP options to indicate it would be confused by a unicast reply. See [RFC 1542 section 3.1.1](https://tools.ietf.org/html/rfc1542#section-3.1.1)
Comment: So, In a lot of my testing, I find that all four messages are broadcasts. I have a capture on my other PC, I'll upload that later. But without that for the moment, could you explain why all four messages are sometimes broadcasts, and other times alternating broadcast/unicast like all the documentation states.
Comment: @Eddie, broadcasts at which layer (layer-3)?
Comment: Both from what I recall. Dst IP 255.255.255.255, Dst MAC: ffff.ffff.ffff. I'll try to upload the packet capture when I get home.
Comment: @Ron So, under what conditions the **OFFER** message can be unicast and when can they be broadcast messages. As pointed by Eddie, I have seen all four messages broadcasted sometimes. So, why is that client needs to set its broadcast bit to 1 in some cases but not for all?
Comment: Brilliant, thanks @richardb, that explains it. I can confirm in both my captures the broadcast flag was set to 1 in the initial client Discover. Captures: [Client-Server](https://www.dropbox.com/s/tpxj20md85yg2lc/DHCP%20CAP%20-%20Client%20Server.pcapng?dl=1), and [Client-Helper-Server](https://www.dropbox.com/s/5abpgndmo73zzp0/DHCP%20CAP%20-%20Client%20Helper%20Server.pcapng?dl=1).
Comment: @RakeshNittur, if you read the text to which richardb linked, "_If a client does not have this limitation (i.e., it is perfectly able  to receive unicast BOOTREPLY messages), it SHOULD NOT set the  BROADCAST flag (i.e., it SHOULD clear the BROADCAST flag to 0)._" It is completely up to the client.
Answer: 4.4.1 Initialization and allocation of network address:

The client begins in INIT state and forms a DHCPDISCOVER message.
  The client should wait a random time between one and ten seconds to
  desynchronize the use of DHCP at startup.  The client sets
  'ciaddr'(client IP Address)  to 0x00000000.  The client MAY request
  specific parameters by    including the 'parameter request list'
  option.  The client MAY    suggest a network address and/or lease time
  by including the    'requested IP address' and 'IP address lease time'
  options.  The    client MUST include its hardware address in the
  'chaddr'(client hardware address) field for use in delivery of DHCP
  reply messages.  The client MAY include a different unique identifier
  in the 'client identifier' option.  If    the client does not include
  the 'client identifier' option, the    server will use the contents of
  the 'chaddr' field to identify the    client's lease.
The client generates and records a random transaction identifier
  and    inserts that identifier into the 'xid' field.  The client
  records its    own local time for later use in computing the lease
  expiration.  The    client then broadcasts the DHCPDISCOVER on the
  local hardware    broadcast address to 0xffffffff IP broadcast address
  and 'DHCP    server' UDP port.
If the 'xid'(transaction id) of an arriving DHCPOFFER message does
  not match the 'xid' of the most recent DHCPDISCOVER message, the
  DHCPOFFER message    must be silently discarded.  Any arriving DHCPACK
  messages must be    silently discarded.
The client collects DHCPOFFER messages over a period of time,
  selects    one DHCPOFFER message from the (possibly many) incoming
  DHCPOFFER    messages (e.g., the first DHCPOFFER message or the
  DHCPOFFER message    from the previously used server) and extracts the
  server address from    the 'server identifier' option in the DHCPOFFER
  message.  The time    over which the client collects messages and the
  mechanism used to    select one DHCPOFFER are implementation
  dependent.  The client may    perform a check on the suggested address
  to ensure that the address    is not already in use.  For example, if
  the client is on a network    that supports ARP, the client may issue
  an ARP request for the    suggested request.  When broadcasting an ARP
  request for the    suggested address, the client must fill in its own
  hardware address    as the sender's hardware address, and 0 as the
  sender's IP address,    to avoid confusing ARP caches in other hosts
  on the same subnet.  If    the network address appears to be in use,
  the client sends a    DHCPDECLINE message to the server and waits for
  another DHCPOFFER. As    the client does not have a valid network
  address, the client must    broadcast the DHCPDECLINE message.
Comment: When quoting someone else's work, you should properly attribute it.


Net based on finer filter is a subnet?

Question: Let $G$ be a filter finer than the filter $F$. Is it necessary that the net based on the filter $G$ is a subnet of the net based on $F$?
Answer: Well, there are at least two nets that I could think of that derive from some filter on $X$: $\mathcal{F}$: one that used choices: consider $\mathcal{F}$, directed by $\supseteq$, as the index set, and for each $F \in \mathcal{F}$, pick some $\lambda(F) \in F$, and then $\lambda : \mathcal{F} \rightarrow X$ is a net based on $\mathcal{F}$.
If we then have a finer filter $\mathcal{G}$, and we choose the two nets (one based on $\mathcal{F}$ and the other on $\mathcal{G}$) in this way independently, then there is no reason that the net based on $\mathcal{G}$ would be a subnet of the one based on $\mathcal{F}$, because this would imply that for a lot of elements they would have made the same choice (if we follows the usual definition of subnet, using cofinal maps between index sets).
A more canonical way to derive a net from a filter, is to consider the large index set
$$I(\mathcal{F})=\left\{(F,x): F \in \mathcal{F}, x \in F\right\} $$ ordered by $(F,x) \le (G,x')$ iff $G \subseteq F$. The net derived from $\mathcal{F}$ is then $f_{\mathcal{F}}((F,x)) = x$ for $(F,x) \in I(\mathcal{F})$.
If we have a finer filter $\mathcal{G}$ and a corresponding $f_{\mathcal{G}}$, then being a subnet would mean there is a map $h$ from $I(\mathcal{G})$ to $I(\mathcal{F})$ that preserves the two orders, and such that its image is cofinal, and for all $G \in \mathcal{G}$ we have that $h((G,x))$ is of the form $(F,x)$ (same $x$), for some $F \in \mathcal{F}$. I don't really see how to do that in general (think of $\mathcal{F}$ as the cofinite filter on a set, and $\mathcal{G}$ as any free ultrafilter, e.g.).
It seems that this does not quite hold, I think, but I have no concrete counterexample. Or you use another notion of subnet (like AA-subnets).
Comment: Sir, for me the net based on a filter is the second way you have defined. Whereas a subnet of a net P is the composition of P with an increasing cofinal function from some directed set to the directed set of P.

Net based on finer filter is a subnet?


how can I recognize multiple faces from one image in python

Question: I wants to create an app which can recognize multiple faces from one image, I planed to built an android app through KIVI, I am not getting from where to start, it is my first minor project, any help will be appreciated.
Answer: In general, you perform object detection to find potential faces, and then you perform face recognition on the face(s) detected.
This article walks through the various steps quite well:
https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78
The author also has a Python library that does recognition of multiple faces in a scene with video examples:
https://github.com/ageitgey/face_recognition
Answer: Actually there are so many ways for doing so depending on your point of view. You can use deep learning and machine learning approaches or old fashioned vision approaches. For instance, you can use Segnet neural net if you want to use learning approaches. But because you have limited computation power, vision approaches is more common. Take a look at here.


If I quit an internship can I still put in on my resume?

Question: I'm currently working at an unpaid internship and I'm absolutely miserable. My coworkers are rude and they don't let me help. I feel useless and asking for more work is futile. It's costing me money to be here and I'm starting to feel like it isn't worth it. At this point it makes more sense financially to go back home. If I quit though, can I still include it on my resume and ask for a reference?
Comment: i mean, you can do anything. Free country in most places. You should *probably* escalate this to your manager or some higher up. Because mean people suck. However, while you can include it on your resume, if you have not escalated this to someone at work, your reference *probably* (but i am often wrong) won't be much. You'd be better explaining the situation to future prospective employees, or just get another internship somewhere else.
Comment: At the very least, in the US you can put it on your resume and when a prospective employer contacts this place, they will confirm that you joined as an unpaid intern on day X and quit on day Y. If you're looking for a manager to explain how wonderful you are though, you probably won't have much luck.
Comment: I know you want to quit, but my suggestion would be to ride it out. Scoring yourself an internship puts you ahead of the competition even if you felt like you learned nothing - your future employers don't need to know that. At the very least talk to your manager about these issues before leaving.
Answer:
If I quit though, can I still include it on my resume and ask for a
  reference?

You could, but you need to consider what kind of reference this would actually provide. Would this be a reference you would really want?
If you quit on me, I'd have a hard time giving you a strong reference. If someone called to check on that reference, at best I'd say "user29236 worked for me for x months".
At worst I'd say "user29236 worked for me for x months, seemed unhappy, couldn't get along with the coworkers, then quit."
If I were the intern, I'd skip the reference part, as that wouldn't be the kind of reference I want.
Answer: Yes you can and should put it on your resume. Don't mention on your resume you quit, just the start and end date, work done, expertise gained etc. Make it look positive, any experience gained is a good thing. It is up to you what to answer when asked in an interview about why or how it ended (often they don't ask). There is always a way to spin it into something positive.
Also you can ask for a reference and most managers will give you one, even though you quit. Quitting is part of this whole "game". It's in their best interest to give a good reference, it reflects bad on them as well if they wouldn't. And it's a small world, you never know how a bad reference can some day hit back.
It may be a good idea to clearly explain why you quit, in an email or written letter. In a form that would provide feedback so they (hopefully) could improve things. Sound positive, don't sound bitter or angry. Thank them for the opportunity, that you learned a lot, such things.
Leaving a bad situation isn't necessarily a bad thing and can be seen as a sign of strength. Especially if you do it gracefully.
As an aside this sounds like a bad situation to get out of asap and it sounds like they are (ab)using an intern position as a real job. There are laws against it. I know in California an employer is not allowed to (ab)use an intern position for regular work tasks, this also means an intern has more freedom with regards to work times and all that.
Answer: Internships are supposed to help you learn how to navigate the workplace not just teach technical skills. Quitting when things get tough is a bad choice.  Show some grit and go talk to your manager about the problem and try to work things out. Find out why people are treating you like this. What can you change about how you deal with them that might improve things? Ask you boss specifically what you can do to do a better job and then listen to what he says and follow his advice. People don't just act rude and not want to give you work for no reason. Find out the reason before you quit so at least you can fix it in the next job.
Answer: If in the US.
There are well defined boundaries on what an unpaid intern is allowed to do.  You really need to talk to the person that you report to and get some direction.
See this for some info:  http://www.sba.gov/blogs/truth-behind-unpaid-internships-0
and http://www.forbes.com/sites/theyec/2013/04/19/6-legal-requirements-for-unpaid-internship-programs/
U.S. Legal Requirements:

The training, even though it includes actual operation of the facilities of the employer, is similar to that which would be given in
  a vocational school
The training is for the benefit of the trainee
The trainees do not displace regular employees, but work under close observation
The employer that provides the training derives no immediate advantage from the activities of the trainees, and on occasion the
  employer's operations may actually be impeded
The trainees are not necessarily entitled to a job at the completion of the training period
The employer and the trainee understand that the trainees are not entitled to wages for the time spent in training

Reading between the lines on that, essentially you can't perform a job that a paid employee should be doing.  This is going to greatly limit your ability to "help" out on existing projects - basically you'll watch and see how things work but you won't be able to contribute much to it.
Now, back to the question: yes, you can put it on your resume.  However before you leave you should discuss what's going on with your manager and make sure your expectations of the job are inline with their's and inline with legal requirements of your area.  If those expectations are out of whack then do what you can to leave on good terms with them such that they'll provide a positive reference.


Sharepoint 2010 list and alerts

Question: I have created an issue list in sharepoint 2010, we have created teams as one of the fields.  How would i make sharepoint send alert notificaitons to certain email groups based on the team selected?
Answer:
Create a public view for each team with a filter to select items marked with the team
Create an alert for each team specifying the e-mail address of the team and in "Send Alerts for These changes" specify "Someone changes an item that appears in the following view:" and select the teams view.
Answer: If you want to send notification to a specific security group after creation of an issue for a specific team, Alert Me might not be a good choice. better you go for sharepoint designer workflow to send mail to a specific group or user. In this case you can enable targeted audience from library settings of the list and provide the targeted groups in targeted audience field. Then you would be able to access it from workflow. Let me know if you need further informations...
Answer: You may also be able to use an Alert filter (in an alert template) to do this.  Check out this link: (although the link references WSS 3.0, it should still apply to 2010)
http://blogs.msdn.com/b/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx

Sharepoint 2010 list and alerts


Existence of a global analytic solution to a linear first order PDE

Question: Let $B=\lbrace \|z\|<1\rbrace$ be a unit ball in $\mathbb{C}^n, n\geq 2.$ Let
$f_1,\cdots, f_n, f$ be holomorphic functions on $B.$ Now, consider the following
first order, linear PDE:
$$f_1\partial_{z_1}(y)+\cdots +f_n\partial_{z_n}(y)+fy=0.$$
Here is my question. Is there some non-degeneracy condition of functions $f_1,\cdots, f_n$ that implies existence of a nontrivial solution $y$ which is holomorphic on $B?$
From what I understand about the Cauchy-Kovalevskaya theorem, if $f_1,\cdots, f_n$ have no common zero, then for any $w\in B$ there exists a nontrivial holomorphic
solution (in fact infinitely many) defined near $w.$ But, I don't see how to get a global solution from it.Thank you very much in advance.
Answer: If the holomorphic vector field $X=\sum_i f_i\partial_{z_i}$ has no zeroes and there is a complex hypersurface nowhere tangent to it, and each point lies on a unique trajectory of that vector field through that hypersurface, then the differential equation becomes a linear ordinary differential equation for a holomorphic parameterization of each trajectory, so has global solvability. So you need to find your nowhere tangent hypersurface, and prove, for each point, both existence and uniqueness of a trajectory through that hypersurface and through that point.
Comment: I see, thanks! But I don't quite see apriori how doable that is.


What to do when iPad is stolen

Question: Recently my apartment was burglarized and my employer's iPad that I was borrowing was stolen from my apartment. I'm located in the US. My employer didn't setup Find My iPad. I used the iPad a few times to view web sites in Safari on my network and connect it to my computer to update it to iOS 6. I've reported the burglary to the police. I have the iPad's serial number and the device backup in iTunes. Instead of waiting around, is there anything I can do to find the stolen iPad?
Answer: The first thing you should do is report it, having the serial number by hand (you can find it on the original box). While the procedure of handling stolen goods might be different in other countries, it's not unlikely police bumps into a batch of stolen goods and will try to get these back to the rightful owners.
As for tracking, if you had a Gmail account set up, you could check Gmail's connection logs (available from the bottom of the web interface), to see the IP addresses connecting. The same goes for other "cloud" services which allow to see a log of clients, like Dropbox.
Whether the IP address will lead you to the thief is questionable, but it could give you a broad localisation and you can always pass this information to the police.
If you had an iPad with cellular support, it is technically possible to be tracked by IMEI number, but depending on legislation/others, your carrier might not fulfil these requests without the necessary warrants.
Apart from tracking though, the next thing you should consider is safeguarding your data as much as possible. If your iPad was not password-protected, you should change all passwords of any online accounts configured, but please note this might prevent you from seeing access log as described earlier.
Comment: This is a good list: 1) File a police report with any/all local districts to maximize the chance of recovery at pawn shops and such 2) Report the theft and police report to Apple and the cellular carrier but don't expect much from that other than knowing they have the information.
Comment: Follow up questions, do pawn shows have to report everything they receive to the police? Should I be calling/visiting pawn shops to look for the device? Should I be calling the police department asking for updates every few weeks to see if the iPad was found?
Comment: @wwwuser there is no generic answer to that question, but I suggest you ask the police how you should follow-up your case.
Comment: I called the police department about my case and they said there is no need to follow up. They'll contact me if they find anything. I wish there was something I could do to help get the iPad back. Are there third parties that help locate an iPad based on a serial number? I don't feel okay with just sitting around and waiting. I realize the police can only do so much, but I wish there was something I could do to help.
Comment: I would recommend not to lock your iPad if not really needed. This will make the thieve use it and makes it easier to trace by gmail-ip or IMEI.
Answer: Well, to my knowledge the only thing that can help you find an iPad is Find My iPad. If your employer didn't set that up then it's a shame, becuase I'm afraid you can't do much more.
It's good that you have the serial number, though. That way you can prove the iPad is yours in case the police finds it.
Answer: Just had mine stolen yesterday. Find my iPad is not what you think. I had it on my WiFi only model so unless the device connects to wifi, the service is useless.
Also, if you decide to not have a passcode lock in order to try to track down the iPad, you are leaving it open for the thief to get any personal data. Sending a remote lock or setting a passcode does secure your data, but at the same time makes it less likely you will find it. For me, I have opted for the erase mode. As soon as it is turned back in or ever hits WiFfi before it gets erased, all existing data will then be erased.
Comment: Sorry to this. Hopefully, you get some hints with Find my iPad. I wish there was some company or way to find it by serial number. Mine is still missing and tracking by serial number would help find so many lost devices.

What to do when iPad is stolen


Is it safe to switch theme in drupal on my site?

Question: I have a website with Drupal CMS behind it. I use a custom theme and I would like to change it but I am not sure if it is entirely safe, i.e. is it possible to lose some data, design, etc if I switch it back to my theme? What about blocks and their position if the theme uses different blocks layout. Thanks.
Answer: It should be safe, but you should have a current backup of the database and files anyways. You can (and probably should) set the administration theme to one of the standard themes, so you can't lock yourself out of the admin section if you break your custom theme.
If the regions are named different (or missing in one theme) you may have to move your blocks. The blocks are set seperately for every theme, so just enable the second theme (without setting it a default) and set the blocks for this theme. After that you can set the theme as default.
I use a copy of the website to try out bigger changes to the site, so that I never break the live site. It makes it much easier and safer to just try out stuff.
Answer: Blocks are configured per theme. You won't lose any data.
Answer: You will not lose any data but your block positioning may change depending on how the theme is set up.
Answer: You won't lose any data, though you might have to re-position the blocks as per the new theme layout.
Answer: Like some others have said, you won't lose data, but I've typically had to position the blocks when changing themes.
If you enable the new theme (don't set it to default yet) you can setup the blocks before you go live with it. And if you allow certain users to change themes, you can view and tweak it.
Answer: Like everyone else said, you will not lose data. I would like to add if you switch from a theme that has, say two columns, to a one column theme, the blocks from the second column will have to go somewhere (they would need to be manually set).


How to make silicic acid, potassium silicate or calcium silicate?

Question: I am a student of tropical agriculture. I am taking the class of agronomic chemistry and plant nutrition. I want to make use of silicate source I have at home for e.g. zeolite, wood ashes, diatomaceous earth, silica sand. I have hydroxide of calcium, potassium and sodium. Can I use any of these to make silicate for use on plant nutrition ?
Answer: You can make the silicates by fusing the hydroxides with silica. Potassium silicate fertilizer grade are successfully produced by direct fusion of silica ($\ce{SiO2}$) and potasium compounds($\ce{KOH}$ and $\ce{K2CO3}$) in furnaces at temperatures up to melting point of mixture. The fusion temperature reaches around 1350 °C.
$$\ce{SiO2 + 2 KOH ->[\Delta] K2SiO3 + H2O}$$
$$\ce{SiO2 + K2CO3 ->[\Delta] K2SiO3 + CO2}$$
Calcium silicate is prepared by reacting calcium hydroxide and silica. This paper1 discussed the reaction at 30-85 °C.
References

https://www.matec-conferences.org/articles/matecconf/pdf/2016/21/matecconf_bisstech2016_01021.pdf
REACTION BETWEEN SILICA AND CALCIUM HYDROXIDE SOLUTIONS. I. KINETICS IN THE TEMPERATURE RANGE 30 TO 85°, S. A. Greenberg, The Journal of Physical Chemistry 1961 65 (1), 12-16, DOI: 10.1021/j100819a005
Comment: You should add that the potassium silicate obtained by fusion of $\ce{KOH + SiO2}$ is extremely difficult to dissolve into water. This can only be done with hot water and under pressure.


Can this device be made by anyone now?

Question: In reference to the patent: CA2366687C
Answer: A) That would be a legal opinion that would be best asked - in that form - to a patent attorney.
B) To answer the underlying question, of how do I find out whether a patent is expired?

There are several things to take into consideration - what patent term applies to the patent, whether there were extensions, whether the patent was allowed to lapse early (and isn't in a grace period), etc.
Patent Baristas has a good article helping you step through the process.
PatentBytes also has a good Patent 101 article introducing the steps necessary to begin determining if the patent is still in force.
Further, the patent also may be at some point ruled invalid - which is an even more complicated topic best researched in depth, and discussed with an experienced patent attorney.

C) Also note the associated patents issued in the US, EU, etc. listed in the top right of the Google patent listing you linked to.
Answer: No. Or at least, not without risking getting sued.
This patent appears to be granted and currently in force in Canada (according to CIPO, with all renewal fees up to date.
Comment: Can you expand on how do you find out or know if the patent is open?

Can this device be made by anyone now?


What should I use to overlay a particle board subfloor in my mobile home?

Question: I am buying a mobile home that has a three-quarter inch particle board subfloor. I plan to patch any holes and then overlay the particle board throughout the entire trailer with either plywood or OSB. Given that the new floor will be resting on the existing particle board, what thickness do I need and should I go with plywood or OSB? Don't want to be too cheap but I don't want to overspend either.
Comment: Are you sure it only has particle board (and that it's actually particle board and not OSB)? Particle board has almost never been considered a structural product. I'd bet that it has 1/2" plywood underneath.
Comment: @isherwood it is most likely MDF or a high density particle type board.  My older mobile is using that.
Comment: Isherwood most folks don't know the difference between particle board and OSB. They see something that is not plywood and call it particle board.
Comment: I can assure you if age is right it crumbles to saw dust powder if it gets wet.  No OSB in older units newer mobiles yes.
Answer: If you do in fact have only the 3/4" particle board now, you should not consider it structural. Therefore, I'd use 3/4" (23/32) tongue-and-groove OSB, which is standard as a basic single-layer subfloor in new homes. In areas where you want to install vinyl or other flooring requiring a prepared surface, use 3/4" t&g BC plywood to avoid the need for additional underlayment.
If you actually have MDF (or some other high-performance pressed-particle product), which has more structural integrity, I'd consider a 1/2" or 5/8" BC, with the joints staggered from those of the MDF. You won't save a ton over the OSB (it may actually cost more), but it'll result in less of a height difference and has a nicer finished surface.
Answer: First I am glad to hear you say overlay the existing subfloor.  The main reason I say this is that the subfloor usually ends up under the wall framing and trying to remove or replace it can only be done by cutting and rematching the height.
As far as what to place over the existing has two items to keep in mind.
The first is if you use too thick of board your walls bottom plate gets the amount of exposed wood available for access reduced.  If you plan any open wall work such as replacement of a wall with sheetrock you can loose to much of the plate to nail to.  So try to keep at a 1/2 inch maximum.
The other part of selection of material will depend on what you are finishing the room in and type of room.  If your existing floor is in fair shape both plywood and OSB staple or screw down nicely for living rooms, bedrooms, and halls.  I prefer a exterior grade plywood with one side sanded(up) but have also used the OSB.  If your in a bathroom or kitchen area hardybacker or cement board is the better choice.
Basically installing this subfloor is the same concept as installing a subfloor on a concrete slab with exception of anchoring methods.


Should I create a blog in rails or use something that already exists?

Question: In my next rails project I'm going to need blogging functionality. I'm wondering whether anyone has any good suggestions, or should I just roll my own? (Probably not in 15 minutes)
I think the most important feature will be to display code samples elegantly.
Answer: How's your free time?

Five years, that's how long that little idea took. Plus 2 years of adding bells and whistles. And that, folks, is why I'm giving in and using a blog host. Because I have lots of ideas, lots of things to say and to explore, but only a few dozen years left at best. I can't afford to go chasing every 5-year idea that springs to mind. After due consideration of the crap web frameworks and crap blog packages out there, I decided that I don't want to spend my next 5 years implementing my vision for a decent self-publishing system. Someone else can do it.

http://steve-yegge.blogspot.com/2006/03/blog-or-get-off-pot.html
Answer: It's a classic build-versus-buy (or, in this case, download for free) decision isn't it?

Write up the feature set of what you are looking for.
Survey the offerings out there to see how close a fit you have.
For the one or two products that is the closest fit, evaluate whether or not it would be less effort to write your own solution or customize the offering to do what you need.
If all you need is a blog site, then this is a no-brainer. Use WordPress and that's it.
If there are other features for this app and blogging is just one of them, then consider writing an app around WordPress. It is just a PHP application using MySql after all.
If WordPress has features or does things that you don't want, then maybe you do need to roll your own.
If the most important feature for this site is that it is to be written in RoR, then roll your own or find a RoR based blogging app as WordPress is not written in RoR. I haven't really done the homework on this but I would imagine that getting PHP and RoR to share session state would be a time consuming hack.
Answer: Rolling your own blog is a great project (and quite fun too!), but for practical usage, using something pre-made is going to be more secure, have more cool features, etc. etc. Unless you're incredibly dedicated, you'll probably end up cutting corners and end up with something that isn't quite what you want.
Despite being a Rails guy myself, I'm a huge fan of Wordpress. If you're looking for Rails-based blog engines, I've had luck with Mephisto, although the documentation leaves something to be desired. Radiant CMS is another CMS/Blog system that might be worth looking at.
Answer: A lot of Ruby/Rails developers have actually gone the route of using static website/blog generators. This has a few advantages. First, the pages are static HTML with no dependency on a database. This means they can be served by your front-end Web server (Apache, Nginx, etc.) faster than if they were to go through Mongrel, Thin or Phusion Passenger. Secondly, the pages will be easier for search engines to index. Finally, and probably most importantly, you can easily version control your posts using Git (or your favorite SCM)
I switched my blog over to a static model after development on Mephisto seemed to stall. I am using Tom Preston-Werner's Jekyll and Disqus for the comments. Works great. Give it a try!
Comment: but one of the problems i see with these static page generators is the unavailability of commenting functionality, you will have to use 3rd party commenting tools like disqus or intensedebate or facebook.
Answer: If you are just looking for a project, then building your own blog engine is a good start.
Personally, though I have been a full-time Rails developer for the past 3 years, I still use and recommend Wordpress for myself and others.
Answer: If the project is to write a blog, don't roll your own.  There are plenty solutions out there that will solve this problem for you while you worry about pumping out great content.
You will end up spending to much time futzing with the little things that don't really matter.
Answer: Probably there are tons of those.
For example, Rastafari, or Enkiblog.
Comment: Thank you for the Enkiblog link, I think I will probably give this ago, seems to offer me the best combination, time will tell.
Answer:
In my next rails project I'm going to
  need blogging functionality. I'm
  wondering whether anyone has any good
  suggestions, or should I just role my
  own? (Probably not in 15 minutes)

I wouldn't recommend rolling your own blog system. You should look into using Radiant CMS with a blog extension.

I think the most important feature will be to display code samples elegantly.

For this I can recommend looking into SyntaxHighlighter.
Answer: All depends on your goal:
If it is for learning purposes and it's for fun, code it from scratch. Also, try to add new functionality that you will not find in current blogging platforms. For example, make in a way that is easy for a developer to blog tutorials or screencasts.
If it's for a client or just to blog, use wordpress. You can have your site in ruby and then link to wordpress. Think about it, how many human hours are behind wordpress so for you to match that you will need to work full time on it for 8 years.
Wordpress will work out of the box and then periodically you can tweak it, depending on future needs.
Answer: I agree, for fun and learning, code from scratch.  But consider coding something people really need and don't already have.  Innovate.
There are so many excellent blog platforms out there, and some (like Wordpress) have active developer communities writing hundreds of useful and powerful plugins. And that includes some excellent support for code samples.
No need to reinvent the wheel.


Only one instance of a ScriptManager can be added to the page Dotnetnuke 6.2 Error

Question: Hi all I am developing a portal in dotnetnuke 6.2. I am developing custom modules for the project.I am using ajax controls in ascx files for the module development.but when running the application it shows Only one instance of a ScriptManager can be added to the page error.But no where i am using script manager in the project.I searched the on the web.No exact solution is available.Your help is highly appreciated.
Answer: If you open the Default.aspx.cs page on the root of your DotNetNuke website you can see:
<code>var scriptManager = ScriptManager.GetCurrent(Page);
if (scriptManager == null)
{
  scriptManager = new ScriptManager();
  Page.Form.Controls.AddAt(0, scriptManager);
}
</code>
The ScriptManager is on the main page of DotNetNuke...


Can I mention Sherlock Holmes in my story?

Question: Now that character SHERLOCK HOLMES is no longer under copyright and is in public domain, can I bring him into my fantasy story where the Protagonist meets him to get some help?
Answer: I am not a lawyer. The general points I'll make have all sorts of legal specifics you need to look up. With that being said:
Yes, you can reference or even use the character. When TV and film producers do the same, they don't pay a penny. In theory, you should be careful which stories you reference. They have different publication dates, and the dates on which they enter the public domain also vary by region. And there is one other pitfall: copyrightable original elements of derivative works are protected, so don't copy those. In other words, if you steal something you must know where it originated.
Answer: This question was asked previously: Is Sherlock Holmes public domain for use in a story? but a US court case in 2013 (and it's failed appeal in 2014) has since established that Sherlock Holmes, as depicted in all but the last-published stories, has lapsed from US copyright and is now in the public domain.
https://en.wikipedia.org/wiki/Sherlock_Holmes#Copyright_issues
What this means is that the early version of the character is public domain, however character details that were introduced in later stories are still under copyright.
The remaining titles are due to lapse between 2019 and 2023.
The copyright has already lapsed in the UK.


Late withdrawal from all the courses after the census date as I had an accident and will be undergoing surgery

Question: I will be undergoing surgery due to an accident that happened to me 2 months before the start of the term and I have been. The term has nearly ended and I wont be able to sit for final exams as I will be undergoing surgery based on doctors advice.On top of that this injury has been affecting my studies to a great extent.But if I withdraw from courses right now, I will be excluded from the university.I need help regarding this.
Answer: You have to see the people at the university - we cannot give you a definitive answer as regulations etc vary by location etc
There are most likely student advisors or equivalent, admissions dept, your course head, even the department dean who can all be contacted about your situation.
Make sure you have documentary evidence so they have something to work with - doctor's letters etc
Best of luck.
Comment: I faced a similar situation, when diagnosed with cancer requiring surgery while I was a graduate student. The graduate student advisor knew the right petition to present to the right committee to let me drop from full time to just a couple of course units of research.
Comment: My experience, both as a student and as a faculty member, has been that universities are very accommodating of medical problems.  As this answer says, make sure you have documentation showing that you truly have a medical need; I'd expect the appropriate authorities can and will solve the problem for you.