This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def readData() | |
data=[] | |
f = File.open("twl06.txt", "r") | |
f.each_line do |line| | |
data << line | |
end | |
return data | |
end | |
def levenshtein(s,t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.onReady(function(){ | |
var ds = new Ext.data.Store({ | |
proxy: new Ext.data.ScriptTagProxy({ | |
url: "https://api.meetup.com/topics.json/?key=14105b6310651261633e2e1715346562" | |
}), | |
baseParams:{"search":"Javascript"}, | |
reader: new Ext.data.JsonReader({ | |
root: 'results' | |
}, | |
['id', 'name', 'link'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var geoCodeURL = "http://nominatim.openstreetmap.org/search"; | |
var map = new OpenLayers.Map({ div: "map" }); | |
var osm = new OpenLayers.Layer.OSM(); | |
map.addLayers([osm]); | |
map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
map.setCenter( | |
new OpenLayers.LonLat( 9.2134, 55.3028).transform( | |
new OpenLayers.Projection("EPSG:4326"), | |
map.getProjectionObject() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.noConflict(); | |
var geoCodeURL = "http://nominatim.openstreetmap.org/search.php"; | |
var map = new OpenLayers.Map({ div:'map' }); | |
var osm = new OpenLayers.Layer.OSM(); | |
map.addLayers([osm]); | |
map.addControl(new OpenLayers.Control.LayerSwitcher()); | |
var markers = new OpenLayers.Layer.Markers("Markers"); | |
map.addLayer(markers); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reviewGrid = Ext.create("ReviewGrid", {renderTo: 'review'}); | |
var productStore = Ext.create("ProductStore", {}); | |
var productForm = Ext.create("ProductForm", {store:productStore, renderTo: 'product', reviewGrid: reviewGrid}); | |
describe("ProductForm", function() { | |
it("should be able to navigate 1 product forward ", function() { | |
waitsFor(5000, function () { | |
return ( productStore.isLoading() == false); | |
}, "productStore load"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ext.regModel('Product', { | |
idProperty: 'id', | |
successProperty: 'meta.success', | |
fields: [ | |
'id', | |
"name", | |
'company' | |
], | |
hasMany: {model:'Review', name: 'reviews', associationKey: 'reviews'} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass /geoserver http://localhost:8080/geoserver | |
ProxyPreserveHost On | |
ProxyStatus On |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map = new OpenLayers.Map('map'); | |
var wms = new OpenLayers.Layer.WMS( | |
"State", | |
"http://sigma.openplans.org/geoserver/wms", | |
{layers: 'topp:tasmania_state_boundaries'} | |
); | |
wfs = new OpenLayers.Layer.WFS( | |
"Cities", | |
"http://sigma.openplans.org/geoserver/wfs", | |
{typename: 'topp:tasmania_cities'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { | |
clicksToMoveEditor: 1, | |
autoCancel: false | |
}); | |
var grid = Ext.create('Ext.grid.Panel', { | |
title: 'Listing videos', | |
store: Ext.create('Ext.data.Store', { ... } ), | |
renderTo: 'video-grid', | |
plugins: [rowEditing], | |
columns: [{ header: 'title', dataIndex: 'title', width: 200, editor: { xtype: 'textfield' } }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function ValidateFieldNotEmpty Integer iColumn String sValue Returns Boolean | |
String sField | |
Move "...." to sField | |
If (sValue = "") Begin | |
Error DFERR_OPERATOR (SFormat("Feltet '%1' skal tildeles en værdi", sValue)) | |
Function_Return True | |
End | |
Function_Return False | |
End_Function |
OlderNewer