This file contains 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
'''takes a marc21 dump and adds 999$i fields to it''' | |
import sys | |
from pymarc import MARCReader | |
from pymarc import Field | |
import json | |
def main(): | |
stats = { | |
'records': 0, |
This file contains 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
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="example" version="1.5"> | |
<fields> | |
<field name="_version_" type="long" indexed="true" stored="true"/> | |
<field name="abstract_display" type="string" indexed="false" stored="true" multiValued="false"/> | |
<field name="accessible_online" type="boolean" indexed="true" stored="true" /> | |
<field name="allfields" type="text" indexed="true" multiValued="true" stored="false"/> | |
<field name="availability" type="string" indexed="true" stored="true" multiValued="true"/> | |
<field name="class_dewey_full" type="string" indexed="true" stored="true" multiValued="true"/> | |
<field name="class_kssb_full" type="string" indexed="true" stored="true" multiValued="true"/> |
This file contains 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
using System.Web.Http; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Serialization; | |
using Viola.CallSlipFetching; | |
using ViolaGui.Filters; | |
namespace ViolaGui | |
{ | |
public static class WebApiConfig | |
{ |
This file contains 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
using System; | |
using Newtonsoft.Json; | |
namespace Viola.CallSlipFetching | |
{ | |
public class CallSlipDeliveryTypeConverter : JsonConverter | |
{ | |
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) | |
{ | |
var deliveryType = value as CallSlipDeliveryTypes; |
This file contains 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
using System; | |
using System.Collections.Generic; | |
namespace Viola.CallSlipFetching | |
{ | |
public sealed class CallSlipDeliveryTypes | |
{ | |
private readonly string _name; | |
private static readonly Dictionary<string, CallSlipDeliveryTypes> Instance = new Dictionary<string, CallSlipDeliveryTypes>(); |
This file contains 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
dynamic activities = null; | |
//Wrong | |
var objects = new List<dynamic>(activities.items).Select(a=>a.object); | |
//Right | |
var objects = new List<dynamic>(activities.items).Select(a=>a.@object); |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Net; | |
using System.Text; | |
using System.Web.Helpers; | |
namespace bibliotekarien.GooglePlus | |
{ | |
public class ActivitiesFetcher |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<ctx_obj_set> | |
<ctx_obj identifier=""> | |
<ctx_obj_attributes><perldata> | |
<hash> | |
<item key="@rft.auinit"> | |
<array> | |
<item key="0">D F</item> | |
</array> | |
</item> |