c++
tuple <int,int> getDimensions ()
{
return make_tuple (1,2);
}
int w , h ;
tee (w,h) = getDimensions()
forword_as_tuple
SQL_SERVER
check constraint violation 547
non repeatable read
set XACT_ABORT
האם להרוג את הטרנזקציה גם על שגיאה קלה
@@Error
XACT_STATE commit המצב של הטרנזקציה האם היא ניתנת ל
Save Transaction here
Rollback Transaction here
https://www.simple-talk.com/sql/t-sql-programming/handling-constraint-violations-and-errors-in-sql-server/
Hadoop
Input format
abstract class FileInputFormat
expend it TextInputFormat
InputFormat: | Description: | Key: | Value: |
---|---|---|---|
TextInputFormat | Default format; reads lines of text files | The byte offset of the line | The line contents |
KeyValueInputFormat | Parses lines into key, val pairs | Everything up to the first tab character | The remainder of the line |
SequenceFileInputFormat | A Hadoop-specific high-performance binary format | user-defined | user-defined |
InputFormats provided by MapReduce
input split –> break the data into task if 64 Bit
JopConfig object
Camel
CamelContext context = new DefaultCamelContext ();
eip –> enterprise integration pattern
jms:queue:IncomingOrders
ActiveMqComponent based on jmsComponent
pool connection factory
Neo4j
GraphDatabaseFactory().NewEmbededDataBase ()
loadPropertiesFromFile (neo4j.properties )
Embedded Linux
Enable Disable BlockLayer
The kernel command line –> from configuration
slab cache
kmem_cache_create allocate free destroy
memory pools
mempool create
setup macro – deprecated
python
slicing
from collections import Sequence
class MyList(Sequence):
def __init__(self, *items):
self.data = list(items)
def __len__(self):
return len(self.data)
def __getitem__(self, slice):
return self.data[slice]
s = MyList(1,2,3)
# lots of free methods
print s[1:2], len(s), bool(s), s.count(3), s.index(2), iter(s)
Ruby
def thing.greet(greeting, *names)
names.each do |name|
puts "#{greeting}, #{name}!"
end
end
>> thing.greet("Hello", "Alice", "Bob", "Charlie")
Hello, Alice!
Hello, Bob!
Hello, Charlie!
Java Script
prototype
אין תגובות:
הוסף רשומת תגובה