text
stringlengths
2
1.04M
meta
dict
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <!-- SOUND PROFILE --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/profile_soundprofile_container" style="@style/profile_option_container"> <LinearLayout style="@style/profile_option_icon_subcontainer" android:id="@+id/profile_sound_profile_icon_container"> <ImageView style="@style/profile_option_icon" android:id="@+id/profile_soundprofile_icon" android:src="@drawable/ic_record_voice_over_black_48dp" /> </LinearLayout> <LinearLayout style="@style/profile_option_content_subcontainer" android:layout_toRightOf="@+id/profile_sound_profile_icon_container"> <TextView style="@style/general_text_view" android:text="@string/profile_options_label_soundprofile"/> <TextView style="@style/small_text_view" android:text="@string/profile_options_description_soundprofile" /> <TextView style="@style/very_small_text_view" android:id="@+id/profile_soundprofile_value" /> </LinearLayout> <LinearLayout style="@style/profile_option_activator_subcontainer"> <android.support.v7.widget.SwitchCompat android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/profile_soundprofile_active"/> </LinearLayout> </RelativeLayout> <View style="@style/profile_option_divisor"/> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/profile_volumes_container" style="@style/profile_option_container"> <LinearLayout style="@style/profile_option_icon_subcontainer" android:id="@+id/profile_volumes_icon_container"> <ImageView style="@style/profile_option_icon" android:src="@drawable/ic_volume_up_black_48dp" /> </LinearLayout> <LinearLayout style="@style/profile_option_content_subcontainer" android:layout_toRightOf="@+id/profile_volumes_icon_container"> <TextView style="@style/general_text_view" android:text="@string/profile_options_label_sounds_ringtone_volumes"/> <TextView style="@style/small_text_view" android:text="@string/profile_options_description_volumes" /> <TextView style="@style/very_small_text_view" android:id="@+id/profile_volumes_value" /> </LinearLayout> <LinearLayout style="@style/profile_option_activator_subcontainer"> <android.support.v7.widget.SwitchCompat android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/profile_volumes_active"/> </LinearLayout> </RelativeLayout> <View style="@style/profile_option_divisor"/> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/profile_ringtone_uri_container" style="@style/profile_option_container"> <LinearLayout style="@style/profile_option_icon_subcontainer" android:id="@+id/profile_ringtone_icon_container"> <ImageView style="@style/profile_option_icon" android:src="@drawable/ic_music_note_black_48dp" /> </LinearLayout> <LinearLayout style="@style/profile_option_content_subcontainer" android:layout_toRightOf="@+id/profile_ringtone_icon_container"> <TextView style="@style/general_text_view" android:text="@string/profile_options_label_ringtone_uri"/> <TextView style="@style/small_text_view" android:text="@string/profile_options_description_ringtone_uri" /> <TextView style="@style/very_small_text_view" android:id="@+id/profile_ringtone_uri_value" /> </LinearLayout> <LinearLayout style="@style/profile_option_activator_subcontainer"> <android.support.v7.widget.SwitchCompat android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/profile_ringtone_uri_active"/> </LinearLayout> </RelativeLayout> <View style="@style/profile_option_divisor"/> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/profile_notifications_uri_container" style="@style/profile_option_container"> <LinearLayout style="@style/profile_option_icon_subcontainer" android:id="@+id/profile_notifications_uri_icon_container"> <ImageView style="@style/profile_option_icon" android:src="@drawable/ic_notifications_black_48dp" /> </LinearLayout> <LinearLayout style="@style/profile_option_content_subcontainer" android:layout_toRightOf="@+id/profile_notifications_uri_icon_container"> <TextView style="@style/general_text_view" android:text="@string/profile_options_label_notifications_uri"/> <TextView style="@style/small_text_view" android:text="@string/profile_options_description_notifications_uri" /> <TextView style="@style/very_small_text_view" android:id="@+id/profile_notifications_uri_value" /> </LinearLayout> <LinearLayout style="@style/profile_option_activator_subcontainer"> <android.support.v7.widget.SwitchCompat android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/profile_notifications_uri_active"/> </LinearLayout> </RelativeLayout> <View style="@style/profile_option_divisor"/> </LinearLayout> </ScrollView>
{ "content_hash": "7ae7da320bba7daada3425b0db214c1b", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 91, "avg_line_length": 34.79807692307692, "alnum_prop": 0.5502901353965184, "repo_name": "AleCat83/GeoSettingsOpen", "id": "9aa54abd0c7ba9aed3a657b876f96ea9c84654be", "size": "7238", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/res/layout/fragment_profile_sounds.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "228880" } ], "symlink_target": "" }
Copyright (c) 2020 W.T.J. Riezebos Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
{ "content_hash": "12cc6a517e4e4ce538818bd540860ab9", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 72, "avg_line_length": 42.69230769230769, "alnum_prop": 0.7945945945945946, "repo_name": "widoriezebos/Thoth", "id": "af46e107e61652e1110a4090bd9aa088f98b2302", "size": "567", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Documentation/Copyright.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "10147" }, { "name": "HTML", "bytes": "2300" }, { "name": "Java", "bytes": "1120152" }, { "name": "JavaScript", "bytes": "2814" }, { "name": "PLSQL", "bytes": "377" }, { "name": "Smarty", "bytes": "74554" } ], "symlink_target": "" }
'use strict'; describe('ProAct.Stream', function () { it ('is in ProAct.States.ready state after creation', function () { var stream = P.stream(); expect(stream.state).toBe(ProAct.States.ready); }); describe('#trigger', function () { it ('updates the stream listeners', function () { var stream = ProAct.stream(), res = []; stream.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream.trigger(1); expect(res).toEqual([1]); stream.trigger(2); expect(res).toEqual([1, 2]); }); }); describe('#map', function () { it ('creates a new stream from the this stream, using the passed function as default transformation', function () { var stream1 = P.stream(), stream2 = stream1.map(function (number) {return number * 2;}), res = []; stream2.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual([2]); stream1.trigger(2); expect(res).toEqual([2, 4]); }); it ('is transitive', function () { var stream1 = P.stream(), stream2 = stream1.map(function (number) {return number * 2;}), stream3 = stream2.map(function (number) {return number * 3;}), stream4 = stream3.map(function (number) {return '(' + number + ')';}), res = []; stream4.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual(['(6)']); stream1.trigger(2); expect(res).toEqual(['(6)', '(12)']); }); it ('works with predefined mapping functions', function () { var stream1 = P.stream(), stream2 = stream1.map('-'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual([-1]); }); it ('works with stored mapping functions', function () { P.registry.store('l:test', function (v) { return '(' + v + ')'; }); var stream1 = P.stream(), stream2 = stream1.map('l:test'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual(['(1)']); }); }); describe('#filter', function () { it ('filters only chosen values', function() { var stream1 = P.stream(), stream2 = stream1.filter(function (number) {return number % 2 === 0;}), res = []; stream2.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual([]); stream1.trigger(2); expect(res).toEqual([2]); stream1.trigger(3); expect(res).toEqual([2]); stream1.trigger(4); expect(res).toEqual([2, 4]); }); it ('is chainable', function () { var stream1 = P.stream(), stream2 = stream1.filter(function (number) {return number % 2 === 0;}), stream3 = stream2.filter(function (number) {return number % 3 === 0;}), res = []; stream3.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(2); expect(res).toEqual([]); stream1.trigger(6); expect(res).toEqual([6]); stream1.trigger(9); expect(res).toEqual([6]); stream1.trigger(24); expect(res).toEqual([6, 24]); }); it ('works with predefined filtering functions', function () { var stream1 = P.stream(), stream2 = stream1.filter('-'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual([]); stream1.trigger(-3); expect(res).toEqual([-3]); }); it ('works with stored filtering functions', function () { ProAct.registry.store('l:test', function (v) { return v > 5; }); var stream1 = P.stream(), stream2 = stream1.filter('l:test'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual([]); stream1.trigger(13); expect(res).toEqual([13]); }); }); describe('#reduce', function () { it ('creates a ProAct.Property that listens to accumulations', function () { var stream = P.stream(), reduced = stream.reduce(0, function (x, y) {return x + y;}); expect(reduced.v).toEqual(0); stream.trigger(1); expect(reduced.v).toEqual(1); stream.trigger(2); expect(reduced.v).toEqual(3); }); }); describe('#accumulate', function () { it ('accumulates values using the passed function', function () { var stream1 = P.stream(), stream2 = stream1.accumulate(0, function (x, y) {return x + y;}), res = []; stream2.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual([1]); stream1.trigger(1); expect(res).toEqual([1, 2]); stream1.trigger(1); expect(res).toEqual([1, 2, 3]); stream1.trigger(2); expect(res).toEqual([1, 2, 3, 5]); }); it ('can be chained', function () { var stream1 = P.stream(), stream2 = stream1.accumulate(0, function (x, y) {return x + y;}), stream3 = stream2.accumulate(1, function (x, y) {return x * y;}), res = []; stream3.on(function (number) { res.push(number); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual([1]); stream1.trigger(2); expect(res).toEqual([1, 3]); stream1.trigger(5); expect(res).toEqual([1, 3, 24]); }); it ('works with predefined accumulating functions', function () { var stream1 = P.stream(), stream2 = stream1.accumulate('+'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual([1]); stream1.trigger(3); expect(res).toEqual([1, 4]); }); it ('works with predefined stored functions', function () { ProAct.registry.store('l:test', [1, function (a, b) { return a * b; }]); var stream1 = P.stream(), stream2 = stream1.accumulate('l:test'), res = []; stream2.on(function (number) { res.push(number); }); stream1.trigger(1); expect(res).toEqual([1]); stream1.trigger(3); expect(res).toEqual([1, 3]); }); }); describe('#merge', function () { it ('merges two streams events into one stream of events', function () { var stream1 = P.stream(), stream2 = P.stream(), stream3 = stream1.merge(stream2), res = []; stream3.on(function (e) { res.push(e); }); expect(res).toEqual([]); stream1.trigger(1); expect(res).toEqual([1]); stream2.trigger(1); expect(res).toEqual([1, 1]); }); }); describe('Errors', function () { it ('can be triggered with #triggerErr and listen for with #onErr', function () { var stream = P.stream(), res = [], resErr = []; stream.onErr(function (error) { resErr.push(error); }); stream.on(function (error) { res.push(error); }); stream.triggerErr('error'); expect(res).toEqual([]); expect(resErr).toEqual(['error']); stream.trigger(1); expect(res).toEqual([1]); expect(resErr).toEqual(['error']); }); it ('can be chained through many streams', function () { var stream1 = P.stream(), stream2 = new ProAct.Stream(stream1), resErr = []; stream2.onErr(function (error) { resErr.push(error); }); stream1.triggerErr('error'); expect(resErr).toEqual(['error']); }); it ('can be generated from transformations', function () { var stream1 = P.stream(), stream2 = stream1.map(function (v) { if (v < 0) { throw Error('no!'); } return -v; }), res = [], resErr = []; stream2.onErr(function (error) { resErr.push(error); }); stream2.on(function (v) { res.push(v); }); stream1.trigger(5); expect(res).toEqual([-5]); expect(resErr).toEqual([]); stream1.trigger(-5); expect(res).toEqual([-5]); expect(resErr.length).toEqual(1); expect(resErr[0].message).toEqual('no!'); }); }); describe('Close', function () { it ('triggering closing event destroys the stream, but the event is delivered to its listeners', function () { var stream = P.stream(), res = []; stream.onClose(function (e) { res.push(e); }); stream.triggerClose('last'); expect(stream.state).toBe(ProAct.States.closed); expect(res.length).toBe(1); expect(res[0]).toEqual('last'); }); it ('triggering closing event destroys the stream and its source, but the event is delivered to its listeners', function () { var stream1 = P.stream(), stream2 = stream1.map(function (e) { return e + ' time'; }), res = []; stream2.onClose(function (e) { res.push(e); }); stream1.triggerClose('last'); expect(stream1.state).toBe(ProAct.States.closed); expect(stream2.state).toBe(ProAct.States.closed); expect(res.length).toBe(1); expect(res[0]).toEqual('last'); }); it ('if stream is a merge stream, it is not closed untill all of its sources are closed', function () { var source1 = P.stream(), source2 = P.stream(), source3 = P.stream(), stream = P.stream().into(source1, source2, source3), res = []; stream.onClose(function (e) { res.push(e); }); source1.triggerClose('last'); expect(source1.state).toBe(ProAct.States.closed); expect(stream.state).toBe(ProAct.States.ready); expect(res.length).toBe(0); source2.triggerClose('last'); expect(source2.state).toBe(ProAct.States.closed); expect(stream.state).toBe(ProAct.States.ready); expect(res.length).toBe(0); source3.triggerClose('last'); expect(source3.state).toBe(ProAct.States.closed); expect(stream.state).toBe(ProAct.States.closed); expect(res.length).toBe(1); expect(res[0]).toEqual('last'); }); }); describe ('ProAct.Actor#skipDuplicates', function () { it ('creates a stream which skips the duplicates in the source with the default comparator', function () { var stream = ProAct.stream(), skipDuplicates = stream.skipDuplicates(), res = []; skipDuplicates.on(function (v) { res.push(v); }); stream.trigger(3); expect(res).toEqual([3]); stream.trigger(3); expect(res).toEqual([3]); stream.trigger(7); expect(res).toEqual([3, 7]); }); it ('creates a stream which skips the duplicates in the source with a custom comparator', function () { var stream = ProAct.stream(), skipDuplicates = stream.skipDuplicates(function(a, b) { return a % 2 === b % 2; }), res = []; skipDuplicates.on(function (v) { res.push(v); }); stream.trigger(3); expect(res).toEqual([3]); stream.trigger(1); expect(res).toEqual([3]); stream.trigger(2); expect(res).toEqual([3, 2]); stream.trigger(4); expect(res).toEqual([3, 2]); }); }); describe ('ProAct.Actor#diff', function () { it ('creates a stream with the differences of the source values relative to the seed with a custom differ', function () { var stream = ProAct.stream(), diff = stream.diff(0, function(prev, v) { return v - prev; }), res = []; diff.on(function (v) { res.push(v); }); stream.trigger(3); expect(res).toEqual([3]); stream.trigger(7); expect(res).toEqual([3, 4]); stream.trigger(6); expect(res).toEqual([3, 4, -1]); }); }); describe ('ProAct.Actor#take', function () { it ('creates a limited stream with limit the passed limit with the caller as source', function () { var stream = ProAct.stream(), take = stream.take(3), res = [], closed = false; take.on(function (v) { res.push(v); }); take.onClose(function () { closed = true; }); stream.trigger(3); expect(res).toEqual([3]); expect(closed).toBe(false); stream.trigger(5); expect(res).toEqual([3, 5]); expect(closed).toBe(false); stream.trigger(8); expect(res).toEqual([3, 5, 8]); expect(closed).toBe(true); }); }); describe ('ProAct.Actor#takeWhile', function () { it ('creates a limited stream which uses a function as a limiting condition', function () { var stream = ProAct.stream(), takeWhile = stream.takeWhile(function(v) { return v < 3; }), res = [], closed = false; takeWhile.on(function(v) { res.push(v); }); takeWhile.onClose(function () { closed = true; }); stream.trigger(1); expect(res).toEqual([1]); expect(closed).toBe(false); stream.trigger(2); expect(res).toEqual([1, 2]); expect(closed).toBe(false); stream.trigger(3); expect(res).toEqual([1, 2]); expect(closed).toBe(true); }); }); describe ('ProAct.Actor#skip', function () { it ('creates a stream that begins emitting after given limit events were triggered into it', function () { var stream = ProAct.stream(), skip = stream.skip(3), res = []; skip.on(function (v) { res.push(v); }); stream.trigger(3); expect(res).toEqual([]); stream.trigger(5); expect(res).toEqual([]); stream.trigger(8); expect(res).toEqual([]); stream.trigger(13); expect(res).toEqual([13]); stream.trigger(21); expect(res).toEqual([13, 21]); }); it ('it closes the stream if source closes', function () { var stream = ProAct.stream(), skip = stream.skip(2), res = [], closed = false; skip.on(function (v) { res.push(v); }); skip.onClose(function () { closed = true; }); stream.trigger(3); expect(res).toEqual([]); stream.close(); expect(res).toEqual([]); expect(closed).toEqual(true); }); }); describe ('ProAct.Actor#skipWhile', function () { it ('the resulting stream doesn\'t emit anything while the passed condition is true', function () { var stream = ProAct.stream(), skip = stream.skipWhile(function (x) { return x < 4; }), res = []; skip.on(function (v) { res.push(v); }); stream.trigger(3); expect(res).toEqual([]); stream.trigger(2); expect(res).toEqual([]); stream.trigger(8); expect(res).toEqual([8]); stream.trigger(13); expect(res).toEqual([8, 13]); }); }); describe('ProAct.Actor.flatMap', function () { beforeEach(function () { jasmine.Clock.useMock(); }); it ('turns stream of streams in a stream with sources these streams', function () { var sourceStream = ProAct.seq(100, [1, 2, 3, 4]), stream = sourceStream.flatMap(function (s) { return ProAct.interval(50, s).take(4); }), res = []; stream.on(function (v) { res.push(v); }); stream.onClose(function (v) { res.push(v); }); jasmine.Clock.tick(150); expect(res).toEqual([1]); jasmine.Clock.tick(150); expect(res).toEqual([1, 1, 1, 2, 1, 2]); jasmine.Clock.tick(150); expect(res).toEqual([1, 1, 1, 2, 1, 2, 2, 3, 2, 3, 4, 3]); jasmine.Clock.tick(150); expect(res).toEqual([1, 1, 1, 2, 1, 2, 2, 3, 2, 3, 4, 3, 3, 4, 4, 4, P.Actor.Close]); expect(stream.state).toEqual(ProAct.States.closed); }); }); });
{ "content_hash": "67c518bf0c2c15b8b080caac045b62a5", "timestamp": "", "source": "github", "line_count": 655, "max_line_length": 129, "avg_line_length": 25.238167938931298, "alnum_prop": 0.5343899340632751, "repo_name": "proactjs/proactjs", "id": "ad04159d55914d29efe55e6862fdf90bfdf94f4c", "size": "16531", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/unit/streams/stream.spec.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "987504" }, { "name": "Shell", "bytes": "339" } ], "symlink_target": "" }
''' The function `rfc3339` formats dates according to the :RFC:`3339`. `rfc3339` tries to have as much as possible sensible defaults. ''' __author__ = 'Henry Precheur <henry@precheur.org>' __license__ = 'Public Domain' __all__ = ('rfc3339', ) import datetime import time def _timezone(utcoffset): ''' Return a string reprenseting the timezone offset. >>> _timezone(3600) '+01:00' >>> _timezone(-28800) '-08:00' ''' hours = abs(utcoffset) // 3600 minutes = abs(utcoffset) % 3600 if utcoffset >= 0: return '+%02d:%02d' % (hours, minutes) else: return '-%02d:%02d' % (hours, minutes) def _utc_offset(date, use_system_timezone): ''' Return the UTC offset of `date`. If `date` does not have any `tzinfo`, use the timezone informations stored locally on the system. >>> if time.daylight: ... system_timezone = -time.altzone ... else: ... system_timezone = -time.timezone >>> _utc_offset(datetime.datetime.now(), True) == system_timezone True >>> _utc_offset(datetime.datetime.now(), False) 0 ''' if date.utcoffset() is not None: return date.utcoffset() elif use_system_timezone: if time.daylight: # multiplying by "-1" had to be done as pep8 wouldn't allow # "-time.altzone" return time.altzone * -1 else: return time.timezone * -1 else: return 0 def _utc_string(d): return d.strftime('%Y-%m-%dT%H:%M:%SZ') def rfc3339(date, utc=False, use_system_timezone=True): ''' Return a string formatted according to the :RFC:`3339`. If called with `utc=True`, it normalizes `date` to the UTC date. If `date` does not have any timezone information, uses the local timezone:: >>> date = datetime.datetime(2008, 4, 2, 20) >>> rfc3339(date, utc=True, use_system_timezone=False) '2008-04-02T20:00:00Z' >>> rfc3339(date) # doctest: +ELLIPSIS '2008-04-02T20:00:00...' If called with `user_system_time=False` don't use the local timezone and consider the offset to UTC to be zero:: >>> rfc3339(date, use_system_timezone=False) '2008-04-02T20:00:00+00:00' `date` must be a a `datetime.datetime`, `datetime.date` or a timestamp as returned by `time.time()`:: >>> rfc3339(0, utc=True, use_system_timezone=False) '1970-01-01T00:00:00Z' >>> rfc3339(datetime.date(2008, 9, 6), use_system_timezone=False) '2008-09-06T00:00:00+00:00' >>> rfc3339('foo bar') Traceback (most recent call last): ... TypeError: excepted datetime, got str instead ''' # Check if `date` is a timestamp. try: if utc: return _utc_string(datetime.datetime.utcfromtimestamp(date)) else: date = datetime.datetime.fromtimestamp(date) except TypeError: pass if isinstance(date, datetime.date): # If `date` is a `datetime.date` convert it to a `datetime.datetime`. if not isinstance(date, datetime.datetime): date = datetime.datetime(*date.timetuple()[:3]) utcoffset = _utc_offset(date, use_system_timezone) if utc: return _utc_string(date + datetime.timedelta(seconds=utcoffset)) else: return date.strftime('%Y-%m-%dT%H:%M:%S') \ + _timezone(utcoffset) else: raise TypeError('excepted %s, got %s instead' % (datetime.datetime.__name__, date.__class__.__name__)) if __name__ == '__main__': import doctest doctest.testmod()
{ "content_hash": "97bc03701570542b8609ee76026a8787", "timestamp": "", "source": "github", "line_count": 125, "max_line_length": 78, "avg_line_length": 29.664, "alnum_prop": 0.5827939590075513, "repo_name": "steveandroulakis/mytardis", "id": "b5e7fd4f598b3ce69991983574709711bc833004", "size": "3755", "binary": false, "copies": "7", "ref": "refs/heads/3.0", "path": "tardis/tardis_portal/rfc3339.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "JavaScript", "bytes": "308601" }, { "name": "Python", "bytes": "1673248" }, { "name": "Shell", "bytes": "953" } ], "symlink_target": "" }
<?php class Kwc_Basic_Text_Cc_Component extends Kwc_Chained_Cc_Component { public static function getSettings($masterComponentClass = null) { $ret = parent::getSettings($masterComponentClass); $ret['flags']['hasFulltext'] = true; return $ret; } public function getFulltextContent() { return $this->getData()->chained->getComponent()->getFulltextContent(); } public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer) { $ret = parent::getTemplateVars($renderer); $childs = $this->getData()->getChildComponents(); foreach ($ret['contentParts'] as $kPart=>$part) { if (is_array($part)) { $component = self::getChainedByMaster($part['component'], $this->getData(), array( 'ignoreVisible' => true )); $ret['contentParts'][$kPart]['component'] = $component; } } return $ret; } }
{ "content_hash": "183f414d73c1a6c32bba395ec43d77fb", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 98, "avg_line_length": 33.03333333333333, "alnum_prop": 0.579212916246216, "repo_name": "koala-framework/koala-framework", "id": "610a8d9c79c126f0270729fcd1dcbf6c73d6415a", "size": "991", "binary": false, "copies": "1", "ref": "refs/heads/5.4", "path": "Kwc/Basic/Text/Cc/Component.php", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "CSS", "bytes": "49755" }, { "name": "JavaScript", "bytes": "1120596" }, { "name": "PHP", "bytes": "7076782" }, { "name": "SCSS", "bytes": "92667" }, { "name": "Smarty", "bytes": "229096" }, { "name": "Twig", "bytes": "33150" } ], "symlink_target": "" }
#include <lug/Graphics/Vulkan/API/DescriptorSet.hpp> #include <lug/Graphics/Vulkan/API/Buffer.hpp> #include <lug/Graphics/Vulkan/API/Device.hpp> #include <lug/System/Logger/Logger.hpp> namespace lug { namespace Graphics { namespace Vulkan { namespace API { DescriptorSet::DescriptorSet(VkDescriptorSet descriptorSet, const Device* device) : _descriptorSet(descriptorSet), _device(device) {} DescriptorSet::DescriptorSet(DescriptorSet&& descriptorSet) { _descriptorSet = descriptorSet._descriptorSet; _device = descriptorSet._device; descriptorSet._descriptorSet = VK_NULL_HANDLE; descriptorSet._device = nullptr; } DescriptorSet& DescriptorSet::operator=(DescriptorSet&& descriptorSet) { destroy(); _descriptorSet = descriptorSet._descriptorSet; _device = descriptorSet._device; descriptorSet._descriptorSet = VK_NULL_HANDLE; descriptorSet._device = nullptr; return *this; } DescriptorSet::~DescriptorSet() { destroy(); } void DescriptorSet::updateBuffers( uint32_t dstBinding, uint32_t dstArrayElement, VkDescriptorType descriptorType, const std::vector<VkDescriptorBufferInfo>& bufferInfos ) const { VkWriteDescriptorSet write{ /* write.sType */ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, /* write.pNext */ nullptr, /* write.dstSet */ _descriptorSet, /* write.dstBinding */ dstBinding, /* write.dstArrayElement */ dstArrayElement, /* write.descriptorCount */ static_cast<uint32_t>(bufferInfos.size()), /* write.descriptorType */ descriptorType, /* write.pImageInfo */ nullptr, /* write.pBufferInfo */ bufferInfos.data(), /* write.pTexelBufferView */ nullptr }; vkUpdateDescriptorSets(static_cast<VkDevice>(*_device), 1, &write, 0, nullptr); } void DescriptorSet::updateImages( uint32_t dstBinding, uint32_t dstArrayElement, VkDescriptorType descriptorType, const std::vector<VkDescriptorImageInfo>& imageInfos ) const { VkWriteDescriptorSet write{ /* write.sType */ VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, /* write.pNext */ nullptr, /* write.dstSet */ _descriptorSet, /* write.dstBinding */ dstBinding, /* write.dstArrayElement */ dstArrayElement, /* write.descriptorCount */ static_cast<uint32_t>(imageInfos.size()), /* write.descriptorType */ descriptorType, /* write.pImageInfo */ imageInfos.data(), /* write.pBufferInfo */ nullptr, /* write.pTexelBufferView */ nullptr }; vkUpdateDescriptorSets(static_cast<VkDevice>(*_device), 1, &write, 0, nullptr); } void DescriptorSet::destroy() { if (_descriptorSet != VK_NULL_HANDLE) { _descriptorSet = VK_NULL_HANDLE; } } } // API } // Vulkan } // Graphics } // lug
{ "content_hash": "e69972f9e5d56871fb3556dbbf1230b5", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 133, "avg_line_length": 30.467391304347824, "alnum_prop": 0.6821262932572244, "repo_name": "Lugdunum3D/Lugdunum", "id": "7a368ebef0f44a76a3bff61b725b84d2e91d9093", "size": "2803", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "src/lug/Graphics/Vulkan/API/DescriptorSet.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "250035" }, { "name": "C++", "bytes": "1214736" }, { "name": "CMake", "bytes": "58251" }, { "name": "GLSL", "bytes": "30705" }, { "name": "PowerShell", "bytes": "2591" }, { "name": "Shell", "bytes": "4441" } ], "symlink_target": "" }
Imports System.Security.Cryptography Public Class BasicEncryption Public Shared Function encodeBase64(str As String, Optional encoding As System.Text.Encoding = Nothing) As String If encoding Is Nothing Then Return Convert.ToBase64String(Text.Encoding.UTF8.GetBytes(str)) End If Return Convert.ToBase64String(encoding.GetBytes(str)) End Function Public Shared Function decodeBase64(str As String, Optional encoding As System.Text.Encoding = Nothing) As String Try If encoding Is Nothing Then Return Text.Encoding.UTF8.GetString(Convert.FromBase64String(str)) End If Return encoding.GetString(Convert.FromBase64String(str)) Catch Return str End Try End Function Public Shared Function getMD5Checksum(filepath As String) As String Using s = MD5.Create Using stream As IO.Stream = IO.File.OpenRead(filepath) Return BitConverter.ToString(s.ComputeHash(stream)).Replace("-", "").ToLower End Using End Using End Function End Class
{ "content_hash": "dbd1ba9edbcc002587261e64915c41f5", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 117, "avg_line_length": 39.06896551724138, "alnum_prop": 0.6734333627537511, "repo_name": "Infinicken/MCLauncher", "id": "ce22928c14d1de52dd37c9dc061bf0a6d0c777db", "size": "1135", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MCLauncher/BasicEncryption.vb", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "1200" }, { "name": "Visual Basic", "bytes": "251383" } ], "symlink_target": "" }
<!DOCTYPE html> <script src="../resources/runner.js"></script> <div id="wrapper"> <div id="host"></div> </div> <script> 'use strict'; const numChildOfHost = 10; const numDivsInShadow = 100; const loops = 20; for (let i = 0; i < numChildOfHost; ++i) { let div = document.createElement('div'); div.appendChild(document.createTextNode('div' + i)); host.appendChild(div); } const slot = document.createElement('slot'); const shadowRoot = host.attachShadow({mode: 'open'}); shadowRoot.appendChild(slot); for (let i = 0; i < numDivsInShadow; ++i) { let div = document.createElement('div'); shadowRoot.appendChild(div); } function run() { let div = document.createElement('div'); for (let i = 0; i < loops; ++i) { host.appendChild(div); slot.assignedNodes({flatten: true}); host.removeChild(div); slot.assignedNodes({flatten: true}); } } PerfTestRunner.measureRunsPerSecond({ description: "Measure v1 distribution performance", run: run, done: () => { wrapper.innerHTML = ''; } }); </script>
{ "content_hash": "a3460451bf648a278a8917454d505be0", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 54, "avg_line_length": 23.545454545454547, "alnum_prop": 0.6631274131274131, "repo_name": "heke123/chromium-crosswalk", "id": "9f392778d7dfd90729cb0f974a8d404bafe5d953", "size": "1036", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "third_party/WebKit/PerformanceTests/ShadowDOM/v1-distribution.html", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
module.exports = { loginCustomer }; function loginCustomer(req, res) { console.log("LOGIN"); OpenBankService.getToken(req.body.customerName, req.body.customerPass).then(function (data) { res.send(data) }).catch(function (e) { res.badRequest("Bad username/password"); }) }
{ "content_hash": "6f0d0bec1f01d04369c942f97a33b655", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 96, "avg_line_length": 23.153846153846153, "alnum_prop": 0.6710963455149501, "repo_name": "tpvmovil-psd2hackathon/tpvmovil", "id": "99bbe9d685d6adb88931ce1a69ded1fdf0d8a5a4", "size": "301", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "backend/api/controllers/CustomerController.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "1062" }, { "name": "HTML", "bytes": "2567" }, { "name": "Java", "bytes": "4535" }, { "name": "JavaScript", "bytes": "253538" } ], "symlink_target": "" }
export { default as authentication } from './authentication'; export { default as user } from './user'; export { default as users } from './users';
{ "content_hash": "d82c7dcdf5e269adb4d6fa87f92f0da2", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 61, "avg_line_length": 49, "alnum_prop": 0.7006802721088435, "repo_name": "raphaelameaume/react-node-starter", "id": "eb2aae7b0dbc9f50634063e007ec1157546cdbeb", "size": "147", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/js/reducers/index.js", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "2940" }, { "name": "JavaScript", "bytes": "36415" } ], "symlink_target": "" }
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; /* @var $this yii\web\View */ /* @var $model app\models\Posts */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="posts-form"> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'post_title')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'post_description')->textInput(['maxlength' => true]) ?> <?= $form->field($model, 'user_id')->textInput() ?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> </div> <?php ActiveForm::end(); ?> </div>
{ "content_hash": "7b709b211341901742d445e388d455fc", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 150, "avg_line_length": 25.666666666666668, "alnum_prop": 0.5815295815295816, "repo_name": "alvinmactal/Droga", "id": "28d8c315e3ae552bac6020b8d31be83d7bbaa69f", "size": "693", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "views/posts/_form.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "1030" }, { "name": "CSS", "bytes": "1364" }, { "name": "PHP", "bytes": "143264" } ], "symlink_target": "" }
package com.google.bitcoin.bouncycastle.bcpg; import java.io.*; import java.math.BigInteger; /** * basic packet for a PGP public key */ public class PublicKeyEncSessionPacket extends ContainedPacket implements PublicKeyAlgorithmTags { private int version; private long keyID; private int algorithm; private BigInteger[] data; PublicKeyEncSessionPacket( BCPGInputStream in) throws IOException { version = in.read(); keyID |= (long)in.read() << 56; keyID |= (long)in.read() << 48; keyID |= (long)in.read() << 40; keyID |= (long)in.read() << 32; keyID |= (long)in.read() << 24; keyID |= (long)in.read() << 16; keyID |= (long)in.read() << 8; keyID |= in.read(); algorithm = in.read(); switch (algorithm) { case RSA_ENCRYPT: case RSA_GENERAL: data = new BigInteger[1]; data[0] = new MPInteger(in).getValue(); break; case ELGAMAL_ENCRYPT: case ELGAMAL_GENERAL: data = new BigInteger[2]; data[0] = new MPInteger(in).getValue(); data[1] = new MPInteger(in).getValue(); break; default: throw new IOException("unknown PGP public key algorithm encountered"); } } public PublicKeyEncSessionPacket( long keyID, int algorithm, BigInteger[] data) { this.version = 3; this.keyID = keyID; this.algorithm = algorithm; this.data = data; } public int getVersion() { return version; } public long getKeyID() { return keyID; } public int getAlgorithm() { return algorithm; } public BigInteger[] getEncSessionKey() { return data; } public void encode( BCPGOutputStream out) throws IOException { ByteArrayOutputStream bOut = new ByteArrayOutputStream(); BCPGOutputStream pOut = new BCPGOutputStream(bOut); pOut.write(version); pOut.write((byte)(keyID >> 56)); pOut.write((byte)(keyID >> 48)); pOut.write((byte)(keyID >> 40)); pOut.write((byte)(keyID >> 32)); pOut.write((byte)(keyID >> 24)); pOut.write((byte)(keyID >> 16)); pOut.write((byte)(keyID >> 8)); pOut.write((byte)(keyID)); pOut.write(algorithm); for (int i = 0; i != data.length; i++) { pOut.writeObject(new MPInteger(data[i])); } out.writePacket(PUBLIC_KEY_ENC_SESSION , bOut.toByteArray(), true); } }
{ "content_hash": "841efd25a50aa0b318d04dd80ce64b00", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 82, "avg_line_length": 25.5, "alnum_prop": 0.5098039215686274, "repo_name": "barmstrong/bitcoin-android", "id": "f622acbb01a329d023e289a6cde0ba19292639df", "size": "2856", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "src/com/google/bitcoin/bouncycastle/bcpg/PublicKeyEncSessionPacket.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "3505654" } ], "symlink_target": "" }
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>pymatgen.analysis.chemenv.utils package &mdash; pymatgen 2020.7.3 documentation</title> <link rel="canonical" href="https://pymatgen.orgpymatgen.analysis.chemenv.utils.html"/> <script type="text/javascript" src="_static/js/modernizr.min.js"></script> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script src="_static/language_data.js"></script> <script async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="_static/js/theme.js"></script> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/css/custom.css" type="text/css" /> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="pymatgen.analysis.chemenv.utils.chemenv_config module" href="pymatgen.analysis.chemenv.utils.chemenv_config.html" /> <link rel="prev" title="pymatgen.analysis.chemenv.coordination_environments.voronoi module" href="pymatgen.analysis.chemenv.coordination_environments.voronoi.html" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33990148-1']); _gaq.push(['_trackPageview']); </script> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" > <a href="index.html" class="icon icon-home"> pymatgen </a> <div class="version"> 2020.7.3 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="change_log.html">Change log</a></li> <li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="team.html">Development Team</a></li> <li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li> <li class="toctree-l1 current"><a class="reference internal" href="modules.html">API Docs</a><ul class="current"> <li class="toctree-l2 current"><a class="reference internal" href="pymatgen.html">pymatgen package</a><ul class="current"> <li class="toctree-l3 current"><a class="reference internal" href="pymatgen.html#subpackages">Subpackages</a><ul class="current"> <li class="toctree-l4"><a class="reference internal" href="pymatgen.alchemy.html">pymatgen.alchemy package</a></li> <li class="toctree-l4 current"><a class="reference internal" href="pymatgen.analysis.html">pymatgen.analysis package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.apps.html">pymatgen.apps package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.cli.html">pymatgen.cli package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.command_line.html">pymatgen.command_line package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.core.html">pymatgen.core package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.electronic_structure.html">pymatgen.electronic_structure package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.entries.html">pymatgen.entries package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.ext.html">pymatgen.ext package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.io.html">pymatgen.io package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.optimization.html">pymatgen.optimization package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.phonon.html">pymatgen.phonon package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.plugins.html">pymatgen.plugins package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.symmetry.html">pymatgen.symmetry package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.transformations.html">pymatgen.transformations package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.util.html">pymatgen.util package</a></li> <li class="toctree-l4"><a class="reference internal" href="pymatgen.vis.html">pymatgen.vis package</a></li> </ul> </li> <li class="toctree-l3"><a class="reference internal" href="pymatgen.html#submodules">Submodules</a></li> <li class="toctree-l3"><a class="reference internal" href="pymatgen.html#module-pymatgen">Module contents</a></li> </ul> </li> </ul> </li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">pymatgen</a> </nav> <div class="wy-nav-content"> <div class="rst-content style-external-links"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html">Docs</a> &raquo;</li> <li><a href="modules.html">pymatgen</a> &raquo;</li> <li><a href="pymatgen.html">pymatgen package</a> &raquo;</li> <li><a href="pymatgen.analysis.html">pymatgen.analysis package</a> &raquo;</li> <li><a href="pymatgen.analysis.chemenv.html">pymatgen.analysis.chemenv package</a> &raquo;</li> <li>pymatgen.analysis.chemenv.utils package</li> <li class="wy-breadcrumbs-aside"> <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/pymatgen.analysis.chemenv.utils.rst" class="fa fa-github"> Edit on GitHub</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="pymatgen-analysis-chemenv-utils-package"> <h1>pymatgen.analysis.chemenv.utils package<a class="headerlink" href="#pymatgen-analysis-chemenv-utils-package" title="Permalink to this headline">¶</a></h1> <div class="section" id="subpackages"> <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2> <div class="toctree-wrapper compound"> </div> </div> <div class="section" id="submodules"> <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2> <div class="toctree-wrapper compound"> <ul> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.chemenv_config.html">pymatgen.analysis.chemenv.utils.chemenv_config module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.chemenv_errors.html">pymatgen.analysis.chemenv.utils.chemenv_errors module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.coordination_geometry_utils.html">pymatgen.analysis.chemenv.utils.coordination_geometry_utils module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.defs_utils.html">pymatgen.analysis.chemenv.utils.defs_utils module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.func_utils.html">pymatgen.analysis.chemenv.utils.func_utils module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.graph_utils.html">pymatgen.analysis.chemenv.utils.graph_utils module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.math_utils.html">pymatgen.analysis.chemenv.utils.math_utils module</a></li> <li class="toctree-l1"><a class="reference internal" href="pymatgen.analysis.chemenv.utils.scripts_utils.html">pymatgen.analysis.chemenv.utils.scripts_utils module</a></li> </ul> </div> </div> <div class="section" id="module-pymatgen.analysis.chemenv.utils"> <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-pymatgen.analysis.chemenv.utils" title="Permalink to this headline">¶</a></h2> </div> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p> &copy; Copyright 2011, Pymatgen Development Team </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> <div class="footer">This page uses <a href="http://analytics.google.com/"> Google Analytics</a> to collect statistics. You can disable it by blocking the JavaScript coming from www.google-analytics.com. <script type="text/javascript"> (function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); </script> </div> </body> </html>
{ "content_hash": "05053a5c3f6a67415e155409c414ba4b", "timestamp": "", "source": "github", "line_count": 287, "max_line_length": 200, "avg_line_length": 39.184668989547035, "alnum_prop": 0.6565890094255735, "repo_name": "mbkumar/pymatgen", "id": "06dfef6087732c863691df97d8e1ad701ea93614", "size": "11252", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/pymatgen.analysis.chemenv.utils.html", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "5100" }, { "name": "CSS", "bytes": "7550" }, { "name": "Common Lisp", "bytes": "3029065" }, { "name": "HTML", "bytes": "827" }, { "name": "Makefile", "bytes": "5573" }, { "name": "Perl", "bytes": "229104" }, { "name": "Propeller Spin", "bytes": "4026362" }, { "name": "Python", "bytes": "6933839" }, { "name": "Roff", "bytes": "1135003" } ], "symlink_target": "" }
require 'spec_helper' require 'image_optim/cmd' describe ImageOptim::Cmd do before do stub_const('Cmd', ImageOptim::Cmd) end def expect_int_exception(&block) expect(&block).to raise_error(SignalException) do |error| expect(error.message.to_s).to match(/INT|#{Signal.list['INT']}/) end end describe :run do it 'calls system and returns result' do status = double expect(Cmd).to receive(:system).with('cmd', 'arg').and_return(status) allow(Cmd).to receive(:check_status!) expect(Cmd.run('cmd', 'arg')).to eq(status) end it 'returns process success status' do expect(Cmd.run('sh -c exit\ 0')).to eq(true) expect($CHILD_STATUS.exitstatus).to eq(0) expect(Cmd.run('sh -c exit\ 1')).to eq(false) expect($CHILD_STATUS.exitstatus).to eq(1) expect(Cmd.run('sh -c exit\ 66')).to eq(false) expect($CHILD_STATUS.exitstatus).to eq(66) end it 'raises SignalException if process terminates after signal' do expect_int_exception do Cmd.run('kill -s INT $$') end end end describe :capture do it 'calls ` and returns result' do output = double expect(Cmd).to receive(:`).with('cmd arg arg+').and_return(output) allow(Cmd).to receive(:check_status!) expect(Cmd.capture('cmd arg arg+')).to eq(output) end it 'returns output' do expect(Cmd.capture('echo test')).to eq("test\n") expect($CHILD_STATUS.exitstatus).to eq(0) expect(Cmd.capture('printf more; sh -c exit\ 1')).to eq('more') expect($CHILD_STATUS.exitstatus).to eq(1) expect(Cmd.capture('sh -c exit\ 66')).to eq('') expect($CHILD_STATUS.exitstatus).to eq(66) end it 'raises SignalException if process terminates after signal' do expect_int_exception do Cmd.capture('kill -s INT $$') end end end end
{ "content_hash": "92e3c64352d85aeb1b89d13328c9c988", "timestamp": "", "source": "github", "line_count": 66, "max_line_length": 75, "avg_line_length": 28.636363636363637, "alnum_prop": 0.629100529100529, "repo_name": "weheartit/image_optim", "id": "f97776701cb0aac5e9f96780b31bb7f68ab2dc1d", "size": "1890", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "spec/image_optim/cmd_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "8072" }, { "name": "Ruby", "bytes": "130977" }, { "name": "Shell", "bytes": "723" } ], "symlink_target": "" }
var ActionDeviceList = require('/ui/edit/ActionDeviceList'), RFActionDeviceList = require('/ui/edit/RFActionDeviceList'), RawActionDeviceList = require('/ui/edit/RawActionDeviceList'), RuleList = require('/ui/edit/RuleActionList'); function ActionComposer(button, parentButton, navGroup, onSave) { var self = Ninja.UI.createWindow({ title: 'Action Composer' }); var data = [ { type: { name: 'Light', device_type: ['rgbled', 'rgbled8', 'light'] }, properties: { title: 'Light Actions', image: '/images/light@2x.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }, { type: { name: 'Relay', device_type: ['relay'] }, properties: { title: 'Relay Actions', image: '/images/relay@2x.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }, { window: RFActionDeviceList, properties: { title: 'RF Actions', image: '/images/rf@2x.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }/*, { window: RuleList, properties: { title: 'Rules', image: '/images/rule@2x.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }/*, { type: { name: 'Socket', device_type: ['socket'] // TODO: Eh? }, properties: { title: 'Socket Actions', image: 'socket.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }*/ ]; if (developerMode) { data.push({ window: RawActionDeviceList, properties: { title: 'Hacker Actions', image: '/images/hacker@2x.png', accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE }, template: Ti.UI.LIST_ITEM_TEMPLATE_DEFAULT }); } var listSection = Ninja.UI.createListSection({items: data}); var listView = Ninja.UI.createListView({sections: [listSection]}); listView.addEventListener('itemclick', function(e) { if (data[e.itemIndex].type) { var actionWindow = new ActionDeviceList(button, parentButton, navGroup, onSave, data[e.itemIndex].type); } else { var actionWindow = data[e.itemIndex].window(button, parentButton, navGroup, onSave); } navGroup.open(actionWindow) }); self.add(listView); return self; } module.exports = ActionComposer;
{ "content_hash": "997a102f5909d468eb26106103a131b7", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 107, "avg_line_length": 28.31958762886598, "alnum_prop": 0.5879140880961048, "repo_name": "ninjablocks/shogun-remote", "id": "261c7dbdd06cba9adf7ab377b46e8c5658cadd85", "size": "2747", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Resources/ui/edit/ActionComposer.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "31717" }, { "name": "HTML", "bytes": "13865" }, { "name": "JavaScript", "bytes": "812496" }, { "name": "Shell", "bytes": "450" } ], "symlink_target": "" }
package org.onosproject.pcepio.types; import java.util.Iterator; import java.util.LinkedList; import java.util.ListIterator; import java.util.Objects; import org.jboss.netty.buffer.ChannelBuffer; import org.onosproject.pcepio.exceptions.PcepParseException; import org.onosproject.pcepio.protocol.PcepVersion; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.base.MoreObjects; /** * Provides TE Link Descriptors TLV. */ public class TELinkDescriptorsTlv implements PcepValueType { /* * Reference: PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02 * 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type=[TBD14] | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | // Link Descriptor Sub-TLVs (variable) // | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ protected static final Logger log = LoggerFactory.getLogger(TELinkDescriptorsTlv.class); public static final short TYPE = 1070; //TODD:change this TBD14 public short hLength; public static final int TLV_HEADER_LENGTH = 4; // LinkDescriptors Sub-TLVs (variable) private LinkedList<PcepValueType> llLinkDescriptorsSubTLVs; /** * Constructor to initialize llLinkDescriptorsSubTLVs. * * @param llLinkDescriptorsSubTLVs of PcepValueType */ public TELinkDescriptorsTlv(LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { this.llLinkDescriptorsSubTLVs = llLinkDescriptorsSubTLVs; } /** * Returns object of TELinkDescriptorsTLV. * * @param llLinkDescriptorsSubTLVs of PcepValueType * @return object of TELinkDescriptorsTLV */ public static TELinkDescriptorsTlv of(final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { return new TELinkDescriptorsTlv(llLinkDescriptorsSubTLVs); } /** * Returns linked list of Link Attribute of Sub TLV. * * @return llLinkDescriptorsSubTLVs linked list of Link Attribute of Sub TLV */ public LinkedList<PcepValueType> getllLinkDescriptorsSubTLVs() { return llLinkDescriptorsSubTLVs; } @Override public PcepVersion getVersion() { return PcepVersion.PCEP_1; } @Override public short getType() { return TYPE; } @Override public short getLength() { return hLength; } @Override public int hashCode() { return Objects.hash(llLinkDescriptorsSubTLVs.hashCode()); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } /* * Here we have a list of Tlv so to compare each sub tlv between the object * we have to take a list iterator so one by one we can get each sub tlv object * and can compare them. * it may be possible that the size of 2 lists is not equal so we have to first check * the size, if both are same then we should check for the subtlv objects otherwise * we should return false. */ if (obj instanceof TELinkDescriptorsTlv) { int countObjSubTlv = 0; int countOtherSubTlv = 0; boolean isCommonSubTlv = true; TELinkDescriptorsTlv other = (TELinkDescriptorsTlv) obj; Iterator<PcepValueType> objListIterator = ((TELinkDescriptorsTlv) obj).llLinkDescriptorsSubTLVs.iterator(); countObjSubTlv = ((TELinkDescriptorsTlv) obj).llLinkDescriptorsSubTLVs.size(); countOtherSubTlv = other.llLinkDescriptorsSubTLVs.size(); if (countObjSubTlv != countOtherSubTlv) { return false; } else { while (objListIterator.hasNext() && isCommonSubTlv) { PcepValueType subTlv = objListIterator.next(); isCommonSubTlv = Objects.equals(llLinkDescriptorsSubTLVs.contains(subTlv), other.llLinkDescriptorsSubTLVs.contains(subTlv)); } return isCommonSubTlv; } } return false; } @Override public int write(ChannelBuffer c) { int tlvStartIndex = c.writerIndex(); c.writeShort(TYPE); int tlvLenIndex = c.writerIndex(); hLength = 0; c.writeShort(hLength); ListIterator<PcepValueType> listIterator = llLinkDescriptorsSubTLVs.listIterator(); while (listIterator.hasNext()) { PcepValueType tlv = listIterator.next(); tlv.write(c); // need to take care of padding int pad = tlv.getLength() % 4; if (0 != pad) { pad = 4 - pad; for (int i = 0; i < pad; ++i) { c.writeByte((byte) 0); } } } hLength = (short) (c.writerIndex() - tlvStartIndex); c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); return c.writerIndex() - tlvStartIndex; } /** * Reads channel buffer and returns object of TELinkDescriptorsTLV. * * @param c input channel buffer * @param length length * @return object of TELinkDescriptorsTLV * @throws PcepParseException if mandatory fields are missing */ public static PcepValueType read(ChannelBuffer c, short length) throws PcepParseException { // Node Descriptor Sub-TLVs (variable) LinkedList<PcepValueType> llLinkDescriptorsSubTLVs = new LinkedList<>(); ChannelBuffer tempCb = c.readBytes(length); while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { PcepValueType tlv; short hType = tempCb.readShort(); int iValue = 0; short hLength = tempCb.readShort(); log.debug("sub Tlv Length" + hLength); switch (hType) { case LinkLocalRemoteIdentifiersTlv.TYPE: tlv = LinkLocalRemoteIdentifiersTlv.read(tempCb); break; case IPv4InterfaceAddressTlv.TYPE: iValue = tempCb.readInt(); tlv = new IPv4InterfaceAddressTlv(iValue); break; case IPv4NeighborAddressTlv.TYPE: iValue = tempCb.readInt(); tlv = new IPv4NeighborAddressTlv(iValue); break; case IPv6InterfaceAddressTlv.TYPE: byte[] ipv6Value = new byte[IPv6InterfaceAddressTlv.VALUE_LENGTH]; tempCb.readBytes(ipv6Value, 0, IPv6InterfaceAddressTlv.VALUE_LENGTH); tlv = new IPv6InterfaceAddressTlv(ipv6Value); break; case IPv6NeighborAddressTlv.TYPE: byte[] ipv6NeighborAdd = new byte[IPv6NeighborAddressTlv.VALUE_LENGTH]; tempCb.readBytes(ipv6NeighborAdd, 0, IPv6NeighborAddressTlv.VALUE_LENGTH); tlv = new IPv6NeighborAddressTlv(ipv6NeighborAdd); break; default: throw new PcepParseException("Unsupported Sub TLV type:" + hType); } // Check for the padding int pad = hLength % 4; if (0 < pad) { pad = 4 - pad; if (pad <= tempCb.readableBytes()) { tempCb.skipBytes(pad); } } llLinkDescriptorsSubTLVs.add(tlv); } if (0 < tempCb.readableBytes()) { throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); } return new TELinkDescriptorsTlv(llLinkDescriptorsSubTLVs); } @Override public String toString() { return MoreObjects.toStringHelper(getClass()) .add("Type", TYPE) .add("Length", hLength) .add("LinkDescriptorsSubTLVs", llLinkDescriptorsSubTLVs) .toString(); } }
{ "content_hash": "f343d2abe25986075390f48a13139b65", "timestamp": "", "source": "github", "line_count": 237, "max_line_length": 119, "avg_line_length": 35, "alnum_prop": 0.5758890898131405, "repo_name": "castroflavio/onos", "id": "b974cf827bef028b1ef1d4a0b878c908bb44e247", "size": "8904", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkDescriptorsTlv.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "160641" }, { "name": "HTML", "bytes": "470549" }, { "name": "Java", "bytes": "12758441" }, { "name": "JavaScript", "bytes": "3023656" }, { "name": "Shell", "bytes": "2625" } ], "symlink_target": "" }
from __future__ import absolute_import import random import warnings from time import time from datetime import datetime from collections import deque import six from twisted.internet import reactor, defer, task from scrapy.utils.defer import mustbe_deferred from scrapy.utils.httpobj import urlparse_cached from scrapy.resolver import dnscache from scrapy import signals from .middleware import DownloaderMiddlewareManager from .handlers import DownloadHandlers class Slot(object): """Downloader slot""" def __init__(self, concurrency, delay, randomize_delay): self.concurrency = concurrency self.delay = delay self.randomize_delay = randomize_delay self.active = set() self.queue = deque() self.transferring = set() self.lastseen = 0 self.latercall = None def free_transfer_slots(self): return self.concurrency - len(self.transferring) def download_delay(self): if self.randomize_delay: return random.uniform(0.5 * self.delay, 1.5 * self.delay) return self.delay def close(self): if self.latercall and self.latercall.active(): self.latercall.cancel() def __repr__(self): cls_name = self.__class__.__name__ return "%s(concurrency=%r, delay=%0.2f, randomize_delay=%r)" % ( cls_name, self.concurrency, self.delay, self.randomize_delay) def __str__(self): return ( "<downloader.Slot concurrency=%r delay=%0.2f randomize_delay=%r " "len(active)=%d len(queue)=%d len(transferring)=%d lastseen=%s>" % ( self.concurrency, self.delay, self.randomize_delay, len(self.active), len(self.queue), len(self.transferring), datetime.fromtimestamp(self.lastseen).isoformat() ) ) def _get_concurrency_delay(concurrency, spider, settings): delay = settings.getfloat('DOWNLOAD_DELAY') if hasattr(spider, 'DOWNLOAD_DELAY'): warnings.warn("%s.DOWNLOAD_DELAY attribute is deprecated, use %s.download_delay instead" % (type(spider).__name__, type(spider).__name__)) delay = spider.DOWNLOAD_DELAY if hasattr(spider, 'download_delay'): delay = spider.download_delay if hasattr(spider, 'max_concurrent_requests'): concurrency = spider.max_concurrent_requests return concurrency, delay class Downloader(object): def __init__(self, crawler): self.settings = crawler.settings self.signals = crawler.signals self.slots = {} self.active = set() self.handlers = DownloadHandlers(crawler) self.total_concurrency = self.settings.getint('CONCURRENT_REQUESTS') self.domain_concurrency = self.settings.getint('CONCURRENT_REQUESTS_PER_DOMAIN') self.ip_concurrency = self.settings.getint('CONCURRENT_REQUESTS_PER_IP') self.randomize_delay = self.settings.getbool('RANDOMIZE_DOWNLOAD_DELAY') self.middleware = DownloaderMiddlewareManager.from_crawler(crawler) self._slot_gc_loop = task.LoopingCall(self._slot_gc) self._slot_gc_loop.start(60) def fetch(self, request, spider): def _deactivate(response): self.active.remove(request) return response self.active.add(request) dfd = self.middleware.download(self._enqueue_request, request, spider) return dfd.addBoth(_deactivate) def needs_backout(self): return len(self.active) >= self.total_concurrency def _get_slot(self, request, spider): key = self._get_slot_key(request, spider) if key not in self.slots: conc = self.ip_concurrency if self.ip_concurrency else self.domain_concurrency conc, delay = _get_concurrency_delay(conc, spider, self.settings) self.slots[key] = Slot(conc, delay, self.randomize_delay) return key, self.slots[key] def _get_slot_key(self, request, spider): if 'download_slot' in request.meta: return request.meta['download_slot'] key = urlparse_cached(request).hostname or '' if self.ip_concurrency: key = dnscache.get(key, key) return key def _enqueue_request(self, request, spider): key, slot = self._get_slot(request, spider) request.meta['download_slot'] = key def _deactivate(response): slot.active.remove(request) return response slot.active.add(request) self.signals.send_catch_log(signal=signals.request_reached_downloader, request=request, spider=spider) deferred = defer.Deferred().addBoth(_deactivate) slot.queue.append((request, deferred)) self._process_queue(spider, slot) return deferred def _process_queue(self, spider, slot): if slot.latercall and slot.latercall.active(): return # Delay queue processing if a download_delay is configured now = time() delay = slot.download_delay() if delay: penalty = delay - now + slot.lastseen if penalty > 0: slot.latercall = reactor.callLater(penalty, self._process_queue, spider, slot) return # Process enqueued requests if there are free slots to transfer for this slot while slot.queue and slot.free_transfer_slots() > 0: slot.lastseen = now request, deferred = slot.queue.popleft() dfd = self._download(slot, request, spider) dfd.chainDeferred(deferred) # prevent burst if inter-request delays were configured if delay: self._process_queue(spider, slot) break def _download(self, slot, request, spider): # The order is very important for the following deferreds. Do not change! # 1. Create the download deferred dfd = mustbe_deferred(self.handlers.download_request, request, spider) # 2. Notify response_downloaded listeners about the recent download # before querying queue for next request def _downloaded(response): self.signals.send_catch_log(signal=signals.response_downloaded, response=response, request=request, spider=spider) return response dfd.addCallback(_downloaded) # 3. After response arrives, remove the request from transferring # state to free up the transferring slot so it can be used by the # following requests (perhaps those which came from the downloader # middleware itself) slot.transferring.add(request) def finish_transferring(_): slot.transferring.remove(request) self._process_queue(spider, slot) return _ return dfd.addBoth(finish_transferring) def close(self): self._slot_gc_loop.stop() for slot in six.itervalues(self.slots): slot.close() def _slot_gc(self, age=60): mintime = time() - age for key, slot in list(self.slots.items()): if not slot.active and slot.lastseen + slot.delay < mintime: self.slots.pop(key).close()
{ "content_hash": "0c80b77c90eafa8dd3c7b14ba5fa4a78", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 98, "avg_line_length": 36.68811881188119, "alnum_prop": 0.6198893536634732, "repo_name": "Ryezhang/scrapy", "id": "59c3ad0745d2c73f78729b584cf5c5cdb93a7551", "size": "7411", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "scrapy/core/downloader/__init__.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "HTML", "bytes": "2076" }, { "name": "Python", "bytes": "1337407" }, { "name": "Roff", "bytes": "2010" }, { "name": "Shell", "bytes": "259" } ], "symlink_target": "" }
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from hypothesis import given import hypothesis.strategies as st import numpy as np import unittest from caffe2.python import core, workspace, dyndep import caffe2.python.hypothesis_test_util as hu dyndep.InitOpsLibrary("@/caffe2/caffe2/mpi:mpi_ops") _has_mpi =False COMM = None RANK = 0 SIZE = 0 def SetupMPI(): try: from mpi4py import MPI global _has_mpi, COMM, RANK, SIZE _has_mpi = core.IsOperatorWithEngine("CreateCommonWorld", "MPI") COMM = MPI.COMM_WORLD RANK = COMM.Get_rank() SIZE = COMM.Get_size() except ImportError: _has_mpi = False @unittest.skipIf(not _has_mpi, "MPI is not available. Skipping.") class TestMPI(hu.HypothesisTestCase): @given(X=hu.tensor(), root=st.integers(min_value=0, max_value=SIZE - 1), device_option=st.sampled_from(hu.device_options), **hu.gcs) def test_broadcast(self, X, root, device_option, gc, dc): # Use mpi4py's broadcast to make sure that all nodes inherit the # same hypothesis test. X = COMM.bcast(X) root = COMM.bcast(root) device_option = COMM.bcast(device_option) X[:] = RANK self.assertTrue( workspace.RunOperatorOnce( core.CreateOperator( "CreateCommonWorld", [], "comm", engine="MPI", device_option=device_option))) self.assertTrue(workspace.FeedBlob("X", X, device_option)) mpi_op = core.CreateOperator( "Broadcast", ["comm", "X"], "X", engine="MPI", root=root, device_option=device_option) self.assertTrue(workspace.RunOperatorOnce(mpi_op)) new_X = workspace.FetchBlob("X") np.testing.assert_array_equal(new_X, root) workspace.ResetWorkspace() @given(X=hu.tensor(), root=st.integers(min_value=0, max_value=SIZE - 1), device_option=st.sampled_from(hu.device_options), **hu.gcs) def test_reduce(self, X, root, device_option, gc, dc): # Use mpi4py's broadcast to make sure that all nodes inherit the # same hypothesis test. X = COMM.bcast(X) root = COMM.bcast(root) device_option = COMM.bcast(device_option) X[:] = RANK self.assertTrue( workspace.RunOperatorOnce( core.CreateOperator( "CreateCommonWorld", [], "comm", engine="MPI", device_option=device_option))) self.assertTrue(workspace.FeedBlob("X", X, device_option)) mpi_op = core.CreateOperator( "Reduce", ["comm", "X"], "X_reduced", engine="MPI", root=root, device_option=device_option) self.assertTrue(workspace.RunOperatorOnce(mpi_op)) if (RANK == root): new_X = workspace.FetchBlob("X") np.testing.assert_array_equal(new_X, root) workspace.ResetWorkspace() @given(X=hu.tensor(), root=st.integers(min_value=0, max_value=SIZE - 1), device_option=st.sampled_from(hu.device_options), inplace=st.booleans(), **hu.gcs) def test_allreduce(self, X, root, device_option, inplace, gc, dc): # Use mpi4py's broadcast to make sure that all nodes inherit the # same hypothesis test. X = COMM.bcast(X) root = COMM.bcast(root) device_option = COMM.bcast(device_option) inplace = COMM.bcast(inplace) X[:] = RANK self.assertTrue( workspace.RunOperatorOnce( core.CreateOperator( "CreateCommonWorld", [], "comm", engine="MPI", device_option=device_option))) # Use mpi4py's broadcast to make sure that all copies have the same # tensor size. X = COMM.bcast(X) X[:] = RANK self.assertTrue(workspace.FeedBlob("X", X, device_option)) mpi_op = core.CreateOperator( "Allreduce", ["comm", "X"], "X" if inplace else "X_reduced", engine="MPI", root=root, device_option=device_option) self.assertTrue(workspace.RunOperatorOnce(mpi_op)) new_X = workspace.FetchBlob("X" if inplace else "X_reduced") np.testing.assert_array_equal(new_X, SIZE * (SIZE - 1) / 2) workspace.ResetWorkspace() @given(X=hu.tensor(), device_option=st.sampled_from(hu.device_options), specify_send_blob=st.booleans(), specify_recv_blob=st.booleans(), **hu.gcs) def test_sendrecv( self, X, device_option, specify_send_blob, specify_recv_blob, gc, dc): # Use mpi4py's broadcast to make sure that all nodes inherit the # same hypothesis test. X = COMM.bcast(X) device_option = COMM.bcast(device_option) specify_send_blob = COMM.bcast(specify_send_blob) specify_recv_blob = COMM.bcast(specify_recv_blob) X[:] = RANK self.assertTrue( workspace.RunOperatorOnce( core.CreateOperator( "CreateCommonWorld", [], "comm", engine="MPI", device_option=device_option))) self.assertTrue(workspace.FeedBlob("X", X, device_option)) for src in range(SIZE): for dst in range(SIZE): tag = src * SIZE + dst if src == dst: continue elif RANK == src: X[:] = RANK self.assertTrue(workspace.FeedBlob("X", X, device_option)) if specify_send_blob: self.assertTrue(workspace.FeedBlob( "dst", np.array(dst, dtype=np.int32))) self.assertTrue(workspace.FeedBlob( "tag", np.array(tag, dtype=np.int32))) mpi_op = core.CreateOperator( "SendTensor", ["comm", "X", "dst", "tag"], [], engine="MPI", raw_buffer=True, device_option=device_option) else: mpi_op = core.CreateOperator( "SendTensor", ["comm", "X"], [], engine="MPI", dst=dst, tag=tag, raw_buffer=True, device_option=device_option) self.assertTrue(workspace.RunOperatorOnce(mpi_op)) elif RANK == dst: if specify_recv_blob: self.assertTrue(workspace.FeedBlob( "src", np.array(src, dtype=np.int32))) self.assertTrue(workspace.FeedBlob( "tag", np.array(tag, dtype=np.int32))) mpi_op = core.CreateOperator( "ReceiveTensor", ["comm", "X", "src", "tag"], ["X", "src", "tag"], engine="MPI", src=src, tag=tag, raw_buffer=True, device_option=device_option) else: mpi_op = core.CreateOperator( "ReceiveTensor", ["comm", "X"], ["X", "src", "tag"], engine="MPI", src=src, tag=tag, raw_buffer=True, device_option=device_option) self.assertTrue(workspace.RunOperatorOnce(mpi_op)) received = workspace.FetchBlob("X") np.testing.assert_array_equal(received, src) src_blob = workspace.FetchBlob("src") np.testing.assert_array_equal(src_blob, src) tag_blob = workspace.FetchBlob("tag") np.testing.assert_array_equal(tag_blob, tag) # simply wait for the guys to finish COMM.barrier() workspace.ResetWorkspace() if __name__ == "__main__": SetupMPI() import unittest unittest.main()
{ "content_hash": "db3d622a40fc31c4dc28c27158a27d43", "timestamp": "", "source": "github", "line_count": 198, "max_line_length": 80, "avg_line_length": 41.696969696969695, "alnum_prop": 0.5314922480620154, "repo_name": "sf-wind/caffe2", "id": "29f128e58ffd4d76f509fd522ec977684c7b3616", "size": "8927", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "caffe2/python/operator_test/mpi_test.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "5415" }, { "name": "C", "bytes": "316608" }, { "name": "C++", "bytes": "4740750" }, { "name": "CMake", "bytes": "139512" }, { "name": "CSS", "bytes": "2196" }, { "name": "Cuda", "bytes": "665218" }, { "name": "HTML", "bytes": "5203" }, { "name": "Makefile", "bytes": "1225" }, { "name": "Metal", "bytes": "36752" }, { "name": "Objective-C", "bytes": "6505" }, { "name": "Objective-C++", "bytes": "239139" }, { "name": "Python", "bytes": "2901542" }, { "name": "Shell", "bytes": "31734" } ], "symlink_target": "" }
package com.gitpoint; import android.app.Application; import com.facebook.react.ReactApplication; import com.reactnative.photoview.PhotoViewPackage; import com.lugg.ReactNativeConfig.ReactNativeConfigPackage; import com.microsoft.codepush.react.CodePush; import com.learnium.RNDeviceInfo.RNDeviceInfo; import com.oblador.vectoricons.VectorIconsPackage; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import com.facebook.soloader.SoLoader; import java.util.Arrays; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override protected String getJSBundleFile() { return CodePush.getJSBundleFile(); } @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new PhotoViewPackage(), new ReactNativeConfigPackage(), new CodePush(BuildConfig.CODEPUSH_ANDROID_DEPLOYMENT_KEY, MainApplication.this, BuildConfig.DEBUG), new RNDeviceInfo(), new VectorIconsPackage() ); } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); } }
{ "content_hash": "1794433237d22521afe8c0c966b98c89", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 111, "avg_line_length": 28.160714285714285, "alnum_prop": 0.7381103360811667, "repo_name": "housseindjirdeh/git-point", "id": "964743a2cfb66358e9b167c45e6df904df11e51f", "size": "1577", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "android/app/src/main/java/com/gitpoint/MainApplication.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "1938" }, { "name": "JavaScript", "bytes": "280967" }, { "name": "Objective-C", "bytes": "4842" }, { "name": "Python", "bytes": "1641" } ], "symlink_target": "" }
layout: default seo_title: "Culture | Early Light Media" seo_description: "Our playground for letting loose and thinking outside the box." --- <div class="page-blog-landing"> <h2>Culture</h2> <div class="row"> <!-- render latest 2 culture blog post--> {% for post in site.categories.culture limit: 2 %} <div class="col-md-6"> {% include panel-box.html bgimg=true category_link=false post_date=true %} </div> {% endfor %} </div> <div class="row"> <!-- render next 2 culture blog post--> {% for post in site.categories.culture limit: 2 offset: 2 %} <div class="col-md-6"> {% include panel-box.html bgimg=true post_date=true %} </div> {% endfor %} </div> {% include nav-circle.html active="culture" %} </div>
{ "content_hash": "61e8fadb92fd453e327fb104d280d37b", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 82, "avg_line_length": 26.266666666666666, "alnum_prop": 0.6129441624365483, "repo_name": "tkraak/elm", "id": "bf771f5c961f2f68c1e25f76d1136a6830205c92", "size": "792", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "blog/culture/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "39994" }, { "name": "CoffeeScript", "bytes": "21825" }, { "name": "HTML", "bytes": "49147" }, { "name": "JavaScript", "bytes": "7428" }, { "name": "Ruby", "bytes": "6782" } ], "symlink_target": "" }
from neutron.conf.services import provider_configuration from oslo_config import cfg def list_service_provider(): return [ ('service_providers', provider_configuration.serviceprovider_opts), ] _dummy_bgpvpn_provider = ':'.join([ 'BGPVPN', 'Dummy', 'networking_bgpvpn.neutron.services.service_drivers.driver_api.' 'BGPVPNDriver', 'default' ]) # Set reasonable example for BGPVPN as a default value def set_service_provider_default(): cfg.set_defaults(provider_configuration.serviceprovider_opts, service_provider=[_dummy_bgpvpn_provider])
{ "content_hash": "65ed9078d022bea1e0d1a0bfc9b1b665", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 75, "avg_line_length": 27.318181818181817, "alnum_prop": 0.7054908485856906, "repo_name": "openstack/networking-bgpvpn", "id": "6bce35929abdc934583565897307a13c1c1aa80b", "size": "1156", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "networking_bgpvpn/neutron/opts.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "5665" }, { "name": "Mako", "bytes": "1055" }, { "name": "Python", "bytes": "477528" }, { "name": "Shell", "bytes": "4835" } ], "symlink_target": "" }
class Profile; class ProjectorSystemWebAppDelegate : public web_app::SystemWebAppDelegate { public: explicit ProjectorSystemWebAppDelegate(Profile* profile); ProjectorSystemWebAppDelegate(const ProjectorSystemWebAppDelegate&) = delete; ProjectorSystemWebAppDelegate operator=( const ProjectorSystemWebAppDelegate&) = delete; ~ProjectorSystemWebAppDelegate() override; // web_app::SystemWebAppDelegate: std::unique_ptr<WebAppInstallInfo> GetWebAppInfo() const override; bool ShouldCaptureNavigations() const override; gfx::Size GetMinimumWindowSize() const override; bool IsAppEnabled() const override; }; #endif // CHROME_BROWSER_ASH_WEB_APPLICATIONS_PROJECTOR_SYSTEM_WEB_APP_INFO_H_
{ "content_hash": "ba3cdd4a3925bfa1eb2f437e66432fd4", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 79, "avg_line_length": 39.611111111111114, "alnum_prop": 0.8008415147265077, "repo_name": "scheib/chromium", "id": "d5949e042e1ea607dbb15b2b3598cd5dc05cb6c8", "size": "1120", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "chrome/browser/ash/web_applications/projector_system_web_app_info.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<?xml version="1.0" ?> <!-- This file is part of the Sylius package. (c) Paweł Jędrzejewski For the full copyright and license information, please view the LICENSE file that was distributed with this source code. --> <serializer xmlns="http://symfony.com/schema/dic/serializer-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/serializer-mapping https://symfony.com/schema/dic/serializer-mapping/serializer-mapping-1.0.xsd" > <class name="Sylius\Component\Core\Model\Shipment"> <attribute name="id"> <group>shipment:read</group> <group>admin:order:read</group> <group>shop:cart:read</group> </attribute> <attribute name="createdAt"> <group>shipment:read</group> </attribute> <attribute name="updatedAt"> <group>shipment:read</group> </attribute> <attribute name="state"> <group>shipment:read</group> </attribute> <attribute name="method"> <group>shop:order:account:read</group> <group>shipment:read</group> <group>shop:cart:read</group> </attribute> <attribute name="units"> <group>shipment:read</group> </attribute> <attribute name="tracking"> <group>shipment:read</group> <group>shipment:update</group> </attribute> <attribute name="shippedAt"> <group>shipment:read</group> </attribute> <attribute name="order"> <group>shipment:read</group> </attribute> </class> </serializer>
{ "content_hash": "6271ef21df5fb2c737d9eb7768fd707c", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 158, "avg_line_length": 28.4, "alnum_prop": 0.5927230046948356, "repo_name": "kayue/Sylius", "id": "eb5fe55475032d0da34f709de4eba9122282b4ab", "size": "1706", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Sylius/Bundle/ApiBundle/Resources/config/serialization/Shipment.xml", "mode": "33188", "license": "mit", "language": [ { "name": "Gherkin", "bytes": "1031410" }, { "name": "JavaScript", "bytes": "96527" }, { "name": "PHP", "bytes": "6906419" }, { "name": "SCSS", "bytes": "19063" }, { "name": "Shell", "bytes": "13478" }, { "name": "Twig", "bytes": "399969" } ], "symlink_target": "" }
namespace Client { partial class Form1 { /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// 清理所有正在使用的资源。 /// </summary> /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要 /// 使用代码编辑器修改此方法的内容。 /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.button1 = new System.Windows.Forms.Button(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.statusStrip1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // // statusStrip1 // this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripStatusLabel1}); this.statusStrip1.Location = new System.Drawing.Point(0, 404); this.statusStrip1.Name = "statusStrip1"; this.statusStrip1.Size = new System.Drawing.Size(569, 22); this.statusStrip1.TabIndex = 0; this.statusStrip1.Text = "statusStrip1"; // // toolStripStatusLabel1 // this.toolStripStatusLabel1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; this.toolStripStatusLabel1.Size = new System.Drawing.Size(43, 17); this.toolStripStatusLabel1.Text = "Ping:0"; // // dataGridView1 // this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Location = new System.Drawing.Point(0, 1); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.Size = new System.Drawing.Size(569, 378); this.dataGridView1.TabIndex = 1; // // button1 // this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button1.Location = new System.Drawing.Point(494, 380); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 2; this.button1.Text = "读取数据"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // timer1 // this.timer1.Enabled = true; this.timer1.Interval = 1000; this.timer1.Tick += new System.EventHandler(this.timer1_Tick); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(569, 426); this.Controls.Add(this.button1); this.Controls.Add(this.dataGridView1); this.Controls.Add(this.statusStrip1); this.Name = "Form1"; this.Text = "Form1"; this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.Button button1; private System.Windows.Forms.Timer timer1; } }
{ "content_hash": "5be317e6432bd8c47fa56753016f5fc8", "timestamp": "", "source": "github", "line_count": 114, "max_line_length": 161, "avg_line_length": 43.280701754385966, "alnum_prop": 0.5956627482772598, "repo_name": "luyikk/ZYSOCKET", "id": "b4bb85866f6d4701167fe45957445b0d504e6bf3", "size": "5094", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "DEMO/例3 - 例2的加密版/Client/Form1.Designer.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "348" }, { "name": "C", "bytes": "451" }, { "name": "C#", "bytes": "32978903" }, { "name": "C++", "bytes": "86396" }, { "name": "HTML", "bytes": "38474" }, { "name": "Java", "bytes": "1864" }, { "name": "PowerShell", "bytes": "4676" }, { "name": "Protocol Buffer", "bytes": "192" }, { "name": "Python", "bytes": "5096" }, { "name": "Shell", "bytes": "206" } ], "symlink_target": "" }
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Home extends CI_Controller { /** * Index Page for this controller. * * Maps to the following URL * http://example.com/index.php/welcome * - or - * http://example.com/index.php/welcome/index * - or - * Since this controller is set as the default controller in * config/routes.php, it's displayed at http://example.com/ * * So any other public methods not prefixed with an underscore will * map to /index.php/welcome/<method_name> * @see https://codeigniter.com/user_guide/general/urls.html */ public function index() { $this->load->view('common/header'); $this->load->view('home'); $this->load->view('common/footer'); } }
{ "content_hash": "3158942e18002e04540c4c788c3366d4", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 71, "avg_line_length": 29.928571428571427, "alnum_prop": 0.5930787589498807, "repo_name": "asimbilaladil/elearning", "id": "5767beb45daeb7fc6828616269ed3b45ec4cc880", "size": "838", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "application/controllers/Home-old.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "240" }, { "name": "CSS", "bytes": "1193043" }, { "name": "HTML", "bytes": "10352510" }, { "name": "JavaScript", "bytes": "3421383" }, { "name": "PHP", "bytes": "1967217" } ], "symlink_target": "" }
When /^I add an editorial remark "([^"]*)" to the document "([^"]*)"$/ do |remark_text, document_title| @edition = create(:draft_publication, title: document_title) @remark_text = remark_text visit edit_admin_edition_path(@edition) click_link "Add new remark" fill_in "Remark", with: @remark_text click_button "Submit remark" end Then /^my editorial remark should be visible with the document$/ do ensure_path admin_edition_path(@edition) assert page.has_css? ".editorial_remark .body", text: @remark_text end
{ "content_hash": "53b1528db8767855a8ea6ce96315f117", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 103, "avg_line_length": 37.714285714285715, "alnum_prop": 0.7064393939393939, "repo_name": "hotvulcan/whitehall", "id": "5c1c6ff85e74e0d8c4c538c22ccc0a38dbe9f4d3", "size": "528", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "features/step_definitions/editorial_remarks.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "260838" }, { "name": "Cucumber", "bytes": "138948" }, { "name": "HTML", "bytes": "780935" }, { "name": "JavaScript", "bytes": "249641" }, { "name": "Ruby", "bytes": "3448461" }, { "name": "Shell", "bytes": "13163" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.Data; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Threading; using JSErrorCollector; using Kentico.KInspector.Core; using OpenQA.Selenium.Firefox; using OpenQA.Selenium; namespace Kentico.KInspector.Modules { public class ScreenshotterModule : IModule { public ModuleMetadata GetModuleMetadata() { return new ModuleMetadata { Name = "Screenshotter", SupportedVersions = new[] { new Version("5.5"), new Version("6.0"), new Version("7.0"), new Version("8.0"), new Version("8.1"), new Version("8.2"), new Version("9.0"), new Version("10.0") }, Comment = @"It takes a screenshot of all published pages on the website. - All screenshots are saved into your desktop folder - You can see actual progress in a console window - For larger websites, it can take some time to take all the screenshots - Currently, it works only with the Firefox browser installed NOTE: Current implementation will only take screenshots of the site you've entered in the first step (target instance setup). For pages that are not assigned to the that site it'll return 404s. You may ignore those.", }; } public ModuleResults GetResults(IInstanceInfo instanceInfo) { var dbService = instanceInfo.DBService; DataTable urls; if (instanceInfo.Version.Major >= 9) { urls = dbService.ExecuteAndGetTableFromFile("ScreenshotterModule-v9.sql"); } else { urls = dbService.ExecuteAndGetTableFromFile("ScreenshotterModule.sql"); } // Start process in separate thread to make website responsive. Thread t = new Thread(StartScreenshotting); t.Start(new object[] { instanceInfo, urls }); return new ModuleResults { Result = urls }; } public void StartScreenshotting(object parameters) { var parameter = parameters as object[]; InstanceInfo instanceInfo = parameter[0] as InstanceInfo; DataTable urls = parameter[1] as DataTable; try { Log("Starting firefox..."); FirefoxProfile ffProfile = new FirefoxProfile(); JavaScriptError.AddExtension(ffProfile); using (var browser = new FirefoxDriver(ffProfile)) { string targetDirectory = CreateTargetDirectory(instanceInfo); List<JavaScriptError> jsErrors = new List<JavaScriptError>(); for (int i = 0; i < urls.Rows.Count; i++) { try { Guid nodeGuid = (Guid)urls.Rows[i]["NodeGUID"]; Uri url = new Uri(instanceInfo.Uri, "getdoc/" + nodeGuid); Log("Screenshotting [{0}/{1}]: {2}", i, urls.Rows.Count, nodeGuid); browser.Navigate().GoToUrl(url); string fileName = GetFileName(targetDirectory, browser.Url); browser.GetScreenshot() .SaveAsFile(fileName, ImageFormat.Jpeg); jsErrors.AddRange(JavaScriptError.ReadErrors(browser)); } catch (Exception e) { Log("Exception: {0}", e.Message); } } SaveJavaScriptErrorsToFile(jsErrors, targetDirectory); Log("Screenshotting finished."); browser.Close(); } } catch (WebDriverException ex) { // If the exception occurs, it's most probably because Firefox is not installed. Console.WriteLine(ex.Message); } } private static string CreateTargetDirectory(InstanceInfo config) { const string KINSPECTOR_DESKTOP_FOLDER_NAME = "KInspector_Screenshotter_Output"; string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); string targetDirectory = desktopPath + "\\" + KINSPECTOR_DESKTOP_FOLDER_NAME + "\\" + SanitizeFileName(config.Uri.ToString()) + "\\"; Log("Creating target directory: {0}", targetDirectory); Directory.CreateDirectory(targetDirectory); return targetDirectory; } private static string GetFileName(string targetDirectory, string urlPath) { const string EXTENSION = ".jpg"; string filePath = targetDirectory + "\\" + SanitizeFileName(urlPath) + EXTENSION; const int MAX_WINDOWS_FILENAME_LENGTH = 248; if (filePath.Length > MAX_WINDOWS_FILENAME_LENGTH) { filePath = filePath.Substring(0, MAX_WINDOWS_FILENAME_LENGTH - EXTENSION.Length); filePath += EXTENSION; } return filePath; } private static string SanitizeFileName(string fileName) { var invalids = Path.GetInvalidFileNameChars(); return string.Join("_", fileName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd('.'); } private static void Log(string message) { Console.WriteLine($"[{DateTime.Now}]: {message}"); } private static void Log(string message, params object[] args) { Console.WriteLine($"[{DateTime.Now}]: {string.Format(message, args)}"); } private void SaveJavaScriptErrorsToFile(IList<JavaScriptError> jsErrors, string targetDirectory) { if (jsErrors.Count <= 0) { return; } var errors = jsErrors.Select(javaScriptError => javaScriptError.ToString()).ToList(); File.AppendAllLines(targetDirectory + "JsErrors.txt", errors); } } }
{ "content_hash": "03e897463b9bc2eadd57dd06283aaf3d", "timestamp": "", "source": "github", "line_count": 179, "max_line_length": 217, "avg_line_length": 36.089385474860336, "alnum_prop": 0.5453560371517028, "repo_name": "JosefDvorak/KInspector", "id": "006a60d7af9ca0d391b630aeaddd50bc4c1aba96", "size": "6462", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "KInspector.Modules/Modules/General/ScreenshotterModule.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "306" }, { "name": "Batchfile", "bytes": "191" }, { "name": "C#", "bytes": "298695" }, { "name": "CSS", "bytes": "3429" }, { "name": "F#", "bytes": "656" }, { "name": "HTML", "bytes": "16898" }, { "name": "JavaScript", "bytes": "29071" }, { "name": "PLpgSQL", "bytes": "4923" }, { "name": "SQLPL", "bytes": "60919" } ], "symlink_target": "" }
<?php namespace Symfony\Bundle\SecurityBundle\DependencyInjection\Security\Factory; use Symfony\Component\Config\Definition\Builder\NodeDefinition; use Symfony\Component\DependencyInjection\ChildDefinition; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; /** * AbstractFactory is the base class for all classes inheriting from * AbstractAuthenticationListener. * * @author Fabien Potencier <fabien@symfony.com> * @author Lukas Kahwe Smith <smith@pooteeweet.org> * @author Johannes M. Schmitt <schmittjoh@gmail.com> */ abstract class AbstractFactory implements SecurityFactoryInterface { protected $options = [ 'check_path' => '/login_check', 'use_forward' => false, 'require_previous_session' => false, 'login_path' => '/login', ]; protected $defaultSuccessHandlerOptions = [ 'always_use_default_target_path' => false, 'default_target_path' => '/', 'login_path' => '/login', 'target_path_parameter' => '_target_path', 'use_referer' => false, ]; protected $defaultFailureHandlerOptions = [ 'failure_path' => null, 'failure_forward' => false, 'login_path' => '/login', 'failure_path_parameter' => '_failure_path', ]; public function create(ContainerBuilder $container, string $id, array $config, string $userProviderId, ?string $defaultEntryPointId) { // authentication provider $authProviderId = $this->createAuthProvider($container, $id, $config, $userProviderId); // authentication listener $listenerId = $this->createListener($container, $id, $config, $userProviderId); // add remember-me aware tag if requested if ($this->isRememberMeAware($config)) { $container ->getDefinition($listenerId) ->addTag('security.remember_me_aware', ['id' => $id, 'provider' => $userProviderId]) ; } // create entry point if applicable (optional) $entryPointId = $this->createEntryPoint($container, $id, $config, $defaultEntryPointId); return [$authProviderId, $listenerId, $entryPointId]; } public function addConfiguration(NodeDefinition $node) { $builder = $node->children(); $builder ->scalarNode('provider')->end() ->booleanNode('remember_me')->defaultTrue()->end() ->scalarNode('success_handler')->end() ->scalarNode('failure_handler')->end() ; foreach (array_merge($this->options, $this->defaultSuccessHandlerOptions, $this->defaultFailureHandlerOptions) as $name => $default) { if (\is_bool($default)) { $builder->booleanNode($name)->defaultValue($default); } else { $builder->scalarNode($name)->defaultValue($default); } } } final public function addOption(string $name, $default = null) { $this->options[$name] = $default; } /** * Subclasses must return the id of a service which implements the * AuthenticationProviderInterface. * * @return string */ abstract protected function createAuthProvider(ContainerBuilder $container, string $id, array $config, string $userProviderId); /** * Subclasses must return the id of the abstract listener template. * * Listener definitions should inherit from the AbstractAuthenticationListener * like this: * * <service id="my.listener.id" * class="My\Concrete\Classname" * parent="security.authentication.listener.abstract" * abstract="true" /> * * In the above case, this method would return "my.listener.id". * * @return string */ abstract protected function getListenerId(); /** * Subclasses may create an entry point of their as they see fit. The * default implementation does not change the default entry point. * * @return string|null the entry point id */ protected function createEntryPoint(ContainerBuilder $container, string $id, array $config, ?string $defaultEntryPointId) { return $defaultEntryPointId; } /** * Subclasses may disable remember-me features for the listener, by * always returning false from this method. * * @return bool Whether a possibly configured RememberMeServices should be set for this listener */ protected function isRememberMeAware(array $config) { return $config['remember_me']; } protected function createListener(ContainerBuilder $container, string $id, array $config, string $userProvider) { $listenerId = $this->getListenerId(); $listener = new ChildDefinition($listenerId); $listener->replaceArgument(4, $id); $listener->replaceArgument(5, new Reference($this->createAuthenticationSuccessHandler($container, $id, $config))); $listener->replaceArgument(6, new Reference($this->createAuthenticationFailureHandler($container, $id, $config))); $listener->replaceArgument(7, array_intersect_key($config, $this->options)); $listenerId .= '.'.$id; $container->setDefinition($listenerId, $listener); return $listenerId; } protected function createAuthenticationSuccessHandler(ContainerBuilder $container, string $id, array $config) { $successHandlerId = $this->getSuccessHandlerId($id); $options = array_intersect_key($config, $this->defaultSuccessHandlerOptions); if (isset($config['success_handler'])) { $successHandler = $container->setDefinition($successHandlerId, new ChildDefinition('security.authentication.custom_success_handler')); $successHandler->replaceArgument(0, new Reference($config['success_handler'])); $successHandler->replaceArgument(1, $options); $successHandler->replaceArgument(2, $id); } else { $successHandler = $container->setDefinition($successHandlerId, new ChildDefinition('security.authentication.success_handler')); $successHandler->addMethodCall('setOptions', [$options]); $successHandler->addMethodCall('setFirewallName', [$id]); } return $successHandlerId; } protected function createAuthenticationFailureHandler(ContainerBuilder $container, string $id, array $config) { $id = $this->getFailureHandlerId($id); $options = array_intersect_key($config, $this->defaultFailureHandlerOptions); if (isset($config['failure_handler'])) { $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.custom_failure_handler')); $failureHandler->replaceArgument(0, new Reference($config['failure_handler'])); $failureHandler->replaceArgument(1, $options); } else { $failureHandler = $container->setDefinition($id, new ChildDefinition('security.authentication.failure_handler')); $failureHandler->addMethodCall('setOptions', [$options]); } return $id; } protected function getSuccessHandlerId(string $id) { return 'security.authentication.success_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); } protected function getFailureHandlerId(string $id) { return 'security.authentication.failure_handler.'.$id.'.'.str_replace('-', '_', $this->getKey()); } }
{ "content_hash": "281e0e049d2061f8a2c245eb99773b98", "timestamp": "", "source": "github", "line_count": 198, "max_line_length": 146, "avg_line_length": 38.31818181818182, "alnum_prop": 0.6474232239356794, "repo_name": "oleg-andreyev/symfony", "id": "e8bfa9412aff72ade9bda321b85cc75e3b3aedde", "size": "7816", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "49607" }, { "name": "HTML", "bytes": "356956" }, { "name": "Hack", "bytes": "26" }, { "name": "JavaScript", "bytes": "27650" }, { "name": "PHP", "bytes": "18500484" }, { "name": "Shell", "bytes": "3136" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>dpdgraph: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.13.0 / dpdgraph - 0.6.6</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> dpdgraph <small> 0.6.6 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2021-10-30 10:24:50 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-30 10:24:50 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.13.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.12.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.12.0 Official release 4.12.0 ocaml-config 2 OCaml Switch Configuration ocaml-options-vanilla 1 Ensure that OCaml is compiled with no special options enabled ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;yves.bertot@inria.fr&quot; license: &quot;LGPL-2.1-only&quot; homepage: &quot;https://github.com/karmaki/coq-dpdgraph&quot; build: [ [&quot;./configure&quot;] [&quot;echo&quot; &quot;%{jobs}%&quot; &quot;jobs for the linter&quot;] [make &quot;-j%{jobs}%&quot; &quot;WARN_ERR=&quot;] ] bug-reports: &quot;https://github.com/karmaki/coq-dpdgraph/issues&quot; dev-repo: &quot;git+https://github.com/karmaki/coq-dpdgraph.git&quot; install: [ [make &quot;install&quot; &quot;BINDIR=%{bin}%&quot;] ] depends: [ &quot;ocaml&quot; {} &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} &quot;ocamlgraph&quot; ] authors: [ &quot;Anne Pacalet&quot; &quot;Yves Bertot&quot;] synopsis: &quot;Compute dependencies between Coq objects (definitions, theorems) and produce graphs&quot; url { src: &quot;https://github.com/Karmaki/coq-dpdgraph/releases/download/v0.6.6/coq-dpdgraph-0.6.6.tgz&quot; checksum: &quot;sha256=1bc2715bdc412b9413f1a9348d6598a7a722c3b68c087c0294d1d58cdf2d2c7f&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-dpdgraph.0.6.6 coq.8.13.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.13.0). The following dependencies couldn&#39;t be met: - coq-dpdgraph -&gt; coq &lt; 8.11~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-dpdgraph.0.6.6</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "135da05169af05a944a46c7f5a0e403e", "timestamp": "", "source": "github", "line_count": 167, "max_line_length": 157, "avg_line_length": 41.4311377245509, "alnum_prop": 0.538083538083538, "repo_name": "coq-bench/coq-bench.github.io", "id": "bd08318ef41a88e520bb75ff73bf19b0ca1fc221", "size": "6921", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.12.0-2.0.8/released/8.13.0/dpdgraph/0.6.6.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
/* vi: set sw=4 ts=4: */ /* * ifplugd for busybox, based on ifplugd 0.28 (written by Lennart Poettering). * * Copyright (C) 2009 Maksym Kryzhanovskyy <xmaks@email.cz> * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ //config:config IFPLUGD //config: bool "ifplugd" //config: default y //config: select PLATFORM_LINUX //config: help //config: Network interface plug detection daemon. //applet:IF_IFPLUGD(APPLET(ifplugd, BB_DIR_USR_SBIN, BB_SUID_DROP)) //kbuild:lib-$(CONFIG_IFPLUGD) += ifplugd.o //usage:#define ifplugd_trivial_usage //usage: "[OPTIONS]" //usage:#define ifplugd_full_usage "\n\n" //usage: "Network interface plug detection daemon\n" //usage: "\n -n Don't daemonize" //usage: "\n -s Don't log to syslog" //usage: "\n -i IFACE Interface" //usage: "\n -f/-F Treat link detection error as link down/link up" //usage: "\n (otherwise exit on error)" //usage: "\n -a Don't up interface at each link probe" //usage: "\n -M Monitor creation/destruction of interface" //usage: "\n (otherwise it must exist)" //usage: "\n -r PROG Script to run" //usage: "\n -x ARG Extra argument for script" //usage: "\n -I Don't exit on nonzero exit code from script" //usage: "\n -p Don't run \"up\" script on startup" //usage: "\n -q Don't run \"down\" script on exit" //usage: "\n -l Always run script on startup" //usage: "\n -t SECS Poll time in seconds" //usage: "\n -u SECS Delay before running script after link up" //usage: "\n -d SECS Delay after link down" //usage: "\n -m MODE API mode (mii, priv, ethtool, wlan, iff, auto)" //usage: "\n -k Kill running daemon" #include "libbb.h" #include "fix_u32.h" #include <linux/if.h> #include <linux/mii.h> #include <linux/ethtool.h> #ifdef HAVE_NET_ETHERNET_H /* musl breakage: * In file included from /usr/include/net/ethernet.h:10, * from networking/ifplugd.c:41: * /usr/include/netinet/if_ether.h:96: error: redefinition of 'struct ethhdr' * * Build succeeds without it on musl. Commented it out. * If on your system you need it, consider removing <linux/ethtool.h> * and copy-pasting its definitions here (<linux/ethtool.h> is what pulls in * conflicting definition of struct ethhdr on musl). */ /* # include <net/ethernet.h> */ #endif #include <linux/netlink.h> #include <linux/rtnetlink.h> #include <linux/sockios.h> #include <syslog.h> #define __user #include <linux/wireless.h> #ifndef ETH_ALEN # define ETH_ALEN 6 #endif /* From initial port to busybox, removed most of the redundancy by converting implementation of a polymorphic interface to the strict functional style. The main role is run a script when link state changed, other activities like audio signal or detailed reports are on the script itself. One questionable point of the design is netlink usage: We have 1 second timeout by default to poll the link status, it is short enough so that there are no real benefits in using netlink to get "instantaneous" interface creation/deletion notifications. We can check for interface existence by just doing some fast ioctl using its name. Netlink code then can be just dropped (1k or more?) */ #define IFPLUGD_ENV_PREVIOUS "IFPLUGD_PREVIOUS" #define IFPLUGD_ENV_CURRENT "IFPLUGD_CURRENT" enum { FLAG_NO_AUTO = 1 << 0, // -a, Do not enable interface automatically FLAG_NO_DAEMON = 1 << 1, // -n, Do not daemonize FLAG_NO_SYSLOG = 1 << 2, // -s, Do not use syslog, use stderr instead FLAG_IGNORE_FAIL = 1 << 3, // -f, Ignore detection failure, retry instead (failure is treated as DOWN) FLAG_IGNORE_FAIL_POSITIVE = 1 << 4, // -F, Ignore detection failure, retry instead (failure is treated as UP) FLAG_IFACE = 1 << 5, // -i, Specify ethernet interface FLAG_RUN = 1 << 6, // -r, Specify program to execute FLAG_IGNORE_RETVAL = 1 << 7, // -I, Don't exit on nonzero return value of program executed FLAG_POLL_TIME = 1 << 8, // -t, Specify poll time in seconds FLAG_DELAY_UP = 1 << 9, // -u, Specify delay for configuring interface FLAG_DELAY_DOWN = 1 << 10, // -d, Specify delay for deconfiguring interface FLAG_API_MODE = 1 << 11, // -m, Force API mode (mii, priv, ethtool, wlan, auto) FLAG_NO_STARTUP = 1 << 12, // -p, Don't run script on daemon startup FLAG_NO_SHUTDOWN = 1 << 13, // -q, Don't run script on daemon quit FLAG_INITIAL_DOWN = 1 << 14, // -l, Run "down" script on startup if no cable is detected FLAG_EXTRA_ARG = 1 << 15, // -x, Specify an extra argument for action script FLAG_MONITOR = 1 << 16, // -M, Use interface monitoring #if ENABLE_FEATURE_PIDFILE FLAG_KILL = 1 << 17, // -k, Kill a running daemon #endif }; #if ENABLE_FEATURE_PIDFILE # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:Mk" #else # define OPTION_STR "+ansfFi:r:It:+u:+d:+m:pqlx:M" #endif enum { // interface status IFSTATUS_ERR = -1, IFSTATUS_DOWN = 0, IFSTATUS_UP = 1, }; enum { // constant fds ioctl_fd = 3, netlink_fd = 4, }; struct globals { smallint iface_last_status; smallint iface_prev_status; smallint iface_exists; smallint api_method_num; /* Used in getopt32, must have sizeof == sizeof(int) */ unsigned poll_time; unsigned delay_up; unsigned delay_down; const char *iface; const char *api_mode; const char *script_name; const char *extra_arg; }; #define G (*ptr_to_globals) #define INIT_G() do { \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ G.iface_last_status = -1; \ G.iface_exists = 1; \ G.poll_time = 1; \ G.delay_down = 5; \ G.iface = "eth0"; \ G.api_mode = "a"; \ G.script_name = "/etc/ifplugd/ifplugd.action"; \ } while (0) /* Utility routines */ static void set_ifreq_to_ifname(struct ifreq *ifreq) { memset(ifreq, 0, sizeof(struct ifreq)); strncpy_IFNAMSIZ(ifreq->ifr_name, G.iface); } static int network_ioctl(int request, void* data, const char *errmsg) { int r = ioctl(ioctl_fd, request, data); if (r < 0 && errmsg) bb_perror_msg("%s failed", errmsg); return r; } /* Link detection routines and table */ static smallint detect_link_mii(void) { /* char buffer instead of bona-fide struct avoids aliasing warning */ char buf[sizeof(struct ifreq)]; struct ifreq *const ifreq = (void *)buf; struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; set_ifreq_to_ifname(ifreq); if (network_ioctl(SIOCGMIIPHY, ifreq, "SIOCGMIIPHY") < 0) { return IFSTATUS_ERR; } mii->reg_num = 1; if (network_ioctl(SIOCGMIIREG, ifreq, "SIOCGMIIREG") < 0) { return IFSTATUS_ERR; } return (mii->val_out & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } static smallint detect_link_priv(void) { /* char buffer instead of bona-fide struct avoids aliasing warning */ char buf[sizeof(struct ifreq)]; struct ifreq *const ifreq = (void *)buf; struct mii_ioctl_data *mii = (void *)&ifreq->ifr_data; set_ifreq_to_ifname(ifreq); if (network_ioctl(SIOCDEVPRIVATE, ifreq, "SIOCDEVPRIVATE") < 0) { return IFSTATUS_ERR; } mii->reg_num = 1; if (network_ioctl(SIOCDEVPRIVATE+1, ifreq, "SIOCDEVPRIVATE+1") < 0) { return IFSTATUS_ERR; } return (mii->val_out & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } static smallint detect_link_ethtool(void) { struct ifreq ifreq; struct ethtool_value edata; set_ifreq_to_ifname(&ifreq); edata.cmd = ETHTOOL_GLINK; ifreq.ifr_data = (void*) &edata; if (network_ioctl(SIOCETHTOOL, &ifreq, "ETHTOOL_GLINK") < 0) { return IFSTATUS_ERR; } return edata.data ? IFSTATUS_UP : IFSTATUS_DOWN; } static smallint detect_link_iff(void) { struct ifreq ifreq; set_ifreq_to_ifname(&ifreq); if (network_ioctl(SIOCGIFFLAGS, &ifreq, "SIOCGIFFLAGS") < 0) { return IFSTATUS_ERR; } /* If IFF_UP is not set (interface is down), IFF_RUNNING is never set * regardless of link status. Simply continue to report last status - * no point in reporting spurious link downs if interface is disabled * by admin. When/if it will be brought up, * we'll report real link status. */ if (!(ifreq.ifr_flags & IFF_UP) && G.iface_last_status != IFSTATUS_ERR) return G.iface_last_status; return (ifreq.ifr_flags & IFF_RUNNING) ? IFSTATUS_UP : IFSTATUS_DOWN; } static smallint detect_link_wlan(void) { int i; struct iwreq iwrequest; uint8_t mac[ETH_ALEN]; memset(&iwrequest, 0, sizeof(iwrequest)); strncpy_IFNAMSIZ(iwrequest.ifr_ifrn.ifrn_name, G.iface); if (network_ioctl(SIOCGIWAP, &iwrequest, "SIOCGIWAP") < 0) { return IFSTATUS_ERR; } memcpy(mac, &iwrequest.u.ap_addr.sa_data, ETH_ALEN); if (mac[0] == 0xFF || mac[0] == 0x44 || mac[0] == 0x00) { for (i = 1; i < ETH_ALEN; ++i) { if (mac[i] != mac[0]) return IFSTATUS_UP; } return IFSTATUS_DOWN; } return IFSTATUS_UP; } enum { // api mode API_ETHTOOL, // 'e' API_MII, // 'm' API_PRIVATE, // 'p' API_WLAN, // 'w' API_IFF, // 'i' API_AUTO, // 'a' }; static const char api_modes[] ALIGN1 = "empwia"; static const struct { const char *name; smallint (*func)(void); } method_table[] = { { "SIOCETHTOOL" , &detect_link_ethtool }, { "SIOCGMIIPHY" , &detect_link_mii }, { "SIOCDEVPRIVATE" , &detect_link_priv }, { "wireless extension", &detect_link_wlan }, { "IFF_RUNNING" , &detect_link_iff }, }; static const char *strstatus(int status) { if (status == IFSTATUS_ERR) return "error"; return "down\0up" + (status * 5); } static int run_script(const char *action) { char *env_PREVIOUS, *env_CURRENT; char *argv[5]; int r; bb_error_msg("executing '%s %s %s'", G.script_name, G.iface, action); argv[0] = (char*) G.script_name; argv[1] = (char*) G.iface; argv[2] = (char*) action; argv[3] = (char*) G.extra_arg; argv[4] = NULL; env_PREVIOUS = xasprintf("%s=%s", IFPLUGD_ENV_PREVIOUS, strstatus(G.iface_prev_status)); putenv(env_PREVIOUS); env_CURRENT = xasprintf("%s=%s", IFPLUGD_ENV_CURRENT, strstatus(G.iface_last_status)); putenv(env_CURRENT); /* r < 0 - can't exec, 0 <= r < 0x180 - exited, >=0x180 - killed by sig (r-0x180) */ r = spawn_and_wait(argv); unsetenv(IFPLUGD_ENV_PREVIOUS); unsetenv(IFPLUGD_ENV_CURRENT); free(env_PREVIOUS); free(env_CURRENT); bb_error_msg("exit code: %d", r & 0xff); return (option_mask32 & FLAG_IGNORE_RETVAL) ? 0 : r; } static void up_iface(void) { struct ifreq ifrequest; if (!G.iface_exists) return; set_ifreq_to_ifname(&ifrequest); if (network_ioctl(SIOCGIFFLAGS, &ifrequest, "getting interface flags") < 0) { G.iface_exists = 0; return; } if (!(ifrequest.ifr_flags & IFF_UP)) { ifrequest.ifr_flags |= IFF_UP; /* Let user know we mess up with interface */ bb_error_msg("upping interface"); if (network_ioctl(SIOCSIFFLAGS, &ifrequest, "setting interface flags") < 0) { if (errno != ENODEV) xfunc_die(); G.iface_exists = 0; return; } } #if 0 /* why do we mess with IP addr? It's not our business */ if (network_ioctl(SIOCGIFADDR, &ifrequest, "can't get interface address") < 0) { } else if (ifrequest.ifr_addr.sa_family != AF_INET) { bb_perror_msg("the interface is not IP-based"); } else { ((struct sockaddr_in*)(&ifrequest.ifr_addr))->sin_addr.s_addr = INADDR_ANY; network_ioctl(SIOCSIFADDR, &ifrequest, "can't set interface address"); } network_ioctl(SIOCGIFFLAGS, &ifrequest, "can't get interface flags"); #endif } static void maybe_up_new_iface(void) { if (!(option_mask32 & FLAG_NO_AUTO)) up_iface(); #if 0 /* bloat */ struct ifreq ifrequest; struct ethtool_drvinfo driver_info; set_ifreq_to_ifname(&ifrequest); driver_info.cmd = ETHTOOL_GDRVINFO; ifrequest.ifr_data = &driver_info; if (network_ioctl(SIOCETHTOOL, &ifrequest, NULL) == 0) { char buf[sizeof("/xx:xx:xx:xx:xx:xx")]; /* Get MAC */ buf[0] = '\0'; set_ifreq_to_ifname(&ifrequest); if (network_ioctl(SIOCGIFHWADDR, &ifrequest, NULL) == 0) { sprintf(buf, "/%02X:%02X:%02X:%02X:%02X:%02X", (uint8_t)(ifrequest.ifr_hwaddr.sa_data[0]), (uint8_t)(ifrequest.ifr_hwaddr.sa_data[1]), (uint8_t)(ifrequest.ifr_hwaddr.sa_data[2]), (uint8_t)(ifrequest.ifr_hwaddr.sa_data[3]), (uint8_t)(ifrequest.ifr_hwaddr.sa_data[4]), (uint8_t)(ifrequest.ifr_hwaddr.sa_data[5])); } bb_error_msg("using interface %s%s with driver<%s> (version: %s)", G.iface, buf, driver_info.driver, driver_info.version); } #endif if (G.api_mode[0] == 'a') G.api_method_num = API_AUTO; } static smallint detect_link(void) { smallint status; if (!G.iface_exists) return (option_mask32 & FLAG_MONITOR) ? IFSTATUS_DOWN : IFSTATUS_ERR; /* Some drivers can't detect link status when the interface is down. * I imagine detect_link_iff() is the most vulnerable. * That's why -a "noauto" in an option, not a hardwired behavior. */ if (!(option_mask32 & FLAG_NO_AUTO)) up_iface(); if (G.api_method_num == API_AUTO) { int i; smallint sv_logmode; sv_logmode = logmode; for (i = 0; i < ARRAY_SIZE(method_table); i++) { logmode = LOGMODE_NONE; status = method_table[i].func(); logmode = sv_logmode; if (status != IFSTATUS_ERR) { G.api_method_num = i; bb_error_msg("using %s detection mode", method_table[i].name); break; } } } else { status = method_table[G.api_method_num].func(); } if (status == IFSTATUS_ERR) { if (option_mask32 & FLAG_IGNORE_FAIL) status = IFSTATUS_DOWN; else if (option_mask32 & FLAG_IGNORE_FAIL_POSITIVE) status = IFSTATUS_UP; else if (G.api_mode[0] == 'a') bb_error_msg("can't detect link status"); } if (status != G.iface_last_status) { G.iface_prev_status = G.iface_last_status; G.iface_last_status = status; } return status; } static NOINLINE int check_existence_through_netlink(void) { int iface_len; /* Buffer was 1K, but on linux-3.9.9 it was reported to be too small. * netlink.h: "limit to 8K to avoid MSG_TRUNC when PAGE_SIZE is very large". * Note: on error returns (-1) we exit, no need to free replybuf. */ enum { BUF_SIZE = 8 * 1024 }; char *replybuf = xmalloc(BUF_SIZE); iface_len = strlen(G.iface); while (1) { struct nlmsghdr *mhdr; ssize_t bytes; bytes = recv(netlink_fd, replybuf, BUF_SIZE, MSG_DONTWAIT); if (bytes < 0) { if (errno == EAGAIN) goto ret; if (errno == EINTR) continue; bb_perror_msg("netlink: recv"); return -1; } mhdr = (struct nlmsghdr*)replybuf; while (bytes > 0) { if (!NLMSG_OK(mhdr, bytes)) { bb_error_msg("netlink packet too small or truncated"); return -1; } if (mhdr->nlmsg_type == RTM_NEWLINK || mhdr->nlmsg_type == RTM_DELLINK) { struct rtattr *attr; int attr_len; if (mhdr->nlmsg_len < NLMSG_LENGTH(sizeof(struct ifinfomsg))) { bb_error_msg("netlink packet too small or truncated"); return -1; } attr = IFLA_RTA(NLMSG_DATA(mhdr)); attr_len = IFLA_PAYLOAD(mhdr); while (RTA_OK(attr, attr_len)) { if (attr->rta_type == IFLA_IFNAME) { int len = RTA_PAYLOAD(attr); if (len > IFNAMSIZ) len = IFNAMSIZ; if (iface_len <= len && strncmp(G.iface, RTA_DATA(attr), len) == 0 ) { G.iface_exists = (mhdr->nlmsg_type == RTM_NEWLINK); } } attr = RTA_NEXT(attr, attr_len); } } mhdr = NLMSG_NEXT(mhdr, bytes); } } ret: free(replybuf); return G.iface_exists; } #if ENABLE_FEATURE_PIDFILE static NOINLINE pid_t read_pid(const char *filename) { int len; char buf[128]; len = open_read_close(filename, buf, 127); if (len > 0) { buf[len] = '\0'; /* returns ULONG_MAX on error => -1 */ return bb_strtoul(buf, NULL, 10); } return 0; } #endif int ifplugd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int ifplugd_main(int argc UNUSED_PARAM, char **argv) { int iface_status; int delay_time; const char *iface_status_str; struct pollfd netlink_pollfd[1]; unsigned opts; const char *api_mode_found; #if ENABLE_FEATURE_PIDFILE char *pidfile_name; pid_t pid_from_pidfile; #endif INIT_G(); opts = getopt32(argv, OPTION_STR, &G.iface, &G.script_name, &G.poll_time, &G.delay_up, &G.delay_down, &G.api_mode, &G.extra_arg); G.poll_time *= 1000; applet_name = xasprintf("ifplugd(%s)", G.iface); #if ENABLE_FEATURE_PIDFILE pidfile_name = xasprintf(CONFIG_PID_FILE_PATH "/ifplugd.%s.pid", G.iface); pid_from_pidfile = read_pid(pidfile_name); if (opts & FLAG_KILL) { if (pid_from_pidfile > 0) /* Upstream tool use SIGINT for -k */ kill(pid_from_pidfile, SIGINT); return EXIT_SUCCESS; } if (pid_from_pidfile > 0 && kill(pid_from_pidfile, 0) == 0) bb_error_msg_and_die("daemon already running"); #endif api_mode_found = strchr(api_modes, G.api_mode[0]); if (!api_mode_found) bb_error_msg_and_die("unknown API mode '%s'", G.api_mode); G.api_method_num = api_mode_found - api_modes; if (!(opts & FLAG_NO_DAEMON)) bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv); xmove_fd(xsocket(AF_INET, SOCK_DGRAM, 0), ioctl_fd); if (opts & FLAG_MONITOR) { struct sockaddr_nl addr; int fd = xsocket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); memset(&addr, 0, sizeof(addr)); addr.nl_family = AF_NETLINK; addr.nl_groups = RTMGRP_LINK; addr.nl_pid = getpid(); xbind(fd, (struct sockaddr*)&addr, sizeof(addr)); xmove_fd(fd, netlink_fd); } write_pidfile(pidfile_name); /* this can't be moved before socket creation */ if (!(opts & FLAG_NO_SYSLOG)) { openlog(applet_name, 0, LOG_DAEMON); logmode |= LOGMODE_SYSLOG; } bb_signals(0 | (1 << SIGINT ) | (1 << SIGTERM) | (1 << SIGQUIT) | (1 << SIGHUP ) /* why we ignore it? */ /* | (1 << SIGCHLD) - run_script does not use it anymore */ , record_signo); bb_error_msg("started: %s", bb_banner); if (opts & FLAG_MONITOR) { struct ifreq ifrequest; set_ifreq_to_ifname(&ifrequest); G.iface_exists = (network_ioctl(SIOCGIFINDEX, &ifrequest, NULL) == 0); } if (G.iface_exists) maybe_up_new_iface(); iface_status = detect_link(); if (iface_status == IFSTATUS_ERR) goto exiting; iface_status_str = strstatus(iface_status); if (opts & FLAG_MONITOR) { bb_error_msg("interface %s", G.iface_exists ? "exists" : "doesn't exist, waiting"); } /* else we assume it always exists, but don't mislead user * by potentially lying that it really exists */ if (G.iface_exists) { bb_error_msg("link is %s", iface_status_str); } if ((!(opts & FLAG_NO_STARTUP) && iface_status == IFSTATUS_UP ) || (opts & FLAG_INITIAL_DOWN) ) { if (run_script(iface_status_str) != 0) goto exiting; } /* Main loop */ netlink_pollfd[0].fd = netlink_fd; netlink_pollfd[0].events = POLLIN; delay_time = 0; while (1) { int iface_status_old; switch (bb_got_signal) { case SIGINT: case SIGTERM: bb_got_signal = 0; goto cleanup; case SIGQUIT: bb_got_signal = 0; goto exiting; default: bb_got_signal = 0; break; } if (poll(netlink_pollfd, (opts & FLAG_MONITOR) ? 1 : 0, G.poll_time ) < 0 ) { if (errno == EINTR) continue; bb_perror_msg("poll"); goto exiting; } if ((opts & FLAG_MONITOR) && (netlink_pollfd[0].revents & POLLIN) ) { int iface_exists_old; iface_exists_old = G.iface_exists; G.iface_exists = check_existence_through_netlink(); if (G.iface_exists < 0) /* error */ goto exiting; if (iface_exists_old != G.iface_exists) { bb_error_msg("interface %sappeared", G.iface_exists ? "" : "dis"); if (G.iface_exists) maybe_up_new_iface(); } } /* note: if !G.iface_exists, returns DOWN */ iface_status_old = iface_status; iface_status = detect_link(); if (iface_status == IFSTATUS_ERR) { if (!(opts & FLAG_MONITOR)) goto exiting; iface_status = IFSTATUS_DOWN; } iface_status_str = strstatus(iface_status); if (iface_status_old != iface_status) { bb_error_msg("link is %s", iface_status_str); if (delay_time) { /* link restored its old status before * we ran script. don't run the script: */ delay_time = 0; } else { delay_time = monotonic_sec(); if (iface_status == IFSTATUS_UP) delay_time += G.delay_up; if (iface_status == IFSTATUS_DOWN) delay_time += G.delay_down; #if 0 /* if you are back in 1970... */ if (delay_time == 0) { sleep(1); delay_time = 1; } #endif } } if (delay_time && (int)(monotonic_sec() - delay_time) >= 0) { if (run_script(iface_status_str) != 0) goto exiting; delay_time = 0; } } /* while (1) */ cleanup: if (!(opts & FLAG_NO_SHUTDOWN) && (iface_status == IFSTATUS_UP || (iface_status == IFSTATUS_DOWN && delay_time) ) ) { setenv(IFPLUGD_ENV_PREVIOUS, strstatus(iface_status), 1); setenv(IFPLUGD_ENV_CURRENT, strstatus(-1), 1); run_script("down\0up"); /* reusing string */ } exiting: remove_pidfile(pidfile_name); bb_error_msg_and_die("exiting"); }
{ "content_hash": "a82640ba4e99aa0e6906f748160d702d", "timestamp": "", "source": "github", "line_count": 775, "max_line_length": 111, "avg_line_length": 26.738064516129032, "alnum_prop": 0.645980117749252, "repo_name": "deathslocus/jor1k-sysroot", "id": "4f8a274b0afde8ed45d6b54e13914c1c390e3dc1", "size": "20722", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "fs/home/admin/busybox-1.26.0/networking/ifplugd.c", "mode": "33188", "license": "mit", "language": [ { "name": "Awk", "bytes": "941" }, { "name": "C", "bytes": "7558716" }, { "name": "C++", "bytes": "111729" }, { "name": "HTML", "bytes": "153452" }, { "name": "Lex", "bytes": "6389" }, { "name": "Logos", "bytes": "8558" }, { "name": "M4", "bytes": "116840" }, { "name": "Makefile", "bytes": "67992" }, { "name": "Objective-C", "bytes": "604" }, { "name": "Perl", "bytes": "275795" }, { "name": "Python", "bytes": "267971" }, { "name": "Ruby", "bytes": "678737" }, { "name": "Shell", "bytes": "472727" }, { "name": "Tcl", "bytes": "18233" }, { "name": "VimL", "bytes": "154154" }, { "name": "XC", "bytes": "8205" }, { "name": "XS", "bytes": "8065" }, { "name": "Yacc", "bytes": "14198" } ], "symlink_target": "" }
#include <pcl/features/multiscale_feature_persistence.h> #include <pcl/features/impl/multiscale_feature_persistence.hpp> #include <pcl/point_types.h> #include <pcl/impl/instantiate.hpp> // Instantiations of specific point types #ifdef PCL_ONLY_CORE_POINT_TYPES PCL_INSTANTIATE_PRODUCT(MultiscaleFeaturePersistence, ((pcl::PointXYZ)(pcl::PointXYZRGBA))((pcl::FPFHSignature33))) #else PCL_INSTANTIATE_PRODUCT(MultiscaleFeaturePersistence, (PCL_XYZ_POINT_TYPES)(PCL_FEATURE_POINT_TYPES)) #endif
{ "content_hash": "4530dcaba0464d3ff5019cf60e6c50a0", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 117, "avg_line_length": 33.4, "alnum_prop": 0.7904191616766467, "repo_name": "kalectro/pcl_groovy", "id": "71588736c478c64f44d7141c2e96d21fc8127d16", "size": "2292", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "features/src/multiscale_feature_persistence.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "2285014" }, { "name": "C++", "bytes": "25366000" }, { "name": "Java", "bytes": "269016" }, { "name": "Objective-C", "bytes": "159918" }, { "name": "Perl", "bytes": "263" }, { "name": "Python", "bytes": "16004" }, { "name": "Shell", "bytes": "24173" } ], "symlink_target": "" }
"The protodown app module" from bootstrap.build import Arguments def init(arguments): return "Initialized empty repository" def config(arguments): print(arguments) if(arguments.option=='help'): return 'display config help' else: s = Template("setting $option to $value") return s.substitute(option=arguments.option,value=arguments.value) def lookup(arguments): return "lookup tests" def resolve(arguments): return "Looking for UC0..." def generate(arguments): return "Generating prototype..." def run(arguments): return "Starting application..." class Protodown(object): """generate prototypes from markdown""" def __init__(self): super(Protodown, self).__init__() self.arguments=Arguments() #This should be in the kernel. self.arguments['config'].set_defaults(func=config); self.arguments['resolve'].set_defaults(func=resolve); self.arguments['generate'].set_defaults(func=generate); self.arguments['run'].set_defaults(func=run); self.arguments['lookup'].set_defaults(func=lookup); self.args=self.arguments.get_args() def print_help(self): self.arguments.print_help() #group = parser.add_argument_group('Available protodown commands') #group.add_argument('init', help="Create an empty Protodown repository or reinitialize an existing one") #group.add_argument('config', help="Configure your protodown repository") #group.add_argument('resolve', help="Find solutions for your prototype") #group.add_argument('generate', help="Let the magic happen") #group.add_argument('run', help="Start your prototype")
{ "content_hash": "a54b647111da518d8bff3e06d480b1cc", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 104, "avg_line_length": 33.28, "alnum_prop": 0.6947115384615384, "repo_name": "tweakch/protodown", "id": "331fc0d24c8cc019e09c4e931ebfc2ceac140321", "size": "1687", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "bootstrap/app.py", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "802" }, { "name": "Java", "bytes": "109" }, { "name": "Python", "bytes": "5422" } ], "symlink_target": "" }
using System; using System.Windows.Forms; namespace Kelompok1 { public partial class FormObat : Form { Obat obat; private string id_obat; bool update; public FormObat() { InitializeComponent(); obat = new Obat(); textBoxNObat.Focus(); } public FormObat(object[] data) { InitializeComponent(); obat = new Obat(); id_obat = data[0].ToString(); textBoxNObat.Text = data[1].ToString(); comboBoxJObat.Text = data[2].ToString(); update = true; labelJudul.Text = "Ubah Obat"; this.Text = "Ubah Obat"; } private void buttonSimpan_Click(object sender, EventArgs e) { try { if (textBoxNObat.Text == "") { TampilanPesan.Warning("Nama obat harus diisi."); textBoxNObat.Focus(); } else if (comboBoxJObat.Text == "") { TampilanPesan.Warning("Jenis obat harus diisi."); comboBoxJObat.Focus(); } else { obat.nama_obat = textBoxNObat.Text; obat.jenis_obat = comboBoxJObat.Text; int res; if (update) { obat.id_obat = Convert.ToInt32(id_obat); res = obat.UpdateObat(); } else { res = obat.InsertObat(); } if (res == 1) { this.Close(); this.DialogResult = DialogResult.OK; } } } catch (Exception err) { TampilanPesan.Error(err.ToString()); } } } }
{ "content_hash": "8a833a20b352a713c6a6526f000ab72c", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 69, "avg_line_length": 27.710526315789473, "alnum_prop": 0.3803418803418803, "repo_name": "qwildz/klinik_gui", "id": "bec17b2a9c57d0c7a4454fa2ab48df4df8a73c59", "size": "2108", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Kelompok1/View/Obat/FormObat.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "92903" } ], "symlink_target": "" }
// Copyright (c) 2011-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "walletmodel.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include <QApplication> #include <QClipboard> SendCoinsEntry::SendCoinsEntry(QWidget *parent) : QFrame(parent), ui(new Ui::SendCoinsEntry), model(0) { ui->setupUi(this); #ifdef Q_OS_MAC ui->payToLayout->setSpacing(4); #endif #if QT_VERSION >= 0x040700 /* Do not move this to the XML file, Qt before 4.7 will choke on it */ ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); ui->payTo->setPlaceholderText(tr("Enter a AmsterdamCoin address (e.g. AMem7wACp4fNJqRwU5dASpESLayDCCLWTJ)")); #endif setFocusPolicy(Qt::TabFocus); setFocusProxy(ui->payTo); GUIUtil::setupAddressWidget(ui->payTo, this); } SendCoinsEntry::~SendCoinsEntry() { delete ui; } void SendCoinsEntry::on_pasteButton_clicked() { // Paste text from clipboard into recipient field ui->payTo->setText(QApplication::clipboard()->text()); } void SendCoinsEntry::on_addressBookButton_clicked() { if(!model) return; AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); dlg.setModel(model->getAddressTableModel()); if(dlg.exec()) { ui->payTo->setText(dlg.getReturnValue()); ui->payAmount->setFocus(); } } void SendCoinsEntry::on_payTo_textChanged(const QString &address) { if(!model) return; // Fill in label from address book, if address has an associated label QString associatedLabel = model->getAddressTableModel()->labelForAddress(address); if(!associatedLabel.isEmpty()) ui->addAsLabel->setText(associatedLabel); } void SendCoinsEntry::setModel(WalletModel *model) { this->model = model; if(model && model->getOptionsModel()) connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged())); clear(); } void SendCoinsEntry::setRemoveEnabled(bool enabled) { ui->deleteButton->setEnabled(enabled); } void SendCoinsEntry::clear() { ui->payTo->clear(); ui->addAsLabel->clear(); ui->payAmount->clear(); ui->payTo->setFocus(); // update the display unit, to not use the default ("BTC") updateDisplayUnit(); } void SendCoinsEntry::on_deleteButton_clicked() { emit removeEntry(this); } bool SendCoinsEntry::validate() { // Check input validity bool retval = true; if(!ui->payAmount->validate()) { retval = false; } else { if(ui->payAmount->value() <= 0) { // Cannot send 0 coins or less ui->payAmount->setValid(false); retval = false; } } if(!ui->payTo->hasAcceptableInput() || (model && !model->validateAddress(ui->payTo->text()))) { ui->payTo->setValid(false); retval = false; } return retval; } SendCoinsRecipient SendCoinsEntry::getValue() { SendCoinsRecipient rv; rv.address = ui->payTo->text(); rv.label = ui->addAsLabel->text(); rv.amount = ui->payAmount->value(); return rv; } QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, ui->payTo); QWidget::setTabOrder(ui->payTo, ui->addressBookButton); QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); return ui->payAmount->setupTabChain(ui->addAsLabel); } void SendCoinsEntry::setValue(const SendCoinsRecipient &value) { ui->payTo->setText(value.address); ui->addAsLabel->setText(value.label); ui->payAmount->setValue(value.amount); } void SendCoinsEntry::setAddress(const QString &address) { ui->payTo->setText(address); ui->payAmount->setFocus(); } bool SendCoinsEntry::isClear() { return ui->payTo->text().isEmpty(); } void SendCoinsEntry::setFocus() { ui->payTo->setFocus(); } void SendCoinsEntry::updateDisplayUnit() { if(model && model->getOptionsModel()) { // Update payAmount with the current unit ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); } }
{ "content_hash": "f3cea8b92bd42a58efe77e84c36a6fb1", "timestamp": "", "source": "github", "line_count": 185, "max_line_length": 113, "avg_line_length": 24.978378378378377, "alnum_prop": 0.6749621294092187, "repo_name": "Bitspender/h4", "id": "357330b0fe4f2d6b0dbe8c16a15c7346886c9a66", "size": "4621", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/qt/sendcoinsentry.cpp", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "32790" }, { "name": "C++", "bytes": "2612179" }, { "name": "CSS", "bytes": "1127" }, { "name": "Groff", "bytes": "18289" }, { "name": "HTML", "bytes": "50615" }, { "name": "Makefile", "bytes": "13419" }, { "name": "NSIS", "bytes": "6074" }, { "name": "Objective-C", "bytes": "1052" }, { "name": "Objective-C++", "bytes": "5864" }, { "name": "Python", "bytes": "69746" }, { "name": "QMake", "bytes": "15251" }, { "name": "Shell", "bytes": "13173" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>graph-basics: 29 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.7.1+1 / graph-basics - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> graph-basics <small> 8.7.0 <span class="label label-success">29 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-10-25 21:58:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-10-25 21:58:08 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.7.1+1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.5 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/graph-basics&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/GraphBasics&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: graph theory&quot; &quot;keyword: Curry-Howard&#39;s isomorphism&quot; &quot;keyword: inductive definitions&quot; &quot;category: Mathematics/Combinatorics and Graph Theory&quot; &quot;date: April 2001&quot; ] authors: [ &quot;Jean Duprat&quot; ] bug-reports: &quot;https://github.com/coq-contribs/graph-basics/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/graph-basics.git&quot; synopsis: &quot;A Coq toolkit for graph theory&quot; description: &quot;&quot;&quot; This library offers inductive definitions of basics in graph theory. The goal is to offer the possibility to write proofs and programs on graphs in the same formalism : the Coq language. It now contains : vertices, arcs, edges, degrees, graphs, directed graphs, paths, acyclic graphs, connected graphs and tree.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/graph-basics/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=b0766caf69228e485bd2445c748eff1e&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-graph-basics.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-graph-basics.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>11 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-graph-basics.8.7.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>29 s</dd> </dl> <h2>Installation size</h2> <p>Total: 1 M</p> <ul> <li>104 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Paths.vo</code></li> <li>66 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Paths.glob</code></li> <li>61 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Sets.vo</code></li> <li>60 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Graphs.vo</code></li> <li>56 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Connected.vo</code></li> <li>55 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Edges.vo</code></li> <li>55 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Degrees.vo</code></li> <li>48 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Arcs.vo</code></li> <li>46 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Vertices.vo</code></li> <li>45 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Acyclic.vo</code></li> <li>43 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Connected.glob</code></li> <li>38 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Dipaths.vo</code></li> <li>37 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Digraphs.vo</code></li> <li>37 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Trees.vo</code></li> <li>35 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Graphs.glob</code></li> <li>31 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Sets.glob</code></li> <li>30 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Enumerated.vo</code></li> <li>26 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Edges.glob</code></li> <li>24 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Degrees.glob</code></li> <li>20 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Paths.v</code></li> <li>17 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Acyclic.glob</code></li> <li>15 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Connected.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Digraphs.glob</code></li> <li>13 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Graphs.v</code></li> <li>12 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Sets.v</code></li> <li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Degrees.v</code></li> <li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Dipaths.glob</code></li> <li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Arcs.glob</code></li> <li>10 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Trees.glob</code></li> <li>9 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Vertices.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Edges.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Acyclic.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Digraphs.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Arcs.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Vertices.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Enumerated.glob</code></li> <li>4 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Trees.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Dipaths.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/GraphBasics/Enumerated.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-graph-basics.8.7.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{ "content_hash": "a53ea2b9829b89325902561d2b391681", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 232, "avg_line_length": 56.618811881188115, "alnum_prop": 0.5798723441461922, "repo_name": "coq-bench/coq-bench.github.io", "id": "0d72510d49d9221918f3392c4b685418dbc44d04", "size": "11462", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "clean/Linux-x86_64-4.07.1-2.0.6/released/8.7.1+1/graph-basics/8.7.0.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
Testing jekyll static content generator. *** [My simple blog](http://inik.tk)
{ "content_hash": "fa91664879d06e7520652e7ddc5bbe48", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 40, "avg_line_length": 26, "alnum_prop": 0.7307692307692307, "repo_name": "nikonorovi/nikonorovi.github.io", "id": "43141052c529ba48034c28024d040e3063df76a3", "size": "78", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "528863" }, { "name": "HTML", "bytes": "28357" }, { "name": "JavaScript", "bytes": "70091" } ], "symlink_target": "" }
// Vaca - Visual Application Components Abstraction // Copyright (c) 2005-2010 David Capello // // This file is distributed under the terms of the MIT license, // please read LICENSE.txt for more information. #ifndef VACA_COMMONDIALOG_H #define VACA_COMMONDIALOG_H #include "vaca/base.h" #include "vaca/Component.h" #include <commdlg.h> namespace vaca { /** Base class for common dialogs. */ class VACA_DLL CommonDialog : public Component { Widget* m_parent; public: CommonDialog(Widget* parent); virtual ~CommonDialog(); Widget* getParent(); HWND getParentHandle(); virtual bool doModal() = 0; }; } // namespace vaca #endif // VACA_COMMONDIALOG_H
{ "content_hash": "fda15b80bd05cee3b66f9b1a6067297d", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 63, "avg_line_length": 18.763157894736842, "alnum_prop": 0.6788218793828892, "repo_name": "dacap/vaca", "id": "e7a0631f179d5e029fedbae26c73fd881966b3c5", "size": "713", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "vaca/CommonDialog.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "58709" }, { "name": "C++", "bytes": "904490" }, { "name": "CMake", "bytes": "7882" } ], "symlink_target": "" }
<html><img border=0 src=7227-91-0.txt alt=7227-91-0.txt></img><body> "x" "1" "HELMA, C, CRAMER, T, KRAMER, S, AND DE RAEDT, L, DATA MINING AND MACHINE LEARNING TECHNIQUES FOR THE IDENTIFICATION OF MUTAGENICITY INDUCING SUBSTRUCTURES AND STRUCTURE ACTIVITY RELATIONSHIPS OF NONCO __ NGENERIC COMPOUNDS. J. CHEM. INF. COMPUT. SCI. 44: 1402-1411, 2004" </body></html>
{ "content_hash": "99e789aaafd8bceb593b1795b20c1469", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 276, "avg_line_length": 91.25, "alnum_prop": 0.736986301369863, "repo_name": "andrewdefries/Ames_ToxBenchmark", "id": "f61a1ef40f2b7ea0090614a8256538c18e1cf802", "size": "365", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "7227-91-0.txt.html", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
/** * * TypeFlag * */ import React, {PropTypes} from 'react'; import styled from 'styled-components'; import { getToolTypeColor } from 'components/CommonComponents'; import Isvg from 'react-inlinesvg'; import MethodologyFlag from 'assets/images/flag/methodology.svg'; import PrincipleFlag from 'assets/images/flag/principle.svg'; import TacticFlag from 'assets/images/flag/tactic.svg'; import TheoryFlag from 'assets/images/flag/theory.svg'; import { injectIntl } from 'react-intl'; import TypeFlagTooltip from 'components/TypeFlagTooltip'; import BigMethodologyFlag from 'assets/images/flag/big-methodology.svg'; import BigPrincipleFlag from 'assets/images/flag/big-principle.svg'; import BigTacticFlag from 'assets/images/flag/big-tactic.svg'; import BigTheoryFlag from 'assets/images/flag/big-theory.svg'; const FlagContainer = styled.div` position: absolute; ${props=>props.lang === 'ar' ? 'right' : 'left'}: -200px; top: 125px; svg circle, svg line, svg polyline { stroke: ${props=>getToolTypeColor(props.type)}; } `; const FlagViewport = styled.div` position: relative; width: 264px; height: 182px; overflow: hidden; `; const Flag = styled(Isvg)` position: absolute; display: ${props=>props.show?'block':'none'}; `; export class TypeFlag extends React.PureComponent { constructor(props) { super(props); this.state = { showTooltip: false } } handleMouseOver() { this.setState({ showTooltip: true }); } handleMouseOut() { this.setState({ showTooltip: false }); } render() { //iF there's only one truth here, we show big flag. const oneTruth = [this.props.isTactic, this.props.isMethodology, this.props.isPrinciple, this.props.isTheory].filter(item=>item).length == 1; const truths = [ {name: 'tactic', show: this.props.isTactic}, {name: 'methodology', show: this.props.isMethodology}, {name: 'principle', show: this.props.isPrinciple}, {name: 'theory', show:this.props.isTheory} ]; return ( <FlagContainer lang={this.props.intl.locale} type={this.props.type} onMouseOver={this.handleMouseOver.bind(this)} onMouseOut={this.handleMouseOut.bind(this)}> <TypeFlagTooltip type={this.props.type} truths={truths} show={this.state.showTooltip} /> <FlagViewport> <Flag show={this.props.isTactic} src={oneTruth ? BigTacticFlag : TacticFlag} /> <Flag show={this.props.isMethodology} src={oneTruth ? BigMethodologyFlag : MethodologyFlag} /> <Flag show={this.props.isPrinciple} src={oneTruth ? BigPrincipleFlag : PrincipleFlag} /> <Flag show={this.props.isTheory} src={oneTruth ? BigTheoryFlag : TheoryFlag} /> </FlagViewport> </FlagContainer> ); } } TypeFlag.propTypes = { type: PropTypes.string.isRequired, isMethodology: PropTypes.bool, isPrinciple: PropTypes.bool, isTactic: PropTypes.bool, isTheory: PropTypes.bool }; export default injectIntl(TypeFlag);
{ "content_hash": "4374a6f3d1bf2be3d286d8277e47be2a", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 164, "avg_line_length": 31.585106382978722, "alnum_prop": 0.7005725833614012, "repo_name": "rapicastillo/beautifulrising-client", "id": "a87c0fcd0c82676f99afc02ed183be4d60a300b4", "size": "2969", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "app/components/TypeFlag/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "1787" }, { "name": "HTML", "bytes": "10212" }, { "name": "JavaScript", "bytes": "506188" } ], "symlink_target": "" }
<Macro name="GoogleMap"> <Param name="id" type="id"/> <Param name="backgroundColor" type="string" default="#FFF"/> <Param name="latitude" type="number" default="0"/> <Param name="longitude" type="number" default="0"/> <Param name="zoom" type="number" default="1"/> <Param name="text" type="string"/> <Param name="autoshow" type="bool" default="yes"/> <Param name="showMarker" type="bool" default="no"/> <Param name="draggableMarker" type="bool" default="no"/> <Param name="draggable" type="bool" default="true"/> <Param name="sensor" type="bool" default="false"/> <Param name="language" type="id" default="en"/> <Param name="region" type="string"/> <Script name="gmap"> var mapsOnPage = []; function loadMap (args) { var myLatlng = new google.maps.LatLng (args.latitude, args.longitude); var myOptions = { zoom: args.zoom, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP, draggable: args.draggable, zoomControl: true, backgroundColor: args.backgroundColor }; var map = window[args.id + 'Obj'] = new google.maps.Map (document.getElementById (args.id), myOptions); if (args.showMarker) { var marker = window[args.id + 'Marker'] = new google.maps.Marker ({ draggable: args.draggableMarker, map: map, position: myLatlng, title: args.text }); } } function googleMapsInit (deferredInit) { var t = deferredInit !== true; for (var n = 0; n < mapsOnPage.length; ++n) if (mapsOnPage[n].autoshow == t) loadMap (mapsOnPage[n]); if (t && exists ('mapReady')) mapReady (); } </Script> <Script> mapsOnPage.push ({ id: '{@id}', autoshow: {@autoshow}, backgroundColor: '{@backgroundColor}', latitude: number ('{@latitude}', 0), longitude: number ('{@longitude}', 0), zoom: number ('{@zoom}', 1), text: '{@text}', showMarker: {@showMarker}, draggableMarker: {@draggableMarker}, draggable: {@draggable} }); if (mapsOnPage.length == 1) listen ('onLoad', function () { loadScript ('http://maps.googleapis.com/maps/api/js?sensor={@sensor}&language={@language}&region={@region}&callback=googleMapsInit'); }); </Script> <div id={@id} style="height:100%"></div> </Macro>
{ "content_hash": "ecebbafca0fededf415edcfbcefbd8ac", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 141, "avg_line_length": 35.91428571428571, "alnum_prop": 0.5668257756563246, "repo_name": "selenia-plugins/matisse-widgets", "id": "67be0377e206f07a9acdd3ebf3a463fdb7dfbdf9", "size": "2514", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "resources/views/macros/GoogleMap.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "19405" }, { "name": "HTML", "bytes": "8874" }, { "name": "JavaScript", "bytes": "5583" }, { "name": "PHP", "bytes": "101831" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0-adoptopenjdk) on Tue Aug 07 14:38:45 CEST 2018 --> <title>MetadataVisitor (doov-core 2.1.0 API)</title> <meta name="date" content="2018-08-07"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="MetadataVisitor (doov-core 2.1.0 API)"; } } catch(err) { } //--> var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":6,"i13":6,"i14":6,"i15":6,"i16":6,"i17":6,"i18":6,"i19":6,"i20":6,"i21":6,"i22":6,"i23":6,"i24":6}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../io/doov/core/dsl/meta/MetadataType.html" title="enum in io.doov.core.dsl.meta"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?io/doov/core/dsl/meta/MetadataVisitor.html" target="_top">Frames</a></li> <li><a href="MetadataVisitor.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">io.doov.core.dsl.meta</div> <h2 title="Interface MetadataVisitor" class="title">Interface MetadataVisitor</h2> </div> <div class="contentContainer"> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Known Implementing Classes:</dt> <dd><a href="../../../../../io/doov/core/dsl/meta/ast/AbstractAstVisitor.html" title="class in io.doov.core.dsl.meta.ast">AbstractAstVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstFullVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstFullVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstHtmlVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstHtmlVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstLinePercentVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstLinePercentVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstLineVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstLineVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstMarkdownVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstMarkdownVisitor</a>, <a href="../../../../../io/doov/core/dsl/meta/ast/AstTextVisitor.html" title="class in io.doov.core.dsl.meta.ast">AstTextVisitor</a></dd> </dl> <hr> <br> <pre>public interface <span class="typeNameLabel">MetadataVisitor</span></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.BinaryMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.ConverterMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.LeafMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.MappingMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.NaryMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.lang.StepWhen-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.meta.UnaryMetadata-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/meta/UnaryMetadata.html" title="class in io.doov.core.dsl.meta">UnaryMetadata</a>&nbsp;unaryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#end-io.doov.core.dsl.lang.ValidationRule-int-">end</a></span>(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.meta.BinaryMetadata-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.meta.ConverterMetadata-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.meta.LeafMetadata-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i11" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.meta.MappingMetadata-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i12" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.meta.NaryMetadata-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i13" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.lang.StepWhen-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i14" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#start-io.doov.core.dsl.lang.ValidationRule-int-">start</a></span>(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i15" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.BinaryMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i16" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.ConverterMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i17" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.LeafMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i18" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.MappingMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i19" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.Metadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/Metadata.html" title="interface in io.doov.core.dsl.meta">Metadata</a>&nbsp;metadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i20" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.NaryMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i21" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.lang.StepCondition-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/lang/StepCondition.html" title="interface in io.doov.core.dsl.lang">StepCondition</a>&nbsp;stepCondition, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i22" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.lang.StepWhen-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i23" class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.meta.UnaryMetadata-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/meta/UnaryMetadata.html" title="class in io.doov.core.dsl.meta">UnaryMetadata</a>&nbsp;unaryMetadata, int&nbsp;depth)</code>&nbsp;</td> </tr> <tr id="i24" class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../io/doov/core/dsl/meta/MetadataVisitor.html#visit-io.doov.core.dsl.lang.ValidationRule-int-">visit</a></span>(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</code>&nbsp;</td> </tr> </table> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="visit-io.doov.core.dsl.meta.Metadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/Metadata.html" title="interface in io.doov.core.dsl.meta">Metadata</a>&nbsp;metadata, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.meta.LeafMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.LeafMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.LeafMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/LeafMetadata.html" title="class in io.doov.core.dsl.meta">LeafMetadata</a>&nbsp;fieldMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.UnaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/UnaryMetadata.html" title="class in io.doov.core.dsl.meta">UnaryMetadata</a>&nbsp;unaryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.UnaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/UnaryMetadata.html" title="class in io.doov.core.dsl.meta">UnaryMetadata</a>&nbsp;unaryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.meta.BinaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.BinaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.BinaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/BinaryMetadata.html" title="class in io.doov.core.dsl.meta">BinaryMetadata</a>&nbsp;binaryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.meta.NaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.NaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.NaryMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta">NaryMetadata</a>&nbsp;naryMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.lang.ValidationRule-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.lang.ValidationRule-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.lang.ValidationRule-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/lang/ValidationRule.html" title="interface in io.doov.core.dsl.lang">ValidationRule</a>&nbsp;validationRule, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.lang.StepWhen-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.lang.StepWhen-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.lang.StepWhen-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/lang/StepWhen.html" title="interface in io.doov.core.dsl.lang">StepWhen</a>&nbsp;stepWhen, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.lang.StepCondition-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/lang/StepCondition.html" title="interface in io.doov.core.dsl.lang">StepCondition</a>&nbsp;stepCondition, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.meta.MappingMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.MappingMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.MappingMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/MappingMetadata.html" title="class in io.doov.core.dsl.meta">MappingMetadata</a>&nbsp;mappingMetadata, int&nbsp;depth)</pre> </li> </ul> <a name="end-io.doov.core.dsl.meta.ConverterMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>end</h4> <pre>void&nbsp;end(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</pre> </li> </ul> <a name="visit-io.doov.core.dsl.meta.ConverterMetadata-int-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>visit</h4> <pre>void&nbsp;visit(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</pre> </li> </ul> <a name="start-io.doov.core.dsl.meta.ConverterMetadata-int-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>start</h4> <pre>void&nbsp;start(<a href="../../../../../io/doov/core/dsl/meta/ConverterMetadata.html" title="class in io.doov.core.dsl.meta">ConverterMetadata</a>&nbsp;metadata, int&nbsp;depth)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-all.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../io/doov/core/dsl/meta/MetadataType.html" title="enum in io.doov.core.dsl.meta"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../../io/doov/core/dsl/meta/NaryMetadata.html" title="class in io.doov.core.dsl.meta"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?io/doov/core/dsl/meta/MetadataVisitor.html" target="_top">Frames</a></li> <li><a href="MetadataVisitor.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "ffdebaf37b5532126d9570b5c6e47d79", "timestamp": "", "source": "github", "line_count": 585, "max_line_length": 975, "avg_line_length": 47.817094017094014, "alnum_prop": 0.6451220820076502, "repo_name": "lesfurets/dOOv", "id": "11a26849365ec1926bbdf4f7ffa739c47f1f87c4", "size": "27973", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/site/core/apidocs/io/doov/core/dsl/meta/MetadataVisitor.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2067" }, { "name": "Groovy", "bytes": "5190" }, { "name": "Java", "bytes": "539255" } ], "symlink_target": "" }
<?php # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/compute/v1/compute.proto namespace Google\Cloud\Compute\V1\SSLHealthCheck; use UnexpectedValueException; /** * Specifies the type of proxy header to append before sending data to the backend, either NONE or PROXY_V1. The default is NONE. * * Protobuf type <code>google.cloud.compute.v1.SSLHealthCheck.ProxyHeader</code> */ class ProxyHeader { /** * A value indicating that the enum field is not set. * * Generated from protobuf enum <code>UNDEFINED_PROXY_HEADER = 0;</code> */ const UNDEFINED_PROXY_HEADER = 0; /** * Generated from protobuf enum <code>NONE = 2402104;</code> */ const NONE = 2402104; /** * Generated from protobuf enum <code>PROXY_V1 = 334352940;</code> */ const PROXY_V1 = 334352940; private static $valueToName = [ self::UNDEFINED_PROXY_HEADER => 'UNDEFINED_PROXY_HEADER', self::NONE => 'NONE', self::PROXY_V1 => 'PROXY_V1', ]; public static function name($value) { if (!isset(self::$valueToName[$value])) { throw new UnexpectedValueException(sprintf( 'Enum %s has no name defined for value %s', __CLASS__, $value)); } return self::$valueToName[$value]; } public static function value($name) { $const = __CLASS__ . '::' . strtoupper($name); if (!defined($const)) { throw new UnexpectedValueException(sprintf( 'Enum %s has no value defined for name %s', __CLASS__, $name)); } return constant($const); } }
{ "content_hash": "1ab6ebf54419d21f20e8ab7666a44a16", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 129, "avg_line_length": 28.67241379310345, "alnum_prop": 0.607937462417318, "repo_name": "googleapis/google-cloud-php", "id": "f5c32ed2662bf9d7f80101cdec94f335fbf64cfc", "size": "1663", "binary": false, "copies": "3", "ref": "refs/heads/main", "path": "Compute/src/V1/SSLHealthCheck/ProxyHeader.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "3333" }, { "name": "PHP", "bytes": "47981731" }, { "name": "Python", "bytes": "413107" }, { "name": "Shell", "bytes": "8171" } ], "symlink_target": "" }
Title: A Year of commits Date: 2014-10-03 Tags: git Category: code Slug: git-commits Author: Zunayed Morsalin Summary: One year of commits I was on my github page and realized I had joined the site exactly 1 year ago today. It's fun taking a look through memory lane and looking at the projects I use to work on. <img class="align-center" width="960" src="/images/github_screenshot.png" />
{ "content_hash": "d84423254a4b1c64409e53aa8ab4f56d", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 173, "avg_line_length": 35.63636363636363, "alnum_prop": 0.7602040816326531, "repo_name": "zunayed/blag", "id": "eb6a6c2866d24d33965146ed31cbca36d7014cf0", "size": "392", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "content/posts/2014-10-03 year-of-github.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "73266" }, { "name": "HTML", "bytes": "7646" }, { "name": "Makefile", "bytes": "2232" }, { "name": "Python", "bytes": "14969" }, { "name": "Shell", "bytes": "1775" } ], "symlink_target": "" }
<?php namespace EPManager\MainBundle\Repository; use Doctrine\ORM\EntityRepository; /** * Execution repository * * @author Julien Brochet <julien.brochet@orange.com> */ class ExecutionRepository extends EntityRepository { /** * Finds entities by id * * @param integer $id * * @return array The entities */ public function findByIdJoin($id) { return $this->getEntityManager() ->createQueryBuilder() ->select(['e','se','t','s','srv','g']) ->from('MainBundle:Execution', 'e') ->join('e.task', 't') ->join('t.script', 's') ->leftJoin('t.server', 'srv') ->leftJoin('t.group', 'g') ->leftJoin('e.subExecutions', 'se') ->where('e.id = :id') ->setParameter('id', $id) ->getQuery() ->getOneOrNullResult() ; } /** * Finds the latest executions * * @param string $limit The number of execution * * @return array */ public function findLatest($limit = 5) { return $this->getEntityManager() ->createQueryBuilder() ->select(['e']) ->from('MainBundle:Execution', 'e') ->orderBy('e.id', 'desc') ->getQuery() ->setMaxResults($limit) ->execute(); ; } /** * Finds all execution ordered by a column * * @return Query */ public function findAllOrderedQuery() { return $this->getEntityManager() ->createQueryBuilder() ->select(['e','t']) ->from('MainBundle:Execution', 'e') ->join('e.task', 't') ->orderBy('e.created', 'desc') ->getQuery() ; } }
{ "content_hash": "f4ad05ca7b5279d8606b4ec6c99d9afb", "timestamp": "", "source": "github", "line_count": 77, "max_line_length": 53, "avg_line_length": 23.83116883116883, "alnum_prop": 0.4828337874659401, "repo_name": "aerialls/EPManager", "id": "379eba39f8437a7713dc12f4b624c1a35b6771bf", "size": "2076", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/EPManager/MainBundle/Repository/ExecutionRepository.php", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "177693" }, { "name": "JavaScript", "bytes": "6334581" }, { "name": "PHP", "bytes": "292644" }, { "name": "Perl", "bytes": "2643" } ], "symlink_target": "" }
EasyRTC Server: Installation ============================ Ubuntu EasyRTC Install Steps: ---------------------------- 1. Install Node.js - `sudo apt-get install python-software-properties` - `sudo add-apt-repository ppa:chris-lea/node.js` - `sudo apt-get update` - `sudo apt-get install nodejs` 2. Create folder hold the EasyRTC application - ex: `sudo mkdir /var/nodes` - ex: `sudo mkdir /var/nodes/easyrtc` 3. Security Considerations (not going into specifics) - Create user for node.js (or use existing web user) - chown the nodes folder to be owned by this user - ensure the node is run as that user. 4. Download files from the [server_example folder](../server_example/) into your EasyRTC application folder. - OR [download and extract this .zip](http://easyrtc.com/files/easyrtc_server_example.zip) 5. Change to the easyrtc folder and then install node modules locally - `cd /var/nodes/easyrtc` - `sudo npm install` Windows EasyRTC Install Steps: ------------------------------ 1. Install Node.js - Go to [http://nodejs.org](http://nodejs.org) - Click 'Install' to download the .msi file - Run the Node.js installer 2. Create an EasyRTC application folder. - Note: Node is defaulted to browse to `%HOMEDRIVE%%HOMEPATH%` - ex: `C:\Users\USERNAME\nodes\easyrtc` 3. Download files from the [server_example folder](../server_example/) into your EasyRTC application folder. - OR [download and extract this .zip](http://easyrtc.com/files/easyrtc_server_example.zip) 4. In the start menu, launch the Node.js command prompt 5. Navigate to the easyrtc folder. There should be a server.js and package.json file. - ex: `cd C:\Users\USERNAME\nodes\easyrtc` 6. Run the node package manager to download dependencies. This will create a new folder called node_modules - `npm install` Mac EasyRTC Install Steps: -------------------------- 1. Install Node.js - Go to [http://nodejs.org](http://nodejs.org) - Click 'Install' to download the .pkg file - In the finder double-click on the pkg file to start the install - By default node.js will be installed in /usr/local/bin/node and npm will be installed in /usr/local/bin/npm - Make sure /usr/local/bin is in your $PATH variable (echo $PATH) 2. Download files from the [server_example folder](../server_example/) into a folder of your choice. - OR [download and extract this .zip](http://easyrtc.com/files/easyrtc_server_example.zip) - ex: `/Users/USERNAME/nodes/easyrtc` 3. Open a terminal window by double-clicking on Terminal within the Applications/Utilities directory in finder 4. Navigate to the easyrtc folder. There should be a server.js and package.json file. - ex: `cd /Users/USERNAME/nodes/easyrtc` 5. Run the node package manager to download dependencies. This will create a new folder called node_modules - `npm install` Git Install Steps: ------------------ For EasyRTC maintainers or those wishing to test the newer beta release, [a Git client](http://git-scm.com/) can be used to download EasyRTC directly from [our Github repository](github.com/priologic/easyrtc). Afterwards, EasyRTC can be updated using standard Git commands. 1. Follow install instructions for your OS 2. Delete the `easyrtc` folder from `/node_modules/` 3. From `/node_modules/` clone the EasyRTC repo - `git clone https://github.com/priologic/easyrtc.git` - `git clone -b beta https://github.com/priologic/easyrtc.git` 4. In the console, enter the `/node_modules/easyrtc/` folder - `cd easyrtc` 5. Install EasyRTC dependencies from NPM - `npm install` Running EasyRTC Server ====================== From Console ------------ Running the server from the console may be the best approach for development. It allows easy access to console messages which can alert you to problems and status. 1. Open your console on the server. - In Windows you can use the provided Node.js console program located in the Start Menu. 2. Navigate to your EasyRTC application folder 3. Run the server using the node command. - `node server.js` Running EasyRTC as a Service in Ubuntu -------------------------------------- Below is a small upstart script which can be saved as /etc/init/easyrtc.conf description "EasyRTC Node.js server" author "Priologic Software Inc." # Saves log to /var/log/upstart/easyrtc.log console log # Starts only after drives are mounted. start on started mountall stop on shutdown # Automatically Respawn. But fail permanently if it respawns 10 times in 5 seconds: respawn respawn limit 10 5 script # Note: To run as a non root user, use exec sudo -u USERNAME node /var/nodes/easyrtc/server.js exec /usr/bin/node /var/nodes/easyrtc/server.js end script This will start EasyRTC at boot and allow you to start and stop the service in the console using the following: sudo start easyrtc sudo stop easyrtc There are improvements which can be made such as increasing the open file limit, running the service as a non-root user, and adding notification commands to let administrators know of problems. Upgrading EasyRTC ----------------- If you are using the packaged version of EasyRTC, upgrading is easy. In the console change to your application directory then enter: npm upgrade Note that you should first check the changelog to see if there are any breaking changes. Your First EasyRTC Server Program ================================= Below is the initial server program which will run an EasyRTC server along with all the demos. This server program is also included within the EasyRTC download. // Load required modules var http = require("http"); // http server core module var express = require("express"); // web framework external module var io = require("socket.io"); // web socket external module var easyrtc = require("easyrtc"); // EasyRTC external module // Start Express http server on port 8080 var webServer = http.createServer(httpApp).listen(8080); // Start Socket.io so it attaches itself to Express server var socketServer = io.listen(webServer); // Start EasyRTC server var easyrtcServer = easyrtc.listen(httpApp, socketServer); Configuring EasyRTC Server ========================== Configuration options are set using the `setOption` function or from the `listen()` function. easyrtc.setOption('OPTION_NAME', 'OPTION_VALUE'); or var easyrtcServer = easyrtc.listen(httpApp, socketServer, {'OPTION1_NAME': 'OPTION1_VALUE', 'OPTION2_NAME': 'OPTION2_VALUE'}) Note that some options can not be set after the `listen()` function has been run. For complete details, read [server_configuration.md](server_configuration.md) Start Browsing! --------------- Browsing EasyRTC should be a snap. If you have installed the server on your desktop machine with the default settings, you can browse to it by going to: - [http://localhost:8080/](http://localhost:8080/) - [http://localhost:8080/demos/](http://localhost:8080/demos/) If the server is located on another computer, you can browse to it by knowing the IP address or domain name: - http://IPADDRESS:PORT/ If You Run Into Problems ------------------------ Please feel free to post on our discussion forum: - [https://groups.google.com/forum/#!forum/easyrtc](https://groups.google.com/forum/#!forum/easyrtc)
{ "content_hash": "3360e6cf7943b0a44c1094f526bb1a77", "timestamp": "", "source": "github", "line_count": 211, "max_line_length": 273, "avg_line_length": 35.535545023696685, "alnum_prop": 0.6971192317951453, "repo_name": "techvn/easyRtc", "id": "ba6bdf0ba19784b20a72bff37be2b43b4932138a", "size": "7498", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/easyrtc_server_install.md", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "CSS", "bytes": "40805" }, { "name": "JavaScript", "bytes": "763701" }, { "name": "Shell", "bytes": "429" } ], "symlink_target": "" }
export enum DragTypeOverMeEnum { InsideEmptyPanel = 1, MultilineRight, MultilineLeft } export interface HashTable<T = any> { } export interface ILocalizableOwner { getLocale(): string; getMarkdownHtml(text: string, name: string): string; getProcessedText(text: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; } export interface ILocalizableString { getLocaleText(loc: string): string; setLocaleText(loc: string, newValue: string): any; getJson(): any; getLocales(): Array<any>; getIsMultiple(): boolean; } export interface IPropertyDecoratorOptions<T = any> { defaultValue?: T; defaultSource?: string; getDefaultValue?: any; localizable?: any; onSet?: any; } export interface IArrayPropertyDecoratorOptions { onPush?: any; onRemove?: any; onSet?: any; } export interface IObject { } export interface IFilePosition { offset: number; line: number; column: number; } export interface IFileRange { start: IFilePosition; end: IFilePosition; } export interface ILiteralExpectation { type: any; text: string; ignoreCase: boolean; } export interface IClassParts extends Array<any> { } export interface IClassExpectation { type: any; parts: IClassParts; inverted: boolean; ignoreCase: boolean; } export interface IAnyExpectation { type: any; } export interface IEndExpectation { type: any; } export interface IOtherExpectation { type: any; description: string; } export interface ICached { nextPos: number; result: any; } export interface IParseOptions { filename?: string; startRule?: string; tracer?: any; } /* * Defines an individual action. Action items can be displayed in certain survey elements - in Toolbar (or action bar), in titles (of pages, panels, questions), in matrix rows (as 'expand details' or 'remove row' buttons), and etc. */ export interface IAction { /* * Unique string id */ id: string; /* * Set this property to false to make the toolbar item invisible. */ visible?: boolean; /* * Toolbar item title */ title?: string; /* * Toolbar item tooltip */ tooltip?: string; /* * Set this property to false to disable the toolbar item. */ enabled?: boolean; /* * Set this property to false to hide the toolbar item title. */ showTitle?: boolean; /* * A callback that calls on toolbar item click. */ action?: any; /* * Toolbar item css class */ css?: string; /* * Toolbar inner element css class */ innerCss?: string; /* * Toolbar item data object. Used as data for custom template or component rendering */ data?: any; popupModel?: any; needSeparator?: boolean; /* * Set this property to true to activate the toolbar item (page) */ active?: boolean; pressed?: boolean; /* * Toolbar item template name */ template?: string; /* * Toolbar item component name */ component?: string; /* * Toolbar item icon name */ iconName?: string; /* * Toolbar item icon size */ iconSize?: number; /* * Toolbar item child items. Can be used as contianer for options */ items?: any; /* * Gets or sets an action's location in a matrix question's row. * * The following options are available: * * - `start` - An action is located at the beginning of a row. * - `end` - An action is located at the end of a row. */ location?: string; /* * Set it to true to make the tabIndex -1 to disable keyboard navigation to this item */ disableTabStop?: boolean; /* * Set it to false to force action "large" mode even if has icon and does not fit to action bar space */ disableShrink?: boolean; /* * Action button display mode */ mode?: "popup" | "large" | "small"; visibleIndex?: number; } export interface IDimensions { scroll: number; offset: number; } export interface IPosition { left?: string | number; top?: string | number; } export interface INumberPosition extends IPosition { left?: number; top?: number; } export interface ISize { width: number; height: number; } export interface ISurveyTriggerOwner { getObjects(pages: any, questions: any): Array<any>; setCompleted(): any; setTriggerValue(name: string, value: any, isVariable: boolean): any; copyTriggerValue(name: string, fromName: string): any; focusQuestion(name: string): boolean; } export interface IConditionObject { name: string; text: string; question: Question; context?: Question; } export interface IMatrixColumnOwner extends ILocalizableOwner { getRequiredText(): string; onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void; onColumnItemValuePropertyChanged(column: MatrixDropdownColumn, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void; onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void; getCellType(): string; getCustomCellType(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, cellType: string): string; onColumnCellTypeChanged(column: MatrixDropdownColumn): void; } export interface IMatrixDropdownData { value: any; onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void; onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any; isValidateOnValueChanging: boolean; getRowIndex(row: MatrixDropdownRowModelBase): number; getRowValue(rowIndex: number): any; checkIfValueInRowDuplicated(checkedRow: MatrixDropdownRowModelBase, cellQuestion: Question): boolean; hasDetailPanel(row: MatrixDropdownRowModelBase): boolean; getIsDetailPanelShowing(row: MatrixDropdownRowModelBase): boolean; setIsDetailPanelShowing(row: MatrixDropdownRowModelBase, val: boolean): void; createRowDetailPanel(row: MatrixDropdownRowModelBase): PanelModel; validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError; columns: any; createQuestion(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; getParentTextProcessor(): ITextProcessor; getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question; onTotalValueChanged(): any; getSurvey(): ISurvey; } export interface ISurveyData { getValue(name: string): any; setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any; getVariable(name: string): any; setVariable(name: string, newValue: any): void; getComment(name: string): string; setComment(name: string, newValue: string, locNotification: any): any; getAllValues(): any; getFilteredValues(): any; getFilteredProperties(): any; } export interface ITextProcessor { processText(text: string, returnDisplayValue: boolean): string; processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any; } export interface ISurveyErrorOwner extends ILocalizableOwner { getErrorCustomText(text: string, error: SurveyError): string; } export interface ISurvey extends ITextProcessor, ISurveyErrorOwner { getSkeletonComponentName(element: ISurveyElement): string; currentPage: IPage; pages: any; getCss(): any; isPageStarted(page: IPage): boolean; getQuestionByName(name: string): IQuestion; pageVisibilityChanged(page: IPage, newValue: boolean): any; panelVisibilityChanged(panel: IPanel, newValue: boolean): any; questionVisibilityChanged(question: IQuestion, newValue: boolean): any; isEditingSurveyElement: boolean; isClearValueOnHidden: boolean; isClearValueOnHiddenContainer: boolean; questionsOrder: string; questionCreated(question: IQuestion): any; questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any): any; panelAdded(panel: IElement, index: number, parentPanel: any, rootPanel: any): any; questionRemoved(question: IQuestion): any; panelRemoved(panel: IElement): any; questionRenamed(question: IQuestion, oldName: string, oldValueName: string): any; validateQuestion(question: IQuestion): SurveyError; validatePanel(panel: IPanel): SurveyError; hasVisibleQuestionByValueName(valueName: string): boolean; questionCountByValueName(valueName: string): number; processHtml(html: string): string; getSurveyMarkdownHtml(element: Base, text: string, name: string): string; getRendererForString(element: Base, name: string): string; getRendererContextForString(element: Base, locStr: LocalizableString): any; getExpressionDisplayValue(question: IQuestion, value: any, displayValue: string): string; isDisplayMode: boolean; isDesignMode: boolean; areInvisibleElementsShowing: boolean; areEmptyElementsHidden: boolean; isLoadingFromJson: boolean; isUpdateValueTextOnTyping: boolean; autoGrowComment: boolean; state: string; isLazyRendering: boolean; cancelPreviewByPage(panel: IPanel): any; editText: string; cssNavigationEdit: string; requiredText: string; beforeSettingQuestionErrors(question: IQuestion, errors: any): void; beforeSettingPanelErrors(question: IPanel, errors: any): void; getSurveyErrorCustomText(obj: Base, text: string, error: SurveyError): string; getElementTitleTagName(element: Base, tagName: string): string; questionTitlePattern: string; getUpdatedQuestionTitle(question: IQuestion, title: string): string; getUpdatedQuestionNo(question: IQuestion, no: string): string; getUpdatedElementTitleActions(element: ISurveyElement, titleActions: any): Array<IAction>; getUpdatedMatrixRowActions(question: QuestionMatrixDropdownModelBase, row: MatrixDropdownRowModelBase, actions: any): Array<IAction>; questionStartIndex: string; questionTitleLocation: string; questionDescriptionLocation: string; questionErrorLocation: string; storeOthersAsComment: boolean; maxTextLength: number; maxOthersLength: number; clearValueOnDisableItems: boolean; uploadFiles(question: IQuestion, name: string, files: any, uploadingCallback: any): any; downloadFile(name: string, content: string, callback: any): any; clearFiles(question: IQuestion, name: string, value: any, fileName: string, clearCallback: any): any; updateChoicesFromServer(question: IQuestion, choices: any, serverResult: any): Array<any>; loadedChoicesFromServer(question: IQuestion): void; updateQuestionCssClasses(question: IQuestion, cssClasses: any): any; updatePanelCssClasses(panel: IPanel, cssClasses: any): any; updatePageCssClasses(panel: IPanel, cssClasses: any): any; updateChoiceItemCss(question: IQuestion, options: any): any; afterRenderQuestion(question: IQuestion, htmlElement: any): any; afterRenderQuestionInput(question: IQuestion, htmlElement: any): any; afterRenderPanel(panel: IElement, htmlElement: any): any; afterRenderPage(htmlElement: any): any; getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion; canChangeChoiceItemsVisibility(): boolean; getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean; matrixRowAdded(question: IQuestion, row: any): any; matrixBeforeRowAdded(options: any): any; matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): any; matrixRowRemoving(question: IQuestion, rowIndex: number, row: any): boolean; matrixAllowRemoveRow(question: IQuestion, rowIndex: number, row: any): boolean; matrixCellCreating(question: IQuestion, options: any): any; matrixCellCreated(question: IQuestion, options: any): any; matrixAfterCellRender(question: IQuestion, options: any): any; matrixCellValueChanged(question: IQuestion, options: any): any; matrixCellValueChanging(question: IQuestion, options: any): any; isValidateOnValueChanging: boolean; matrixCellValidate(question: IQuestion, options: any): SurveyError; dynamicPanelAdded(question: IQuestion): any; dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): any; dynamicPanelItemValueChanged(question: IQuestion, options: any): any; dragAndDropAllow(options: any): boolean; scrollElementToTop(element: ISurveyElement, question: IQuestion, page: IPage, id: string): any; runExpression(expression: string): any; elementContentVisibilityChanged(element: ISurveyElement): void; } export interface ISurveyImpl { getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; } export interface IConditionRunner { runCondition(values: any, properties: any): any; } export interface IShortcutText { shortcutText: string; } export interface ISurveyElement extends IShortcutText { name: string; isVisible: boolean; isReadOnly: boolean; isPage: boolean; isPanel: boolean; containsErrors: boolean; parent: IPanel; skeletonComponentName: string; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): any; onSurveyLoad(): any; onFirstRendering(): any; getType(): string; setVisibleIndex(value: number): number; locStrsChanged(): any; delete(): any; toggleState(): void; stateChangedCallback(): void; getTitleToolbar(): AdaptiveActionContainer; } export interface IElement extends IConditionRunner, ISurveyElement { visible: boolean; renderWidth: string; width: string; minWidth?: string; maxWidth?: string; isExpanded: boolean; isCollapsed: boolean; rightIndent: number; startWithNewLine: boolean; registerFunctionOnPropertyValueChanged(name: string, func: any, key: string): void; unRegisterFunctionOnPropertyValueChanged(name: string, key: string): void; getPanel(): IPanel; getLayoutType(): string; isLayoutTypeSupported(layoutType: string): boolean; removeElement(el: IElement): boolean; onAnyValueChanged(name: string): any; updateCustomWidgets(): any; clearIncorrectValues(): any; clearErrors(): any; dispose(): void; needResponsiveWidth(): boolean; } export interface IQuestion extends IElement, ISurveyErrorOwner { hasTitle: boolean; isEmpty(): boolean; onSurveyValueChanged(newValue: any): any; updateValueFromSurvey(newValue: any): any; updateCommentFromSurvey(newValue: any): any; supportGoNextPageAutomatic(): boolean; clearUnusedValues(): any; getDisplayValue(keysAsText: boolean, value: any): any; getValueName(): string; clearValue(): any; clearValueIfInvisible(): any; isAnswerCorrect(): boolean; updateValueWithDefaults(): any; getQuestionFromArray(name: string, index: number): IQuestion; value: any; survey: any; } export interface IParentElement { addElement(element: IElement, index: number): any; removeElement(element: IElement): boolean; isReadOnly: boolean; } export interface IPanel extends ISurveyElement, IParentElement { getChildrenLayoutType(): string; getQuestionTitleLocation(): string; getQuestionStartIndex(): string; parent: IPanel; elementWidthChanged(el: IElement): any; indexOf(el: IElement): number; elements: any; ensureRowsVisibility(): void; } export interface IPage extends IPanel, IConditionRunner { isStarted: boolean; } export interface ITitleOwner { name: string; no: string; requiredText: string; isRequireTextOnStart: boolean; isRequireTextBeforeTitle: boolean; isRequireTextAfterTitle: boolean; locTitle: LocalizableString; } export interface IProgressInfo { questionCount: number; answeredQuestionCount: number; requiredQuestionCount: number; requiredAnsweredQuestionCount: number; } export interface IWrapperObject { getOriginalObj(): Base; getClassNameProperty(): string; } export interface IFindElement { element: Base; str: LocalizableString; } export interface IValidatorOwner { getValidators(): Array<SurveyValidator>; validatedValue: any; getValidatorTitle(): string; getDataFilteredValues(): any; getDataFilteredProperties(): any; } export interface IMatrixData { onMatrixRowChanged(row: MatrixRowModel): void; getCorrectedRowValue(value: any): any; } export interface IMatrixCellsOwner extends ILocalizableOwner { getRows(): Array<any>; getColumns(): Array<any>; } export interface IMultipleTextData extends ILocalizableOwner, IPanel { getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; getAllValues(): any; getMultipleTextValue(name: string): any; setMultipleTextValue(name: string, value: any): any; getItemDefaultValue(name: string): any; getIsRequiredText(): string; } export interface SurveyTemplateRendererTemplateData { name: string; data: any; nodes?: any; afterRender: any; } export interface SurveyTemplateRendererViewModel { componentData: any; templateData: SurveyTemplateRendererTemplateData; } export interface IQuestionPanelDynamicData { getItemIndex(item: ISurveyData): number; getPanelItemData(item: ISurveyData): any; setPanelItemData(item: ISurveyData, name: string, val: any): any; getSharedQuestionFromArray(name: string, panelIndex: number): Question; getSurvey(): ISurvey; getRootData(): ISurveyData; } export declare class ArrayChanges { constructor(index: number, deleteCount: number, itemsToAdd: any, deletedItems: any); index: number; deleteCount: number; itemsToAdd: any; deletedItems: any; } /* * The base class for SurveyJS objects. */ export declare class Base { constructor(); static currentDependencis: Dependencies; static finishCollectDependencies(): Dependencies; static startCollectDependencies(updater: any, target: Base, property: string): void; static get commentPrefix(): string; static set commentPrefix(val: string); static createItemValue: any; static itemValueLocStrChanged: any; /* * Returns true if a value undefined, null, empty string or empty array. */ isValueEmpty(value: any, trimString?: boolean): boolean; protected trimValue(value: any): any; protected IsPropertyEmpty(value: any): boolean; propertyHash: any; localizableStrings: any; arraysInfo: any; eventList: any; bindingsValue: Bindings; isDisposedValue: boolean; onPropChangeFunctions: any; protected isLoadingFromJsonValue: boolean; loadingOwner: Base; /* * Event that raise on property change of the sender object * sender - the object that owns the property * options.name - the property name that has been changed * options.oldValue - old value. Please note, it equals to options.newValue if property is an array * options.newValue - new value. */ onPropertyChanged: EventBase<Base>; /* * Event that raised on changing property of the ItemValue object. * sender - the object that owns the property * options.propertyName - the property name to which ItemValue array is belong. It can be "choices" for dropdown question * options.obj - the instance of ItemValue object which property has been changed * options.name - the property of ItemObject that has been changed * options.oldValue - old value * options.newValue - new value */ onItemValuePropertyChanged: Event<(sender: Base, options: any) => any, any>; getPropertyValueCoreHandler: any; setPropertyValueCoreHandler: any; createArrayCoreHandler: any; surveyChangedCallback: any; isCreating: boolean; dispose(): void; get isDisposed(): boolean; protected addEvent<T>(): EventBase<T>; protected onBaseCreating(): void; /* * Returns the type of the object as a string as it represents in the json. It should be in lowcase. */ getType(): string; getSurvey(isLive?: boolean): ISurvey; /* * Returns true if the object is inluded into survey, otherwise returns false. */ get inSurvey(): boolean; get bindings(): Bindings; checkBindings(valueName: string, value: any): void; protected updateBindings(propertyName: string, value: any): void; protected updateBindingValue(valueName: string, value: any): void; /* * Returns the element template name without prefix. Typically it equals to getType(). */ getTemplate(): string; /* * Returns true if the object is loading from Json at the current moment. */ get isLoadingFromJson(): boolean; protected getIsLoadingFromJson(): boolean; startLoadingFromJson(): void; endLoadingFromJson(): void; /* * Deserialized the current object into JSON */ toJSON(): any; /* * Load object properties and elements. It doesn't reset properties that was changed before and they are not defined in the json parameter. */ fromJSON(json: any): void; onSurveyLoad(): void; /* * Make a clone of the existing object. Create a new object of the same type and load all properties into it. */ clone(): Base; /* * Returns the serializable property that belongs to this instance by property name. It returns null if the property is not exists. */ getPropertyByName(propName: string): JsonObjectProperty; isPropertyVisible(propName: string): boolean; static createProgressInfo(): IProgressInfo; getProgressInfo(): IProgressInfo; localeChanged(): void; locStrsChanged(): void; /* * Returns the property value by name */ getPropertyValue(name: string, defaultValue?: any): any; protected getPropertyValueCore(propertiesHash: any, name: string): any; geValueFromHash(): any; protected setPropertyValueCore(propertiesHash: any, name: string, val: any): void; get isEditingSurveyElement(): boolean; iteratePropertiesHash(func: any): void; /* * set property value */ setPropertyValue(name: string, val: any): void; protected setArrayPropertyDirectly(name: string, val: any, sendNotification?: boolean): void; protected setPropertyValueDirectly(name: string, val: any): void; protected clearPropertyValue(name: string): void; onPropertyValueChangedCallback(name: string, oldValue: any, newValue: any, sender: Base, arrayChanges: ArrayChanges): void; itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; protected propertyValueChanged(name: string, oldValue: any, newValue: any, arrayChanges?: ArrayChanges, target?: Base): void; protected get isInternal(): boolean; /* * Register a function that will be called on a property value changed. */ registerFunctionOnPropertyValueChanged(name: string, func: any, key?: string): void; /* * Register a function that will be called on a property value changed from the names list. */ registerFunctionOnPropertiesValueChanged(names: any, func: any, key?: string): void; /* * Unregister notification on property value changed */ unRegisterFunctionOnPropertyValueChanged(name: string, key?: string): void; /* * Unregister notification on property value changed for all properties in the names list. */ unRegisterFunctionOnPropertiesValueChanged(names: any, key?: string): void; createCustomLocalizableObj(name: string): void; protected createLocalizableString(name: string, owner: ILocalizableOwner, useMarkDown?: boolean, defaultStr?: string | boolean): LocalizableString; getLocalizableString(name: string): LocalizableString; getLocalizableStringText(name: string, defaultStr?: string): string; setLocalizableStringText(name: string, value: string): void; addUsedLocales(locales: any): void; searchText(text: string, founded: any): void; protected getSearchableLocKeys(keys: any): void; protected getSearchableItemValueKeys(keys: any): void; protected AddLocStringToUsedLocales(locStr: LocalizableString, locales: any): void; protected createItemValues(name: string): Array<any>; protected createNewArrayCore(name: string): Array<any>; protected ensureArray(name: string, onPush?: any, onRemove?: any): any; protected createNewArray(name: string, onPush?: any, onRemove?: any): Array<any>; protected getItemValueType(): string; protected setArray(name: string, src: any, dest: any, isItemValues: boolean, onPush: any): void; protected isTwoValueEquals(x: any, y: any, caseInSensitive?: boolean, trimString?: boolean): boolean; protected copyCssClasses(dest: any, source: any): void; } export declare class Bindings { constructor(obj: Base); properties: any; values: any; getType(): string; getNames(): Array<any>; getProperties(): Array<JsonObjectProperty>; setBinding(propertyName: string, valueName: string): void; clearBinding(propertyName: string): void; isEmpty(): boolean; getValueNameByPropertyName(propertyName: string): string; getPropertiesByValueName(valueName: string): Array<any>; getJson(): any; setJson(value: any): void; } export declare class ButtonGroupItemModel { constructor(question: QuestionButtonGroupModel, item: ItemValue, index: number); question: QuestionButtonGroupModel; item: ItemValue; index: number; get value(): any; get iconName(): any; get iconSize(): any; get caption(): LocalizableString; get showCaption(): any; get isRequired(): boolean; get selected(): boolean; get readOnly(): boolean; get name(): string; get id(): string; get hasErrors(): boolean; get describedBy(): string; get css(): any; onChange(): void; } export declare class ButtonGroupItemViewModel { constructor(model: any); model: any; } export declare class ComponentCollection { static Instance: ComponentCollection; customQuestionValues: any; onCreateComposite: any; onCreateCustom: any; onAddingJson: any; add(json: any): void; get items(): any; getCustomQuestionByName(name: string): ComponentQuestionJSON; clear(): void; createQuestion(name: string, questionJSON: ComponentQuestionJSON): Question; protected createCompositeModel(name: string, questionJSON: ComponentQuestionJSON): QuestionCompositeModel; protected createCustomModel(name: string, questionJSON: ComponentQuestionJSON): QuestionCustomModel; } export declare class ComponentQuestionJSON { constructor(name: string, json: any); name: string; json: any; onInit(): void; onCreated(question: Question): void; onLoaded(question: Question): void; onAfterRender(question: Question, htmlElement: any): void; onAfterRenderContentElement(question: Question, element: Question, htmlElement: any): void; onPropertyChanged(question: Question, propertyName: string, newValue: any): void; onValueChanged(question: Question, name: string, newValue: any): void; onItemValuePropertyChanged(question: Question, item: ItemValue, propertyName: string, name: string, newValue: any): void; getDisplayValue(keyAsText: boolean, value: any, question: Question): any; get isComposite(): boolean; } export declare class ComputedUpdater<T = any> { constructor(_updater: any); static ComputedUpdaterType: any; dependencies: Dependencies; type: any; get updater(): any; setDependencies(dependencies: Dependencies): void; protected getDependencies(): Dependencies; dispose(): any; } export declare class ConditionsParser { conditionError: ConditionsParserError; static parserCache: any; createCondition(text: string): Operand; parseExpression(text: string): Operand; get error(): ConditionsParserError; } export declare class ConditionsParserError { constructor(at: number, code: string); at: number; code: string; } export declare class CssClassBuilder { classes: any; isEmpty(): boolean; append(value: string, condition?: boolean): CssClassBuilder; toString(): string; } export declare class CustomPropertiesCollection { static properties: IObject; static parentClasses: any; static addProperty(className: string, property: any): void; static removeProperty(className: string, propertyName: string): void; static addClass(className: string, parentClassName: string): void; static getProperties(className: string): Array<any>; static createProperties(obj: any): void; } export declare class CustomWidgetCollection { static Instance: CustomWidgetCollection; widgetsValues: any; widgetsActivatedBy: any; onCustomWidgetAdded: Event<(customWidget: QuestionCustomWidget) => any, any>; get widgets(): any; add(widgetJson: any, activatedBy?: string): void; addCustomWidget(widgetJson: any, activatedBy?: string): QuestionCustomWidget; /* * Returns the way the custom wiget is activated. It can be activated by a property ("property"), question type ("type") or by new/custom question type ("customtype"). */ getActivatedBy(widgetName: string): string; /* * Sets the way the custom wiget is activated. The activation types are: property ("property"), question type ("type") or new/custom question type ("customtype"). A custom wiget may support all or only some of this activation types. */ setActivatedBy(widgetName: string, activatedBy: string): void; clear(): void; getCustomWidgetByName(name: string): QuestionCustomWidget; getCustomWidget(question: IQuestion): QuestionCustomWidget; } export declare class DefaultTitleModel { static getIconCss(cssClasses: any, isCollapsed: boolean): string; } export declare class DefaultTitleViewModel { constructor(element: any); element: any; getIconCss(): any; } export declare class Dependencies { constructor(currentDependency: any, target: Base, property: string); currentDependency: any; target: Base; property: string; static DependenciesCount: number; dependencies: any; id: string; addDependency(target: Base, property: string): void; dispose(): void; } export declare class DragDropInfo { constructor(source: IElement, target: IElement, nestedPanelDepth?: number); source: IElement; target: IElement; nestedPanelDepth: number; destination: ISurveyElement; isBottom: boolean; isEdge: boolean; } export declare class DragOrClickHelper { constructor(dragHandler: any); pointerDownEvent: any; currentTarget: any; startX: any; startY: any; currentX: any; currentY: any; itemModel: any; onPointerDown(pointerDownEvent: any, itemModel?: any): void; onPointerUp: any; tryToStartDrag: any; } export declare class ElementFactory { static Instance: ElementFactory; creatorHash: any; registerElement(elementType: string, elementCreator: any): void; clear(): void; unregisterElement(elementType: string, removeFromSerializer?: boolean): void; getAllTypes(): Array<any>; createElement(elementType: string, name: string): IElement; } export declare class Event<T, Options> { onCallbacksChanged: any; protected callbacks: any; get isEmpty(): boolean; fire(sender: any, options: any): void; clear(): void; add(func: T): void; remove(func: T): void; hasFunc(func: T): boolean; } export declare class ExpressionRunnerBase { constructor(expression: string); expressionValue: string; operand: Operand; processValue: ProcessValue; parser: ConditionsParser; isAsyncValue: boolean; hasFunctionValue: boolean; asyncFuncList: any; get expression(): string; set expression(val: string); getVariables(): Array<any>; hasFunction(): boolean; get isAsync(): boolean; canRun(): boolean; protected runCore(values: any, properties?: any): any; protected doOnComplete(res: any): void; } export declare class FunctionFactory { static Instance: FunctionFactory; functionHash: any; isAsyncHash: any; register(name: string, func: any, isAsync?: boolean): void; unregister(name: string): void; hasFunction(name: string): boolean; isAsyncFunction(name: string): boolean; clear(): void; getAll(): Array<any>; run(name: string, params: any, properties?: any): any; } export declare class Helpers { /* * A static methods that returns true if a value undefined, null, empty string or empty array. */ static isValueEmpty(value: any): boolean; static isArrayContainsEqual(x: any, y: any): boolean; static isArraysEqual(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean; static isTwoValueEquals(x: any, y: any, ignoreOrder?: boolean, caseSensitive?: boolean, trimStrings?: boolean): boolean; static randomizeArray<T>(array: any): Array<T>; static getUnbindValue(value: any): any; static createCopy(obj: any): any; static isConvertibleToNumber(value: any): boolean; static isNumber(value: any): boolean; static getMaxLength(maxLength: number, surveyLength: number): any; static getNumberByIndex(index: number, startIndexStr: string): string; static isCharNotLetterAndDigit(ch: string): boolean; static isCharDigit(ch: string): boolean; static correctAfterPlusMinis(a: number, b: number, res: number): number; static correctAfterMultiple(a: number, b: number, res: number): number; } export declare class ImplementorBase { constructor(element: any); element: any; implementedMark: any; dispose(): void; } export declare class JsonError { constructor(type: string, message: string); type: string; message: string; description: string; at: any; getFullDescription(): string; } /* * The metadata object. It contains object properties' runtime information and allows you to modify it. */ export declare class JsonMetadata { classes: any; alternativeNames: any; childrenClasses: any; classProperties: any; classHashProperties: any; getObjPropertyValue(obj: any, name: string): any; setObjPropertyValue(obj: any, name: string, val: any): void; addClass(name: string, properties: any, creator?: any, parentName?: string): JsonMetadataClass; removeClass(name: string): void; overrideClassCreatore(name: string, creator: any): void; overrideClassCreator(name: string, creator: any): void; getProperties(className: string): Array<JsonObjectProperty>; getPropertiesByObj(obj: any): Array<JsonObjectProperty>; getDynamicPropertiesByObj(obj: any, dynamicType?: string): Array<JsonObjectProperty>; hasOriginalProperty(obj: Base, propName: string): boolean; getOriginalProperty(obj: Base, propName: string): JsonObjectProperty; getProperty(className: string, propertyName: string): JsonObjectProperty; findProperty(className: string, propertyName: string): JsonObjectProperty; findProperties(className: string, propertyNames: any): Array<JsonObjectProperty>; getAllPropertiesByName(propertyName: string): Array<JsonObjectProperty>; getAllClasses(): Array<any>; createClass(name: string, json?: any): any; getChildrenClasses(name: string, canBeCreated?: boolean): Array<JsonMetadataClass>; getRequiredProperties(name: string): Array<any>; addProperties(className: string, propertiesInfos: any): void; addProperty(className: string, propertyInfo: any): JsonObjectProperty; removeProperty(className: string, propertyName: string): boolean; findClass(name: string): JsonMetadataClass; isDescendantOf(className: string, ancestorClassName: string): boolean; addAlterNativeClassName(name: string, alternativeName: string): void; generateSchema(className?: string): any; } export declare class JsonMetadataClass { constructor(name: string, properties: any, creator?: any, parentName?: string); name: string; creator: any; parentName: string; static requiredSymbol: string; static typeSymbol: string; properties: any; find(name: string): JsonObjectProperty; createProperty(propInfo: any): JsonObjectProperty; } export declare class JsonObject { static typePropertyName: string; static positionPropertyName: string; static metaDataValue: JsonMetadata; static get metaData(): JsonMetadata; errors: any; lightSerializing: boolean; toJsonObject(obj: any, storeDefaults?: boolean): any; toObject(jsonObj: any, obj: any): void; toObjectCore(jsonObj: any, obj: any): void; toJsonObjectCore(obj: any, property: JsonObjectProperty, storeDefaults?: boolean): any; valueToJson(obj: any, result: any, property: JsonObjectProperty, storeDefaults?: boolean): void; valueToObj(value: any, obj: any, property: JsonObjectProperty): void; } export declare class MatrixCells { constructor(cellsOwner: IMatrixCellsOwner); cellsOwner: IMatrixCellsOwner; values: any; get isEmpty(): boolean; setCellText(row: any, column: any, val: string): void; setDefaultCellText(column: any, val: string): void; getCellLocText(row: any, column: any): LocalizableString; getDefaultCellLocText(column: any, val: string): LocalizableString; getCellDisplayLocText(row: any, column: any): LocalizableString; getCellText(row: any, column: any): string; getDefaultCellText(column: any): string; getCellDisplayText(row: any, column: any): string; get rows(): any; get columns(): any; getJson(): any; setJson(value: any): void; protected createString(): LocalizableString; } export declare class MatrixDropdownCell { constructor(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData); column: MatrixDropdownColumn; row: MatrixDropdownRowModelBase; data: IMatrixDropdownData; questionValue: Question; locStrsChanged(): void; protected createQuestion(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData): Question; get question(): Question; get value(): any; set value(val: any); runCondition(values: any, properties: any): void; } export declare class Operand { toString(func?: any): string; getType(): string; evaluate(processValue?: ProcessValue): any; setVariables(variables: any): any; hasFunction(): boolean; hasAsyncFunction(): boolean; addToAsyncList(list: any): void; isEqual(op: Operand): boolean; protected isContentEqual(op: Operand): boolean; protected areOperatorsEquals(op1: Operand, op2: Operand): boolean; } export declare class OperandMaker { static unaryFunctions: any; static binaryFunctions: any; static signs: any; } export declare class PanelViewModel { constructor(question: any, targetElement: any); question: any; targetElement: any; } export declare class PopupUtils { static calculatePosition(targetRect: any, height: number, width: number, verticalPosition: any, horizontalPosition: any, showPointer: boolean): INumberPosition; static updateVerticalDimensions(top: number, height: number, windowHeight: number): any; static updateHorizontalDimensions(left: number, width: number, windowWidth: number, horizontalPosition: any): any; static updateVerticalPosition(targetRect: any, height: number, verticalPosition: any, showPointer: boolean, windowHeight: number): any; static calculatePopupDirection(verticalPosition: any, horizontalPosition: any): string; static calculatePointerTarget(targetRect: any, top: number, left: number, verticalPosition: any, horizontalPosition: any, width?: number, margins?: number): INumberPosition; } export declare class PopupViewModel { constructor(popupViewModel: any); popupViewModel: any; dispose(): void; } export declare class ProcessValue { constructor(); values: any; properties: any; getFirstName(text: string, obj?: any): string; hasValue(text: string, values?: any): boolean; getValue(text: string, values?: any): any; setValue(obj: any, text: string, value: any): void; getValueInfo(valueInfo: any): void; } export declare class ProgressButtonsViewModel { constructor(survey: any, element: any); progressButtonsModel: any; scrollButtonCssKo: any; hasScroller: any; updateScroller: any; isListElementClickable(index: any): boolean; getListElementCss(index: any): string; clickListElement(index: any): void; getScrollButtonCss(isLeftScroll: boolean): any; clickScrollButton(listContainerElement: any, isLeftScroll: boolean): void; dispose(): void; } export declare class ProgressViewModel { constructor(model: any); model: any; getProgressTextInBarCss(css: any): string; getProgressTextUnderBarCss(css: any): string; } export declare class QuestionCustomWidget { constructor(name: string, widgetJson: any); name: string; widgetJson: any; htmlTemplate: string; isFirstRender: boolean; afterRender(question: IQuestion, el: any): void; willUnmount(question: IQuestion, el: any): void; getDisplayValue(question: IQuestion, value?: any): string; isFit(question: IQuestion): boolean; get canShowInToolbox(): boolean; get showInToolbox(): boolean; set showInToolbox(val: boolean); init(): void; activatedByChanged(activatedBy: string): void; get isDefaultRender(): boolean; get pdfQuestionType(): string; get pdfRender(): any; } export declare class QuestionFactory { static Instance: QuestionFactory; static get DefaultChoices(): any; static get DefaultColums(): any; static get DefaultRows(): any; static get DefaultMutlipleTextItems(): any; creatorHash: any; registerQuestion(questionType: string, questionCreator: any): void; unregisterElement(elementType: string): void; clear(): void; getAllTypes(): Array<any>; createQuestion(questionType: string, name: string): Question; } export declare class QuestionMatrixDropdownRenderedCell { constructor(); static counter: number; idValue: number; itemValue: ItemValue; minWidth: string; width: string; locTitle: LocalizableString; cell: MatrixDropdownCell; column: MatrixDropdownColumn; row: MatrixDropdownRowModelBase; question: Question; isRemoveRow: boolean; choiceIndex: number; matrix: QuestionMatrixDropdownModelBase; requiredText: string; isEmpty: boolean; colSpans: number; panel: PanelModel; isShowHideDetail: boolean; isActionsCell: boolean; isDragHandlerCell: boolean; classNameValue: string; get hasQuestion(): boolean; get hasTitle(): boolean; get hasPanel(): boolean; get id(): number; get showErrorOnTop(): boolean; get showErrorOnBottom(): boolean; get item(): ItemValue; set item(val: ItemValue); get isChoice(): boolean; get choiceValue(): any; get isCheckbox(): boolean; get isFirstChoice(): boolean; get className(): string; get headers(): string; getTitle(): string; calculateFinalClassName(matrixCssClasses: any): string; } export declare class RendererFactory { static Instance: RendererFactory; renderersHash: any; unregisterRenderer(questionType: string, rendererAs: string): void; registerRenderer(questionType: string, renderAs: string, renderer: any): void; getRenderer(questionType: string, renderAs: string): any; getRendererByQuestion(question: Question): any; clear(): void; } export declare class ResponsivityManager { constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number); resizeObserver: any; isInitialized: boolean; protected minDimensionConst: number; separatorSize: number; separatorAddConst: number; paddingSizeConst: number; protected recalcMinDimensionConst: boolean; getComputedStyle: any; protected getDimensions(element: any): IDimensions; protected getAvailableSpace(): number; protected calcItemSize(item: any): number; dispose(): void; } export declare class StringEditorViewModel { constructor(locString: any); locString: any; get koHasHtml(): any; get editValue(): any; set editValue(val: any); onInput(sender: StringEditorViewModel, event: any): void; onClick(sender: StringEditorViewModel, event: any): void; dispose(): void; } export declare class StylesManager { constructor(); static SurveyJSStylesSheetId: string; static Styles: any; static Media: any; static ThemeColors: any; static ThemeCss: any; static modernThemeCss: any; static bootstrapThemeCss: any; static bootstrapmaterialThemeCss: any; sheet: any; static applyTheme(themeName?: string, themeSelector?: string): void; static Enabled: boolean; initializeStyles(sheet: any): void; } export declare class SurveyError { constructor(text?: string, errorOwner?: ISurveyErrorOwner); text: string; locTextValue: LocalizableString; visible: boolean; get locText(): LocalizableString; getText(): string; getErrorType(): string; protected getDefaultText(): string; } export declare class SurveyProgressButtonsModel { constructor(survey: SurveyModel); isListElementClickable(index: number): boolean; getListElementCss(index: number): string; getScrollButtonCss(hasScroller: boolean, isLeftScroll: boolean): string; clickListElement(index: number): void; } export declare class SurveyProgressModel { static getProgressTextInBarCss(css: any): string; static getProgressTextUnderBarCss(css: any): string; } export declare class SurveyTemplateText { constructor(); addText(newText: string, id: string, name: string): void; replaceText(replaceText: string, id: string, questionType?: string): void; protected getId(id: string, questionType: string): string; protected get text(): string; protected set text(val: string); } export declare class SurveyTimer { static instanceValue: SurveyTimer; static get instance(): SurveyTimer; listenerCounter: number; timerId: number; onTimer: Event<() => any, any>; start(func?: any): void; stop(func?: any): void; doTimer(): void; } export declare class SvgIconData { } export declare class SvgIconRegistry { icons: SvgIconData; iconPrefix: string; registerIconFromSymbol(iconId: string, iconSymbolSvg: string): void; registerIconFromSvgViaElement(iconId: string, iconSvg: string, iconPrefix?: string): void; registerIconFromSvg(iconId: string, iconSvg: string, iconPrefix?: string): boolean; iconsRenderedHtml(): any; renderIcons(): void; } export declare class SyntaxError { constructor(message: string, expected: any, found: string, location: IFileRange); static buildMessage(expected: any, found: string): string; message: string; expected: any; found: string; location: IFileRange; name: string; } export declare class TextPreProcessor { _unObservableValues: any; onProcess: any; process(text: string, returnDisplayValue?: boolean, doEncoding?: boolean): string; processValue(name: string, returnDisplayValue: boolean): TextPreProcessorValue; get hasAllValuesOnLastRun(): boolean; } export declare class TextPreProcessorItem { start: number; end: number; } export declare class TextPreProcessorValue { constructor(name: string, returnDisplayValue: boolean); name: string; returnDisplayValue: boolean; value: any; isExists: boolean; canProcess: boolean; } export declare class TooltipErrorViewModel { constructor(question: any); question: any; tooltipManager: any; afterRender: any; } export declare class TooltipManager { constructor(tooltipElement: any); tooltipElement: any; targetElement: any; dispose(): void; onMouseMoveCallback: any; } export declare class ValidatorResult { constructor(value: any, error?: SurveyError); value: any; error: SurveyError; } export declare class ValidatorRunner { asyncValidators: any; onAsyncCompleted: any; run(owner: IValidatorOwner): Array<SurveyError>; } export declare class XmlParser { parser: any; assignValue(target: any, name: string, value: any): void; xml2Json(xmlNode: any, result: any): void; parseXmlString(xmlString: string): any; } /* * The class contains methods to work with api.surveyjs.io service. */ export declare class dxSurveyService { constructor(); static get serviceUrl(): string; static set serviceUrl(val: string); loadSurvey(surveyId: string, onLoad: any): void; getSurveyJsonAndIsCompleted(surveyId: string, clientId: string, onLoad: any): void; sendResult(postId: string, result: any, onSendResult: any, clientId?: string, isPartialCompleted?: boolean): void; sendFile(postId: string, file: any, onSendFile: any): void; getResult(resultId: string, name: string, onGetResult: any): void; isCompleted(resultId: string, clientId: string, onIsCompleted: any): void; } export declare class Action extends Base implements IAction { constructor(innerItem: IAction); innerItem: IAction; updateCallback: any; location: string; id: string; iconName: string; iconSize: number; visible: boolean; title: string; tooltip: string; enabled: boolean; showTitle: boolean; action: any; css: string; innerCss: string; data: any; popupModel: any; needSeparator: boolean; active: boolean; pressed: boolean; template: string; component: string; items: any; visibleIndex: number; mode: "popup" | "large" | "small"; disableTabStop: boolean; disableShrink: boolean; cssClassesValue: any; get cssClasses(): any; get disabled(): boolean; get hasTitle(): boolean; get isVisible(): boolean; get canShrink(): boolean; getActionRootCss(): string; getActionBarItemTitleCss(): string; getActionBarItemCss(): string; minDimension: number; maxDimension: number; } export declare class ActionContainer<T extends Action = Action> extends Base { constructor(); actions: any; cssClassesValue: any; protected getRenderedActions(): Array<T>; updateCallback: any; containerCss: string; protected raiseUpdate(isResetInitialized: boolean): void; protected onSet(): void; protected onPush(item: T): void; protected onRemove(item: T): void; get hasActions(): boolean; get renderedActions(): any; get visibleActions(): any; getRootCss(): string; get cssClasses(): any; setItems(items: any, sortByVisibleIndex?: boolean): void; initResponsivityManager(container: any): void; resetResponsivityManager(): void; } export declare class ActionContainerImplementor extends ImplementorBase { constructor(model: any, handleClick?: boolean); handleClick: boolean; itemsSubscription: any; dispose(): void; } export declare class AnswerRequiredError extends SurveyError { constructor(text?: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class ArrayOperand extends Operand { constructor(values: any); values: any; getType(): string; toString(func?: any): string; evaluate(processValue?: ProcessValue): Array<any>; setVariables(variables: any): void; hasFunction(): boolean; hasAsyncFunction(): boolean; addToAsyncList(list: any): void; protected isContentEqual(op: Operand): boolean; } export declare class BinaryOperand extends Operand { constructor(operatorName: string, left?: any, right?: any, isArithmeticOp?: boolean); consumer: any; isArithmeticValue: boolean; getType(): string; get isArithmetic(): boolean; get isConjunction(): boolean; get conjunction(): string; get operator(): string; get leftOperand(): any; get rightOperand(): any; protected isContentEqual(op: Operand): boolean; evaluate(processValue?: ProcessValue): any; toString(func?: any): string; setVariables(variables: any): void; hasFunction(): boolean; hasAsyncFunction(): boolean; addToAsyncList(list: any): void; } /* * The calculated value is a way to define the variable in Survey Creator. * It has two main properties: name and expression. Based on expression the value read-only property is automatically calculated. * The name property should be unique though all calculated values. * It uses survey.getVariable/seruvey.setVariable functions to get/set its value. The class do not store its value internally. * You may set includeIntoResult property to true to store this calculated value into survey result. */ export declare class CalculatedValue extends Base { constructor(name?: string, expression?: string); data: ISurveyData; expressionIsRunning: boolean; expressionRunner: ExpressionRunner; setOwner(data: ISurveyData): void; getType(): string; getSurvey(live?: boolean): ISurvey; get owner(): ISurveyData; /* * The calculated value name. It should be non empty and unique. */ get name(): string; set name(val: string); /* * Set this property to true to include the non-empty calculated value into survey result, survey.data property. */ get includeIntoResult(): boolean; set includeIntoResult(val: boolean); /* * The Expression that used to calculate the value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}. * <br/>Example: "({quantity} * {price}) * (100 - {discount}) / 100" */ get expression(): string; set expression(val: string); locCalculation(): void; unlocCalculation(): void; isCalculated: boolean; resetCalculation(): void; doCalculation(calculatedValues: any, values: any, properties: any): void; runExpression(values: any, properties: any): void; get value(): any; protected setValue(val: any): void; } /* * A definition for filling choices for checkbox, dropdown and radiogroup questions from resfull services. * The run method call a restful service and results can be get on getResultCallback. */ export declare class ChoicesRestful extends Base { constructor(); static cacheText: string; static noCacheText: string; static get EncodeParameters(): boolean; static set EncodeParameters(val: boolean); static clearCache(): void; static itemsResult: any; static sendingSameRequests: any; static onBeforeSendRequest: any; lastObjHash: string; isRunningValue: boolean; protected processedUrl: string; protected processedPath: string; isUsingCacheFromUrl: boolean; onProcessedUrlCallback: any; getResultCallback: any; beforeSendRequestCallback: any; updateResultCallback: any; getItemValueCallback: any; error: SurveyError; owner: IQuestion; createItemValue: any; getSurvey(live?: boolean): ISurvey; run(textProcessor?: ITextProcessor): void; get isUsingCache(): boolean; get isRunning(): boolean; protected getIsRunning(): boolean; get isWaitingForParameters(): boolean; protected useChangedItemsResults(): boolean; protected parseResponse(response: any): any; protected sendRequest(): void; getType(): string; get isEmpty(): boolean; getCustomPropertiesNames(): Array<any>; setData(json: any): void; getData(): any; /* * Gets or sets a link to a web service. You can use text preprocessing here. * For example, the following url: _https://surveyjs.io/api/CountriesExample?region={region}_ is changed based on the _region_ question's value. * SurveyJS automatically gets data from the web service when the value of the _region_ question changes. */ get url(): string; set url(val: string); /* * Use this property, if a web service returns a lot of information and you need only a part of it. * For example, a web service returns a list of countries and a list of capitals. * If you need a list of countries, set a correct path from which SurveyJS obtains the data, like: _DataList1\DataList2_ */ get path(): string; set path(val: string); /* * Gets or sets the name of a property (in the obtained data object) to which SurveyJS binds to provide values for choice items. */ get valueName(): string; set valueName(val: string); /* * Gets or sets the name of a property (in the obtained data object) to which SurveyJS binds to provide display texts for choice items. */ get titleName(): string; set titleName(val: string); get imageLinkName(): string; set imageLinkName(val: string); get allowEmptyResponse(): boolean; set allowEmptyResponse(val: boolean); get attachOriginalItems(): boolean; set attachOriginalItems(val: boolean); get itemValueType(): string; clear(): void; protected beforeSendRequest(): void; protected beforeLoadRequest(): void; protected onLoad(result: any, loadingObjHash?: string): void; protected callResultCallback(items: any, loadingObjHash: string): void; } export declare class ConditionRunner extends ExpressionRunnerBase { constructor(expression: string); onRunComplete: any; run(values: any, properties?: any): boolean; protected doOnComplete(res: any): void; } export declare class Const extends Operand { constructor(value: any); getType(): string; toString(func?: any): string; get correctValue(): any; evaluate(): any; setVariables(variables: any): void; protected getCorrectValue(value: any): any; protected isContentEqual(op: Operand): boolean; } export declare class CustomError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; } export declare class DragDropCore<T> extends Base { constructor(surveyValue?: ISurvey, creator?: any); isBottom: boolean; onGhostPositionChanged: EventBase<Base>; protected ghostPositionChanged(): void; static PreventScrolling: boolean; onBeforeDrop: EventBase<DragDropCore<T>>; onAfterDrop: EventBase<DragDropCore<T>>; draggedElement: any; protected get draggedElementType(): string; protected parentElement: T; dropTarget: any; protected get dropTargetDataAttributeName(): string; protected get survey(): SurveyModel; prevDropTarget: any; protected draggedElementShortcut: any; scrollIntervalId: number; protected allowDropHere: boolean; startDrag(event: any, draggedElement: any, parentElement?: any, draggedElementNode?: any, preventSaveTargetNode?: boolean): void; timeoutID: any; startX: number; startY: number; currentX: number; currentY: number; savedTargetNode: any; stopLongTapIfMoveEnough: any; stopLongTap: any; onContextMenu: any; dragOver: any; drop: any; protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean; protected onStartDrag(): void; protected getShortcutText(draggedElement: IShortcutText): string; protected createDraggedElementShortcut(text: string, draggedElementNode?: any, event?: any): any; protected getDraggedElementClass(): string; protected doDragOver(dropTargetNode?: any): void; protected afterDragOver(dropTargetNode?: any): void; getGhostPosition(item: any): string; protected isDropTargetValid(dropTarget: any, dropTargetNode?: any): boolean; handlePointerCancel: any; protected handleEscapeButton: any; protected banDropHere: any; protected doBanDropHere: any; protected getDataAttributeValueByNode(node: any): any; protected getDropTargetByNode(dropTargetNode: any, event: any): any; protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode?: any, event?: any): any; protected calculateMiddleOfHTMLElement(HTMLElement: any): number; protected calculateIsBottom(clientY: number, dropTargetNode?: any): boolean; protected findDropTargetNodeByDragOverNode(dragOverNode: any): any; protected doDrop(): any; protected clear: any; protected doClear(): void; } export declare class EventBase<T> extends Event<any, any> { } export declare class ExceedSizeError extends SurveyError { constructor(maxSize: number, errorOwner?: ISurveyErrorOwner); getErrorType(): string; getDefaultText(): string; } export declare class ExpressionItem extends Base implements ILocalizableOwner { constructor(expression?: string); locOwner: ILocalizableOwner; getType(): string; runCondition(values: any, properties: any): boolean; /* * The expression property. If this expression returns true, then survey will use html property to show on complete page. */ get expression(): string; set expression(val: string); get locHtml(): LocalizableString; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; getSurvey(isLive?: boolean): ISurvey; } export declare class ExpressionRunner extends ExpressionRunnerBase { constructor(expression: string); onRunComplete: any; run(values: any, properties?: any): any; protected doOnComplete(res: any): void; } export declare class FunctionOperand extends Operand { constructor(originalValue: string, parameters: ArrayOperand); isReadyValue: boolean; asynResult: any; onAsyncReady: any; getType(): string; evaluateAsync(processValue: ProcessValue): void; evaluate(processValue?: ProcessValue): any; toString(func?: any): string; setVariables(variables: any): void; get isReady(): boolean; hasFunction(): boolean; hasAsyncFunction(): boolean; addToAsyncList(list: any): void; protected isContentEqual(op: Operand): boolean; } /* * Array of ItemValue is used in checkox, dropdown and radiogroup choices, matrix columns and rows. * It has two main properties: value and text. If text is empty, value is used for displaying. * The text property is localizable and support markdown. */ export declare class ItemValue extends Base implements ILocalizableOwner, IShortcutText { constructor(value: any, text?: string, typeName?: string); getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; static get Separator(): string; static set Separator(val: string); static createArray(locOwner: ILocalizableOwner): Array<ItemValue>; static setupArray(items: any, locOwner: ILocalizableOwner): void; /* * Resets the input array and fills it with values from the values array */ static setData(items: any, values: any, type?: string): void; static getData(items: any): any; static getItemByValue(items: any, val: any): ItemValue; static getTextOrHtmlByValue(items: any, val: any): string; static locStrsChanged(items: any): void; static runConditionsForItems(items: any, filteredItems: any, runner: ConditionRunner, values: any, properties: any, useItemExpression?: boolean, onItemCallBack?: any): boolean; static runEnabledConditionsForItems(items: any, runner: ConditionRunner, values: any, properties: any, onItemCallBack?: any): boolean; ownerPropertyName: string; locTextValue: LocalizableString; isVisibleValue: boolean; visibleConditionRunner: ConditionRunner; enableConditionRunner: ConditionRunner; onCreating(): any; getType(): string; getSurvey(live?: boolean): ISurvey; getLocale(): string; get locText(): LocalizableString; setLocText(locText: LocalizableString): void; _locOwner: ILocalizableOwner; get locOwner(): ILocalizableOwner; set locOwner(val: ILocalizableOwner); get value(): any; set value(val: any); get hasText(): boolean; get pureText(): string; set pureText(val: string); get text(): string; set text(val: string); get calculatedText(): string; get shortcutText(): string; getData(): any; toJSON(): any; setData(value: any): void; get visibleIf(): string; set visibleIf(val: string); get enableIf(): string; set enableIf(val: string); get isVisible(): boolean; setIsVisible(val: boolean): void; get isEnabled(): any; setIsEnabled(val: boolean): void; addUsedLocales(locales: any): void; locStrsChanged(): void; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; protected getConditionRunner(isVisible: boolean): ConditionRunner; originalItem: any; } export declare class JsonMissingTypeErrorBase extends JsonError { constructor(baseClassName: string, type: string, message: string); baseClassName: string; type: string; message: string; } /* * Contains information about a property of a survey element (page, panel, questions, and etc). */ export declare class JsonObjectProperty implements IObject { constructor(classInfo: JsonMetadataClass, name: string, isRequired?: boolean); name: string; static getItemValuesDefaultValue: any; static Index: number; static mergableValues: any; idValue: number; classInfoValue: JsonMetadataClass; typeValue: string; choicesValue: any; baseValue: any; isRequiredValue: boolean; isUniqueValue: boolean; readOnlyValue: boolean; visibleValue: boolean; isLocalizableValue: boolean; choicesfunc: any; dependedProperties: any; isSerializable: boolean; isLightSerializable: boolean; isCustom: boolean; isDynamicChoices: boolean; isBindable: boolean; className: string; alternativeName: string; classNamePart: string; baseClassName: string; defaultValueValue: any; serializationProperty: string; displayName: string; category: string; categoryIndex: number; visibleIndex: number; nextToProperty: string; showMode: string; maxLength: number; maxValue: any; minValue: any; dataListValue: any; layout: string; onGetValue: any; onSetValue: any; visibleIf: any; onPropertyEditorUpdate: any; get id(): number; get classInfo(): JsonMetadataClass; get type(): string; set type(val: string); isArray: boolean; get isRequired(): boolean; set isRequired(val: boolean); get isUnique(): boolean; set isUnique(val: boolean); get hasToUseGetValue(): any; get defaultValue(): any; set defaultValue(val: any); isDefaultValue(value: any): boolean; getValue(obj: any): any; getPropertyValue(obj: any): any; get hasToUseSetValue(): any; setValue(obj: any, value: any, jsonConv: JsonObject): void; getObjType(objType: string): any; getClassName(className: string): string; /* * Depricated, please use getChoices */ get choices(): any; get hasChoices(): boolean; getChoices(obj: any, choicesCallback?: any): Array<any>; setChoices(value: any, valueFunc?: any): void; getBaseValue(): string; setBaseValue(val: any): void; get readOnly(): boolean; set readOnly(val: boolean); isVisible(layout: string, obj?: any): boolean; get visible(): boolean; set visible(val: boolean); get isLocalizable(): boolean; set isLocalizable(val: boolean); get dataList(): any; set dataList(val: any); mergeWith(prop: JsonObjectProperty): void; addDependedProperty(name: string): void; getDependedProperties(): Array<any>; schemaType(): string; } export declare class JsonRequiredPropertyError extends JsonError { constructor(propertyName: string, className: string); propertyName: string; className: string; } export declare class JsonUnknownPropertyError extends JsonError { constructor(propertyName: string, className: string); propertyName: string; className: string; } export declare class KeyDuplicationError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } /* * The class represents the string that supports multi-languages and markdown. * It uses in all objects where support for multi-languages and markdown is required. */ export declare class LocalizableString implements ILocalizableString { constructor(owner: ILocalizableOwner, useMarkdown?: boolean, name?: string); owner: ILocalizableOwner; useMarkdown: boolean; name: string; static SerializeAsObject: boolean; static get defaultLocale(): string; static set defaultLocale(val: string); static defaultRenderer: string; static editableRenderer: string; values: any; htmlValues: any; renderedText: string; calculatedTextValue: string; localizationName: string; onGetTextCallback: any; onGetDefaultTextCallback: any; onStrChanged: any; onSearchChanged: any; sharedData: LocalizableString; searchText: string; searchIndex: number; getIsMultiple(): boolean; get locale(): string; strChanged(): void; get text(): string; set text(val: string); get calculatedText(): string; get pureText(): string; get hasHtml(): boolean; get html(): string; get isEmpty(): boolean; get textOrHtml(): string; get renderedHtml(): string; getLocaleText(loc: string): string; setLocaleText(loc: string, value: string): void; hasNonDefaultText(): boolean; getLocales(): Array<any>; getJson(): any; setJson(value: any): void; get renderAs(): string; get renderAsData(): any; equals(obj: any): boolean; searchableText: string; setFindText(text: string): boolean; onChanged(): void; protected onCreating(): void; getHtmlValue(): string; } /* * The class represents the list of strings that supports multi-languages. */ export declare class LocalizableStrings implements ILocalizableString { constructor(owner: ILocalizableOwner); owner: ILocalizableOwner; values: any; onValueChanged: any; getIsMultiple(): boolean; get locale(): string; get value(): any; set value(val: any); get text(): string; set text(val: string); getLocaleText(loc: string): string; setLocaleText(loc: string, newValue: string): any; getValue(loc: string): Array<any>; setValue(loc: string, val: any): void; hasValue(loc?: string): boolean; get isEmpty(): boolean; getLocales(): Array<any>; getJson(): any; setJson(value: any): void; } export declare class MatrixDropdownColumn extends Base implements ILocalizableOwner, IWrapperObject { constructor(name: string, title?: string); static getColumnTypes(): Array<any>; templateQuestionValue: Question; colOwnerValue: IMatrixColumnOwner; indexValue: number; _isVisible: boolean; _hasVisibleCell: boolean; getOriginalObj(): Base; getClassNameProperty(): string; getSurvey(live?: boolean): ISurvey; endLoadingFromJson(): void; getDynamicPropertyName(): string; getDynamicType(): string; get colOwner(): IMatrixColumnOwner; set colOwner(val: IMatrixColumnOwner); locStrsChanged(): void; addUsedLocales(locales: any): void; get index(): number; setIndex(val: number): void; getType(): string; get cellType(): string; set cellType(val: string); get templateQuestion(): Question; get value(): string; get isVisible(): boolean; setIsVisible(newVal: boolean): void; get hasVisibleCell(): boolean; set hasVisibleCell(val: boolean); get name(): string; set name(val: string); get title(): string; set title(val: string); get locTitle(): LocalizableString; get fullTitle(): string; get isRequired(): boolean; set isRequired(val: boolean); get requiredText(): string; get requiredErrorText(): string; set requiredErrorText(val: string); get locRequiredErrorText(): LocalizableString; get readOnly(): boolean; set readOnly(val: boolean); get hasOther(): boolean; set hasOther(val: boolean); get visibleIf(): string; set visibleIf(val: string); get enableIf(): string; set enableIf(val: string); get requiredIf(): string; set requiredIf(val: string); get isUnique(): boolean; set isUnique(val: boolean); get showInMultipleColumns(): boolean; set showInMultipleColumns(val: boolean); get isSupportMultipleColumns(): boolean; get isShowInMultipleColumns(): boolean; get validators(): any; set validators(val: any); get totalType(): string; set totalType(val: string); get totalExpression(): string; set totalExpression(val: string); get hasTotal(): boolean; get totalFormat(): string; set totalFormat(val: string); get locTotalFormat(): LocalizableString; get renderAs(): string; set renderAs(val: string); get totalMaximumFractionDigits(): number; set totalMaximumFractionDigits(val: number); get totalMinimumFractionDigits(): number; set totalMinimumFractionDigits(val: number); get totalDisplayStyle(): string; set totalDisplayStyle(val: string); get totalCurrency(): string; set totalCurrency(val: string); get minWidth(): string; set minWidth(val: string); get width(): string; set width(val: string); get colCount(): number; set colCount(val: number); getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; createCellQuestion(row: MatrixDropdownRowModelBase): Question; updateCellQuestion(cellQuestion: Question, data: any, onUpdateJson?: any): void; defaultCellTypeChanged(): void; protected calcCellQuestionType(row: MatrixDropdownRowModelBase): string; protected updateTemplateQuestion(): void; protected createNewQuestion(cellType: string): Question; protected setQuestionProperties(question: Question, onUpdateJson?: any): void; protected propertyValueChanged(name: string, oldValue: any, newValue: any): void; } export declare class MatrixDropdownRowModelBase implements ISurveyData, ISurveyImpl, ILocalizableOwner { constructor(data: IMatrixDropdownData, value: any); static RowVariableName: string; static OwnerVariableName: string; static IndexVariableName: string; static RowValueVariableName: string; static idCounter: number; protected data: IMatrixDropdownData; protected isSettingValue: boolean; idValue: string; textPreProcessor: MatrixDropdownRowTextProcessor; detailPanelValue: PanelModel; cells: any; showHideDetailPanelClick: any; onDetailPanelShowingChanged: any; get id(): string; get rowName(): any; get text(): any; get value(): any; set value(val: any); get locText(): LocalizableString; get hasPanel(): boolean; get detailPanel(): PanelModel; get detailPanelId(): string; get isDetailPanelShowing(): boolean; isCreatingDetailPanel: boolean; showDetailPanel(): void; hideDetailPanel(destroyPanel?: boolean): void; getAllValues(): any; getFilteredValues(): any; getFilteredProperties(): any; runCondition(values: any, properties: any): void; clearValue(): void; onAnyValueChanged(name: string): void; getDataValueCore(valuesHash: any, key: string): any; getValue(name: string): any; setValue(name: string, newColumnValue: any): void; getVariable(name: string): any; setVariable(name: string, newValue: any): void; getComment(name: string): string; setComment(name: string, newValue: string, locNotification: any): void; get isEmpty(): boolean; getQuestionByColumn(column: MatrixDropdownColumn): Question; getCellByColumn(column: MatrixDropdownColumn): MatrixDropdownCell; getQuestionByColumnName(columnName: string): Question; get questions(): any; getQuestionByName(name: string): Question; getQuestionsByName(name: string): Array<Question>; protected getSharedQuestionByName(columnName: string): Question; clearIncorrectValues(val: any): void; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; locStrsChanged(): void; updateCellQuestionOnColumnChanged(column: MatrixDropdownColumn, name: string, newValue: any): void; updateCellQuestionOnColumnItemValueChanged(column: MatrixDropdownColumn, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void; onQuestionReadOnlyChanged(parentIsReadOnly: boolean): void; hasErrors(fireCallback: boolean, rec: any, raiseOnCompletedAsyncValidators: any): boolean; protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void; updateCellOnColumnItemValueChanged(cell: MatrixDropdownCell, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void; protected buildCells(value: any): void; protected isTwoValueEquals(val1: any, val2: any): boolean; protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell; getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; get rowIndex(): number; get editingObj(): Base; onEditingObjPropertyChanged: any; editingObjValue: Base; dispose(): void; } export declare class MatrixDropdownTotalCell extends MatrixDropdownCell { constructor(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData); column: MatrixDropdownColumn; row: MatrixDropdownRowModelBase; data: IMatrixDropdownData; protected createQuestion(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, data: IMatrixDropdownData): Question; locStrsChanged(): void; updateCellQuestion(): void; getTotalExpression(): string; } export declare class MatrixRowModel extends Base { constructor(item: ItemValue, fullName: string, data: IMatrixData, value: any); fullName: string; data: IMatrixData; item: ItemValue; cellClick: any; get name(): string; get text(): string; get locText(): LocalizableString; get value(): any; set value(val: any); get rowClasses(): string; } export declare class MinRowCountError extends SurveyError { constructor(minRowCount: number, errorOwner?: ISurveyErrorOwner); minRowCount: number; getErrorType(): string; protected getDefaultText(): string; } export declare class MultipleTextItemModel extends Base implements IValidatorOwner, ISurveyData, ISurveyImpl { constructor(name?: any, title?: string); editorValue: QuestionTextModel; data: IMultipleTextData; valueChangedCallback: any; getType(): string; get id(): string; getOriginalObj(): Base; /* * The item name. */ get name(): string; set name(val: string); get question(): Question; get editor(): QuestionTextModel; protected createEditor(name: string): QuestionTextModel; addUsedLocales(locales: any): void; locStrsChanged(): void; setData(data: IMultipleTextData): void; /* * Set this property to true, to make the item a required. If a user doesn't fill the item then a validation error will be generated. */ get isRequired(): boolean; set isRequired(val: boolean); /* * Use this property to change the default input type. */ get inputType(): string; set inputType(val: string); /* * Item title. If it is empty, the item name is rendered as title. This property supports markdown. */ get title(): string; set title(val: string); get locTitle(): LocalizableString; /* * Returns the text or html for rendering the title. */ get fullTitle(): string; /* * The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used. * If it is 0, then the value is unlimited */ get maxLength(): number; set maxLength(val: number); getMaxLength(): any; /* * The input place holder. */ get placeHolder(): string; set placeHolder(val: string); get locPlaceHolder(): LocalizableString; /* * The custom text that will be shown on required error. Use this property, if you do not want to show the default text. */ get requiredErrorText(): string; set requiredErrorText(val: string); get locRequiredErrorText(): LocalizableString; /* * The input size. */ get size(): number; set size(val: number); /* * The list of question validators. */ get validators(): any; set validators(val: any); getValidators(): Array<SurveyValidator>; /* * The item value. */ get value(): any; set value(val: any); isEmpty(): boolean; onValueChanged(newValue: any): void; getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; getValue(name: string): any; setValue(name: string, value: any): void; getVariable(name: string): any; setVariable(name: string, newValue: any): void; getComment(name: string): string; setComment(name: string, newValue: string): void; getAllValues(): any; getFilteredValues(): any; getFilteredProperties(): any; getValidatorTitle(): string; get validatedValue(): any; set validatedValue(val: any); getDataFilteredValues(): any; getDataFilteredProperties(): any; } export declare class OneAnswerRequiredError extends SurveyError { constructor(text?: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class OtherEmptyError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class PanelImplementorBase extends ImplementorBase { constructor(panel: any); panel: any; } export declare class PopupBaseViewModel extends Base { constructor(model: any, targetElement?: any); targetElement: any; prevActiveElement: any; scrollEventCallBack: any; top: string; left: string; height: string; isVisible: boolean; popupDirection: string; pointerTarget: IPosition; container: any; _model: any; get model(): any; set model(val: any); get title(): string; get contentComponentName(): string; get contentComponentData(): any; get showPointer(): boolean; get isModal(): boolean; get showFooter(): boolean; get isOverlay(): boolean; get styleClass(): string; onKeyDown(event: any): void; updateOnShowing(): void; updateOnHiding(): void; clickOutside(): void; cancel(): void; apply(): void; get cancelButtonText(): any; get applyButtonText(): any; dispose(): void; createPopupContainer(): void; mountPopupContainer(): void; initializePopupContainer(): void; destroyPopupContainer(): void; } export declare class PopupModel<T = any> extends Base { constructor(contentComponentName: string, contentComponentData: T, verticalPosition?: any, horizontalPosition?: any, showPointer?: boolean, isModal?: boolean, onCancel?: any, onApply?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string); contentComponentName: string; contentComponentData: T; verticalPosition: any; horizontalPosition: any; showPointer: boolean; isModal: boolean; onCancel: any; onApply: any; onHide: any; onShow: any; cssClass: string; title: string; displayMode: "popup" | "overlay"; get isVisible(): boolean; set isVisible(val: boolean); toggleVisibility(): void; onVisibilityChanged: any; } export declare class QuestionImplementor extends ImplementorBase { constructor(question: any); question: any; disposedObjects: any; callBackFunctions: any; koDummy: any; koElementType: any; _koValue: any; protected setObservaleObj(name: string, obj: any, addToQuestion?: boolean): any; protected setCallbackFunc(name: string, func: any): void; protected getKoValue(): any; protected updateQuestion(): void; protected onSurveyLoad(): void; protected getQuestionTemplate(): string; protected getNo(): string; protected updateKoDummy(): void; protected koQuestionAfterRender(elements: any, con: any): void; dispose(): void; } export declare class QuestionMatrixDropdownRenderedRow extends Base { constructor(cssClasses: any, isDetailRow?: boolean); cssClasses: any; isDetailRow: boolean; isGhostRow: boolean; isAdditionalClasses: boolean; row: MatrixDropdownRowModelBase; static counter: number; idValue: number; cells: any; onCreating(): void; get id(): number; get attributes(): { "data-sv-drop-target-matrix-row"?: undefined; } | { "data-sv-drop-target-matrix-row": string; }; get className(): string; } export declare class QuestionMatrixDropdownRenderedTable extends Base { constructor(matrix: QuestionMatrixDropdownModelBase); matrix: QuestionMatrixDropdownModelBase; headerRowValue: QuestionMatrixDropdownRenderedRow; footerRowValue: QuestionMatrixDropdownRenderedRow; hasRemoveRowsValue: boolean; rowsActions: any; cssClasses: any; renderedRowsChangedCallback: any; rows: any; get showTable(): boolean; get showHeader(): boolean; get showAddRowOnTop(): boolean; get showAddRowOnBottom(): boolean; get showFooter(): boolean; get hasFooter(): boolean; get hasRemoveRows(): boolean; isRequireReset(): boolean; get headerRow(): QuestionMatrixDropdownRenderedRow; get footerRow(): QuestionMatrixDropdownRenderedRow; protected build(): void; updateShowTableAndAddRow(): void; onAddedRow(): void; onRemovedRow(row: MatrixDropdownRowModelBase): void; onDetailPanelChangeVisibility(row: MatrixDropdownRowModelBase, isShowing: boolean): void; protected buildRowsActions(): void; protected buildHeader(): void; protected buildFooter(): void; protected buildRows(): void; hasActionCellInRowsValues: any; protected setDefaultRowActions(row: MatrixDropdownRowModelBase, actions: any): void; } export declare class QuestionPanelDynamicItem implements ISurveyData, ISurveyImpl { constructor(data: IQuestionPanelDynamicData, panel: PanelModel); static ItemVariableName: string; static ParentItemVariableName: string; static IndexVariableName: string; panelValue: PanelModel; data: IQuestionPanelDynamicData; textPreProcessor: QuestionPanelDynamicItemTextProcessor; get panel(): PanelModel; setSurveyImpl(): void; getValue(name: string): any; setValue(name: string, newValue: any): void; getVariable(name: string): any; setVariable(name: string, newValue: any): void; getComment(name: string): string; setComment(name: string, newValue: string, locNotification: any): void; getAllValues(): any; getFilteredValues(): any; getFilteredProperties(): any; getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; } export declare class QuestionPanelDynamicTemplateSurveyImpl implements ISurveyImpl { constructor(data: IQuestionPanelDynamicData); data: IQuestionPanelDynamicData; getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; } export declare class QuestionRowModel extends Base { constructor(panel: PanelModelBase); panel: PanelModelBase; static rowCounter: number; protected _scrollableParent: any; protected _updateVisibility: any; startLazyRendering(rowContainerDiv: any, findScrollableContainer?: any): void; ensureVisibility(): void; stopLazyRendering(): void; idValue: string; isLazyRenderingValue: boolean; setIsLazyRendering(val: boolean): void; isLazyRendering(): boolean; get id(): string; get elements(): any; get visibleElements(): any; get visible(): boolean; set visible(val: boolean); get isNeedRender(): boolean; set isNeedRender(val: boolean); updateVisible(): void; addElement(q: IElement): void; get index(): number; setElementMaxMinWidth(el: IElement): void; dispose(): void; getRowCss(): string; } export declare class QuestionTextProcessor implements ITextProcessor { constructor(variableName: string); textPreProcessor: TextPreProcessor; processValue(name: string, returnDisplayValue: boolean): TextPreProcessorValue; protected get survey(): ISurvey; protected get panel(): PanelModel; protected getValues(): any; protected getQuestionByName(name: string): Question; protected getParentTextProcessor(): ITextProcessor; protected onCustomProcessText(textValue: TextPreProcessorValue): boolean; processText(text: string, returnDisplayValue: boolean): string; processTextEx(text: string, returnDisplayValue: boolean): any; } export declare class RenderedRatingItem extends Base { constructor(itemValue: ItemValue, locString?: LocalizableString); itemValue: ItemValue; get value(): number; get locText(): LocalizableString; } export declare class RequiredInAllRowsError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class RequreNumericError extends SurveyError { constructor(text?: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } /* * Base class of SurveyJS Elements and Survey. */ export declare class SurveyElementCore extends Base implements ILocalizableOwner { constructor(); protected createLocTitleProperty(): LocalizableString; /* * Question, Panel, Page and Survey title. If page and panel is empty then they are not rendered. * Question renders question name if the title is empty. Use survey questionTitleTemplate property to change the title question rendering. */ get title(): string; set title(val: string); get locTitle(): LocalizableString; protected getDefaultTitleValue(): string; /* * Question, Panel and Page description. It renders under element title by using smaller font. Unlike the question title, description can be empty. * Please note, this property is hidden for questions without input, for example html question. */ hasDescription: boolean; get description(): string; set description(val: string); updateDescriptionVisibility(newDescription: any): void; get locDescription(): LocalizableString; get titleTagName(): string; protected getDefaultTitleTagName(): string; get hasTitle(): boolean; get hasTitleActions(): boolean; get hasTitleEvents(): boolean; getTitleToolbar(): AdaptiveActionContainer; getTitleOwner(): ITitleOwner; get isTitleOwner(): boolean; toggleState(): boolean; get cssClasses(): any; get cssTitle(): string; get ariaTitleId(): string; get titleTabIndex(): number; get titleAriaExpanded(): boolean; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; } /* * Base SurveyJS validator class. */ export declare class SurveyValidator extends Base { constructor(); errorOwner: ISurveyErrorOwner; onAsyncCompleted: any; getSurvey(live?: boolean): ISurvey; get text(): string; set text(val: string); get isValidateAllValues(): boolean; get locText(): LocalizableString; protected getErrorText(name: string): string; protected getDefaultErrorText(name: string): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; get isRunning(): boolean; get isAsync(): boolean; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; protected createCustomError(name: string): SurveyError; toString(): string; } /* * A Model for a survey running in the Window. */ export declare class SurveyWindowModel extends Base { constructor(jsonObj: any, initialModel?: SurveyModel); static surveyElementName: string; surveyValue: SurveyModel; windowElement: any; templateValue: string; expandedChangedCallback: any; showingChangedCallback: any; closeWindowOnCompleteCallback: any; getType(): string; /* * A survey object. */ get survey(): SurveyModel; /* * Set this value to negative value, for example -1, to avoid closing the window on completing the survey. Leave it equals to 0 (default value) to close the window immediately, or set it to 3, 5, 10, ... to close the window in 3, 5, 10 seconds. */ closeOnCompleteTimeout: number; /* * Returns true if the window is currently showing. Set it to true to show the window and false to hide it. */ get isShowing(): boolean; set isShowing(val: boolean); /* * Show the window */ show(): void; /* * Hide the window */ hide(): void; /* * Returns true if the window is expanded. Set it to true to expand the window or false to collapse it. */ get isExpanded(): boolean; set isExpanded(val: boolean); /* * The window and survey title. */ get title(): string; set title(val: string); get locTitle(): LocalizableString; /* * Expand the window to show the survey. */ expand(): void; /* * Collapse the window and show survey title only. */ collapse(): void; protected createSurvey(jsonObj: any): SurveyModel; protected expandcollapse(value: boolean): void; protected onSurveyComplete(): void; protected closeWindowOnComplete(): void; } /* * A base class for all triggers. * A trigger calls a method when the expression change the result: from false to true or from true to false. * Please note, it runs only one changing the expression result. */ export declare class Trigger extends Base { constructor(); static operatorsValue: any; conditionRunner: ConditionRunner; usedNames: any; hasFunction: boolean; getType(): string; toString(): string; get operator(): string; set operator(val: string); get value(): any; set value(val: any); get name(): string; set name(val: string); get expression(): string; set expression(val: string); checkExpression(keys: any, values: any, properties?: any): void; check(value: any): void; protected onSuccess(values: any, properties: any): void; protected onFailure(): void; endLoadingFromJson(): void; buildExpression(): string; } export declare class UnaryOperand extends Operand { constructor(expressionValue: Operand, operatorName: string); consumer: any; get operator(): string; get expression(): Operand; getType(): string; toString(func?: any): string; protected isContentEqual(op: Operand): boolean; evaluate(processValue?: ProcessValue): boolean; setVariables(variables: any): void; } export declare class UploadingFileError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class VerticalResponsivityManager extends ResponsivityManager { constructor(container: any, model: any, itemsSelector: string, dotsItemSize?: number); protected getDimensions(): IDimensions; protected getAvailableSpace(): number; protected calcItemSize(item: any): number; } export declare class WebRequestEmptyError extends SurveyError { constructor(text: string, errorOwner?: ISurveyErrorOwner); text: string; getErrorType(): string; protected getDefaultText(): string; } export declare class WebRequestError extends SurveyError { constructor(status: string, response: string, errorOwner?: ISurveyErrorOwner); status: string; response: string; getErrorType(): string; protected getDefaultText(): string; } export declare class AdaptiveActionContainer<T extends Action = Action> extends ActionContainer<T> { constructor(); protected dotsItem: Action; protected dotsItemPopupModel: any; responsivityManager: ResponsivityManager; minVisibleItemsCount: number; protected invisibleItemsListModel: ListModel; protected onSet(): void; protected onPush(item: T): void; protected getRenderedActions(): Array<T>; fit(dimension: number, dotsItemSize: number): void; initResponsivityManager(container: any): void; resetResponsivityManager(): void; dispose(): void; } export declare class AnswerCountValidator extends SurveyValidator { constructor(minCount?: number, maxCount?: number); getType(): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; protected getDefaultErrorText(name: string): string; /* * The minCount property. */ get minCount(): number; set minCount(val: number); /* * The maxCount property. */ get maxCount(): number; set maxCount(val: number); } export declare class ButtonGroupItemValue extends ItemValue { constructor(value: any, text?: string, typeName?: string); iconName: string; iconSize: number; /* * By default item caption is visible. * Set it 'false' to hide item caption. */ showCaption: boolean; getType(): string; } /* * Obsolete, please use ChoicesRestful */ export declare class ChoicesRestfull extends ChoicesRestful { constructor(); static get EncodeParameters(): boolean; static set EncodeParameters(val: boolean); static clearCache(): void; static get onBeforeSendRequest(): any; static set onBeforeSendRequest(val: any); } export declare class DragDropChoices extends DragDropCore<QuestionSelectBase> { constructor(surveyValue?: ISurvey, creator?: any); protected get draggedElementType(): string; protected createDraggedElementShortcut(text: string, draggedElementNode: any, event: any): any; protected findDropTargetNodeByDragOverNode(dragOverNode: any): any; protected getDropTargetByDataAttributeValue(dataAttributeValue: string): ItemValue; protected isDropTargetValid(dropTarget: ItemValue): boolean; protected calculateIsBottom(clientY: number): boolean; protected afterDragOver(dropTargetNode: any): void; protected doDrop(): any; protected doClear(): void; } export declare class DragDropMatrixRows extends DragDropCore<QuestionMatrixDynamicModel> { constructor(surveyValue?: ISurvey, creator?: any); protected get draggedElementType(): string; protected createDraggedElementShortcut(text: string, draggedElementNode: any, event: any): any; fromIndex: number; toIndex: number; protected getDropTargetByDataAttributeValue(dataAttributeValue: any): MatrixDropdownRowModelBase; protected isDropTargetValid(dropTarget: any): boolean; protected findDropTargetNodeByDragOverNode(dragOverNode: any): any; protected calculateIsBottom(clientY: number): boolean; protected afterDragOver(dropTargetNode: any): void; protected doDrop: any; protected doClear(): void; } export declare class DragDropSurveyElements extends DragDropCore<any> { constructor(surveyValue?: ISurvey, creator?: any); static newGhostPage: PageModel; static restrictDragQuestionBetweenPages: boolean; static edgeHeight: number; static nestedPanelDepth: number; static ghostSurveyElementName: string; protected isEdge: boolean; protected prevIsEdge: any; protected ghostSurveyElement: IElement; protected get draggedElementType(): string; protected isDraggedElementSelected: boolean; startDragToolboxItem(event: any, draggedElementJson: JsonObject): void; startDragSurveyElement(event: any, draggedElement: any, isElementSelected?: boolean): void; protected createDraggedElementShortcut(text: string, draggedElementNode?: any, event?: any): any; protected createDraggedElementIcon(): any; protected getDraggedElementClass(): string; protected createElementFromJson(json: any): any; protected getDropTargetByDataAttributeValue(dataAttributeValue: string, dropTargetNode: any, event: any): any; protected isDropTargetValid(): boolean; protected calculateIsBottom(clientY: number, dropTargetNode?: any): boolean; protected isDropTargetDoesntChanged(newIsBottom: boolean): boolean; protected findDeepestDropTargetChild(parent: any): any; protected afterDragOver(): void; protected onStartDrag(): void; protected doBanDropHere: any; protected doDrop: any; protected doClear: any; protected insertGhostElementIntoSurvey(): boolean; protected removeGhostElementFromSurvey(): void; } /* * Validate e-mail address in the text input */ export declare class EmailValidator extends SurveyValidator { constructor(); re: any; getType(): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; protected getDefaultErrorText(name: string): any; } /* * Show error if expression returns false */ export declare class ExpressionValidator extends SurveyValidator { constructor(expression?: string); conditionRunner: ConditionRunner; isRunningValue: boolean; getType(): string; get isValidateAllValues(): boolean; get isAsync(): boolean; get isRunning(): boolean; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; protected generateError(res: boolean, value: any, name: string): ValidatorResult; protected getDefaultErrorText(name: string): any; protected ensureConditionRunner(): boolean; /* * The expression property. */ get expression(): string; set expression(val: string); } /* * A class that contains expression and html propeties. It uses in survey.completedHtmlOnCondition array. * If the expression returns true then html of this item uses instead of survey.completedHtml property */ export declare class HtmlConditionItem extends ExpressionItem { constructor(expression?: string, html?: string); getType(): string; /* * The html that shows on completed ('Thank you') page. The expression should return true */ get html(): string; set html(val: string); get locHtml(): LocalizableString; } export declare class ImageItemValue extends ItemValue implements ILocalizableOwner { constructor(value: any, text?: string, typeName?: string); getType(): string; /* * The image or video link property. */ get imageLink(): string; set imageLink(val: string); get locImageLink(): LocalizableString; getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; } export declare class JsonIncorrectTypeError extends JsonMissingTypeErrorBase { constructor(propertyName: string, baseClassName: string); propertyName: string; baseClassName: string; } export declare class JsonMissingTypeError extends JsonMissingTypeErrorBase { constructor(propertyName: string, baseClassName: string); propertyName: string; baseClassName: string; } export declare class ListModel extends ActionContainer { constructor(items: any, onItemSelect: any, allowSelection: boolean, selectedItem?: IAction, onFilteredTextChange?: any); onItemSelect: any; allowSelection: boolean; needFilter: boolean; isExpanded: boolean; selectedItem: IAction; filteredText: string; static INDENT: number; static MINELEMENTCOUNT: number; protected onSet(): void; selectItem: any; isItemDisabled: any; isItemSelected: any; getItemClass: any; getItemIndent: any; get filteredTextPlaceholder(): any; onKeyDown(event: any): void; onPointerDown(event: any, item: any): void; refresh(): void; } export declare class MatrixDropdownRowModel extends MatrixDropdownRowModelBase { constructor(name: string, item: ItemValue, data: IMatrixDropdownData, value: any); name: string; item: ItemValue; get rowName(): string; get text(): string; get locText(): LocalizableString; } export declare class MatrixDropdownRowTextProcessor extends QuestionTextProcessor { constructor(row: MatrixDropdownRowModelBase, variableName: string, parentTextProcessor: ITextProcessor); protected getParentTextProcessor(): ITextProcessor; protected get survey(): ISurvey; protected getValues(): any; protected getQuestionByName(name: string): Question; protected onCustomProcessText(textValue: TextPreProcessorValue): boolean; } export declare class MatrixDropdownTotalRowModel extends MatrixDropdownRowModelBase { constructor(data: IMatrixDropdownData); protected createCell(column: MatrixDropdownColumn): MatrixDropdownCell; setValue(name: string, newValue: any): void; runCondition(values: any, properties: any): void; protected updateCellOnColumnChanged(cell: MatrixDropdownCell, name: string, newValue: any): void; } export declare class MatrixDynamicRowModel extends MatrixDropdownRowModelBase implements IShortcutText { constructor(index: number, data: IMatrixDropdownData, value: any); index: number; dragOrClickHelper: DragOrClickHelper; get rowName(): string; get shortcutText(): string; } export declare class MultipleTextItem extends MultipleTextItemModel { constructor(name?: any, title?: string); protected createEditor(name: string): QuestionTextModel; } /* * Validate numeric values. */ export declare class NumericValidator extends SurveyValidator { constructor(minValue?: number, maxValue?: number); getType(): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; protected getDefaultErrorText(name: string): any; /* * The minValue property. */ get minValue(): number; set minValue(val: number); /* * The maxValue property. */ get maxValue(): number; set maxValue(val: number); } export declare class QuestionCompositeTextProcessor extends QuestionTextProcessor { constructor(composite: QuestionCompositeModel, variableName: string); protected get survey(): ISurvey; protected get panel(): PanelModel; } export declare class QuestionFileImplementor extends QuestionImplementor { constructor(question: QuestionFile); } export declare class QuestionMatrixBaseImplementor extends QuestionImplementor { constructor(question: any); _tableImplementor: ImplementorBase; koRecalc: any; protected getQuestionTemplate(): string; protected isAddRowTop(): boolean; protected isAddRowBottom(): boolean; protected addRow(): void; protected removeRow(row: any): void; dispose(): void; } export declare class QuestionMatrixDynamicRenderedTable extends QuestionMatrixDropdownRenderedTable { constructor(matrix: QuestionMatrixDropdownModelBase); matrix: QuestionMatrixDropdownModelBase; protected setDefaultRowActions(row: MatrixDropdownRowModelBase, actions: any): void; } export declare class QuestionMultipleTextImplementor extends QuestionImplementor { constructor(question: QuestionMultipleText); koRecalc: any; } export declare class QuestionPanelDynamicImplementor extends QuestionImplementor { constructor(question: QuestionPanelDynamic); koRecalc: any; protected onPanelCountChanged(): void; protected onRenderModeChanged(): void; protected onCurrentIndexChanged(): void; protected addPanel(): void; protected removePanel(val: any): void; protected get progress(): string; dispose(): void; } export declare class QuestionPanelDynamicItemTextProcessor extends QuestionTextProcessor { constructor(data: IQuestionPanelDynamicData, panelItem: QuestionPanelDynamicItem, variableName: string); protected get survey(): ISurvey; protected get panel(): PanelModel; protected getValues(): any; protected getQuestionByName(name: string): Question; protected onCustomProcessText(textValue: TextPreProcessorValue): boolean; } export declare class QuestionRatingImplementor extends QuestionImplementor { constructor(question: any); protected onCreated(): void; dispose(): void; } export declare class QuestionRow extends QuestionRowModel { constructor(panel: any); panel: any; koElementAfterRender: any; getElementType(el: any): "survey-panel" | "survey-question"; koAfterRender(el: any, con: any): void; rowAfterRender(elements: any, model: QuestionRow): void; dispose(): void; } export declare class QuestionSelectBaseImplementor extends QuestionImplementor { constructor(question: any); protected onCreated(): void; protected get isOtherSelected(): boolean; } /* * Use it to validate the text by regular expressions. */ export declare class RegexValidator extends SurveyValidator { constructor(regex?: string); getType(): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; /* * The regex property. */ get regex(): string; set regex(val: string); } /* * Base class of SurveyJS Elements. */ export declare class SurveyElement extends SurveyElementCore implements ISurveyElement { constructor(name: string); stateChangedCallback: any; static getProgressInfoByElements(children: any, isRequired: boolean): IProgressInfo; surveyImplValue: ISurveyImpl; surveyDataValue: ISurveyData; surveyValue: ISurvey; textProcessorValue: ITextProcessor; selectedElementInDesignValue: SurveyElement; dragTypeOverMe: DragTypeOverMeEnum; isDragMe: boolean; readOnlyChangedCallback: any; static ScrollElementToTop(elementId: string): boolean; static GetFirstNonTextElement(elements: any, removeSpaces?: boolean): any; static FocusElement(elementId: string): boolean; static CreateDisabledDesignElements: boolean; disableDesignActions: boolean; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; protected getSkeletonComponentNameCore(): string; get skeletonComponentName(): string; /* * Set this property to "collapsed" to render only Panel title and expanded button and to "expanded" to render the collapsed button in the Panel caption */ get state(): string; set state(val: string); /* * Returns true if the Element is in the collapsed state */ get isCollapsed(): boolean; /* * Returns true if the Element is in the expanded state */ get isExpanded(): boolean; /* * Collapse the Element */ collapse(): void; /* * Expand the Element */ expand(): void; /* * Toggle element's state */ toggleState(): boolean; get hasStateButton(): boolean; get shortcutText(): string; titleToolbarValue: any; getTitleToolbar(): AdaptiveActionContainer; get titleActions(): any; isTitleActionRequested: boolean; getTitleActions(): Array<any>; get hasTitleActions(): boolean; get hasTitleEvents(): boolean; getTitleComponentName(): string; get titleTabIndex(): number; get titleAriaExpanded(): boolean; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; protected get surveyImpl(): ISurveyImpl; __setData(data: ISurveyData): void; get data(): ISurveyData; /* * Returns the survey object. */ get survey(): ISurvey; getSurvey(live?: boolean): ISurvey; protected setSurveyCore(value: ISurvey): void; /* * Returns true if the question in design mode right now. */ get isDesignMode(): boolean; isContentElement: boolean; isEditableTemplateElement: boolean; isInteractiveDesignElement: boolean; protected get isInternal(): boolean; get areInvisibleElementsShowing(): boolean; get isVisible(): boolean; get isReadOnly(): boolean; /* * Set it to true to make an element question/panel/page readonly. * Please note, this property is hidden for question without input, for example html question. */ get readOnly(): boolean; set readOnly(val: boolean); protected onReadOnlyChanged(): void; cssClassesValue: any; /* * Returns all css classes that used for rendering the question, panel or page. * You can use survey.onUpdateQuestionCssClasses event to override css classes for a question, survey.onUpdatePanelCssClasses event for a panel and survey.onUpdatePageCssClasses for a page. */ get cssClasses(): any; protected calcCssClasses(css: any): any; protected updateElementCssCore(cssClasses: any): void; get cssError(): string; updateElementCss(reNew?: boolean): void; protected clearCssClasses(): void; protected getIsLoadingFromJson(): boolean; /* * This is the identifier of a survey element - question or panel. */ get name(): string; set name(val: string); protected getValidName(name: string): string; protected onNameChanged(oldValue: string): void; protected updateBindingValue(valueName: string, value: any): void; /* * The list of errors. It is created by callig hasErrors functions */ get errors(): any; set errors(val: any); hasVisibleErrors: boolean; /* * Returns true if a question or a container (panel/page) or their chidren have an error. * The value can be out of date. hasErrors function should be called to get the correct value. */ get containsErrors(): boolean; updateContainsErrors(): void; protected getContainsErrors(): boolean; getElementsInDesign(includeHidden?: boolean): Array<IElement>; get selectedElementInDesign(): SurveyElement; set selectedElementInDesign(val: SurveyElement); updateCustomWidgets(): void; onSurveyLoad(): void; onFirstRendering(): void; endLoadingFromJson(): void; setVisibleIndex(index: number): number; /* * Returns true if it is a page. */ get isPage(): boolean; /* * Returns true if it is a panel. */ get isPanel(): boolean; /* * Returns true if it is a question. */ get isQuestion(): boolean; delete(): void; locOwner: ILocalizableOwner; /* * Returns the current survey locale */ getLocale(): string; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): any; getProcessedText(text: string): string; protected getUseDisplayValuesInTitle(): boolean; protected removeSelfFromList(list: any): void; protected get textProcessor(): ITextProcessor; protected getProcessedHtml(html: string): string; protected onSetData(): void; get parent(): IPanel; set parent(val: IPanel); protected getPage(parent: IPanel): IPage; protected moveToBase(parent: IPanel, container: IPanel, insertBefore?: any): boolean; protected setPage(parent: IPanel, newPage: IPage): void; protected getSearchableLocKeys(keys: any): void; protected get isDefaultV2Theme(): boolean; get isErrorsModeTooltip(): boolean; get hasParent(): boolean; protected get hasFrameV2(): boolean; /* * Use it to set the specific width to the survey element like css style (%, px, em etc). */ get width(): string; set width(val: string); /* * Use it to set the specific minWidth constraint to the survey element like css style (%, px, em etc). */ get minWidth(): string; set minWidth(val: string); /* * Use it to set the specific maxWidth constraint to the survey element like css style (%, px, em etc). */ get maxWidth(): string; set maxWidth(val: string); /* * The rendered width of the question. */ get renderWidth(): string; set renderWidth(val: string); /* * The left indent. Set this property to increase the survey element left indent. */ get indent(): number; set indent(val: number); /* * The right indent. Set it different from 0 to increase the right padding. */ get rightIndent(): number; set rightIndent(val: number); get paddingLeft(): string; set paddingLeft(val: string); get paddingRight(): string; set paddingRight(val: string); allowRootStyle: boolean; get rootStyle(): any; } /* * The `Survey` object contains information about the survey, Pages, Questions, flow logic and etc. */ export declare class SurveyModel extends SurveyElementCore implements ISurvey, ISurveyData, ISurveyImpl, ISurveyTriggerOwner, ISurveyErrorOwner { constructor(jsonObj?: any); static TemplateRendererComponentName: string; static stylesManager: StylesManager; static platform: string; get platformName(): string; /* * You can display an additional field (comment field) for the most of questions; users can enter additional comments to their response. * The comment field input is saved as `'question name' + 'commentPrefix'`. */ get commentPrefix(): string; set commentPrefix(val: string); valuesHash: any; variablesHash: any; editingObjValue: Base; localeValue: string; textPreProcessor: TextPreProcessor; completedStateValue: string; completedStateTextValue: string; isTimerStarted: boolean; /* * The event is fired before the survey is completed and the `onComplete` event is fired. You can prevent the survey from completing by setting `options.allowComplete` to `false` * <br/> `sender` - the survey object that fires the event. * <br/> `options.allowComplete` - Specifies whether a user can complete a survey. Set this property to `false` to prevent the survey from completing. The default value is `true`. * <br/> `options.isCompleteOnTrigger` - returns true if the survey is completing on "complete" trigger. */ onCompleting: EventBase<SurveyModel>; /* * The event is fired after a user clicks the 'Complete' button and finishes a survey. Use this event to send the survey data to your web server. * <br/> `sender` - the survey object that fires the event. * <br/> `options.showDataSaving(text)` - call this method to show that the survey is saving survey data on your server. The `text` is an optional parameter to show a custom message instead of default. * <br/> `options.showDataSavingError(text)` - call this method to show that an error occurred while saving the data on your server. If you want to show a custom error, use an optional `text` parameter. * <br/> `options.showDataSavingSuccess(text)` - call this method to show that the data was successfully saved on the server. * <br/> `options.showDataSavingClear` - call this method to hide the text about the saving progress. * <br/> `options.isCompleteOnTrigger` - returns true if the survey is completed on "complete" trigger. */ onComplete: EventBase<SurveyModel>; /* * The event is fired before the survey is going to preview mode, state equals to `preview`. It happens when a user click on "Preview" button. It shows when "showPreviewBeforeComplete" proeprty equals to "showAllQuestions" or "showAnsweredQuestions". * You can prevent showing it by setting allowShowPreview to `false`. * <br/> `sender` - the survey object that fires the event. * <br/> `options.allowShowPreview` - Specifies whether a user can see a preview. Set this property to `false` to prevent from showing the preview. The default value is `true`. */ onShowingPreview: EventBase<SurveyModel>; /* * The event is fired after a user clicks the 'Complete' button. The event allows you to specify the URL opened after completing a survey. * Specify the `navigateToUrl` property to make survey navigate to another url. * <br/> `sender` - the survey object that fires the event. * <br/> `options.url` - Specifies a URL opened after completing a survey. Set this property to an empty string to cancel the navigation and show the completed survey page. */ onNavigateToUrl: EventBase<SurveyModel>; /* * The event is fired after the survey changed it's state from "starting" to "running". The "starting" state means that survey shows the started page. * The `firstPageIsStarted` property should be set to `true`, if you want to display a start page in your survey. In this case, an end user should click the "Start" button to start the survey. */ onStarted: EventBase<SurveyModel>; /* * The event is fired on clicking the 'Next' button if the `sendResultOnPageNext` is set to `true`. You can use it to save the intermediate results, for example, if your survey is large enough. * <br/> `sender` - the survey object that fires the event. */ onPartialSend: EventBase<SurveyModel>; /* * The event is fired before the current page changes to another page. Typically it happens when a user click the 'Next' or 'Prev' buttons. * <br/> `sender` - the survey object that fires the event. * <br/> `option.oldCurrentPage` - the previous current/active page. * <br/> `option.newCurrentPage` - a new current/active page. * <br/> `option.allowChanging` - set it to `false` to disable the current page changing. It is `true` by default. * <br/> `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage * <br/> `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage */ onCurrentPageChanging: EventBase<SurveyModel>; /* * The event is fired when the current page has been changed to another page. Typically it happens when a user click on 'Next' or 'Prev' buttons. * <br/> `sender` - the survey object that fires the event. * <br/> `option.oldCurrentPage` - a previous current/active page. * <br/> `option.newCurrentPage` - a new current/active page. * <br/> `option.isNextPage` - commonly means, that end-user press the next page button. In general, it means that options.newCurrentPage is the next page after options.oldCurrentPage * <br/> `option.isPrevPage` - commonly means, that end-user press the previous page button. In general, it means that options.newCurrentPage is the previous page before options.oldCurrentPage */ onCurrentPageChanged: EventBase<SurveyModel>; /* * The event is fired before the question value (answer) is changed. It can be done via UI by a user or programmatically on calling the `setValue` method. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - the value name that has being changed. * <br/> `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is null. * <br/> `options.oldValue` - an old, previous value. * <br/> `options.value` - a new value. You can change it. */ onValueChanging: EventBase<SurveyModel>; /* * The event is fired when the question value (i.e., answer) has been changed. The question value can be changed in UI (by a user) or programmatically (on calling `setValue` method). * Use the `onDynamicPanelItemValueChanged` and `onMatrixCellValueChanged` events to handle changes in a question in the Panel Dynamic and a cell question in matrices. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - the value name that has been changed. * <br/> `options.question` - a question which `question.name` equals to the value name. If there are several questions with the same name, the first question is used. If there is no such questions, the `options.question` is `null`. * <br/> `options.value` - a new value. */ onValueChanged: EventBase<SurveyModel>; /* * The event is fired when setVariable function is called. It can be called on changing a calculated value. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - the variable name that has been changed. * <br/> `options.value` - a new value. */ onVariableChanged: EventBase<SurveyModel>; /* * The event is fired when a question visibility has been changed. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question which visibility has been changed. * <br/> `options.name` - a question name. * <br/> `options.visible` - a question `visible` boolean value. */ onVisibleChanged: EventBase<SurveyModel>; /* * The event is fired on changing a page visibility. * <br/> `sender` - the survey object that fires the event. * <br/> `options.page` - a page which visibility has been changed. * <br/> `options.visible` - a page `visible` boolean value. */ onPageVisibleChanged: EventBase<SurveyModel>; /* * The event is fired on changing a panel visibility. * <br/> `sender` - the survey object that fires the event. * <br/> `options.panel` - a panel which visibility has been changed. * <br/> `options.visible` - a panel `visible` boolean value. */ onPanelVisibleChanged: EventBase<SurveyModel>; /* * The event is fired on creating a new question. * Unlike the onQuestionAdded event, this event calls for all question created in survey including inside: a page, panel, matrix cell, dynamic panel and multiple text. * or inside a matrix cell or it can be a text question in multiple text items or inside a panel of a panel dynamic. * You can use this event to set up properties to a question based on it's type for all questions, regardless where they are located, on the page or inside a matrix cell. * Please note: If you want to use this event for questions loaded from JSON then you have to create survey with empty/null JSON parameter, assign the event and call survey.fromJSON(yourJSON) function. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a newly created question object. */ onQuestionCreated: EventBase<SurveyModel>; /* * The event is fired on adding a new question into survey. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a newly added question object. * <br/> `options.name` - a question name. * <br/> `options.index` - an index of the question in the container (page or panel). * <br/> `options.parentPanel` - a container where a new question is located. It can be a page or panel. * <br/> `options.rootPanel` - typically, it is a page. */ onQuestionAdded: EventBase<SurveyModel>; /* * The event is fired on removing a question from survey. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a removed question object. * <br/> `options.name` - a question name. */ onQuestionRemoved: EventBase<SurveyModel>; /* * The event is fired on adding a panel into survey. * <br/> `sender` - the survey object that fires the event. * <br/> `options.panel` - a newly added panel object. * <br/> `options.name` - a panel name. * <br/> `options.index` - an index of the panel in the container (a page or panel). * <br/> `options.parentPanel` - a container (a page or panel) where a new panel is located. * <br/> `options.rootPanel` - a root container, typically it is a page. */ onPanelAdded: EventBase<SurveyModel>; /* * The event is fired on removing a panel from survey. * <br/> `sender` - the survey object that fires the event. * <br/> `options.panel` - a removed panel object. * <br/> `options.name` - a panel name. */ onPanelRemoved: EventBase<SurveyModel>; /* * The event is fired on adding a page into survey. * <br/> `sender` - the survey object that fires the event. * <br/> `options.page` - a newly added `panel` object. */ onPageAdded: EventBase<SurveyModel>; /* * The event is fired on validating value in a question. You can specify a custom error message using `options.error`. The survey blocks completing the survey or going to the next page when the error messages are displayed. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a validated question. * <br/> `options.name` - a question name. * <br/> `options.value` - the current question value (answer). * <br/> `options.error` - an error string. It is empty by default. */ onValidateQuestion: EventBase<SurveyModel>; /* * The event is fired before errors are assigned to a question. You may add/remove/modify errors for a question. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a validated question. * <br/> `options.errors` - the list of errors. The list is empty by default and remains empty if a validated question has no errors. */ onSettingQuestionErrors: EventBase<SurveyModel>; /* * Use this event to validate data on your server. * <br/> `sender` - the survey object that fires the event. * <br/> `options.data` - the values of all non-empty questions on the current page. You can get a question value as `options.data["myQuestionName"]`. * <br/> `options.errors` - set your errors to this object as: `options.errors["myQuestionName"] = "Error text";`. It will be shown as a question error. * <br/> `options.complete()` - call this function to tell survey that your server callback has been processed. */ onServerValidateQuestions: any; /* * The event is fired on validating a panel. Set your error to `options.error` and survey will show the error for the panel and block completing the survey or going to the next page. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - a panel name. * <br/> `options.error` - an error string. It is empty by default. */ onValidatePanel: EventBase<SurveyModel>; /* * Use the event to change the default error text. * <br/> `sender` - the survey object that fires the event. * <br/> `options.text` - an error text. * <br/> `options.error` - an instance of the `SurveyError` object. * <br/> `options.obj` - an instance of Question, Panel or Survey object to where error is located. * <br/> `options.name` - the error name. The following error names are available: * required, requireoneanswer, requirenumeric, exceedsize, webrequest, webrequestempty, otherempty, * uploadingfile, requiredinallrowserror, minrowcounterror, keyduplicationerror, custom */ onErrorCustomText: EventBase<SurveyModel>; /* * Use the this event to be notified when the survey finished validate questions on the current page. It commonly happens when a user try to go to the next page or complete the survey * options.questions - the list of questions that have errors * options.errors - the list of errors * options.page - the page where question(s) are located */ onValidatedErrorsOnCurrentPage: EventBase<SurveyModel>; /* * Use this event to modify the HTML content before rendering, for example `completeHtml` or `loadingHtml`. * `options.html` - specifies the modified HTML content. */ onProcessHtml: EventBase<SurveyModel>; /* * Use this event to change the question title in code. If you want to remove question numbering then set showQuestionNumbers to "off". * <br/> `sender` - the survey object that fires the event. * <br/> `options.title` - a calculated question title, based on question `title`, `name`. * <br/> `options.question` - a question object. */ onGetQuestionTitle: EventBase<SurveyModel>; /* * Use this event to change the element title tag name that renders by default. * <br/> `sender` - the survey object that fires the event. * <br/> `options.element` - an element (question, panel, page and survey) that SurveyJS is going to render. * <br/> `options.tagName` - an element title tagName that are used to render a title. You can change it from the default value. */ onGetTitleTagName: EventBase<SurveyModel>; /* * Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off". * <br/> `sender` - the survey object that fires the event. * <br/> `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it. * <br/> `options.question` - a question object. */ onGetQuestionNo: EventBase<SurveyModel>; /* * Use this event to change the progress text in code. * <br/> `sender` - the survey object that fires the event. * <br/> `options.text` - a progress text, that SurveyJS will render in progress bar. * <br/> `options.questionCount` - a number of questions that have input(s). We do not count html or expression questions * <br/> `options.answeredQuestionCount` - a number of questions that have input(s) and an user has answered. * <br/> `options.requiredQuestionCount` - a number of required questions that have input(s). We do not count html or expression questions * <br/> `options.requiredAnsweredQuestionCount` - a number of required questions that have input(s) and an user has answered. */ onProgressText: EventBase<SurveyModel>; /* * Use this event to process the markdown text. * <br/> `sender` - the survey object that fires the event. * <br/> `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered. * <br/> `options.name` - a property name is going to be rendered. * <br/> `options.text` - a text that is going to be rendered. * <br/> `options.html` - an HTML content. It is `null` by default. Use this property to specify the HTML content rendered instead of `options.text`. */ onTextMarkdown: EventBase<SurveyModel>; /* * Use this event to specity render component name used for text rendering. * <br/> `sender` - the survey object that fires the event. * <br/> `options.element` - SurveyJS element (a question, panel, page, or survey) where the string is going to be rendered. * <br/> `options.name` - a property name is going to be rendered. * <br/> `options.renderAs` - a component name used for text rendering. */ onTextRenderAs: EventBase<SurveyModel>; /* * The event fires when it gets response from the [api.surveyjs.io](https://api.surveyjs.io) service on saving survey results. Use it to find out if the results have been saved successfully. * <br/> `sender` - the survey object that fires the event. * <br/> `options.success` - it is `true` if the results has been sent to the service successfully. * <br/> `options.response` - a response from the service. */ onSendResult: EventBase<SurveyModel>; /* * Use it to get results after calling the `getResult` method. It returns a simple analytics from [api.surveyjs.io](https://api.surveyjs.io) service. * <br/> `sender` - the survey object that fires the event. * <br/> `options.success` - it is `true` if the results were got from the service successfully. * <br/> `options.data` - the object `{AnswersCount, QuestionResult : {} }`. `AnswersCount` is the number of posted survey results. `QuestionResult` is an object with all possible unique answers to the question and number of these answers. * <br/> `options.dataList` - an array of objects `{name, value}`, where `name` is a unique value/answer to the question and `value` is a number/count of such answers. * <br/> `options.response` - the server response. */ onGetResult: EventBase<SurveyModel>; /* * The event is fired on uploading the file in QuestionFile when `storeDataAsText` is set to `false`. Use this event to change the uploaded file name or to prevent a particular file from being uploaded. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the file question instance. * <br/> `options.name` - the question name. * <br/> `options.files` - the Javascript File objects array to upload. * <br/> `options.callback` - a callback function to get the file upload status and the updloaded file content. */ onUploadFiles: EventBase<SurveyModel>; /* * The event is fired on downloading a file in QuestionFile. Use this event to pass the file to a preview. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - the question name. * <br/> `options.content` - the file content. * <br/> `options.fileValue` - single file question value. * <br/> `options.callback` - a callback function to get the file downloading status and the downloaded file content. */ onDownloadFile: EventBase<SurveyModel>; /* * This event is fired on clearing the value in a QuestionFile. Use this event to remove files stored on your server. * <br/> `sender` - the survey object that fires the event. * <br/> `question` - the question instance. * <br/> `options.name` - the question name. * <br/> `options.value` - the question value. * <br/> `options.fileName` - a removed file's name, set it to `null` to clear all files. * <br/> `options.callback` - a callback function to get the operation status. */ onClearFiles: EventBase<SurveyModel>; /* * The event is fired after choices for radiogroup, checkbox, and dropdown has been loaded from a RESTful service and before they are assigned to a question. * You may change the choices, before they are assigned or disable/enabled make visible/invisible question, based on loaded results. * <br/> `sender` - the survey object that fires the event. * <br/> `question` - the question where loaded choices are going to be assigned. * <br/> `choices` - the loaded choices. You can change the loaded choices to before they are assigned to question. * <br/> `serverResult` - a result that comes from the server as it is. */ onLoadChoicesFromServer: EventBase<SurveyModel>; /* * The event is fired after survey is loaded from api.surveyjs.io service. * You can use this event to perform manipulation with the survey model after it was loaded from the web service. * <br/> `sender` - the survey object that fires the event. */ onLoadedSurveyFromService: EventBase<SurveyModel>; /* * The event is fired on processing the text when it finds a text in brackets: `{somevalue}`. By default, it uses the value of survey question values and variables. * For example, you may use the text processing in loading choices from the web. If your `choicesByUrl.url` equals to "UrlToServiceToGetAllCities/{country}/{state}", * you may set on this event `options.value` to "all" or empty string when the "state" value/question is non selected by a user. * <br/> `sender` - the survey object that fires the event. * <br/> `options.name` - the name of the processing value, for example, "state" in our example. * <br/> `options.value` - the value of the processing text. * <br/> `options.isExists` - a boolean value. Set it to `true` if you want to use the value and set it to `false` if you don't. */ onProcessTextValue: EventBase<SurveyModel>; /* * The event is fired before rendering a question. Use it to override the default question CSS classes. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question for which you can change the CSS classes. * <br/> `options.cssClasses` - an object with CSS classes. For example `{root: "table", button: "button"}`. You can change them to your own CSS classes. */ onUpdateQuestionCssClasses: EventBase<SurveyModel>; /* * The event is fired before rendering a panel. Use it to override the default panel CSS classes. * <br/> `sender` - the survey object that fires the event. * <br/> `options.panel` - a panel for which you can change the CSS classes. * <br/> `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes. */ onUpdatePanelCssClasses: EventBase<SurveyModel>; /* * The event is fired before rendering a page. Use it to override the default page CSS classes. * <br/> `sender` - the survey object that fires the event. * <br/> `options.page` - a page for which you can change the CSS classes. * <br/> `options.cssClasses` - an object with CSS classes. For example `{title: "sv_p_title", description: "small"}`. You can change them to your own CSS classes. */ onUpdatePageCssClasses: EventBase<SurveyModel>; /* * The event is fired before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question where choice item is rendered. * <br/> `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.choice.text * <br/> `options.css` - a string with css classes divided by space. You can change it. */ onUpdateChoiceItemCss: EventBase<SurveyModel>; /* * The event is fired right after survey is rendered in DOM. * <br/> `sender` - the survey object that fires the event. * <br/> `options.htmlElement` - a root HTML element bound to the survey object. */ onAfterRenderSurvey: EventBase<SurveyModel>; /* * The event is fired right after a page is rendered in DOM. Use it to modify HTML elements. * <br/> `sender` - the survey object that fires the event. * <br/> `options.htmlElement` - an HTML element bound to the survey header object. */ onAfterRenderHeader: EventBase<SurveyModel>; /* * The event is fired right after a page is rendered in DOM. Use it to modify HTML elements. * <br/> `sender` - the survey object that fires the event. * <br/> `options.page` - a page object for which the event is fired. Typically the current/active page. * <br/> `options.htmlElement` - an HTML element bound to the page object. */ onAfterRenderPage: EventBase<SurveyModel>; /* * The event is fired right after a question is rendered in DOM. Use it to modify HTML elements. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question object for which the event is fired. * <br/> `options.htmlElement` - an HTML element bound to the question object. */ onAfterRenderQuestion: EventBase<SurveyModel>; /* * The event is fired right after a non-composite question (text, comment, dropdown, radiogroup, checkbox) is rendered in DOM. Use it to modify HTML elements. * This event is not fired for matrices, panels, multiple text and image picker. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question object for which the event is fired. * <br/> `options.htmlElement` - an HTML element bound to the question object. */ onAfterRenderQuestionInput: EventBase<SurveyModel>; /* * The event is fired right after a panel is rendered in DOM. Use it to modify HTML elements. * <br/> `sender` - the survey object that fires the event * <br/> `options.panel` - a panel object for which the event is fired * <br/> `options.htmlElement` - an HTML element bound to the panel object */ onAfterRenderPanel: EventBase<SurveyModel>; /* * The event occurs when an element within a question gets focus. * <br/> `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event. * <br/> `options.question` - A [question](https://surveyjs.io/Documentation/Library?id=Question) whose child element gets focus. */ onFocusInQuestion: EventBase<SurveyModel>; /* * The event occurs when an element within a panel gets focus. * <br/> `sender` - A [survey](https://surveyjs.io/Documentation/Library?id=surveymodel) object that fires the event. * <br/> `options.panel` - A [panel](https://surveyjs.io/Documentation/Library?id=PanelModelBase) whose child element gets focus. */ onFocusInPanel: EventBase<SurveyModel>; /* * You can use this event to decide whether show or hide choice item in checkbox, dropdown and radiogroup like questions * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a question that contains choices. * <br/> `options.item` - an item of the question. */ onShowingChoiceItem: EventBase<SurveyModel>; /* * The event is fired on adding a new row in Matrix Dynamic question. * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a matrix question. * <br/> `options.row` - a new added row. */ onMatrixRowAdded: EventBase<SurveyModel>; /* * The event is fired before adding a new row in Matrix Dynamic question. * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a matrix question. * <br/> `options.canAddRow` - specifies whether a new row can be added */ onMatrixBeforeRowAdded: EventBase<SurveyModel>; /* * The event is fired before removing a row from Matrix Dynamic question. You can disable removing and clear the data instead. * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a matrix question. * <br/> `options.rowIndex` - a row index. * <br/> `options.row` - a row object. * <br/> `options.allow` - a boolean property. Set it to `false` to disable the row removing. */ onMatrixRowRemoving: EventBase<SurveyModel>; /* * The event is fired on removing a row from Matrix Dynamic question. * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a matrix question * <br/> `options.rowIndex` - a removed row index * <br/> `options.row` - a removed row object */ onMatrixRowRemoved: EventBase<SurveyModel>; /* * The event is fired before rendering "Remove" button for removing a row from Matrix Dynamic question. * <br/> `sender` - the survey object that fires the event * <br/> `options.question` - a matrix question. * <br/> `options.rowIndex` - a row index. * <br/> `options.row` - a row object. * <br/> `options.allow` - a boolean property. Set it to `false` to disable the row removing. */ onMatrixAllowRemoveRow: EventBase<SurveyModel>; /* * The event is fired before creating cell question in the matrix. You can change the cell question type by setting different options.cellType. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the matrix question. * <br/> `options.cellType` - the cell question type. You can change it. * <br/> `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`. * <br/> `options.column` - the matrix column object. * <br/> `options.columnName` - the matrix column name. * <br/> `options.row` - the matrix row object. */ onMatrixCellCreating: EventBase<SurveyModel>; /* * The event is fired for every cell created in Matrix Dynamic and Matrix Dropdown questions. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the matrix question. * <br/> `options.cell` - the matrix cell. * <br/> `options.cellQuestion` - the question/editor in the cell. You may customize it, change it's properties, like choices or visible. * <br/> `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`. * <br/> `options.column` - the matrix column object. * <br/> `options.columnName` - the matrix column name. * <br/> `options.row` - the matrix row object. */ onMatrixCellCreated: EventBase<SurveyModel>; /* * The event is fired for every cell after is has been rendered in DOM. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the matrix question. * <br/> `options.cell` - the matrix cell. * <br/> `options.cellQuestion` - the question/editor in the cell. * <br/> `options.htmlElement` - an HTML element bound to the `cellQuestion` object. * <br/> `options.column` - the matrix column object. * <br/> `options.row` - the matrix row object. */ onMatrixAfterCellRender: EventBase<SurveyModel>; /* * The event is fired when cell value is changed in Matrix Dynamic and Matrix Dropdown questions. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the matrix question. * <br/> `options.columnName` - the matrix column name. * <br/> `options.value` - a new value. * <br/> `options.row` - the matrix row object. * <br/> `options.getCellQuestion(columnName)` - the function that returns the cell question by column name. */ onMatrixCellValueChanged: EventBase<SurveyModel>; /* * The event is fired on changing cell value in Matrix Dynamic and Matrix Dropdown questions. You may change the `options.value` property to change a cell value. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the matrix question. * <br/> `options.columnName` - the matrix column name. * <br/> `options.value` - a new value. * <br/> `options.oldValue` - the old value. * <br/> `options.row` - the matrix row object. * <br/> `options.getCellQuestion(columnName)` - the function that returns a cell question by column name. */ onMatrixCellValueChanging: EventBase<SurveyModel>; /* * The event is fired when Matrix Dynamic and Matrix Dropdown questions validate the cell value. * <br/> `sender` - the survey object that fires the event. * <br/> `options.error` - an error string. It is empty by default. * <br/> `options.question` - the matrix question. * <br/> `options.columnName` - the matrix column name. * <br/> `options.value` - a cell value. * <br/> `options.row` - the matrix row object. * <br/> `options.getCellQuestion(columnName)` - the function that returns the cell question by column name. */ onMatrixCellValidate: EventBase<SurveyModel>; /* * The event is fired on adding a new panel in Panel Dynamic question. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a panel question. * <br/> `options.panel` - an added panel. */ onDynamicPanelAdded: EventBase<SurveyModel>; /* * The event is fired on removing a panel from Panel Dynamic question. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a panel question. * <br/> `options.panelIndex` - a removed panel index. * <br/> `options.panel` - a removed panel. */ onDynamicPanelRemoved: EventBase<SurveyModel>; /* * The event is fired every second if the method `startTimer` has been called. */ onTimer: EventBase<SurveyModel>; /* * The event is fired before displaying a new information in the Timer Panel. Use it to change the default text. * <br/> `sender` - the survey object that fires the event. * <br/> `options.text` - the timer panel info text. */ onTimerPanelInfoText: EventBase<SurveyModel>; /* * The event is fired when item value is changed in Panel Dynamic question. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - the panel question. * <br/> `options.panel` - the dynamic panel item. * <br/> `options.name` - the item name. * <br/> `options.value` - a new value. * <br/> `options.itemIndex` - the panel item index. * <br/> `options.itemValue` - the panel item object. */ onDynamicPanelItemValueChanged: EventBase<SurveyModel>; /* * Use this event to define, whether an answer to a question is correct or not. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - a question on which you have to decide if the answer is correct or not. * <br/> `options.result` - returns `true`, if an answer is correct, or `false`, if the answer is not correct. Use questions' `value` and `correctAnswer` properties to return the correct value. * <br/> `options.correctAnswers` - you may change the default number of correct or incorrect answers in the question, for example for matrix, where each row is a quiz question. */ onIsAnswerCorrect: EventBase<SurveyModel>; /* * Use this event to control drag&drop operations during design mode. * <br/> `sender` - the survey object that fires the event. * <br/> `options.allow` - set it to `false` to disable dragging. * <br/> `options.target` - a target element that is dragged. * <br/> `options.source` - a source element. It can be `null`, if it is a new element, dragging from toolbox. * <br/> `options.parent` - a page or panel where target element is dragging. * <br/> `options.insertBefore` - an element before the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging an element after the last element in a container. * <br/> `options.insertAfter` - an element after the target element is dragging. It can be `null` if parent container (page or panel) is empty or dragging element to the first position within the parent container. */ onDragDropAllow: EventBase<SurveyModel>; /* * Use this event to control scrolling element to top. You can cancel the default behavior by setting options.cancel property to true. * <br/> `sender` - the survey object that fires the event. * <br/> `options.element` - an element that is going to be scrolled on top. * <br/> `options.question` - a question that is going to be scrolled on top. It can be null if options.page is not null. * <br/> `options.page` - a page that is going to be scrolled on top. It can be null if options.question is not null. * <br/> `options.elementId` - the unique element DOM Id. * <br/> `options.cancel` - set this property to true to cancel the default scrolling. */ onScrollingElementToTop: EventBase<SurveyModel>; onLocaleChangedEvent: EventBase<SurveyModel>; /* * Use this event to create/customize actions to be displayed in a question's title. * <br/> `sender` - A [Survey](https://surveyjs.io/Documentation/Library?id=SurveyModel) object that fires the event. * <br/> `options.question` - A [Question](https://surveyjs.io/Documentation/Library?id=Question) object for which the event is fired. * <br/> `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed question. */ onGetQuestionTitleActions: EventBase<SurveyModel>; /* * Use this event to create/customize actions to be displayed in a panel's title. * <br/> `sender` - A survey object that fires the event. * <br/> `options.panel` - A panel ([PanelModel](https://surveyjs.io/Documentation/Library?id=panelmodel) object) for which the event is fired. * <br/> `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed panel. */ onGetPanelTitleActions: EventBase<SurveyModel>; /* * Use this event to create/customize actions to be displayed in a page's title. * <br/> `sender` - A survey object that fires the event. * <br/> `options.page` - A page ([PageModel](https://surveyjs.io/Documentation/Library?id=pagemodel) object) for which the event is fired. * <br/> `options.titleActions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed page. */ onGetPageTitleActions: EventBase<SurveyModel>; /* * Use this event to create/customize actions to be displayed in a matrix question's row. * <br/> `sender` - A survey object that fires the event. * <br/> `options.question` - A matrix question ([QuestionMatrixBaseModel](https://surveyjs.io/Documentation/Library?id=questionmatrixbasemodel) object) for which the event is fired. * <br/> `options.row` - A matrix row for which the event is fired. * <br/> `options.actions` - A list of actions ([IAction](https://surveyjs.io/Documentation/Library?id=IAction) objects) associated with the processed matrix question and row. */ onGetMatrixRowActions: EventBase<SurveyModel>; /* * The event is fired after the survey element content was collapsed or expanded. * <br/> `sender` - the survey object that fires the event. * <br/> `options.element` - Specifies which survey element content was collapsed or expanded. */ onElementContentVisibilityChanged: EventBase<SurveyModel>; /* * The event is fired before expression question convert it's value into display value for rendering. * <br/> `sender` - the survey object that fires the event. * <br/> `options.question` - The expression question. * <br/> `options.value` - The question value. * <br/> `options.displayValue` - the display value that you can change before rendering. */ onGetExpressionDisplayValue: EventBase<SurveyModel>; /* * The list of errors on loading survey JSON. If the list is empty after loading a JSON, then the JSON is correct and has no errors. */ jsonErrors: any; getType(): string; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; /* * Returns a list of all pages in the survey, including invisible pages. */ get pages(): any; getCss(): any; cssValue: any; get css(): any; set css(val: any); get cssTitle(): string; get cssNavigationComplete(): string; get cssNavigationPreview(): string; get cssNavigationEdit(): string; get cssNavigationPrev(): string; get cssNavigationStart(): string; get cssNavigationNext(): string; get bodyCss(): string; get completedCss(): string; lazyRenderingValue: boolean; /* * By default all rows are rendered no matters if they are visible or not. * Set it true, and survey markup rows will be rendered only if they are visible in viewport. * This feature is experimantal and might do not support all the use cases. */ get lazyRendering(): boolean; set lazyRendering(val: boolean); get isLazyRendering(): boolean; /* * Gets or sets a list of triggers in the survey. */ get triggers(): any; set triggers(val: any); /* * Gets or sets a list of calculated values in the survey. */ get calculatedValues(): any; set calculatedValues(val: any); /* * Gets or sets an identifier of a survey model loaded from the [api.surveyjs.io](https://api.surveyjs.io) service. When specified, the survey JSON is automatically loaded from [api.surveyjs.io](https://api.surveyjs.io) service. */ get surveyId(): string; set surveyId(val: string); /* * Gets or sets an identifier of a survey model saved to the [api.surveyjs.io](https://api.surveyjs.io) service. When specified, the survey data is automatically saved to the [api.surveyjs.io](https://api.surveyjs.io) service. */ get surveyPostId(): string; set surveyPostId(val: string); /* * Gets or sets user's identifier (e.g., e-mail or unique customer id) in your web application. * If you load survey or post survey results from/to [api.surveyjs.io](https://api.surveyjs.io) service, then the library do not allow users to run the same survey the second time. * On the second run, the user will see the survey complete page. */ get clientId(): string; set clientId(val: string); /* * Gets or sets a cookie name used to save information about completing the survey. * If the property is not empty, before starting the survey, the Survey library checks if the cookie with this name exists. * If it is `true`, the survey goes to complete mode and a user sees the survey complete page. On completing the survey the cookie with this name is created. */ get cookieName(): string; set cookieName(val: string); /* * Gets or sets whether to save survey results on completing every page. If the property value is set to `true`, the `onPartialSend` event is fired. */ get sendResultOnPageNext(): boolean; set sendResultOnPageNext(val: boolean); /* * Gets or sets whether to show the progress on saving/sending data into the [api.surveyjs.io](https://api.surveyjs.io) service. */ get surveyShowDataSaving(): boolean; set surveyShowDataSaving(val: boolean); /* * Gets or sets whether the first input is focused on showing a next or a previous page. */ get focusFirstQuestionAutomatic(): boolean; set focusFirstQuestionAutomatic(val: boolean); /* * Gets or sets whether the first input is focused if the current page has errors. * Set this property to `false` (the default value is `true`) if you do not want to bring the focus to the first question that has error on the page. */ get focusOnFirstError(): boolean; set focusOnFirstError(val: boolean); /* * Gets or sets the navigation buttons position. * Possible values: 'bottom' (default), 'top', 'both' and 'none'. Set it to 'none' to hide 'Prev', 'Next' and 'Complete' buttons. * It makes sense if you are going to create a custom navigation, have only a single page, or the `goNextPageAutomatic` property is set to `true`. */ get showNavigationButtons(): any; set showNavigationButtons(val: any); /* * Gets or sets whether the Survey displays "Prev" button in its pages. Set it to `false` to prevent end-users from going back to their answers. */ get showPrevButton(): boolean; set showPrevButton(val: boolean); /* * Gets or sets whether the Survey displays survey title in its pages. Set it to `false` to hide a survey title. */ get showTitle(): boolean; set showTitle(val: boolean); /* * Gets or sets whether the Survey displays page titles. Set it to `false` to hide page titles. */ get showPageTitles(): boolean; set showPageTitles(val: boolean); /* * On finishing the survey the complete page is shown. Set the property to `false`, to hide the complete page. */ get showCompletedPage(): boolean; set showCompletedPage(val: boolean); /* * Set this property to a url you want to navigate after a user completing the survey. * By default it uses after calling onComplete event. In case calling options.showDataSaving callback in onComplete event, navigateToUrl will be used on calling options.showDataSavingSuccess callback. */ get navigateToUrl(): string; set navigateToUrl(val: string); /* * Gets or sets a list of URL condition items. If the expression of this item returns `true`, then survey will navigate to the item URL. */ get navigateToUrlOnCondition(): any; set navigateToUrlOnCondition(val: any); getNavigateToUrl(): string; /* * Gets or sets the required question mark. The required question mark is a char or string that is rendered in the required questions' titles. */ get requiredText(): string; set requiredText(val: string); /* * Gets or sets whether to hide all required errors. */ hideRequiredErrors: boolean; beforeSettingQuestionErrors(question: IQuestion, errors: any): void; beforeSettingPanelErrors(question: IPanel, errors: any): void; /* * Gets or sets the first question index. The first question index is '1' by default. You may start it from '100' or from 'A', by setting '100' or 'A' to this property. * You can set the start index to "(1)" or "# A)" or "a)" to render question number as (1), # A) and a) accordingly. */ get questionStartIndex(): string; set questionStartIndex(val: string); /* * Gets or sets whether the "Others" option text is stored as question comment. * * By default the entered text in the "Others" input in the checkbox/radiogroup/dropdown is stored as `"question name " + "-Comment"`. The value itself is `"question name": "others"`. * Set this property to `false`, to store the entered text directly in the `"question name"` key. */ get storeOthersAsComment(): boolean; set storeOthersAsComment(val: boolean); /* * Specifies the default maximum length for questions like text and comment, including matrix cell questions. * * The default value is `0`, that means that the text and comment have the same max length as the standard HTML input - 524288 characters: https://www.w3schools.com/tags/att_input_maxlength.asp. */ get maxTextLength(): number; set maxTextLength(val: number); /* * Gets or sets the default maximum length for question comments and others * * The default value is `0`, that means that the question comments have the same max length as the standard HTML input - 524288 characters: https://www.w3schools.com/tags/att_input_maxlength.asp. */ get maxOthersLength(): number; set maxOthersLength(val: number); /* * Gets or ses whether a user can navigate the next page automatically after answering all the questions on a page without pressing the "Next" button. * The available options: * * - `true` - navigate the next page and submit survey data automatically. * - `autogonext` - navigate the next page automatically but do not submit survey data. * - `false` - do not navigate the next page and do not submit survey data automatically. */ get goNextPageAutomatic(): boolean | "autogonext"; set goNextPageAutomatic(val: boolean | "autogonext"); /* * Gets or sets whether a survey is automatically completed when `goNextPageAutomatic = true`. Set it to `false` if you do not want to submit survey automatically on completing the last survey page. */ get allowCompleteSurveyAutomatic(): boolean; set allowCompleteSurveyAutomatic(val: boolean); /* * Gets or sets a value that specifies how the survey validates the question answers. * * The following options are available: * * - `onNextPage` (default) - check errors on navigating to the next page or on completing the survey. * - `onValueChanged` - check errors on every question value (i.e., answer) changing. * - `onValueChanging` - check errors before setting value into survey. If there is an error, then survey data is not changed, but question value will be keeped. * - `onComplete` - to validate all visible questions on complete button click. If there are errors on previous pages, then the page with the first error becomes the current. */ get checkErrorsMode(): string; set checkErrorsMode(val: string); /* * Specifies whether the text area of [comment](https://surveyjs.io/Documentation/Library?id=questioncommentmodel) questions/elements automatically expands its height to avoid the vertical scrollbar and to display the entire multi-line contents entered by respondents. * Default value is false. */ get autoGrowComment(): boolean; set autoGrowComment(val: boolean); /* * Gets or sets a value that specifies how the survey updates its questions' text values. * * The following options are available: * * - `onBlur` (default) - the value is updated after an input loses the focus. * - `onTyping` - update the value of text questions, "text" and "comment", on every key press. * * Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey. */ get textUpdateMode(): string; set textUpdateMode(val: string); /* * Gets or sets a value that specifies how the invisible data is included in survey data. * * The following options are available: * * - `none` - include the invisible values into the survey data. * - `onHidden` - clear the question value when it becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing. * - `onHiddenContainer` - clear the question value when it or its parent (page or panel) becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing. * - `onComplete` (default) - clear invisible question values on survey complete. In this case, the invisible questions will not be stored on the server. */ get clearInvisibleValues(): any; set clearInvisibleValues(val: any); /* * Call this function to remove all question values from the survey, that end-user will not be able to enter. * For example the value that doesn't exists in a radiogroup/dropdown/checkbox choices or matrix rows/columns. * Please note, this function doesn't clear values for invisible questions or values that doesn't associated with questions. * In fact this function just call clearIncorrectValues function of all questions in the survey */ clearIncorrectValues(removeNonExisingRootKeys?: boolean): void; /* * Gets or sets the survey locale. The default value it is empty, this means the 'en' locale is used. * You can set it to 'de' - German, 'fr' - French and so on. The library has built-in localization for several languages. The library has a multi-language support as well. */ get locale(): string; set locale(val: string); /* * Returns an array of locales that are used in the survey's translation. */ getUsedLocales(): Array<any>; localeChanged(): void; getLocale(): string; locStrsChanged(): void; getMarkdownHtml(text: string, name: string): string; getRenderer(name: string): string; getRendererContext(locStr: LocalizableString): LocalizableString; getRendererForString(element: Base, name: string): string; getRendererContextForString(element: Base, locStr: LocalizableString): LocalizableString; getExpressionDisplayValue(question: IQuestion, value: any, displayValue: string): string; getProcessedText(text: string): string; getLocString(str: string): any; getErrorCustomText(text: string, error: SurveyError): string; getSurveyErrorCustomText(obj: Base, text: string, error: SurveyError): string; /* * Returns the text that is displayed when there are no any visible pages and questiona. */ get emptySurveyText(): string; /* * Gets or sets a survey logo. */ get logo(): string; set logo(val: string); get locLogo(): LocalizableString; /* * Gets or sets a survey logo width. */ get logoWidth(): any; set logoWidth(val: any); /* * Gets or sets a survey logo height. */ get logoHeight(): any; set logoHeight(val: any); /* * Gets or sets a survey logo position. */ get logoPosition(): string; set logoPosition(val: string); get hasLogo(): boolean; get isLogoBefore(): boolean; get isLogoAfter(): boolean; get logoClassNames(): string; get renderedHasTitle(): boolean; get hasTitle(): boolean; get renderedHasLogo(): boolean; get renderedHasHeader(): boolean; /* * The logo fit mode. */ get logoFit(): string; set logoFit(val: string); _isMobile: boolean; setIsMobile(newVal?: boolean): void; protected isLogoImageChoosen(): string; get titleMaxWidth(): string; /* * Gets or sets the HTML content displayed on the complete page. Use this property to change the default complete page text. */ get completedHtml(): string; set completedHtml(val: string); get locCompletedHtml(): LocalizableString; /* * The list of HTML condition items. If the expression of this item returns `true`, then a survey will use this item HTML instead of `completedHtml`. */ get completedHtmlOnCondition(): any; set completedHtmlOnCondition(val: any); /* * Calculates a given expression and returns a result value. */ runExpression(expression: string): any; /* * Calculates a given expression and returns `true` or `false`. */ runCondition(expression: string): boolean; /* * Run all triggers that performs on value changed and not on moving to the next page. */ runTriggers(): void; get renderedCompletedHtml(): string; /* * The HTML content displayed to an end user that has already completed the survey. */ get completedBeforeHtml(): string; set completedBeforeHtml(val: string); get locCompletedBeforeHtml(): LocalizableString; /* * The HTML that shows on loading survey Json from the [api.surveyjs.io](https://api.surveyjs.io) service. */ get loadingHtml(): string; set loadingHtml(val: string); get locLoadingHtml(): LocalizableString; /* * Gets or sets the 'Start' button caption. * The 'Start' button is shown on the started page. Set the `firstPageIsStarted` property to `true`, to display the started page. */ get startSurveyText(): string; set startSurveyText(val: string); get locStartSurveyText(): LocalizableString; /* * Gets or sets the 'Prev' button caption. */ get pagePrevText(): string; set pagePrevText(val: string); get locPagePrevText(): LocalizableString; /* * Gets or sets the 'Next' button caption. */ get pageNextText(): string; set pageNextText(val: string); get locPageNextText(): LocalizableString; /* * Gets or sets the 'Complete' button caption. */ get completeText(): string; set completeText(val: string); get locCompleteText(): LocalizableString; /* * Gets or sets the 'Preview' button caption. */ get previewText(): string; set previewText(val: string); get locPreviewText(): LocalizableString; /* * Gets or sets the 'Edit' button caption. */ get editText(): string; set editText(val: string); get locEditText(): LocalizableString; getElementTitleTagName(element: Base, tagName: string): string; /* * Set the pattern for question title. Default is "numTitleRequire", 1. What is your name? *, * You can set it to numRequireTitle: 1. * What is your name? * You can set it to requireNumTitle: * 1. What is your name? * You can set it to numTitle (remove require symbol completely): 1. What is your name? */ get questionTitlePattern(): string; set questionTitlePattern(val: string); getQuestionTitlePatternOptions(): Array<any>; /* * Gets or sets a question title template. Obsolete, please use questionTitlePattern */ get questionTitleTemplate(): string; set questionTitleTemplate(val: string); get locQuestionTitleTemplate(): LocalizableString; getUpdatedQuestionTitle(question: IQuestion, title: string): string; getUpdatedQuestionNo(question: IQuestion, no: string): string; /* * Gets or sets whether the survey displays page numbers on pages titles. */ get showPageNumbers(): boolean; set showPageNumbers(val: boolean); /* * Gets or sets a value that specifies how the question numbers are displayed. * * The following options are available: * * - `on` - display question numbers * - `onpage` - display question numbers, start numbering on every page * - `off` - turn off the numbering for questions titles */ get showQuestionNumbers(): string; set showQuestionNumbers(val: string); /* * Gets or sets the survey progress bar position. * * The following options are available: * * - `off` (default) - don't show progress bar * - `top` - show progress bar in the top * - `bottom` - show progress bar in the bottom * - `both` - show progress bar in both sides: top and bottom. */ get showProgressBar(): string; set showProgressBar(val: string); /* * Gets or sets the type of info in the progress bar. * * The following options are available: * * - `pages` (default), * - `questions`, * - `requiredQuestions`, * - `correctQuestions`, * - `buttons` */ get progressBarType(): string; set progressBarType(val: string); get isShowProgressBarOnTop(): boolean; get isShowProgressBarOnBottom(): boolean; /* * Returns the text/HTML that is rendered as a survey title. */ get processedTitle(): string; /* * Gets or sets the question title location. * * The following options are available: * * - `bottom` - show a question title to bottom * - `left` - show a question title to left * - `top` - show a question title to top. * * > Some questions, for example matrixes, do not support 'left' value. The title for them will be displayed to the top. */ get questionTitleLocation(): string; set questionTitleLocation(val: string); protected updateElementCss(reNew?: boolean): void; /* * Gets or sets the error message position. * * The following options are available: * * - `top` - to show question error(s) over the question, * - `bottom` - to show question error(s) under the question. */ get questionErrorLocation(): string; set questionErrorLocation(val: string); /* * Gets or sets the question description position. The default value is `underTitle`. * * The following options are available: * * - `underTitle` - show question description under the question title, * - `underInput` - show question description under the question input instead of question title. */ get questionDescriptionLocation(): string; set questionDescriptionLocation(val: string); /* * Gets or sets the survey edit mode. * * The following options are available: * * - `edit` (default) - make a survey editable, * - `display` - make a survey read-only. */ get mode(): string; set mode(val: string); /* * Gets or sets an object that stores the survey results/data. You can set it directly as `{ 'question name': questionValue, ... }` * * > If you set the `data` property after creating the survey, you may need to set the `currentPageNo` to `0`, if you are using `visibleIf` properties for questions/pages/panels to ensure that you are starting from the first page. */ get data(): any; set data(val: any); /* * Merge the values into survey.data. It works as survey.data, except it doesn't clean the existing data, but overrides them. */ mergeData(data: any): void; setDataCore(data: any): void; onEditingObjPropertyChanged: any; get editingObj(): Base; set editingObj(val: Base); get isEditingSurveyElement(): boolean; getAllValues(): any; /* * Returns survey result data as an array of plain objects: with question `title`, `name`, `value`, and `displayValue`. * * For complex questions (like matrix, etc.) `isNode` flag is set to `true` and data contains array of nested objects (rows). * * Set `options.includeEmpty` to `false` if you want to skip empty answers. */ getPlainData(options?: any): any; getFilteredValues(): any; getFilteredProperties(): any; getDataValueCore(valuesHash: any, key: string): any; setDataValueCore(valuesHash: any, key: string, value: any): void; deleteDataValueCore(valuesHash: any, key: string): void; /* * Returns all comments from the data. */ get comments(): any; /* * Returns a list of visible pages. If all pages are visible, then this property returns the same list as the `pages` property. */ get visiblePages(): any; /* * Returns `true` if the survey contains no pages. The survey is empty. */ get isEmpty(): boolean; /* * Deprecated. Use the `pageCount` property instead. */ get PageCount(): number; /* * Returns the survey page count. */ get pageCount(): number; /* * Returns a number of visible pages within the survey. */ get visiblePageCount(): number; /* * Returns the started page. This property works if the `firstPageIsStarted` property is set to `true`. */ get startedPage(): PageModel; /* * Gets or sets the current survey page. If a survey is rendered, then this property returns a page that a user can see/edit. */ get currentPage(): any; set currentPage(val: any); /* * Returns the currentPage, unless the started page is showing. In this case returns the started page. */ get activePage(): any; /* * The zero-based index of the current page in the visible pages array. */ get currentPageNo(): number; set currentPageNo(val: number); /* * Gets or sets the question display order. Use this property to randomize questions. You can randomize questions on a specific page. * * The following options are available: * * - `random` - randomize questions * - `initial` - keep questions in the same order, as in a survey model. */ get questionsOrder(): string; set questionsOrder(val: string); /* * Sets the input focus to the first question with the input field. */ focusFirstQuestion(): void; scrollToTopOnPageChange(doScroll?: boolean): void; /* * Returns the current survey state: * * - `loading` - the survey is being loaded from JSON, * - `empty` - there is nothing to display in the current survey, * - `starting` - the survey's start page is displayed, * - `running` - a respondent is answering survey questions right now, * - `preview` - a respondent is previewing answered questions before submitting the survey (see [example](https://surveyjs.io/Examples/Library?id=survey-showpreview)), * - `completed` - a respondent has completed the survey and submitted the results. * * Details: [Preview State](https://surveyjs.io/Documentation/Library#states) */ get state(): string; get completedState(): string; get completedStateText(): string; protected setCompletedState(value: string, text: string): void; /* * Clears the survey data and state. If the survey has a `completed` state, it will get a `running` state. */ clear(clearData?: boolean, gotoFirstPage?: boolean): void; mergeValues(src: any, dest: any): void; protected updateCustomWidgets(page: PageModel): void; protected currentPageChanging(newValue: PageModel, oldValue: PageModel): boolean; protected currentPageChanged(newValue: PageModel, oldValue: PageModel): void; /* * Returns the progress that a user made while going through the survey. * It depends from progressBarType property */ getProgress(): number; /* * Returns the progress that a user made while going through the survey. * It depends from progressBarType property */ get progressValue(): number; /* * Returns the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') position. */ get isNavigationButtonsShowing(): string; /* * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on top. */ get isNavigationButtonsShowingOnTop(): boolean; /* * Returns true if the navigation buttons (i.e., 'Prev', 'Next', or 'Complete' and 'Preview') are shows on bottom. */ get isNavigationButtonsShowingOnBottom(): boolean; /* * Returns `true` if the survey is in edit mode. */ get isEditMode(): boolean; get isCompleteButtonVisible(): boolean; get isPreviewButtonVisible(): boolean; get isCancelPreviewButtonVisible(): boolean; /* * Returns `true` if the survey is in display mode or in preview mode. */ get isDisplayMode(): boolean; get isUpdateValueTextOnTyping(): boolean; /* * Returns `true` if the survey is in design mode. It is used by SurveyJS Editor. */ get isDesignMode(): boolean; _isDesignMode: boolean; /* * Sets the survey into design mode. */ setDesignMode(value: boolean): void; /* * Gets or sets whether to show all elements in the survey, regardless their visibility. The default value is `false`. */ get showInvisibleElements(): boolean; set showInvisibleElements(val: boolean); get areInvisibleElementsShowing(): boolean; get areEmptyElementsHidden(): boolean; /* * Returns `true`, if a user has already completed the survey in this browser and there is a cookie about it. Survey goes to `completed` state if the function returns `true`. */ get hasCookie(): boolean; /* * Set the cookie with `cookieName` in user's browser. It is done automatically on survey complete if the `cookieName` property value is not empty. */ setCookie(): void; /* * Deletes the cookie with `cookieName` from the browser. */ deleteCookie(): void; /* * Gets or sets whether the survey must ignore validation like required questions and others, on `nextPage` and `completeLastPage` function calls. The default is `false`. */ ignoreValidation: boolean; /* * Navigates user to the next page. * * Returns `false` in the following cases: * * - if the current page is the last page. * - if the current page contains errors (for example, a required question is empty). */ nextPage(): boolean; asyncValidationQuesitons: any; /* * Returns `true`, if the current page contains errors, for example, the required question is empty or a question validation is failed. */ get isCurrentPageHasErrors(): boolean; /* * Returns `true`, if the current page contains any error. If there is an async function in an expression, then the function will return `undefined` value. * In this case, you should use `onAsyncValidation` parameter, which is a callback function: (hasErrors: boolean) => void */ hasCurrentPageErrors(onAsyncValidation?: any): boolean; /* * Returns `true`, if a page contains an error. If there is an async function in an expression, then the function will return `undefined` value. * In this case, you should use the second `onAsyncValidation` parameter, which is a callback function: (hasErrors: boolean) => void */ hasPageErrors(page?: PageModel, onAsyncValidation?: any): boolean; /* * Returns `true`, if any of the survey pages contains errors. If there is an async function in an expression, then the function will return `undefined` value. * In this case, you should use the third `onAsyncValidation` parameter, which is a callback function: (hasErrors: boolean) => void */ hasErrors(fireCallback?: boolean, focusOnFirstError?: boolean, onAsyncValidation?: any): boolean; /* * Checks whether survey elements (pages, panels, and questions) have unique question names. * You can check for unique names for individual page and panel (and all their elements) or a question. * If the parameter is not specified, then a survey checks that all its elements have unique names. */ ensureUniqueNames(element?: ISurveyElement): void; /* * Navigates user to a previous page. If the current page is the first page, `prevPage` returns `false`. `prevPage` does not perform any checks, required questions can be empty. */ prevPage(): boolean; /* * Completes the survey, if the current page is the last one. It returns `false` if the last page has errors. * If the last page has no errors, `completeLastPage` calls `doComplete` and returns `true`. */ completeLastPage(): boolean; isNavigationButtonPressed: boolean; navigationMouseDown(): boolean; /* * Shows preview for the survey. Switches the survey to the "preview" state. * * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview) */ showPreview(): boolean; /* * Cancels preview and switches back to the "running" state. * * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview) */ cancelPreview(curPage?: any): void; cancelPreviewByPage(panel: IPanel): any; protected doCurrentPageComplete(doComplete: boolean): boolean; /* * Obsolete. Use the `questionsOnPageMode` property instead. */ get isSinglePage(): boolean; set isSinglePage(val: boolean); /* * Gets or sets a value that specifies how the survey combines questions, panels, and pages. * * The following options are available: * * - `singlePage` - combine all survey pages in a single page. Pages will be converted to panels. * - `questionPerPage` - show one question per page. Survey will create a separate page for every question. */ get questionsOnPageMode(): string; set questionsOnPageMode(val: string); /* * Gets or sets whether the first survey page is a start page. Set this property to `true`, to make the first page a starting page. * An end user cannot navigate to the start page and the start page does not affect a survey progress. */ get firstPageIsStarted(): boolean; set firstPageIsStarted(val: boolean); isPageStarted(page: IPage): boolean; /* * Set this property to "showAllQuestions" or "showAnsweredQuestions" to allow respondents to preview answers before submitting the survey results. * * Details: [Preview State](https://surveyjs.io/Documentation/Library#states-preview) * Example: [Show Preview Before Complete](https://surveyjs.io/Examples/Library?id=survey-showpreview) */ get showPreviewBeforeComplete(): string; set showPreviewBeforeComplete(val: string); get isShowPreviewBeforeComplete(): boolean; protected onFirstPageIsStartedChanged(): void; runningPages: any; origionalPages: any; protected onQuestionsOnPageModeChanged(oldValue: string): void; /* * Gets whether the current page is the first one. */ get isFirstPage(): boolean; /* * Gets whether the current page is the last one. */ get isLastPage(): boolean; get isShowPrevButton(): boolean; get isShowNextButton(): boolean; /* * Completes the survey. * * Calling this function performs the following tasks: * * - writes cookie if the `cookieName` property is not empty * - sets the survey into `completed` state * - fires the `onComplete` event * - calls `sendResult` function. * * Calling the `doComplete` function does not perform any validation, unlike the `completeLastPage` function. * The function can return false, if you set options.allowComplete to false in onCompleting event. Otherwise it returns true. * It calls `navigateToUrl` after calling `onComplete` event. * In case calling `options.showDataSaving` callback in the `onComplete` event, `navigateToUrl` is used on calling `options.showDataSavingSuccess` callback. */ doComplete(isCompleteOnTrigger?: boolean): boolean; /* * Starts the survey. Changes the survey mode from "starting" to "running". Call this function if your survey has a start page, otherwise this function does nothing. */ start(): boolean; /* * Gets whether the question values on the current page are validating on the server at the current moment. */ get isValidatingOnServer(): boolean; protected onIsValidatingOnServerChanged(): void; protected doServerValidation(doComplete: boolean, isPreview?: boolean): boolean; protected doNextPage(): void; setCompleted(): void; /* * Returns the HTML content for the complete page. */ get processedCompletedHtml(): string; /* * Returns the HTML content, that is shown to a user that had completed the survey before. */ get processedCompletedBeforeHtml(): string; /* * Returns the HTML content, that is shows when a survey loads the survey JSON. */ get processedLoadingHtml(): string; getProgressInfo(): IProgressInfo; /* * Returns the text for the current progress. */ get progressText(): string; isCalculatingProgressText: boolean; updateProgressText(onValueChanged?: boolean): void; getProgressText(): string; protected afterRenderSurvey(htmlElement: any): void; updateQuestionCssClasses(question: IQuestion, cssClasses: any): void; updatePanelCssClasses(panel: IPanel, cssClasses: any): void; updatePageCssClasses(page: IPage, cssClasses: any): void; updateChoiceItemCss(question: IQuestion, options: any): void; isFirstPageRendering: boolean; afterRenderPage(htmlElement: any): void; afterRenderHeader(htmlElement: any): void; afterRenderQuestion(question: IQuestion, htmlElement: any): void; afterRenderQuestionInput(question: IQuestion, htmlElement: any): void; afterRenderPanel(panel: IElement, htmlElement: any): void; whenQuestionFocusIn(question: IQuestion): void; whenPanelFocusIn(panel: IPanel): void; canChangeChoiceItemsVisibility(): boolean; getChoiceItemVisibility(question: IQuestion, item: any, val: boolean): boolean; matrixBeforeRowAdded(options: any): void; matrixRowAdded(question: IQuestion, row: any): void; getQuestionByValueNameFromArray(valueName: string, name: string, index: number): IQuestion; matrixRowRemoved(question: IQuestion, rowIndex: number, row: any): void; matrixRowRemoving(question: IQuestion, rowIndex: number, row: any): boolean; matrixAllowRemoveRow(question: IQuestion, rowIndex: number, row: any): boolean; matrixCellCreating(question: IQuestion, options: any): void; matrixCellCreated(question: IQuestion, options: any): void; matrixAfterCellRender(question: IQuestion, options: any): void; matrixCellValueChanged(question: IQuestion, options: any): void; matrixCellValueChanging(question: IQuestion, options: any): void; get isValidateOnValueChanging(): boolean; matrixCellValidate(question: IQuestion, options: any): SurveyError; dynamicPanelAdded(question: IQuestion): void; dynamicPanelRemoved(question: IQuestion, panelIndex: number, panel: IPanel): void; dynamicPanelItemValueChanged(question: IQuestion, options: any): void; dragAndDropAllow(options: any): boolean; elementContentVisibilityChanged(element: ISurveyElement): void; getUpdatedElementTitleActions(element: ISurveyElement, titleActions: any): Array<IAction>; getUpdatedMatrixRowActions(question: IQuestion, row: any, actions: any): any; scrollElementToTop(element: ISurveyElement, question: IQuestion, page: IPage, id: string): any; /* * Uploads a file to server. */ uploadFiles(question: IQuestion, name: string, files: any, uploadingCallback: any): void; /* * Downloads a file from server */ downloadFile(questionName: string, fileValue: any, callback: any): void; /* * Clears files from server. */ clearFiles(question: IQuestion, name: string, value: any, fileName: string, callback: any): void; updateChoicesFromServer(question: IQuestion, choices: any, serverResult: any): Array<ItemValue>; loadedChoicesFromServer(question: IQuestion): void; protected createSurveyService(): dxSurveyService; protected uploadFilesCore(name: string, files: any, uploadingCallback: any): void; getPage(index: number): PageModel; /* * Adds an existing page to the survey. */ addPage(page: PageModel, index?: number): void; /* * Creates a new page and adds it to a survey. Generates a new name if the `name` parameter is not specified. */ addNewPage(name?: string, index?: number): PageModel; /* * Removes a page from a survey. */ removePage(page: PageModel): void; /* * Returns a question by its name. */ getQuestionByName(name: string, caseInsensitive?: boolean): Question; /* * Returns a question by its value name */ getQuestionByValueName(valueName: string, caseInsensitive?: boolean): IQuestion; /* * Returns all questions by their valueName. name property is used if valueName property is empty. */ getQuestionsByValueName(valueName: string, caseInsensitive?: boolean): Array<Question>; getCalculatedValueByName(name: string): CalculatedValue; /* * Gets a list of questions by their names. */ getQuestionsByNames(names: any, caseInsensitive?: boolean): Array<IQuestion>; /* * Returns a page on which an element (question or panel) is placed. */ getPageByElement(element: IElement): PageModel; /* * Returns a page on which a question is located. */ getPageByQuestion(question: IQuestion): PageModel; /* * Returns a page by it's name. */ getPageByName(name: string): PageModel; /* * Returns a list of pages by their names. */ getPagesByNames(names: any): Array<PageModel>; /* * Returns a list of all questions in a survey. */ getAllQuestions(visibleOnly?: boolean, includingDesignTime?: boolean): Array<Question>; /* * Returns quiz questions. All visible questions that has input(s) widgets. */ getQuizQuestions(): Array<IQuestion>; /* * Returns a panel by its name. */ getPanelByName(name: string, caseInsensitive?: boolean): IPanel; /* * Returns a list of all survey's panels. */ getAllPanels(visibleOnly?: boolean, includingDesignTime?: boolean): Array<IPanel>; /* * Creates and returns a new page, but do not add it into the survey. * You can use addPage(page) function to add it into survey later. */ createNewPage(name: string): PageModel; protected questionOnValueChanging(valueName: string, newValue: any): any; protected updateQuestionValue(valueName: string, newValue: any): void; protected notifyQuestionOnValueChanged(valueName: string, newValue: any): void; isRunningElementsBindings: boolean; isTriggerIsRunning: boolean; triggerValues: any; triggerKeys: any; conditionValues: any; isValueChangedOnRunningCondition: boolean; conditionRunnerCounter: number; conditionUpdateVisibleIndexes: boolean; conditionNotifyElementsOnAnyValueOrVariableChanged: boolean; /* * Sends a survey result to the [api.surveyjs.io](https://api.surveyjs.io) service. */ sendResult(postId?: string, clientId?: string, isPartialCompleted?: boolean): void; /* * Calls the [api.surveyjs.io](https://api.surveyjs.io) service and, on callback, fires the `onGetResult` event with all answers that your users made for a question. */ getResult(resultId: string, name: string): void; /* * Loads the survey JSON from the [api.surveyjs.io](https://api.surveyjs.io) service. * If `clientId` is not `null` and a user had completed a survey before, the survey switches to `completedbefore` state. */ loadSurveyFromService(surveyId?: string, cliendId?: string): void; protected onLoadingSurveyFromService(): void; protected onLoadSurveyFromService(): void; fromJSON(json: any): void; setJsonObject(jsonObj: any): void; isEndLoadingFromJson: string; endLoadingFromJson(): void; protected onBeforeCreating(): void; protected onCreating(): void; hasVisibleQuestionByValueName(valueName: string): boolean; questionCountByValueName(valueName: string): number; /* * Returns a variable value. Variable, unlike values, are not stored in the survey results. */ getVariable(name: string): any; /* * Sets a variable value. Variable, unlike values, are not stored in the survey results. */ setVariable(name: string, newValue: any): void; /* * Returns all variables in the survey. Use setVariable function to create a new variable. */ getVariableNames(): Array<any>; protected getUnbindValue(value: any): any; /* * Returns a question value (answer) by a question's name. */ getValue(name: string): any; /* * Sets a question value (answer). It runs all triggers and conditions (`visibleIf` properties). * * Goes to the next page if `goNextPageAutomatic` is `true` and all questions on the current page are answered correctly. */ setValue(name: string, newQuestionValue: any, locNotification?: any, allowNotifyValueChanged?: boolean): void; protected doOnPageAdded(page: PageModel): void; protected doOnPageRemoved(page: PageModel): void; protected tryGoNextPageAutomatic(name: string): void; /* * Returns the comment value. */ getComment(name: string): string; /* * Sets a comment value. */ setComment(name: string, newValue: string, locNotification?: any): void; /* * Removes a value from the survey results. */ clearValue(name: string): void; /* * Gets or sets whether to clear value on disable items in checkbox, dropdown and radiogroup questions. * By default, values are not cleared on disabled the corresponded items. This property is not persisted in survey JSON and you have to set it in code. */ get clearValueOnDisableItems(): boolean; set clearValueOnDisableItems(val: boolean); get isClearValueOnHidden(): boolean; get isClearValueOnHiddenContainer(): boolean; questionVisibilityChanged(question: IQuestion, newValue: boolean): void; pageVisibilityChanged(page: IPage, newValue: boolean): void; panelVisibilityChanged(panel: IPanel, newValue: boolean): void; questionCreated(question: IQuestion): any; questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any): void; questionRemoved(question: IQuestion): void; questionRenamed(question: IQuestion, oldName: string, oldValueName: string): any; questionHashes: any; panelAdded(panel: IElement, index: number, parentPanel: any, rootPanel: any): void; panelRemoved(panel: IElement): void; validateQuestion(question: IQuestion): SurveyError; validatePanel(panel: IPanel): SurveyError; processHtml(html: string): string; processText(text: string, returnDisplayValue: boolean): string; processTextEx(text: string, returnDisplayValue: boolean, doEncoding: boolean): any; getSurveyMarkdownHtml(element: Base, text: string, name: string): string; /* * Returns an amount of corrected quiz answers. */ getCorrectedAnswerCount(): number; /* * Returns quiz question number. It may be different from `getQuizQuestions.length` because some widgets like matrix may have several questions. */ getQuizQuestionCount(): number; /* * Returns an amount of incorrect quiz answers. */ getInCorrectedAnswerCount(): number; getCorrectedAnswers(): number; getInCorrectedAnswers(): number; /* * Gets or sets a timer panel position. The timer panel displays information about how much time an end user spends on a survey/page. * * The available options: * - `top` - display timer panel in the top. * - `bottom` - display timer panel in the bottom. * - `none` - do not display a timer panel. * * If the value is not equal to 'none', the survey calls the `startTimer()` method on survey rendering. */ get showTimerPanel(): string; set showTimerPanel(val: string); get isTimerPanelShowingOnTop(): boolean; get isTimerPanelShowingOnBottom(): boolean; /* * Gets or set a value that specifies whether the timer displays information for the page or for the entire survey. * * The available options: * * - `page` - show timer information for page * - `survey` - show timer information for survey * * Use the `onTimerPanelInfoText` event to change the default text. */ get showTimerPanelMode(): string; set showTimerPanelMode(val: string); /* * Gets or sets a value that specifies how the survey width is calculated. * * The available options: * * - `static` - A survey has a fixed width that mostly depends upon the applied theme. Resizing a browser window does not affect the survey width. * - `responsive` - A survey takes all available horizontal space. A survey stretches or shrinks horizonally according to the screen size. * - `auto` - Depends on the question type and corresponds to the static or responsive mode. */ get widthMode(): string; set widthMode(val: string); calculateWidthMode(): string; get timerInfoText(): string; timerFunc: any; /* * Starts a timer that will calculate how much time end-user spends on the survey or on pages. */ startTimer(): void; startTimerFromUI(): void; /* * Stops the timer. */ stopTimer(): void; /* * Returns the time in seconds an end user spends on the survey */ timeSpent: number; /* * Gets or sets the maximum time in seconds that end user has to complete a survey. If the value is 0 or less, an end user has no time limit to finish a survey. */ get maxTimeToFinish(): number; set maxTimeToFinish(val: number); /* * Gets or sets the maximum time in seconds that end user has to complete a page in the survey. If the value is 0 or less, an end user has no time limit. * * You may override this value for every page. */ get maxTimeToFinishPage(): number; set maxTimeToFinishPage(val: number); protected doTimer(): void; get inSurvey(): boolean; getSurveyData(): ISurveyData; getSurvey(): ISurvey; getTextProcessor(): ITextProcessor; getObjects(pages: any, questions: any): Array<any>; setTriggerValue(name: string, value: any, isVariable: boolean): void; copyTriggerValue(name: string, fromName: string): void; isFocusingQuestion: boolean; /* * Focus question by its name. If needed change the current page on the page where question is located. * Function returns false if there is no question with this name or question is invisible, otherwise it returns true. */ focusQuestion(name: string): boolean; getElementWrapperComponentName(element: any, reason?: string): string; getRowWrapperComponentName(row: QuestionRowModel): string; getElementWrapperComponentData(element: any, reason?: string): any; getRowWrapperComponentData(row: QuestionRowModel): any; getItemValueWrapperComponentName(item: ItemValue, question: QuestionSelectBase): string; getItemValueWrapperComponentData(item: ItemValue, question: QuestionSelectBase): any; getMatrixCellTemplateData(cell: any): any; searchText(text: string): Array<IFindElement>; skeletonComponentName: string; getSkeletonComponentName(element: ISurveyElement): string; /* * Use this method to dispose survey model properly. */ dispose(): void; } /* * It extends the Trigger base class and add properties required for SurveyJS classes. */ export declare class SurveyTrigger extends Trigger { constructor(); protected ownerValue: ISurveyTriggerOwner; get owner(): ISurveyTriggerOwner; setOwner(owner: ISurveyTriggerOwner): void; getSurvey(live?: boolean): ISurvey; get isOnNextPage(): boolean; } export declare class SurveyWindow extends SurveyWindowModel { constructor(jsonObj?: any, initialModel?: any); koExpanded: any; koExpandedCss: any; doExpand: any; protected createSurvey(jsonObj: any): SurveyModel; protected closeWindowOnComplete(): void; protected get template(): string; protected set template(val: string); protected doShowingChanged(): void; protected getDefaultTemplate(): string; get css(): any; } /* * Validate text values. */ export declare class TextValidator extends SurveyValidator { constructor(); getType(): string; validate(value: any, name?: string, values?: any, properties?: any): ValidatorResult; protected getDefaultErrorText(name: string): any; /* * The minLength property. */ get minLength(): number; set minLength(val: number); /* * The maxLength property. */ get maxLength(): number; set maxLength(val: number); /* * The allowDigits property. */ get allowDigits(): boolean; set allowDigits(val: boolean); } /* * A class that contains expression and url propeties. It uses in survey.navigateToUrlOnCondition array. * If the expression returns true then url of this item uses instead of survey.navigateToUrl property */ export declare class UrlConditionItem extends ExpressionItem { constructor(expression?: string, url?: string); getType(): string; /* * The url that survey navigates to on completing the survey. The expression should return true */ get url(): string; set url(val: string); get locUrl(): LocalizableString; } export declare class Variable extends Const { constructor(variableName: string); static DisableConversionChar: string; valueInfo: any; useValueAsItIs: boolean; getType(): string; toString(func?: any): string; get variable(): string; evaluate(processValue?: ProcessValue): any; setVariables(variables: any): void; protected getCorrectValue(value: any): any; protected isContentEqual(op: Operand): boolean; } export declare class DragDropRankingChoices extends DragDropChoices { constructor(surveyValue?: ISurvey, creator?: any); protected get draggedElementType(): string; protected createDraggedElementShortcut(text: string, draggedElementNode: any): any; protected getDropTargetByDataAttributeValue(dataAttributeValue: string): ItemValue; isDragOverRootNode: boolean; protected findDropTargetNodeByDragOverNode(dragOverNode: any): any; protected isDropTargetValid(dropTarget: ItemValue, dropTargetNode?: any): boolean; protected calculateIsBottom(clientY: number): boolean; protected doDragOver: any; protected afterDragOver(dropTargetNode: any): void; protected ghostPositionChanged(): void; protected doBanDropHere: any; protected doDrop: any; protected doClear: any; } /* * A base class for a Panel and Page objects. */ export declare class PanelModelBase extends SurveyElement implements IPanel, IConditionRunner, ISurveyErrorOwner, ITitleOwner { constructor(name?: string); static panelCounter: number; elementsValue: any; isQuestionsReady: boolean; questionsValue: any; addElementCallback: any; removeElementCallback: any; onGetQuestionTitleLocation: any; /* * Returns the type of the object as a string as it represents in the json. It should be in lowcase. */ getType(): string; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; endLoadingFromJson(): void; get hasTitle(): boolean; protected canShowTitle(): boolean; get _showDescription(): boolean; localeChanged(): void; locStrsChanged(): void; /* * Returns the char/string for a required panel. */ get requiredText(): string; protected get titlePattern(): string; get isRequireTextOnStart(): boolean; get isRequireTextBeforeTitle(): boolean; get isRequireTextAfterTitle(): boolean; /* * The custom text that will be shown on required error. Use this property, if you do not want to show the default text. */ get requiredErrorText(): string; set requiredErrorText(val: string); get locRequiredErrorText(): LocalizableString; /* * Use this property to randomize questions. Set it to 'random' to randomize questions, 'initial' to keep them in the same order or 'default' to use the Survey questionsOrder property */ get questionsOrder(): string; set questionsOrder(val: string); protected isRandomizing: boolean; randomizeElements(isRandom: boolean): void; /* * A parent element. It is always null for the Page object and always not null for the Panel object. Panel object may contain Questions and other Panels. */ get parent(): PanelModelBase; set parent(val: PanelModelBase); get depth(): number; /* * An expression that returns true or false. If it returns true the Panel becomes visible and if it returns false the Panel becomes invisible. The library runs the expression on survey start and on changing a question value. If the property is empty then visible property is used. */ get visibleIf(): string; set visibleIf(val: string); protected calcCssClasses(css: any): any; /* * A unique element identificator. It is generated automatically. */ get id(): string; set id(val: string); /* * Returns true if the current object is Panel. Returns false if the current object is Page (a root Panel). */ get isPanel(): boolean; getPanel(): IPanel; getLayoutType(): string; isLayoutTypeSupported(layoutType: string): boolean; /* * Returns the list of all questions located in the Panel/Page, including in the nested Panels. */ get questions(): any; protected getValidName(name: string): string; /* * Returns the question by its name */ getQuestionByName(name: string): Question; /* * Returns the element by its name. It works recursively. */ getElementByName(name: string): IElement; getQuestionByValueName(valueName: string): Question; /* * Returns question values on the current page */ getValue(): any; /* * Return questions values as a JSON object with display text. For example, for dropdown, it would return the item text instead of item value. */ getDisplayValue(keysAsText: boolean): any; /* * Returns question comments on the current page */ getComments(): any; /* * Call this function to remove all question values from the current page/panel, that end-user will not be able to enter. * For example the value that doesn't exists in a radigroup/dropdown/checkbox choices or matrix rows/columns. * Please note, this function doesn't clear values for invisible questions or values that doesn't associated with questions. */ clearIncorrectValues(): void; /* * Call this function to clear all errors in the panel / page and all its child elements (panels and questions) */ clearErrors(): void; /* * Returns the list of the elements in the object, Panel/Page. Elements can be questions or panels. The function doesn't return elements in the nested Panels. */ get elements(): any; getElementsInDesign(includeHidden?: boolean): Array<IElement>; /* * Returns true if the current element belongs to the Panel/Page. It looks in nested Panels as well. */ containsElement(element: IElement): boolean; /* * Set this property to true, to require the answer at least in one question in the panel. */ get isRequired(): boolean; set isRequired(val: boolean); /* * An expression that returns true or false. If it returns true the Panel/Page becomes required. * The library runs the expression on survey start and on changing a question value. If the property is empty then isRequired property is used. */ get requiredIf(): string; set requiredIf(val: string); searchText(text: string, founded: any): void; /* * Returns true, if there is an error on this Page or inside the current Panel */ hasErrors(fireCallback?: boolean, focusOnFirstError?: boolean, rec?: any): boolean; getErrorCustomText(text: string, error: SurveyError): string; protected hasErrorsCore(rec: any): void; protected getContainsErrors(): boolean; updateElementVisibility(): void; getFirstQuestionToFocus(withError?: boolean): Question; /* * Call it to focus the input on the first question */ focusFirstQuestion(): void; /* * Call it to focus the input of the first question that has an error. */ focusFirstErrorQuestion(): void; /* * Fill list array with the questions. */ addQuestionsToList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void; /* * Fill list array with the panels. */ addPanelsIntoList(list: any, visibleOnly?: boolean, includingDesignTime?: boolean): void; /* * Returns true if the current object is Page and it is the current page. */ get isActive(): boolean; updateCustomWidgets(): void; /* * Set this property different from "default" to set the specific question title location for this panel/page. */ get questionTitleLocation(): string; set questionTitleLocation(val: string); getQuestionTitleLocation(): string; protected getStartIndex(): string; getQuestionStartIndex(): string; getChildrenLayoutType(): string; getProgressInfo(): IProgressInfo; protected get root(): PanelModelBase; protected childVisibilityChanged(): void; protected createRowAndSetLazy(index: number): QuestionRowModel; protected createRow(): QuestionRowModel; onSurveyLoad(): void; onFirstRendering(): void; updateRows(): void; get rows(): any; ensureRowsVisibility(): void; protected onRowsChanged(): void; protected onAddElement(element: IElement, index: number): void; protected onRemoveElement(element: IElement): void; protected canRenderFirstRows(): boolean; protected updateRowsRemoveElementFromRow(element: IElement, row: QuestionRowModel): void; elementWidthChanged(el: IElement): void; /* * Returns rendered title text or html. */ get processedTitle(): string; protected getRenderedTitle(str: string): string; /* * Use it to get/set the object visibility. */ get visible(): boolean; set visible(val: boolean); protected onVisibleChanged(): void; /* * Returns true if object is visible or survey is in design mode right now. */ get isVisible(): boolean; getIsPageVisible(exceptionQuestion: IQuestion): boolean; lastVisibleIndex: number; setVisibleIndex(index: number): number; protected beforeSetVisibleIndex(index: number): number; protected getPanelStartIndex(index: number): number; protected isContinueNumbering(): boolean; /* * Returns true if readOnly property is true or survey is in display mode or parent panel/page is readOnly. */ get isReadOnly(): boolean; protected onReadOnlyChanged(): void; updateElementCss(reNew?: boolean): void; /* * An expression that returns true or false. If it returns false the Panel/Page becomes read only and an end-user will not able to answer on qustions inside it. * The library runs the expression on survey start and on changing a question value. If the property is empty then readOnly property is used. */ get enableIf(): string; set enableIf(val: string); /* * Add an element into Panel or Page. Returns true if the element added successfully. Otherwise returns false. */ addElement(element: IElement, index?: number): boolean; insertElementAfter(element: IElement, after: IElement): void; insertElementBefore(element: IElement, before: IElement): void; protected canAddElement(element: IElement): boolean; /* * Add a question into Panel or Page. Returns true if the question added successfully. Otherwise returns false. */ addQuestion(question: Question, index?: number): boolean; /* * Add a panel into Panel or Page. Returns true if the panel added successfully. Otherwise returns false. */ addPanel(panel: PanelModel, index?: number): boolean; /* * Creates a new question and adds it at location of index, by default the end of the elements list. Returns null, if the question could not be created or could not be added into page or panel. */ addNewQuestion(questionType: string, name?: string, index?: number): Question; /* * Creates a new panel and adds it into the end of the elements list. Returns null, if the panel could not be created or could not be added into page or panel. */ addNewPanel(name?: string): PanelModel; /* * Returns the index of element parameter in the elements list. */ indexOf(element: IElement): number; protected createNewPanel(name: string): PanelModel; /* * Remove an element (Panel or Question) from the elements list. */ removeElement(element: IElement): boolean; /* * Remove question from the elements list. */ removeQuestion(question: Question): void; runCondition(values: any, properties: any): void; onAnyValueChanged(name: string): void; checkBindings(valueName: string, value: any): void; protected dragDropAddTarget(dragDropInfo: DragDropInfo): void; dragDropFindRow(findElement: ISurveyElement): QuestionRowModel; dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void; needResponsiveWidth(): boolean; get no(): string; dispose(): void; } /* * A base class for all questions. */ export declare class Question extends SurveyElement implements IQuestion, IConditionRunner, IValidatorOwner, ITitleOwner { constructor(name: string); static TextPreprocessorValuesMap: any; static questionCounter: number; conditionRunner: ConditionRunner; isCustomWidgetRequested: boolean; customWidgetValue: QuestionCustomWidget; customWidgetData: any; focusCallback: any; surveyLoadCallback: any; displayValueCallback: any; conditionEnabelRunner: ConditionRunner; conditionRequiredRunner: ConditionRunner; defaultValueRunner: ExpressionRunner; isChangingViaDefaultValue: boolean; isValueChangedDirectly: boolean; valueChangedCallback: any; commentChangedCallback: any; validateValueCallback: any; questionTitleTemplateCallback: any; afterRenderQuestionCallback: any; valueFromDataCallback: any; valueToDataCallback: any; onGetSurvey: any; locProcessedTitle: LocalizableString; protected isReadyValue: boolean; commentElement: any; /* * The event is fired when isReady property of question is changed. * <br/> options.question - the question * <br/> options.isReady - current value of isReady * <br/> options.oldIsReady - old value of isReady */ onReadyChanged: EventBase<Question>; isReadOnlyRenderDiv(): boolean; protected createLocTitleProperty(): LocalizableString; getSurvey(live?: boolean): ISurvey; getValueName(): string; /* * Use this property if you want to store the question result in the name different from the question name. * Question name should be unique in the survey and valueName could be not unique. It allows to share data between several questions with the same valueName. * The library set the value automatically if the question.name property is not valid. For example, if it contains the period '.' symbol. * In this case if you set the question.name property to 'x.y' then the valueName becomes 'x y'. * Please note, this property is hidden for questions without input, for example html question. */ get valueName(): string; set valueName(val: string); protected onValueNameChanged(oldValue: string): void; protected onNameChanged(oldValue: string): void; get isReady(): boolean; /* * A11Y properties */ get ariaRequired(): "true" | "false"; get ariaLabel(): string; get ariaInvalid(): "true" | "false"; get ariaDescribedBy(): string; /* * Get is question ready to use */ choicesLoaded(): void; /* * Get/set the page where the question is located. */ get page(): IPage; set page(val: IPage); getPanel(): IPanel; delete(): void; get isFlowLayout(): boolean; getLayoutType(): string; isLayoutTypeSupported(layoutType: string): boolean; /* * Use it to get/set the question visibility. */ get visible(): boolean; set visible(val: boolean); protected onVisibleChanged(): void; /* * Use it to choose how other question values will be rendered in title if referenced in {}. * Please note, this property is hidden for question without input, for example html question. */ get useDisplayValuesInTitle(): boolean; set useDisplayValuesInTitle(val: boolean); protected getUseDisplayValuesInTitle(): boolean; /* * An expression that returns true or false. If it returns true the Question becomes visible and if it returns false the Question becomes invisible. The library runs the expression on survey start and on changing a question value. If the property is empty then visible property is used. */ get visibleIf(): string; set visibleIf(val: string); /* * Returns true if the question is visible or survey is in design mode right now. */ get isVisible(): boolean; /* * Returns the visible index of the question in the survey. It can be from 0 to all visible questions count - 1 * The visibleIndex is -1 if the title is 'hidden' or hideNumber is true */ get visibleIndex(): number; /* * Set hideNumber to true to stop showing the number for this question. The question will not be counter */ get hideNumber(): boolean; set hideNumber(val: boolean); /* * Returns true if the question may have a title located on the left */ get isAllowTitleLeft(): boolean; /* * Returns the type of the object as a string as it represents in the json. */ getType(): string; get isQuestion(): boolean; /* * Move question to a new container Page/Panel. Add as a last element if insertBefore parameter is not used or inserted into the given index, * if insert parameter is number, or before the given element, if the insertBefore parameter is a question or panel */ moveTo(container: IPanel, insertBefore?: any): boolean; getProgressInfo(): IProgressInfo; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; getDataFilteredValues(): any; getDataFilteredProperties(): any; /* * A parent element. It can be panel or page. */ get parent(): IPanel; set parent(val: IPanel); parentQuestionValue: Question; /* * A parent question. It can be a dynamic panel or dynamic/dropdown matrices. If the value is a matrix, it means that question is a cell question. * This property is null for a stand alone question. */ get parentQuestion(): Question; setParentQuestion(val: Question): void; protected onParentQuestionChanged(): void; protected onParentChanged(): void; /* * Returns false if the question doesn't have a title property, for example: QuestionHtmlModel, or titleLocation property equals to "hidden" */ get hasTitle(): boolean; /* * Set this property different from "default" to set the specific question title location for this panel/page. * Please note, this property is hidden for questions without input, for example html question. */ get titleLocation(): string; set titleLocation(val: string); getTitleOwner(): ITitleOwner; /* * Return the title location based on question titleLocation property and QuestionTitleLocation of it's parents */ getTitleLocation(): string; protected getTitleLocationCore(): string; get hasTitleOnLeft(): boolean; get hasTitleOnTop(): boolean; get hasTitleOnBottom(): boolean; get hasTitleOnLeftTop(): boolean; get errorLocation(): string; /* * Returns false if the question doesn't have an input element, for example: QuestionHtmlModel */ get hasInput(): boolean; /* * Returns false if the question doesn't have an input element or have multiple inputs: matrices or panel dynamic */ get hasSingleInput(): boolean; get inputId(): string; protected getDefaultTitleValue(): string; protected getDefaultTitleTagName(): string; /* * Question description location. By default, value is "default" and it depends on survey questionDescriptionLocation property * You may change it to "underInput" to render it under question input or "underTitle" to rendered it under title. */ get descriptionLocation(): string; set descriptionLocation(val: string); get hasDescriptionUnderTitle(): boolean; get hasDescriptionUnderInput(): boolean; get clickTitleFunction(): any; /* * The custom text that will be shown on required error. Use this property, if you do not want to show the default text. * Please note, this property is hidden for question without input, for example html question. */ get requiredErrorText(): string; set requiredErrorText(val: string); get locRequiredErrorText(): LocalizableString; /* * Use it to get or set the comment value. */ get commentText(): string; set commentText(val: string); get locCommentText(): LocalizableString; /* * Use this property to set the place holder text for comment field . */ get commentPlaceHolder(): string; set commentPlaceHolder(val: string); get locCommentPlaceHolder(): LocalizableString; get commentOrOtherPlaceHolder(): string; /* * Returns a copy of question errors survey. For some questions like matrix and panel dynamic it includes the errors of nested questions. */ getAllErrors(): Array<SurveyError>; getErrorByType(errorType: string): SurveyError; /* * The link to the custom widget. */ get customWidget(): QuestionCustomWidget; updateCustomWidget(): void; get isCompositeQuestion(): boolean; updateCommentElement(): void; onCommentInput(event: any): void; onCommentChange(event: any): void; afterRenderQuestionElement(el: any): void; afterRender(el: any): void; beforeDestroyQuestionElement(el: any): void; /* * Returns the rendred question title. */ get processedTitle(): string; /* * Returns the title after processing the question template. */ get fullTitle(): string; protected get titlePattern(): string; get isRequireTextOnStart(): boolean; get isRequireTextBeforeTitle(): boolean; get isRequireTextAfterTitle(): boolean; /* * The Question renders on the new line if the property is true. If the property is false, the question tries to render on the same line/row with a previous question/panel. */ get startWithNewLine(): boolean; set startWithNewLine(val: boolean); protected calcCssClasses(css: any): any; get cssRoot(): string; protected setCssRoot(val: string): void; protected getCssRoot(cssClasses: any): string; get cssHeader(): string; protected setCssHeader(val: string): void; protected getCssHeader(cssClasses: any): string; get cssContent(): string; protected setCssContent(val: string): void; protected getCssContent(cssClasses: any): string; get cssTitle(): string; protected setCssTitle(val: string): void; protected getCssTitle(cssClasses: any): string; get cssError(): string; protected setCssError(val: string): void; protected getCssError(cssClasses: any): string; getRootCss(): string; updateElementCss(reNew?: boolean): void; protected updateQuestionCss(reNew?: boolean): void; protected updateElementCssCore(cssClasses: any): void; protected updateCssClasses(res: any, css: any): void; protected getCssType(): string; get renderCssRoot(): string; /* * Move the focus to the input of this question. */ focus(onError?: boolean): void; focusIn: any; protected fireCallback(callback: any): void; getOthersMaxLength(): any; protected onCreating(): void; protected getFirstInputElementId(): string; protected getFirstErrorInputElementId(): string; protected getProcessedTextValue(textValue: TextPreProcessorValue): void; supportComment(): boolean; supportOther(): boolean; /* * Set this property to true, to make the question a required. If a user doesn't answer the question then a validation error will be generated. * Please note, this property is hidden for question without input, for example html question. */ get isRequired(): boolean; set isRequired(val: boolean); /* * An expression that returns true or false. If it returns true the Question becomes required and an end-user has to answer it. * If it returns false the Question then an end-user may not answer it the Question maybe empty. * The library runs the expression on survey start and on changing a question value. If the property is empty then isRequired property is used. * Please note, this property is hidden for question without input, for example html question. */ get requiredIf(): string; set requiredIf(val: string); /* * Set it to true, to add a comment for the question. */ get hasComment(): boolean; set hasComment(val: boolean); /* * The unique identificator. It is generated automatically. */ get id(): string; set id(val: string); get ariaTitleId(): string; get ariaRole(): string; get hasOther(): boolean; set hasOther(val: boolean); protected hasOtherChanged(): void; get requireUpdateCommentValue(): boolean; /* * Returns true if readOnly property is true or survey is in display mode or parent panel/page is readOnly. */ get isReadOnly(): boolean; get isInputReadOnly(): boolean; get renderedInputReadOnly(): string; get renderedInputDisabled(): string; protected onReadOnlyChanged(): void; /* * An expression that returns true or false. If it returns false the Question becomes read only and an end-user will not able to answer on the qustion. The library runs the expression on survey start and on changing a question value. If the property is empty then readOnly property is used. * Please note, this property is hidden for question without input, for example html question. */ get enableIf(): string; set enableIf(val: string); surveyChoiceItemVisibilityChange(): void; /* * Run visibleIf and enableIf expressions. If visibleIf or/and enabledIf are not empty, then the results of performing the expression (true or false) set to the visible/readOnly properties. */ runCondition(values: any, properties: any): void; /* * The property returns the question number. If question is invisible then it returns empty string. * If visibleIndex is 1, then no is 2, or 'B' if survey.questionStartIndex is 'A'. */ get no(): string; protected getStartIndex(): string; onSurveyLoad(): void; protected onSetData(): void; protected initDataFromSurvey(): void; protected initCommentFromSurvey(): void; protected runExpression(expression: string): any; /* * Get/Set the question value. */ get value(): any; set value(val: any); get valueForSurvey(): any; /* * Clear the question value. It clears the question comment as well. */ clearValue(): void; unbindValue(): void; createValueCopy(): any; protected getUnbindValue(value: any): any; protected isValueSurveyElement(val: any): boolean; /* * Return true if there is a parent (page or panel) and it is visible */ get isParentVisible(): boolean; clearValueIfInvisible(reason?: string): void; protected clearValueIfInvisibleCore(): void; /* * Gets or sets a value that specifies how invisible question clears the value. By default the behavior is define by Survey "clearInvisibleValues" property. * * The following options are available: * * - `default` (default) - Survey "clearInvisibleValues" property defines the behavior. * - `none` - do not clear invisible value. * - `onHidden` - clear the question value when it becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing. * - `onComplete` - clear invisible question value on survey complete. */ get clearIfInvisible(): string; set clearIfInvisible(val: string); get displayValue(): any; /* * Return the question value as a display text. For example, for dropdown, it would return the item text instead of item value. */ getDisplayValue(keysAsText: boolean, value?: any): any; protected getDisplayValueCore(keyAsText: boolean, value: any): any; protected getDisplayValueEmpty(): string; /* * A default value for the question. Ignored for question types that cannot have a [value](https://surveyjs.io/Documentation/Library?id=Question#value) (for example, HTML). * * The default value is used as a question value in the following cases: * * - While the survey is being loaded from JSON. * - The question is just added to the survey and does not yet have an answer. * - The respondent left the answer empty. */ get defaultValue(): any; set defaultValue(val: any); /* * An expression used to calculate the [defaultValue](https://surveyjs.io/Documentation/Library?id=Question#defaultValue). * * This expression applies until the question [value](https://surveyjs.io/Documentation/Library?id=Question#value) is specified by an end user or programmatically. * * An expression can reference other questions as follows: * * - `{other_question_name}` * - `{panel.other_question_name}` (to access questions inside the same dynamic panel) * - `{row.other_question_name}` (to access questions inside the same dynamic matrix or multi-column dropdown) * * An expression can also include built-in and custom functions for advanced calculations. For example, if the `defaultValue` should be today's date, set the `defaultValueExpression` to `"today()"`, and the corresponding built-in function will be executed each time the survey is loaded. Refer to the following help topic for more information: [Use Functions in Expressions](https://surveyjs.io/Documentation/Library#conditions-functions). */ get defaultValueExpression(): any; set defaultValueExpression(val: any); get resizeStyle(): "none" | "both"; /* * Returns question answer data as a plain object: with question title, name, value and displayValue. * For complex questions (like matrix, etc.) isNode flag is set to true and data contains array of nested objects (rows) * set options.includeEmpty to false if you want to skip empty answers */ getPlainData(options?: any): any; /* * The correct answer on the question. Set this value if you are doing a quiz. * Please note, this property is hidden for question without input, for example html question. */ get correctAnswer(): any; set correctAnswer(val: any); protected convertDefaultValue(val: any): any; /* * Returns questions count: 1 for the non-matrix questions and all inner visible questions that has input(s) widgets for question of matrix types. */ get quizQuestionCount(): number; get correctAnswerCount(): number; protected getQuizQuestionCount(): number; protected getCorrectAnswerCount(): number; isAnswerCorrect(): boolean; updateValueWithDefaults(): void; protected get isClearValueOnHidden(): boolean; getQuestionFromArray(name: string, index: number): IQuestion; getDefaultValue(): any; protected isDefaultValueEmpty(): boolean; protected setDefaultValue(): void; protected isValueExpression(val: any): boolean; protected setValueAndRunExpression(expression: string, defaultValue: any, setFunc: any, values?: any, properties?: any): void; /* * The question comment value. */ get comment(): string; set comment(val: string); protected getQuestionComment(): string; protected setQuestionComment(newValue: string): void; /* * Returns true if the question value is empty */ isEmpty(): boolean; get isAnswered(): boolean; set isAnswered(val: boolean); protected updateIsAnswered(): void; protected getIsAnswered(): boolean; /* * The list of question validators. * Please note, this property is hidden for question without input, for example html question. */ get validators(): any; set validators(val: any); getValidators(): Array<SurveyValidator>; getSupportedValidators(): Array<any>; addConditionObjectsByContext(objects: any, context: any): void; getConditionJson(operator?: string, path?: string): any; /* * Returns true if there is a validation error(s) in the question. */ hasErrors(fireCallback?: boolean, rec?: any): boolean; /* * Returns the validation errors count. */ get currentErrorCount(): number; /* * Returns the char/string for a required question. */ get requiredText(): string; /* * Add error into the question error list. */ addError(error: string | SurveyError): void; /* * Remove a particular error from the question error list. */ removeError(error: SurveyError): void; protected canCollectErrors(): boolean; protected canRunValidators(isOnValueChanged: boolean): boolean; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; protected hasRequiredError(): boolean; validatorRunner: ValidatorRunner; isRunningValidatorsValue: boolean; onCompletedAsyncValidators: any; get isRunningValidators(): boolean; protected getIsRunningValidators(): boolean; protected runValidators(): Array<SurveyError>; protected raiseOnCompletedAsyncValidators(): void; isValueChangedInSurvey: boolean; protected allowNotifyValueChanged: boolean; protected setNewValue(newValue: any): void; protected isTextValue(): boolean; get isSurveyInputTextUpdate(): boolean; get isInputTextUpdate(): boolean; protected setNewValueInData(newValue: any): void; protected getValueCore(): any; protected setValueCore(newValue: any): void; protected canSetValueToSurvey(): boolean; protected valueFromData(val: any): any; protected valueToData(val: any): any; protected onValueChanged(): void; protected setNewComment(newValue: string): void; protected getValidName(name: string): string; updateValueFromSurvey(newValue: any): void; updateCommentFromSurvey(newValue: any): any; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; onSurveyValueChanged(newValue: any): void; setVisibleIndex(val: number): number; removeElement(element: IElement): boolean; supportGoNextPageAutomatic(): boolean; supportGoNextPageError(): boolean; /* * Call this function to remove values from the current question, that end-user will not be able to enter. * For example the value that doesn't exists in a radigroup/dropdown/checkbox choices or matrix rows/columns. */ clearIncorrectValues(): void; clearOnDeletingContainer(): void; /* * Call this function to clear all errors in the question */ clearErrors(): void; clearUnusedValues(): void; onAnyValueChanged(name: string): void; checkBindings(valueName: string, value: any): void; getComponentName(): string; isDefaultRendering(): boolean; renderAs: string; getErrorCustomText(text: string, error: SurveyError): string; getValidatorTitle(): string; get validatedValue(): any; set validatedValue(val: any); getAllValues(): any; needResponsiveWidth(): boolean; } export declare class QuestionCheckboxBaseImplementor extends QuestionSelectBaseImplementor { constructor(question: any); } export declare class QuestionDropdownImplementor extends QuestionSelectBaseImplementor { constructor(question: any); } export declare class QuestionMatrixDynamicImplementor extends QuestionMatrixBaseImplementor { constructor(question: any); protected addRow(): void; protected removeRow(row: any): void; getKoPopupIsVisible(row: any): any; dispose(): void; } export declare class Survey extends SurveyModel { constructor(jsonObj?: any, renderedElement?: any, css?: any); static get cssType(): string; static set cssType(val: string); renderedElement: any; isFirstRender: boolean; mouseDownPage: any; koCurrentPage: any; koState: any; koAfterRenderPage: any; koAfterRenderHeader: any; koCompletedState: any; koCompletedStateText: any; koCompletedStateCss: any; koTimerInfoText: any; koTitleTemplate: any; getDataValueCore(valuesHash: any, key: string): any; setDataValueCore(valuesHash: any, key: string, value: any): void; deleteDataValueCore(valuesHash: any, key: string): void; protected onBaseCreating(): void; nextPageUIClick(): void; nextPageMouseDown(): any; render(element?: any): void; clear(clearData?: boolean, gotoFirstPage?: boolean): void; localeChanged(): void; koEventAfterRender(element: any, survey: any): void; loadSurveyFromService(surveyId?: string, clientId?: string, renderedElement?: any): void; setCompleted(): void; start(): boolean; createNewPage(name: string): PageModel; protected getHtmlTemplate(): string; protected onBeforeCreating(): void; protected currentPageChanged(newValue: any, oldValue: any): void; pageVisibilityChanged(page: any, newValue: boolean): void; protected onLoadSurveyFromService(): void; protected onLoadingSurveyFromService(): void; protected setCompletedState(value: string, text: string): void; protected doTimer(): void; updateSurvey(newProps: any, oldProps?: any): void; dispose(): void; } /* * If expression returns true, it completes the survey. */ export declare class SurveyTriggerComplete extends SurveyTrigger { constructor(); getType(): string; get isOnNextPage(): boolean; protected onSuccess(values: any, properties: any): void; } /* * If expression returns true, the value from question **fromName** will be set into **setToName**. */ export declare class SurveyTriggerCopyValue extends SurveyTrigger { constructor(); get setToName(): string; set setToName(val: string); get fromName(): string; set fromName(val: string); getType(): string; protected onSuccess(values: any, properties: any): void; } /* * If expression returns true, the **runExpression** will be run. If **setToName** property is not empty then the result of **runExpression** will be set to it. */ export declare class SurveyTriggerRunExpression extends SurveyTrigger { constructor(); getType(): string; get setToName(): string; set setToName(val: string); get runExpression(): string; set runExpression(val: string); protected onSuccess(values: any, properties: any): void; } /* * If expression returns true, the value from property **setValue** will be set to **setToName** */ export declare class SurveyTriggerSetValue extends SurveyTrigger { constructor(); getType(): string; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; get setToName(): string; set setToName(val: string); get setValue(): any; set setValue(val: any); get isVariable(): boolean; set isVariable(val: boolean); protected onSuccess(values: any, properties: any): void; } /* * If expression returns true, the survey go to question **gotoName** and focus it. */ export declare class SurveyTriggerSkip extends SurveyTrigger { constructor(); getType(): string; get gotoName(): string; set gotoName(val: string); get isOnNextPage(): boolean; protected onSuccess(values: any, properties: any): void; } /* * If expression returns true, it makes questions/pages visible. * Ohterwise it makes them invisible. */ export declare class SurveyTriggerVisible extends SurveyTrigger { constructor(); pages: any; questions: any; getType(): string; protected onSuccess(values: any, properties: any): void; protected onFailure(): void; protected onItemSuccess(item: any): void; protected onItemFailure(item: any): void; } /* * The page object. It has elements collection, that contains questions and panels. */ export declare class PageModel extends PanelModelBase implements IPage { constructor(name?: string); hasShownValue: boolean; getType(): string; toString(): string; get isPage(): boolean; protected canShowPageNumber(): boolean; protected canShowTitle(): boolean; /* * Use this property to show title in navigation buttons. If the value is empty then page name is used. */ get navigationTitle(): string; set navigationTitle(val: string); get locNavigationTitle(): LocalizableString; get navigationDescription(): string; set navigationDescription(val: string); get locNavigationDescription(): LocalizableString; get passed(): boolean; set passed(val: boolean); delete(): void; onFirstRendering(): void; /* * The visible index of the page. It has values from 0 to visible page count - 1. */ get visibleIndex(): number; set visibleIndex(val: number); protected canRenderFirstRows(): boolean; /* * Returns true, if the page is started page in the survey. It can be shown on the start only and the end-user could not comeback to it after it passed it. */ get isStarted(): boolean; protected calcCssClasses(css: any): any; get cssTitle(): string; num: number; /* * Set this property to "hide" to make "Prev", "Next" and "Complete" buttons are invisible for this page. Set this property to "show" to make these buttons visible, even if survey showNavigationButtons property is false. */ get navigationButtonsVisibility(): string; set navigationButtonsVisibility(val: string); /* * The property returns true, if the page has been shown to the end-user. */ get wasShown(): boolean; get hasShown(): boolean; setWasShown(val: boolean): void; /* * The property returns true, if the elements are randomized on the page */ get areQuestionsRandomized(): boolean; /* * Call it to scroll to the page top. */ scrollToTop(): void; /* * Time in seconds end-user spent on this page */ timeSpent: number; /* * Returns the list of all panels in the page */ getPanels(visibleOnly?: boolean, includingDesignTime?: boolean): Array<IPanel>; /* * The maximum time in seconds that end-user has to complete the page. If the value is 0 or less, the end-user has unlimited number of time to finish the page. */ get maxTimeToFinish(): number; set maxTimeToFinish(val: number); protected onNumChanged(value: number): void; protected onVisibleChanged(): void; dragDropInfo: DragDropInfo; dragDropStart(src: IElement, target: IElement, nestedPanelDepth?: number): void; dragDropMoveTo(destination: ISurveyElement, isBottom?: boolean, isEdge?: boolean): boolean; dragDropFinish(isCancel?: boolean): IElement; ensureRowsVisibility(): void; } /* * A container element, similar to the Page objects. However, unlike the Page, Panel can't be a root. * It may contain questions and other panels. */ export declare class PanelModel extends PanelModelBase implements IElement { constructor(name?: string); getType(): string; get contentId(): string; getSurvey(live?: boolean): ISurvey; onSurveyLoad(): void; protected onSetData(): void; get isPanel(): boolean; /* * Get/set the page where the panel is located. */ get page(): IPage; set page(val: IPage); delete(): void; /* * Move panel to a new container Page/Panel. Add as a last element if insertBefore parameter is not used or inserted into the given index, * if insert parameter is number, or before the given element, if the insertBefore parameter is a question or panel */ moveTo(container: IPanel, insertBefore?: any): boolean; /* * Returns the visible index of the panel in the survey. Commonly it is -1 and it doesn't show. * You have to set showNumber to true to show index/numbering for the Panel */ get visibleIndex(): number; getTitleOwner(): ITitleOwner; /* * Set showNumber to true to start showing the number for this panel. */ get showNumber(): boolean; set showNumber(val: boolean); /* * Gets or sets a value that specifies how the elements numbers inside panel are displayed. * * The following options are available: * * - `default` - display questions numbers as defined in parent panel or survey * - `onpanel` - display questions numbers, start numbering from beginning of this page * - `off` - turn off the numbering for questions titles */ get showQuestionNumbers(): string; set showQuestionNumbers(val: string); /* * Gets or sets the first question index for elements inside the panel. The first question index is '1.' by default and it is taken from survey.questionStartIndex property. * You may start it from '100' or from 'A', by setting '100' or 'A' to this property. * You can set the start index to "(1)" or "# A)" or "a)" to render question number as (1), # A) and a) accordingly. */ get questionStartIndex(): string; set questionStartIndex(val: string); getQuestionStartIndex(): string; /* * The property returns the question number. If question is invisible then it returns empty string. * If visibleIndex is 1, then no is 2, or 'B' if survey.questionStartIndex is 'A'. */ get no(): string; protected setNo(visibleIndex: number): void; protected beforeSetVisibleIndex(index: number): number; protected getPanelStartIndex(index: number): number; protected isContinueNumbering(): boolean; protected hasErrorsCore(rec: any): void; protected getRenderedTitle(str: string): string; /* * The inner indent. Set this property to increase the panel content margin. */ get innerIndent(): number; set innerIndent(val: number); /* * The Panel renders on the new line if the property is true. If the property is false, the panel tries to render on the same line/row with a previous question/panel. */ get startWithNewLine(): boolean; set startWithNewLine(val: boolean); /* * The Panel toolbar gets adaptive if the property is set to true. */ get allowAdaptiveActions(): boolean; set allowAdaptiveActions(val: boolean); get innerPaddingLeft(): string; set innerPaddingLeft(val: string); clearOnDeletingContainer(): void; get footerActions(): any; footerToolbarValue: any; getFooterToolbar(): ActionContainer; get hasEditButton(): boolean; cancelPreview(): void; get cssTitle(): string; get cssError(): string; protected getCssError(cssClasses: any): string; protected onVisibleChanged(): void; needResponsiveWidth(): boolean; focusIn: any; getContainerCss(): string; } /* * A Model for a boolean question. */ export declare class QuestionBooleanModel extends Question { constructor(name: string); getType(): string; isLayoutTypeSupported(layoutType: string): boolean; supportGoNextPageAutomatic(): boolean; /* * Returns true if the question check will be rendered in indeterminate mode. value is empty. */ get isIndeterminate(): boolean; get hasTitle(): boolean; /* * Get/set question value in 3 modes: indeterminate (value is empty), true (check is set) and false (check is unset). */ get checkedValue(): any; set checkedValue(val: any); /* * Set the default state of the check: "indeterminate" - default (value is empty/null), "true" - value equals valueTrue or true, "false" - value equals valueFalse or false. */ get defaultValue(): any; set defaultValue(val: any); getDefaultValue(): any; get locTitle(): LocalizableString; /* * The checkbox label. If it is empty and showTitle is false then title is rendered */ get label(): string; set label(val: string); get locLabel(): LocalizableString; get locDisplayLabel(): LocalizableString; /* * Set this property, if you want to have a different label for state when check is set. */ get labelTrue(): any; set labelTrue(val: any); get locLabelTrue(): LocalizableString; get isDeterminated(): boolean; /* * Set this property, if you want to have a different label for state when check is unset. */ get labelFalse(): any; set labelFalse(val: any); get locLabelFalse(): LocalizableString; /* * Set this property to true to show the question title. It is hidden by default. */ showTitle: boolean; /* * Set this property, if you want to have a different value from true when check is set. */ valueTrue: any; /* * Set this property, if you want to have a different value from false when check is unset. */ valueFalse: any; protected setDefaultValue(): void; protected getDisplayValueCore(keysAsText: boolean, value: any): any; getItemCss(): string; getLabelCss(checked: boolean): string; get svgIcon(): string; get allowClick(): boolean; getCheckedLabel(): LocalizableString; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; onLabelClick(event: any, value: boolean): boolean; onSwitchClickModel(event: any): boolean; } export declare class QuestionCheckboxImplementor extends QuestionCheckboxBaseImplementor { constructor(question: any); protected getKoValue(): any; } export declare class QuestionCustomModelBase extends Question implements ISurveyImpl, ISurveyData, IPanel { constructor(name: string, customQuestion: ComponentQuestionJSON); customQuestion: ComponentQuestionJSON; getType(): string; locStrsChanged(): void; protected createWrapper(): void; protected onPropertyValueChanged(name: string, oldValue: any, newValue: any): void; itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void; onFirstRendering(): void; protected getElement(): SurveyElement; protected initElement(el: SurveyElement): void; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; onSurveyLoad(): void; afterRenderQuestionElement(el: any): void; afterRender(el: any): void; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; protected setNewValue(newValue: any): void; getSurveyData(): ISurveyData; getTextProcessor(): ITextProcessor; getValue(name: string): any; setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any; protected convertDataName(name: string): string; protected convertDataValue(name: string, newValue: any): any; getVariable(name: string): any; setVariable(name: string, newValue: any): void; getComment(name: string): string; setComment(name: string, newValue: string, locNotification: any): any; getAllValues(): any; getFilteredValues(): any; getFilteredProperties(): any; addElement(element: IElement, index: number): void; removeElement(element: IElement): boolean; getQuestionTitleLocation(): string; getQuestionStartIndex(): string; getChildrenLayoutType(): string; elementWidthChanged(el: IElement): void; get elements(): any; indexOf(el: IElement): number; ensureRowsVisibility(): void; protected getContentDisplayValueCore(keyAsText: boolean, value: any, question: Question): any; } /* * A Model for an question that renders empty "div" tag. It used as a base class for some custom widgets */ export declare class QuestionEmptyModel extends Question { constructor(name: string); getType(): string; } /* * A Model for expression question. It is a read-only question. It calculates value based on epxression property. */ export declare class QuestionExpressionModel extends Question { constructor(name: string); expressionIsRunning: boolean; expressionRunner: ExpressionRunner; getType(): string; get hasInput(): boolean; /* * Use this property to display the value in your own format. Make sure you have "{0}" substring in your string, to display the actual value. */ get format(): string; set format(val: string); get locFormat(): LocalizableString; /* * The Expression that used to calculate the question value. You may use standard operators like +, -, * and /, squares (). Here is the example of accessing the question value {questionname}. * <br/>Example: "({quantity} * {price}) * (100 - {discount}) / 100" */ get expression(): string; set expression(val: string); locCalculation(): void; unlocCalculation(): void; runCondition(values: any, properties: any): void; protected canCollectErrors(): boolean; protected hasRequiredError(): boolean; /* * The maximum number of fraction digits to use if displayStyle is not "none". Possible values are from 0 to 20. The default value is -1 and it means that this property is not used. */ get maximumFractionDigits(): number; set maximumFractionDigits(val: number); /* * The minimum number of fraction digits to use if displayStyle is not "none". Possible values are from 0 to 20. The default value is -1 and it means that this property is not used. */ get minimumFractionDigits(): number; set minimumFractionDigits(val: number); runIfReadOnlyValue: boolean; get runIfReadOnly(): boolean; set runIfReadOnly(val: boolean); get formatedValue(): string; protected updateFormatedValue(): void; protected onValueChanged(): void; updateValueFromSurvey(newValue: any): void; protected getDisplayValueCore(keysAsText: boolean, value: any): any; /* * You may set this property to "decimal", "currency", "percent" or "date". If you set it to "currency", you may use the currency property to display the value in currency different from USD. */ get displayStyle(): string; set displayStyle(val: string); /* * Use it to display the value in the currency differen from USD. The displayStype should be set to "currency". */ get currency(): string; set currency(val: string); /* * Determines whether to display grouping separators. The default value is true. */ get useGrouping(): boolean; set useGrouping(val: boolean); protected getValueAsStr(val: any): string; } /* * A Model for a file question */ export declare class QuestionFileModel extends Question { constructor(name: string); isUploading: boolean; isDragging: boolean; /* * The event is fired after question state has been changed. * <br/> sender the question object that fires the event * <br/> options.state new question state value. */ onStateChanged: EventBase<QuestionFileModel>; previewValue: any; currentState: string; getType(): string; clearOnDeletingContainer(): void; /* * Set it to true, to show the preview for the image files. */ get showPreview(): boolean; set showPreview(val: boolean); /* * Set it to true, to allow select multiple files. */ get allowMultiple(): boolean; set allowMultiple(val: boolean); /* * The image height. */ get imageHeight(): string; set imageHeight(val: string); /* * The image width. */ get imageWidth(): string; set imageWidth(val: string); /* * Accepted file types. Passed to the 'accept' attribute of the file input tag. See https://www.w3schools.com/tags/att_input_accept.asp for more details. */ get acceptedTypes(): string; set acceptedTypes(val: string); /* * Set it to false if you do not want to serialize file content as text in the survey.data. * In this case, you have to write the code onUploadFiles event to store the file content. */ get storeDataAsText(): boolean; set storeDataAsText(val: boolean); /* * Set it to true if you want to wait until files will be uploaded to your server. */ get waitForUpload(): boolean; set waitForUpload(val: boolean); /* * Set it to false if you want to disable images preview. */ get allowImagesPreview(): boolean; set allowImagesPreview(val: boolean); /* * Use this property to setup the maximum allowed file size. */ get maxSize(): number; set maxSize(val: number); /* * Use this property to setup confirmation to remove file. */ get needConfirmRemoveFile(): boolean; set needConfirmRemoveFile(val: boolean); /* * The remove file confirmation message. */ getConfirmRemoveMessage(fileName: string): string; /* * The remove file confirmation message template. */ get confirmRemoveMessage(): string; set confirmRemoveMessage(val: string); get locConfirmRemoveMessage(): LocalizableString; /* * The remove all files confirmation message. */ get confirmRemoveAllMessage(): string; set confirmRemoveAllMessage(val: string); get locConfirmRemoveAllMessage(): LocalizableString; /* * The no file chosen caption for modern theme. */ get noFileChosenCaption(): string; set noFileChosenCaption(val: string); get locNoFileChosenCaption(): LocalizableString; /* * The choose files button caption for modern theme. */ get chooseButtonCaption(): string; set chooseButtonCaption(val: string); get locChooseButtonCaption(): LocalizableString; /* * The clean files button caption. */ get cleanButtonCaption(): string; set cleanButtonCaption(val: string); get locCleanButtonCaption(): LocalizableString; /* * The remove file button caption. */ get removeFileCaption(): string; set removeFileCaption(val: string); get locRemoveFileCaption(): LocalizableString; /* * The loading file input title. */ get loadingFileTitle(): string; set loadingFileTitle(val: string); get locLoadingFileTitle(): LocalizableString; /* * The choose file input title. */ get chooseFileTitle(): string; set chooseFileTitle(val: string); get locChooseFileTitle(): LocalizableString; get dragAreaPlaceholder(): string; set dragAreaPlaceholder(val: string); get locDragAreaPlaceholder(): LocalizableString; /* * The input title value. */ get inputTitle(): string; /* * Clear value programmatically. */ clear(doneCallback?: any): void; /* * Remove file item programmatically. */ removeFile(content: any): void; /* * Load multiple files programmatically. */ loadFiles(files: any): void; canPreviewImage(fileItem: any): boolean; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; protected stateChanged(state: string): void; getPlainData(options?: any): any; supportComment(): boolean; getChooseFileCss(): string; getReadOnlyFileCss(): string; getFileRootCss(): string; getFileDecoratorCss(): string; onDragOver: any; onDrop: any; onDragLeave: any; doChange: any; doClean: any; doRemoveFile(data: any): void; doDownloadFile: any; } export declare class QuestionImagePickerImplementor extends QuestionCheckboxBaseImplementor { constructor(question: any); protected getKoValue(): any; } /* * A Model for a matrix base question. */ export declare class QuestionMatrixBaseModel<TRow, TColumn> extends Question { constructor(name: string); protected filteredColumns: any; protected filteredRows: any; protected generatedVisibleRows: any; protected generatedTotalRow: any; visibleRowsChangedCallback: any; protected createColumnValues(): any; getType(): string; get isCompositeQuestion(): boolean; /* * Set this property to false, to hide table header. The default value is true. */ get showHeader(): boolean; set showHeader(val: boolean); /* * The list of columns. A column has a value and an optional text */ get columns(): any; set columns(val: any); get visibleColumns(): any; /* * The list of rows. A row has a value and an optional text */ get rows(): any; set rows(val: any); protected processRowsOnSet(newRows: any): any; protected getVisibleRows(): Array<TRow>; /* * Returns the list of visible rows as model objects. */ get visibleRows(): any; /* * An expression that returns true or false. It runs against each row item and if for this item it returns true, then the item is visible otherwise the item becomes invisible. Please use {item} to get the current item value in the expression. */ get rowsVisibleIf(): string; set rowsVisibleIf(val: string); /* * An expression that returns true or false. It runs against each column item and if for this item it returns true, then the item is visible otherwise the item becomes invisible. Please use {item} to get the current item value in the expression. */ get columnsVisibleIf(): string; set columnsVisibleIf(val: string); runCondition(values: any, properties: any): void; protected filterItems(): boolean; protected onColumnsChanged(): void; protected onRowsChanged(): void; protected shouldRunColumnExpression(): boolean; protected hasRowsAsItems(): boolean; protected runItemsCondition(values: any, properties: any): boolean; protected clearGeneratedRows(): void; clearIncorrectValues(): void; protected clearInvisibleValuesInRows(): void; needResponsiveWidth(): boolean; } /* * A Model for a multiple text question. */ export declare class QuestionMultipleTextModel extends Question implements IMultipleTextData, IPanel { constructor(name: string); static addDefaultItems(question: QuestionMultipleTextModel): void; colCountChangedCallback: any; getType(): string; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; get isAllowTitleLeft(): boolean; get hasSingleInput(): boolean; onSurveyLoad(): void; setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; onSurveyValueChanged(newValue: any): void; /* * The list of input items. */ get items(): any; set items(val: any); /* * Add a new text item. */ addItem(name: string, title?: string): MultipleTextItemModel; getItemByName(name: string): MultipleTextItemModel; addConditionObjectsByContext(objects: any, context: any): void; getConditionJson(operator?: string, path?: string): any; locStrsChanged(): void; supportGoNextPageAutomatic(): boolean; /* * The number of columns. Items are rendred in one line if the value is 0. */ get colCount(): number; set colCount(val: number); /* * The default text input size. */ get itemSize(): number; set itemSize(val: number); /* * Returns the list of rendered rows. */ getRows(): Array<any>; isMultipleItemValueChanging: boolean; protected onValueChanged(): void; protected createTextItem(name: string, title: string): MultipleTextItemModel; protected onItemValueChanged(): void; protected getIsRunningValidators(): boolean; hasErrors(fireCallback?: boolean, rec?: any): boolean; getAllErrors(): Array<SurveyError>; clearErrors(): void; protected getContainsErrors(): boolean; protected getIsAnswered(): boolean; getProgressInfo(): IProgressInfo; protected getDisplayValueCore(keysAsText: boolean, value: any): any; getMultipleTextValue(name: string): any; setMultipleTextValue(name: string, value: any): void; getItemDefaultValue(name: string): any; getTextProcessor(): ITextProcessor; getAllValues(): any; getIsRequiredText(): string; addElement(element: IElement, index: number): void; removeElement(element: IElement): boolean; getQuestionTitleLocation(): string; getQuestionStartIndex(): string; getChildrenLayoutType(): string; elementWidthChanged(el: IElement): void; get elements(): any; indexOf(el: IElement): number; ensureRowsVisibility(): void; getItemLabelCss(item: MultipleTextItemModel): string; getItemCss(): string; getItemTitleCss(): string; } /* * A Model for non value question. This question doesn't add any new functionality. It hides some properties, including the value. */ export declare class QuestionNonValue extends Question { constructor(name: string); getType(): string; get hasInput(): boolean; get hasTitle(): boolean; getTitleLocation(): string; get hasComment(): boolean; hasErrors(fireCallback?: boolean, rec?: any): boolean; getAllErrors(): Array<SurveyError>; supportGoNextPageAutomatic(): boolean; addConditionObjectsByContext(objects: any, context: any): void; getConditionJson(operator?: string, path?: string): any; } /* * A Model for a panel dymanic question. You setup the template panel, but adding elements (any question or a panel) and assign a text to it's title, and this panel will be used as a template on creating dynamic panels. The number of panels is defined by panelCount property. * An end-user may dynamically add/remove panels, unless you forbidden this. */ export declare class QuestionPanelDynamicModel extends Question implements IQuestionPanelDynamicData { constructor(name: string); templateValue: PanelModel; loadingPanelCount: number; isValueChangingInternally: boolean; changingValueQuestion: Question; currentIndexValue: number; renderModeChangedCallback: any; panelCountChangedCallback: any; currentIndexChangedCallback: any; get hasSingleInput(): boolean; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; getType(): string; get isCompositeQuestion(): boolean; clearOnDeletingContainer(): void; get isAllowTitleLeft(): boolean; removeElement(element: IElement): boolean; /* * The template Panel. This panel is used as a template on creatign dynamic panels */ get template(): PanelModel; getPanel(): IPanel; /* * The template Panel elements, questions and panels. */ get templateElements(): any; /* * The template Panel title property. */ get templateTitle(): string; set templateTitle(val: string); get locTemplateTitle(): LocalizableString; /* * The template Panel description property. */ get templateDescription(): string; set templateDescription(val: string); get locTemplateDescription(): LocalizableString; protected get items(): any; /* * The array of dynamic panels created based on panel template */ get panels(): any; /* * The index of current active dynamical panel when the renderMode is not "list". If there is no dymamic panel (panelCount = 0) or renderMode equals "list" it returns -1, otherwise it returns a value from 0 to panelCount - 1. */ get currentIndex(): number; set currentIndex(val: number); /* * The current active dynamical panel when the renderMode is not "list". If there is no dymamic panel (panelCount = 0) or renderMode equals "list" it returns null. */ get currentPanel(): PanelModel; /* * Set it to true, to show a confirmation dialog on removing a panel */ get confirmDelete(): boolean; set confirmDelete(val: boolean); /* * Set it to a question name used in the template panel and the library shows duplication error, if there are same values in different panels of this question. */ get keyName(): string; set keyName(val: string); /* * Use this property to change the default text showing in the confirmation delete dialog on removing a panel. */ get confirmDeleteText(): string; set confirmDeleteText(val: string); get locConfirmDeleteText(): LocalizableString; /* * The duplication value error text. Set it to show the text different from the default. */ get keyDuplicationError(): string; set keyDuplicationError(val: string); get locKeyDuplicationError(): LocalizableString; /* * Use this property to change the default previous button text. Previous button shows the previous panel, change the currentPanel, when the renderMode doesn't equal to "list". */ get panelPrevText(): string; set panelPrevText(val: string); get locPanelPrevText(): LocalizableString; /* * Use this property to change the default next button text. Next button shows the next panel, change the currentPanel, when the renderMode doesn't equal to "list". */ get panelNextText(): string; set panelNextText(val: string); get locPanelNextText(): LocalizableString; /* * Use this property to change the default value of add panel button text. */ get panelAddText(): string; set panelAddText(val: string); get locPanelAddText(): LocalizableString; /* * Use this property to change the default value of remove panel button text. */ get panelRemoveText(): string; set panelRemoveText(val: string); get locPanelRemoveText(): LocalizableString; /* * Returns true when the renderMode equals to "progressTop" or "progressTopBottom" */ get isProgressTopShowing(): boolean; /* * Returns true when the renderMode equals to "progressBottom" or "progressTopBottom" */ get isProgressBottomShowing(): boolean; /* * Returns true when currentIndex is more than 0. */ get isPrevButtonShowing(): boolean; /* * Returns true when currentIndex is more than or equal 0 and less than panelCount - 1. */ get isNextButtonShowing(): boolean; /* * Returns true when showRangeInProgress equals to true, renderMode doesn't equal to "list" and panelCount is >= 2. */ get isRangeShowing(): boolean; getElementsInDesign(includeHidden?: boolean): Array<IElement>; isAddingNewPanels: boolean; addingNewPanelsValue: any; isNewPanelsValueChanged: boolean; protected getValueCore(): any; protected setValueCore(newValue: any): void; /* * Use this property to get/set the number of dynamic panels. */ get panelCount(): number; set panelCount(val: number); /* * Use this property to allow the end-user to collapse/expand the panels. It works only if the renderMode property equals to "list" and templateTitle property is not empty. The following values are available: * <br/> default - the default value. User can't collapse/expand panels * <br/> expanded - User can collapse/expand panels and all panels are expanded by default * <br/> collapsed - User can collapse/expand panels and all panels are collapsed by default * <br/> firstExpanded - User can collapse/expand panels. The first panel is expanded and others are collapsed */ get panelsState(): string; set panelsState(val: string); /* * The minimum panel count. A user could not delete a panel if the panelCount equals to minPanelCount */ get minPanelCount(): number; set minPanelCount(val: number); /* * The maximum panel count. A user could not add a panel if the panelCount equals to maxPanelCount */ get maxPanelCount(): number; set maxPanelCount(val: number); /* * Set this property to false to hide the 'Add New' button */ get allowAddPanel(): boolean; set allowAddPanel(val: boolean); /* * Set this property to false to hide the 'Remove' button */ get allowRemovePanel(): boolean; set allowRemovePanel(val: boolean); /* * Set this property different from "default" to set the specific question title location for the template questions. */ get templateTitleLocation(): string; set templateTitleLocation(val: string); /* * Use this property to show/hide the numbers in titles in questions inside a dynamic panel. * By default the value is "off". You may set it to "onPanel" and the first question inside a dynamic panel will start with 1 or "onSurvey" to include nested questions in dymamic panels into global survey question numbering. */ get showQuestionNumbers(): string; set showQuestionNumbers(val: string); /* * Use this property to change the location of the remove button relative to the panel. * By default the value is "bottom". You may set it to "right" and remove button will appear to the right of the panel. */ get panelRemoveButtonLocation(): string; set panelRemoveButtonLocation(val: string); /* * Shows the range from 1 to panelCount when renderMode doesn't equal to "list". Set to false to hide this element. */ get showRangeInProgress(): boolean; set showRangeInProgress(val: boolean); /* * By default the property equals to "list" and all dynamic panels are rendered one by one on the page. You may change it to: "progressTop", "progressBottom" or "progressTopBottom" to render only one dynamic panel at once. The progress and navigation elements can be rendred on top, bottom or both. */ get renderMode(): string; set renderMode(val: string); /* * Returns true when renderMode equals to "list". */ get isRenderModeList(): boolean; setVisibleIndex(value: number): number; /* * Returns true when an end user may add a new panel. The question is not read only and panelCount less than maxPanelCount */ get canAddPanel(): boolean; /* * Returns true when an end user may remove a panel. The question is not read only and panelCount is more than minPanelCount */ get canRemovePanel(): boolean; protected rebuildPanels(): void; /* * If it is not empty, then this value is set to every new panel, including panels created initially, unless the defaultValue is not empty */ get defaultPanelValue(): any; set defaultPanelValue(val: any); /* * Set it to true to copy the value into new added panel from the last panel. If defaultPanelValue is set and this property equals to true, * then the value for new added panel is merging. */ get defaultValueFromLastPanel(): boolean; set defaultValueFromLastPanel(val: boolean); protected isDefaultValueEmpty(): boolean; protected setDefaultValue(): void; isEmpty(): boolean; getProgressInfo(): IProgressInfo; /* * Add a new dynamic panel based on the template Panel. It checks if canAddPanel returns true and then calls addPanel method. */ addPanelUI(): PanelModel; /* * Add a new dynamic panel based on the template Panel. */ addPanel(): PanelModel; /* * Call removePanel function. Do nothing is canRemovePanel returns false. If confirmDelete set to true, it shows the confirmation dialog first. */ removePanelUI(value: any): void; /* * Goes to the next panel in the PanelDynamic */ goToNextPanel(): void; /* * Goes to the previous panel in the PanelDynamic */ goToPrevPanel(): void; /* * Removes a dynamic panel from the panels array. */ removePanel(value: any): void; locStrsChanged(): void; clearIncorrectValues(): void; clearErrors(): void; getQuestionFromArray(name: string, index: number): IQuestion; getSharedQuestionFromArray(name: string, panelIndex: number): Question; addConditionObjectsByContext(objects: any, context: any): void; getConditionJson(operator?: string, path?: string): any; protected onReadOnlyChanged(): void; onSurveyLoad(): void; onFirstRendering(): void; runCondition(values: any, properties: any): void; protected runPanelsCondition(values: any, properties: any): void; onAnyValueChanged(name: string): void; hasErrors(fireCallback?: boolean, rec?: any): boolean; protected getContainsErrors(): boolean; protected getIsAnswered(): boolean; protected clearValueIfInvisibleCore(): void; protected getIsRunningValidators(): boolean; getAllErrors(): Array<SurveyError>; protected getDisplayValueCore(keysAsText: boolean, value: any): any; protected createNewPanel(): PanelModel; protected createAndSetupNewPanelObject(): PanelModel; protected createNewPanelObject(): PanelModel; setQuestionValue(newValue: any): void; onSurveyValueChanged(newValue: any): void; protected onSetData(): void; getItemIndex(item: ISurveyData): number; getPanelItemData(item: ISurveyData): any; isSetPanelItemData: any; setPanelItemData(item: ISurveyData, name: string, val: any): void; getRootData(): ISurveyData; getPlainData(options?: any): any; updateElementCss(reNew?: boolean): void; get progressText(): string; getRootCss(): string; getPanelWrapperCss(): string; getPanelRemoveButtonCss(): string; getAddButtonCss(): string; getPrevButtonCss(): string; getNextButtonCss(): string; /* * A text displayed when the dynamic panel contains no entries. Applies only in the Default V2 theme. */ get noEntriesText(): string; set noEntriesText(val: string); get locNoEntriesText(): LocalizableString; getShowNoEntriesPlaceholder(): boolean; } /* * A Model for a rating question. */ export declare class QuestionRatingModel extends Question { constructor(name: string); rateValuesChangedCallback: any; endLoadingFromJson(): void; onSurveyLoad(): void; /* * The list of rate items. Every item has value and text. If text is empty, the value is rendered. The item text supports markdown. If it is empty the array is generated by using rateMin, rateMax and rateStep properties. */ get rateValues(): any; set rateValues(val: any); /* * This property is used to generate rate values if rateValues array is empty. It is the first value in the rating. The default value is 1. */ get rateMin(): number; set rateMin(val: number); /* * This property is used to generate rate values if rateValues array is empty. It is the last value in the rating. The default value is 5. */ get rateMax(): number; set rateMax(val: number); /* * This property is used to generate rate values if rateValues array is empty. It is the step value. The number of rate values are (rateMax - rateMin) / rateStep. The default value is 1. */ get rateStep(): number; set rateStep(val: number); protected getDisplayValueCore(keysAsText: boolean, value: any): any; get visibleRateValues(): any; get renderedRateItems(): any; getType(): string; protected getFirstInputElementId(): string; supportGoNextPageAutomatic(): boolean; supportComment(): boolean; supportOther(): boolean; /* * The description of minimum (first) item. */ get minRateDescription(): string; set minRateDescription(val: string); get locMinRateDescription(): LocalizableString; /* * The description of maximum (last) item. */ get maxRateDescription(): string; set maxRateDescription(val: string); get locMaxRateDescription(): LocalizableString; hasMinRateDescription: boolean; hasMaxRateDescription: boolean; get hasMinLabel(): boolean; get hasMaxLabel(): boolean; /* * Specifies whether a Rating question displays the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription) * and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription) property texts as buttons that correspond to * the extreme (first and last) rate items. If any of these properties is empty, the corresponding rate item's value/text is used for display.<br/> * When the `displayRateDescriptionsAsExtremeItems` property is disabled, the texts defined through * the [minRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#minRateDescription) * and [maxRateDescription](https://surveyjs.io/Documentation/Library?id=questionratingmodel#maxRateDescription) properties * are displayed as plain non-clickable texts. */ displayRateDescriptionsAsExtremeItems: boolean; protected valueToData(val: any): any; /* * Click value again to clear. */ setValueFromClick(value: any): void; getItemClass(item: ItemValue): string; } /* * It is a base class for checkbox, dropdown and radiogroup questions. */ export declare class QuestionSelectBase extends Question { constructor(name: string); visibleChoicesChangedCallback: any; filteredChoicesValue: any; conditionChoicesVisibleIfRunner: ConditionRunner; conditionChoicesEnableIfRunner: ConditionRunner; commentValue: string; prevCommentValue: string; otherItemValue: ItemValue; choicesFromUrl: any; cachedValueForUrlRequests: any; isChoicesLoaded: boolean; enableOnLoadingChoices: boolean; dependedQuestions: any; noneItemValue: ItemValue; newItemValue: ItemValue; canShowOptionItemCallback: any; getType(): string; dispose(): void; protected getItemValueType(): string; createItemValue(value: any): ItemValue; supportGoNextPageError(): boolean; isLayoutTypeSupported(layoutType: string): boolean; localeChanged(): void; locStrsChanged(): void; /* * Returns the other item. By using this property, you may change programmatically it's value and text. */ get otherItem(): ItemValue; /* * Returns true if a user select the 'other' item. */ get isOtherSelected(): boolean; /* * Set this property to true, to show the "None" item on the bottom. If end-user checks this item, all other items would be unchecked. */ get hasNone(): boolean; set hasNone(val: boolean); /* * Returns the none item. By using this property, you may change programmatically it's value and text. */ get noneItem(): ItemValue; /* * Use this property to set the different text for none item. */ get noneText(): string; set noneText(val: string); get locNoneText(): LocalizableString; /* * An expression that returns true or false. It runs against each choices item and if for this item it returns true, then the item is visible otherwise the item becomes invisible. Please use {item} to get the current item value in the expression. */ get choicesVisibleIf(): string; set choicesVisibleIf(val: string); /* * An expression that returns true or false. It runs against each choices item and if for this item it returns true, then the item is enabled otherwise the item becomes disabled. Please use {item} to get the current item value in the expression. */ get choicesEnableIf(): string; set choicesEnableIf(val: string); surveyChoiceItemVisibilityChange(): void; runCondition(values: any, properties: any): void; protected isTextValue(): boolean; isSettingDefaultValue: boolean; protected setDefaultValue(): void; protected getIsMultipleValue(): boolean; protected convertDefaultValue(val: any): any; protected filterItems(): boolean; protected runItemsCondition(values: any, properties: any): boolean; protected runItemsEnableCondition(values: any, properties: any): any; protected onAfterRunItemsEnableCondition(): void; protected onEnableItemCallBack(item: ItemValue): boolean; changeItemVisisbility(): any; protected getHasOther(val: any): boolean; get validatedValue(): any; protected createRestful(): ChoicesRestful; protected getQuestionComment(): string; isSettingComment: boolean; protected setQuestionComment(newValue: string): void; clearValue(): void; updateCommentFromSurvey(newValue: any): any; get renderedValue(): any; set renderedValue(val: any); protected setQuestionValue(newValue: any, updateIsAnswered?: boolean, updateComment?: boolean): void; protected setNewValue(newValue: any): void; protected valueFromData(val: any): any; protected rendredValueFromData(val: any): any; protected rendredValueToData(val: any): any; protected renderedValueFromDataCore(val: any): any; protected rendredValueToDataCore(val: any): any; protected hasUnknownValue(val: any, includeOther?: boolean, isFilteredChoices?: boolean, checkEmptyValue?: boolean): boolean; protected isValueDisabled(val: any): boolean; /* * If the clearIncorrectValuesCallback is set, it is used to clear incorrect values instead of default behaviour. */ clearIncorrectValuesCallback: any; /* * Use this property to fill the choices from a RESTful service. */ get choicesByUrl(): ChoicesRestful; set choicesByUrl(val: ChoicesRestful); /* * The list of items. Every item has value and text. If text is empty, the value is rendered. The item text supports markdown. */ get choices(): any; set choices(val: any); /* * Set this property to get choices from the specified question instead of defining them in the current question. This avoids duplication of choices declaration in your survey definition. * By setting this property, the "choices", "choicesVisibleIf", "choicesEnableIf" and "choicesOrder" properties become invisible, because these question characteristics depend on actions in another (specified) question. * Use the `choicesFromQuestionMode` property to filter choices obtained from the specified question. */ get choicesFromQuestion(): string; set choicesFromQuestion(val: string); /* * This property becomes visible when the `choicesFromQuestion` property is selected. The default value is "all" (all visible choices from another question are displayed as they are). * You can set this property to "selected" or "unselected" to display only selected or unselected choices from the specified question. */ get choicesFromQuestionMode(): string; set choicesFromQuestionMode(val: string); /* * Set this property to true to hide the question if there is no visible choices. */ get hideIfChoicesEmpty(): boolean; set hideIfChoicesEmpty(val: boolean); get keepIncorrectValues(): boolean; set keepIncorrectValues(val: boolean); /* * Please use survey.storeOthersAsComment to change the behavior on the survey level. This property is depricated and invisible in Survey Creator. * By default the entered text in the others input in the checkbox/radiogroup/dropdown are stored as "question name " + "-Comment". The value itself is "question name": "others". Set this property to false, to store the entered text directly in the "question name" key. * Possible values are: "default", true, false */ get storeOthersAsComment(): any; set storeOthersAsComment(val: any); protected hasOtherChanged(): void; /* * Use this property to render items in a specific order: "asc", "desc", "random". Default value is "none". */ get choicesOrder(): string; set choicesOrder(val: string); /* * Use this property to set the different text for other item. */ get otherText(): string; set otherText(val: string); get locOtherText(): LocalizableString; /* * Use this property to set the place holder text for other or comment field . */ get otherPlaceHolder(): string; set otherPlaceHolder(val: string); get locOtherPlaceHolder(): LocalizableString; /* * The text that shows when the other item is choosed by the other input is empty. */ get otherErrorText(): string; set otherErrorText(val: string); get locOtherErrorText(): LocalizableString; /* * The list of items as they will be rendered. If needed items are sorted and the other item is added. */ get visibleChoices(): any; /* * The list of enabled items as they will be rendered. The disabled items are not included */ get enabledChoices(): any; protected updateVisibleChoices(): void; protected canUseFilteredChoices(): boolean; setCanShowOptionItemCallback(func: any): void; protected addToVisibleChoices(items: any, isAddAll: boolean): void; protected canShowOptionItem(item: ItemValue, isAddAll: boolean, hasItem: boolean): boolean; /* * For internal use in SurveyJS Creator V2. */ isItemInList(item: ItemValue): boolean; protected get isAddDefaultItems(): boolean; getPlainData(options?: any): any; /* * Returns the text for the current value. If the value is null then returns empty string. If 'other' is selected then returns the text for other value. */ protected getDisplayValueCore(keysAsText: boolean, value: any): any; protected getDisplayValueEmpty(): string; protected getChoicesDisplayValue(items: any, val: any): any; protected get activeChoices(): any; protected getChoicesFromQuestion(question: QuestionSelectBase): Array<ItemValue>; protected get hasActiveChoices(): boolean; protected isBuiltInChoice(item: ItemValue, question: QuestionSelectBase): boolean; protected getChoices(): Array<ItemValue>; supportComment(): boolean; supportOther(): boolean; supportNone(): boolean; protected isSupportProperty(propName: string): boolean; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; protected setSurveyCore(value: ISurvey): void; getStoreOthersAsComment(): boolean; onSurveyLoad(): void; onAnyValueChanged(name: string): void; updateValueFromSurvey(newValue: any): void; protected getCommentFromValue(newValue: any): string; protected setOtherValueIntoValue(newValue: any): any; isRunningChoices: boolean; isFirstLoadChoicesFromUrl: boolean; protected onBeforeSendRequest(): void; protected onLoadChoicesFromUrl(array: any): void; isUpdatingChoicesDependedQuestions: boolean; protected updateChoicesDependedQuestions(): void; onSurveyValueChanged(newValue: any): void; protected onVisibleChoicesChanged(): void; clearIncorrectValues(): void; protected hasValueToClearIncorrectValues(): boolean; protected clearValueIfInvisibleCore(): void; /* * Returns true if item is selected */ isItemSelected(item: ItemValue): boolean; protected clearIncorrectValuesCore(): void; protected canClearValueAnUnknow(val: any): boolean; protected clearDisabledValuesCore(): void; clearUnusedValues(): void; getColumnClass(): string; getItemIndex(item: any): number; getItemClass(item: any): string; protected getItemClassCore(item: any, options: any): string; getLabelClass(item: ItemValue): string; getControlLabelClass(item: ItemValue): string; get columns(): any; get hasColumns(): boolean; choicesLoaded(): void; getItemValueWrapperComponentName(item: ItemValue): string; getItemValueWrapperComponentData(item: ItemValue): any; ariaItemChecked(item: ItemValue): "true" | "false"; isOtherItem(item: ItemValue): boolean; get itemSvgIcon(): string; getSelectBaseRootCss(): string; getAriaItemLabel(item: ItemValue): string; getItemId(item: ItemValue): string; get questionName(): string; getItemEnabled(item: ItemValue): any; } /* * A Model for signature pad question. */ export declare class QuestionSignaturePadModel extends Question { constructor(name: string); isDrawingValue: boolean; protected getCssRoot(cssClasses: any): string; protected updateValue(): void; getType(): string; afterRenderQuestionElement(el: any): void; beforeDestroyQuestionElement(el: any): void; initSignaturePad(el: any): void; destroySignaturePad(el: any): void; /* * Use it to set the specific dataFormat for the signature pad image data. * formats: "" (default) - png, "image/jpeg" - jpeg, "image/svg+xml" - svg */ dataFormat: string; /* * Use it to set the specific width for the signature pad. */ get width(): string; set width(val: string); /* * Use it to set the specific height for the signature pad. */ get height(): string; set height(val: string); /* * Use it to clear content of the signature pad. */ get allowClear(): boolean; set allowClear(val: boolean); /* * Use it to set pen color for the signature pad. */ get penColor(): string; set penColor(val: string); /* * Use it to set background color for the signature pad. */ get backgroundColor(): string; set backgroundColor(val: string); /* * The clear signature button caption. */ get clearButtonCaption(): string; needShowPlaceholder(): boolean; get placeHolderText(): string; } /* * A Base Model for a comment and text questions */ export declare class QuestionTextBase extends Question { constructor(name: string); protected isTextValue(): boolean; /* * The maximum text length. If it is -1, defaul value, then the survey maxTextLength property will be used. * If it is 0, then the value is unlimited */ get maxLength(): number; set maxLength(val: number); getMaxLength(): any; /* * Use this property to set the input place holder. */ get placeHolder(): string; set placeHolder(val: string); get locPlaceHolder(): LocalizableString; getType(): string; isEmpty(): boolean; /* * Gets or sets a value that specifies how the question updates it's value. * * The following options are available: * - `default` - get the value from survey.textUpdateMode * - `onBlur` - the value is updated after an input loses the focus. * - `onTyping` - update the value of text questions, "text" and "comment", on every key press. * * Note, that setting to "onTyping" may lead to a performance degradation, in case you have many expressions in the survey. */ get textUpdateMode(): string; set textUpdateMode(val: string); get isSurveyInputTextUpdate(): boolean; get renderedPlaceHolder(): string; protected setRenderedPlaceHolder(val: string): void; protected onReadOnlyChanged(): void; onSurveyLoad(): void; localeChanged(): void; protected calcRenderedPlaceHolder(): void; protected hasPlaceHolder(): boolean; getControlClass(): string; } /* * The flow panel object. It is a container with flow layout where you can mix questions with markdown text. */ export declare class FlowPanelModel extends PanelModel { constructor(name?: string); static contentElementNamePrefix: string; contentChangedCallback: any; onGetHtmlForQuestion: any; onCustomHtmlProducing: any; getType(): string; getChildrenLayoutType(): string; onSurveyLoad(): any; get content(): string; set content(val: string); get locContent(): LocalizableString; get html(): string; set html(val: string); protected onContentChanged(): any; produceHtml(): string; getQuestionFromText(str: string): Question; protected getHtmlForQuestion(question: Question): string; protected getQuestionHtmlId(question: Question): string; protected onAddElement(element: IElement, index: number): void; protected onRemoveElement(element: IElement): void; dragDropMoveElement(src: IElement, target: IElement, targetIndex: number): void; getElementContentText(element: IElement): string; } export declare class Page extends PageModel { constructor(name?: string); _implementor: ImplementorBase; protected onBaseCreating(): void; protected createRow(): QuestionRowModel; protected onCreating(): void; protected onNumChanged(value: number): void; dispose(): void; } export declare class Panel extends PanelModel { constructor(name?: string); _implementor: ImplementorBase; koElementType: any; koCss: any; koErrorClass: any; protected onBaseCreating(): void; protected createRow(): QuestionRowModel; protected onCreating(): void; protected onNumChanged(value: number): void; dispose(): void; } export declare class QuestionBoolean extends QuestionBooleanModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; onSwitchClick(data: any, event: any): any; onTrueLabelClick(data: any, event: any): any; onFalseLabelClick(data: any, event: any): any; dispose(): void; } /* * A base class for checkbox and radiogroup questions. It introduced a colCount property. */ export declare class QuestionCheckboxBase extends QuestionSelectBase { constructor(name: string); colCountChangedCallback: any; /* * The number of columns for radiogroup and checkbox questions. Items are rendred in one line if the value is 0. */ get colCount(): number; set colCount(val: number); protected onParentChanged(): void; protected onParentQuestionChanged(): void; protected getSearchableItemValueKeys(keys: any): void; } /* * A Model for a comment question */ export declare class QuestionCommentModel extends QuestionTextBase { constructor(name: string); element: any; /* * The html rows attribute. */ get rows(): number; set rows(val: number); /* * The html cols attribute. */ get cols(): number; set cols(val: number); /* * Accepts pressing the Enter key by end-users and accepts carriage return symbols - \n - in the question value assigned. */ get acceptCarriageReturn(): boolean; set acceptCarriageReturn(val: boolean); /* * Specifies whether the question's text area automatically expands its height to avoid the vertical scrollbar and to display the entire multi-line contents entered by respondents. * Default value is false. */ get autoGrow(): boolean; set autoGrow(val: boolean); getType(): string; afterRenderQuestionElement(el: any): void; updateElement(): void; onInput(event: any): void; onKeyDown(event: any): void; onValueChanged(): void; protected setNewValue(newValue: string): any; get className(): string; } export declare class QuestionCompositeModel extends QuestionCustomModelBase { constructor(name: string, customQuestion: ComponentQuestionJSON); customQuestion: ComponentQuestionJSON; static ItemVariableName: string; panelWrapper: PanelModel; textProcessing: QuestionCompositeTextProcessor; protected createWrapper(): void; getTemplate(): string; protected getCssType(): string; protected getElement(): SurveyElement; get contentPanel(): PanelModel; hasErrors(fireCallback?: boolean, rec?: any): boolean; updateElementCss(reNew?: boolean): void; getTextProcessor(): ITextProcessor; protected clearValueIfInvisibleCore(): void; onAnyValueChanged(name: string): void; protected createPanel(): PanelModel; protected onReadOnlyChanged(): void; onSurveyLoad(): void; setVisibleIndex(val: number): number; runCondition(values: any, properties: any): void; getValue(name: string): any; settingNewValue: boolean; setValue(name: string, newValue: any, locNotification: any, allowNotifyValueChanged?: boolean): any; addConditionObjectsByContext(objects: any, context: any): void; protected convertDataValue(name: string, newValue: any): any; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; protected getDisplayValueCore(keyAsText: boolean, value: any): any; } export declare class QuestionCustomModel extends QuestionCustomModelBase { constructor(name: string, customQuestion: ComponentQuestionJSON); customQuestion: ComponentQuestionJSON; questionWrapper: Question; getTemplate(): string; protected createWrapper(): void; protected getElement(): SurveyElement; onAnyValueChanged(name: string): void; hasErrors(fireCallback?: boolean, rec?: any): boolean; focus(onError?: boolean): void; get contentQuestion(): Question; protected createQuestion(): Question; onSurveyLoad(): void; runCondition(values: any, properties: any): void; protected convertDataName(name: string): string; protected convertDataValue(name: string, newValue: any): any; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; onSurveyValueChanged(newValue: any): void; protected getValueCore(): any; protected initElement(el: SurveyElement): void; updateElementCss(reNew?: boolean): void; protected updateElementCssCore(cssClasses: any): void; protected getDisplayValueCore(keyAsText: boolean, value: any): any; } /* * A Model for a dropdown question */ export declare class QuestionDropdownModel extends QuestionSelectBase { constructor(name: string); /* * This flag controls whether to show options caption item ('Choose...'). */ get showOptionsCaption(): boolean; set showOptionsCaption(val: boolean); /* * Use this property to set the options caption different from the default value. The default value is taken from localization strings. */ get optionsCaption(): string; set optionsCaption(val: string); get locOptionsCaption(): LocalizableString; getType(): string; get selectedItem(): ItemValue; supportGoNextPageAutomatic(): boolean; minMaxChoices: any; protected getChoices(): Array<ItemValue>; /* * Use this and choicesMax property to automatically add choices. For example choicesMin = 1 and choicesMax = 10 will generate ten additional choices from 1 to 10. */ get choicesMin(): number; set choicesMin(val: number); /* * Use this and choicesMax property to automatically add choices. For example choicesMin = 1 and choicesMax = 10 will generate ten additional choices from 1 to 10. */ get choicesMax(): number; set choicesMax(val: number); /* * The default value is 1. It tells the value of the iterator between choicesMin and choicesMax properties. * If choicesMin = 10, choicesMax = 30 and choicesStep = 10 then you will have only three additional choices: [10, 20, 30]. */ get choicesStep(): number; set choicesStep(val: number); /* * Dropdown auto complete */ get autoComplete(): string; set autoComplete(val: string); getControlClass(): string; get readOnlyText(): any; } export declare class QuestionEmpty extends QuestionEmptyModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionExpression extends QuestionExpressionModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionFile extends QuestionFileModel { constructor(name: string); _implementor: QuestionFileImplementor; protected onBaseCreating(): void; dispose(): void; } /* * A Model for html question. Unlike other questions it doesn't have value and title. */ export declare class QuestionHtmlModel extends QuestionNonValue { constructor(name: string); ignoreHtmlProgressing: boolean; getType(): string; get isCompositeQuestion(): boolean; getProcessedText(text: string): string; /* * Set html to display it */ get html(): string; set html(val: string); get locHtml(): LocalizableString; get processedHtml(): string; } /* * A Model for image question. This question hasn't any functionality and can be used to improve the appearance of the survey. */ export declare class QuestionImageModel extends QuestionNonValue { constructor(name: string); getType(): string; get isCompositeQuestion(): boolean; onSurveyLoad(): void; /* * The image URL. */ get imageLink(): string; set imageLink(val: string); get locImageLink(): LocalizableString; /* * The image alt text. */ get text(): string; set text(val: string); get locText(): LocalizableString; /* * The image height. */ get imageHeight(): string; set imageHeight(val: string); get renderedHeight(): string; /* * The image width. */ get imageWidth(): string; set imageWidth(val: string); get renderedWidth(): string; /* * The image fit mode. */ get imageFit(): string; set imageFit(val: string); /* * The content mode. */ get contentMode(): string; set contentMode(val: string); /* * The rendered mode. */ get renderedMode(): string; protected calculateRenderedMode(): void; } /* * A base class for matrix dropdown and matrix dynamic questions. */ export declare class QuestionMatrixDropdownModelBase extends QuestionMatrixBaseModel<MatrixDropdownRowModelBase, MatrixDropdownColumn> implements IMatrixDropdownData { constructor(name: string); static get defaultCellType(): string; static set defaultCellType(val: string); static addDefaultColumns(matrix: QuestionMatrixDropdownModelBase): void; detailPanelValue: PanelModel; protected isRowChanging: boolean; columnsChangedCallback: any; onRenderedTableResetCallback: any; onRenderedTableCreatedCallback: any; onCellCreatedCallback: any; onCellValueChangedCallback: any; onHasDetailPanelCallback: any; onCreateDetailPanelCallback: any; onCreateDetailPanelRenderedRowCallback: any; protected createColumnValues(): any; /* * Returns the type of the object as a string as it represents in the json. */ getType(): string; dispose(): void; get hasSingleInput(): boolean; get isRowsDynamic(): boolean; isUpdating: boolean; protected get isUpdateLocked(): boolean; beginUpdate(): void; endUpdate(): void; protected updateColumnsAndRows(): void; itemValuePropertyChanged(item: ItemValue, name: string, oldValue: any, newValue: any): void; /* * Set columnLayout to 'vertical' to place columns vertically and rows horizontally. It makes sense when we have many columns and few rows. */ get columnLayout(): string; set columnLayout(val: string); get columnsLocation(): string; set columnsLocation(val: string); /* * Returns true if columns are located horizontally */ get isColumnLayoutHorizontal(): boolean; /* * Set the value to "underRow" to show the detailPanel under the row. */ get detailPanelMode(): string; set detailPanelMode(val: string); /* * The detail template Panel. This panel is used as a template on creating detail panel for a row. */ get detailPanel(): PanelModel; getPanel(): IPanel; /* * The template Panel elements, questions and panels. */ get detailElements(): any; protected createNewDetailPanel(): PanelModel; get hasRowText(): boolean; getFooterText(): LocalizableString; get canAddRow(): boolean; get canRemoveRows(): boolean; canRemoveRow(row: MatrixDropdownRowModelBase): boolean; onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void; protected onRowsChanged(): void; lockResetRenderedTable: boolean; protected onStartRowAddingRemoving(): void; protected onEndRowAdding(): void; protected onEndRowRemoving(row: MatrixDropdownRowModelBase): void; protected clearRowsAndResetRenderedTable(): void; protected resetRenderedTable(): void; protected clearGeneratedRows(): void; get renderedTable(): QuestionMatrixDropdownRenderedTable; protected createRenderedTable(): QuestionMatrixDropdownRenderedTable; protected onMatrixRowCreated(row: MatrixDropdownRowModelBase): void; /* * Use this property to change the default cell type. */ get cellType(): string; set cellType(val: string); /* * The default column count for radiogroup and checkbox cell types. */ get columnColCount(): number; set columnColCount(val: number); /* * Use this property to set the minimum column width. */ get columnMinWidth(): string; set columnMinWidth(val: string); /* * Set this property to true to show the horizontal scroll. */ get horizontalScroll(): boolean; set horizontalScroll(val: boolean); /* * The Matrix toolbar and inner panel toolbars get adaptive if the property is set to true. */ get allowAdaptiveActions(): boolean; set allowAdaptiveActions(val: boolean); getRequiredText(): string; onColumnPropertyChanged(column: MatrixDropdownColumn, name: string, newValue: any): void; onColumnItemValuePropertyChanged(column: MatrixDropdownColumn, propertyName: string, obj: ItemValue, name: string, newValue: any, oldValue: any): void; onShowInMultipleColumnsChanged(column: MatrixDropdownColumn): void; onColumnCellTypeChanged(column: MatrixDropdownColumn): void; getRowTitleWidth(): string; get hasFooter(): boolean; getAddRowLocation(): string; getShowColumnsIfEmpty(): boolean; protected updateShowTableAndAddRow(): void; protected updateHasFooter(): void; get hasTotal(): boolean; getCellType(): string; getCustomCellType(column: MatrixDropdownColumn, row: MatrixDropdownRowModelBase, cellType: string): string; getConditionJson(operator?: string, path?: string): any; clearIncorrectValues(): void; clearErrors(): void; runCondition(values: any, properties: any): void; protected shouldRunColumnExpression(): boolean; protected runCellsCondition(values: any, properties: any): void; protected runTotalsCondition(values: any, properties: any): void; locStrsChanged(): void; /* * Returns the column by it's name. Returns null if a column with this name doesn't exist. */ getColumnByName(columnName: string): MatrixDropdownColumn; getColumnName(columnName: string): MatrixDropdownColumn; /* * Returns the column width. */ getColumnWidth(column: MatrixDropdownColumn): string; /* * The default choices for dropdown, checkbox and radiogroup cell types. */ get choices(): any; set choices(val: any); /* * The default options caption for dropdown cell type. */ get optionsCaption(): string; set optionsCaption(val: string); get locOptionsCaption(): LocalizableString; /* * The duplication value error text. Set it to show the text different from the default. */ get keyDuplicationError(): string; set keyDuplicationError(val: string); get locKeyDuplicationError(): LocalizableString; get storeOthersAsComment(): boolean; addColumn(name: string, title?: string): MatrixDropdownColumn; protected getVisibleRows(): Array<MatrixDropdownRowModelBase>; get totalValue(): any; protected getVisibleTotalRow(): MatrixDropdownRowModelBase; get visibleTotalRow(): MatrixDropdownRowModelBase; onSurveyLoad(): void; /* * Returns the row value. If the row value is empty, the object is empty: {}. */ getRowValue(rowIndex: number): any; checkIfValueInRowDuplicated(checkedRow: MatrixDropdownRowModelBase, cellQuestion: Question): boolean; /* * Set the row value. */ setRowValue(rowIndex: number, rowValue: any): any; protected generateRows(): Array<MatrixDropdownRowModelBase>; protected generateTotalRow(): MatrixDropdownRowModelBase; protected createNewValue(nullOnEmpty?: boolean): any; protected getRowValueCore(row: MatrixDropdownRowModelBase, questionValue: any, create?: boolean): any; protected getRowObj(row: MatrixDropdownRowModelBase): any; protected getRowDisplayValue(keysAsText: boolean, row: MatrixDropdownRowModelBase, rowValue: any): any; getPlainData(options?: any): any; addConditionObjectsByContext(objects: any, context: any): void; protected getConditionObjectRowName(index: number): string; protected getConditionObjectRowText(index: number): string; protected getConditionObjectsRowIndeces(): Array<any>; getProgressInfo(): IProgressInfo; protected onBeforeValueChanged(val: any): void; protected setQuestionValue(newValue: any): void; supportGoNextPageAutomatic(): boolean; protected getContainsErrors(): boolean; protected getIsAnswered(): boolean; hasErrors(fireCallback?: boolean, rec?: any): boolean; protected getIsRunningValidators(): boolean; getAllErrors(): Array<SurveyError>; protected getUniqueColumns(): Array<MatrixDropdownColumn>; protected getFirstInputElementId(): string; protected getFirstErrorInputElementId(): string; protected getFirstCellQuestion(onError: boolean): Question; protected onReadOnlyChanged(): void; createQuestion(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question; protected createQuestionCore(row: MatrixDropdownRowModelBase, column: MatrixDropdownColumn): Question; protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any; isDoingonAnyValueChanged: boolean; onAnyValueChanged(name: string): void; protected isObject(value: any): boolean; protected onCellValueChanged(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): void; validateCell(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): SurveyError; get isValidateOnValueChanging(): boolean; onRowChanging(row: MatrixDropdownRowModelBase, columnName: string, rowValue: any): any; onRowChanged(row: MatrixDropdownRowModelBase, columnName: string, newRowValue: any, isDeletingValue: boolean): void; getRowIndex(row: MatrixDropdownRowModelBase): number; getElementsInDesign(includeHidden?: boolean): Array<IElement>; hasDetailPanel(row: MatrixDropdownRowModelBase): boolean; getIsDetailPanelShowing(row: MatrixDropdownRowModelBase): boolean; setIsDetailPanelShowing(row: MatrixDropdownRowModelBase, val: boolean): void; getDetailPanelButtonCss(row: MatrixDropdownRowModelBase): string; getDetailPanelIconCss(row: MatrixDropdownRowModelBase): string; getDetailPanelIconId(row: MatrixDropdownRowModelBase): string; createRowDetailPanel(row: MatrixDropdownRowModelBase): PanelModel; getSharedQuestionByName(columnName: string, row: MatrixDropdownRowModelBase): Question; onTotalValueChanged(): any; getParentTextProcessor(): ITextProcessor; getQuestionFromArray(name: string, index: number): IQuestion; getCellTemplateData(cell: QuestionMatrixDropdownRenderedCell): any; getCellWrapperComponentName(cell: MatrixDropdownCell): string; getCellWrapperComponentData(cell: MatrixDropdownCell): any; getColumnHeaderWrapperComponentName(cell: MatrixDropdownCell): string; getColumnHeaderWrapperComponentData(cell: MatrixDropdownCell): any; getRowHeaderWrapperComponentName(cell: MatrixDropdownCell): string; getRowHeaderWrapperComponentData(cell: MatrixDropdownCell): any; } /* * A Model for a simple matrix question. */ export declare class QuestionMatrixModel extends QuestionMatrixBaseModel<MatrixRowModel, ItemValue> implements IMatrixData, IMatrixCellsOwner { constructor(name: string); isRowChanging: boolean; cellsValue: MatrixCells; getType(): string; get hasSingleInput(): boolean; /* * Set this property to true, if you want a user to answer all rows. */ get isAllRowRequired(): boolean; set isAllRowRequired(val: boolean); /* * Returns true, if there is at least one row. */ get hasRows(): boolean; /* * Use this property to render items in a specific order: "random" or "initial". Default is "initial". */ get rowsOrder(): string; set rowsOrder(val: string); /* * Set this property to true to hide the question if there is no visible rows in the matrix. */ get hideIfRowsEmpty(): boolean; set hideIfRowsEmpty(val: boolean); getRows(): Array<any>; getColumns(): Array<any>; addColumn(value: any, text?: string): ItemValue; getItemClass(row: any, column: any): string; protected getQuizQuestionCount(): number; protected getCorrectAnswerCount(): number; protected getVisibleRows(): Array<MatrixRowModel>; protected sortVisibleRows(array: any): Array<MatrixRowModel>; endLoadingFromJson(): void; protected processRowsOnSet(newRows: any): any; /* * Returns the list of visible rows as model objects. */ get visibleRows(): any; get cells(): MatrixCells; set cells(val: MatrixCells); get hasCellText(): boolean; setCellText(row: any, column: any, val: string): void; getCellText(row: any, column: any): string; setDefaultCellText(column: any, val: string): void; getDefaultCellText(column: any): string; getCellDisplayText(row: any, column: any): string; emptyLocalizableString: LocalizableString; getCellDisplayLocText(row: any, column: any): LocalizableString; supportGoNextPageAutomatic(): boolean; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; protected getIsAnswered(): boolean; protected onMatrixRowCreated(row: MatrixRowModel): void; protected setQuestionValue(newValue: any, updateIsAnswered?: boolean): void; protected getDisplayValueCore(keysAsText: boolean, value: any): any; getPlainData(options?: any): any; addConditionObjectsByContext(objects: any, context: any): void; getConditionJson(operator?: string, path?: string): any; protected clearValueIfInvisibleCore(): void; protected getFirstInputElementId(): string; protected onRowsChanged(): void; onMatrixRowChanged(row: MatrixRowModel): void; getCorrectedRowValue(value: any): any; protected getSearchableItemValueKeys(keys: any): void; getColumnHeaderWrapperComponentName(cell: ItemValue): string; getColumnHeaderWrapperComponentData(cell: ItemValue): any; getRowHeaderWrapperComponentName(cell: ItemValue): string; getRowHeaderWrapperComponentData(cell: ItemValue): any; } export declare class QuestionMultipleText extends QuestionMultipleTextModel { constructor(name: string); _implementor: QuestionMultipleTextImplementor; koRows: any; protected onBaseCreating(): void; protected onColCountChanged(): void; protected createTextItem(name: string, title: string): MultipleTextItemModel; dispose(): void; } export declare class QuestionPanelDynamic extends QuestionPanelDynamicModel { constructor(name: string); _implementor: QuestionPanelDynamicImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionRating extends QuestionRatingModel { constructor(name: string); _implementor: QuestionRatingImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionSignaturePad extends QuestionSignaturePadModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } /* * A Model for an input text question. */ export declare class QuestionTextModel extends QuestionTextBase { constructor(name: string); locDataListValue: LocalizableStrings; protected isTextValue(): boolean; getType(): string; onSurveyLoad(): void; /* * Use this property to change the default input type. */ get inputType(): string; set inputType(val: string); runCondition(values: any, properties: any): void; getValidators(): Array<SurveyValidator>; isLayoutTypeSupported(layoutType: string): boolean; /* * The text input size */ get size(): number; set size(val: number); get isTextInput(): boolean; get inputSize(): number; get renderedInputSize(): number; get inputWidth(): string; updateInputSize(): void; /* * Text auto complete */ get autoComplete(): string; set autoComplete(val: string); /* * The minimum value */ get min(): string; set min(val: string); /* * The maximum value */ get max(): string; set max(val: string); /* * The minimum value that you can setup as expression, for example today(-1) = yesterday; */ get minValueExpression(): string; set minValueExpression(val: string); /* * The maximum value that you can setup as expression, for example today(1) = tomorrow; */ get maxValueExpression(): string; set maxValueExpression(val: string); get renderedMin(): any; get renderedMax(): any; /* * The text that shows when value is less than min property. */ get minErrorText(): string; set minErrorText(val: string); get locMinErrorText(): LocalizableString; /* * The text that shows when value is greater than man property. */ get maxErrorText(): string; set maxErrorText(val: string); get locMaxErrorText(): LocalizableString; /* * Readonly property that returns true if the current inputType allows to set min and max properties */ get isMinMaxType(): boolean; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; protected canSetValueToSurvey(): boolean; /* * The step value */ get step(): string; set step(val: string); get renderedStep(): string; supportGoNextPageAutomatic(): boolean; supportGoNextPageError(): boolean; /* * The list of recommended options available to choose. */ get dataList(): any; set dataList(val: any); get locDataList(): LocalizableStrings; get dataListId(): string; protected canRunValidators(isOnValueChanged: boolean): boolean; protected setNewValue(newValue: any): void; protected correctValueType(newValue: any): any; protected hasPlaceHolder(): boolean; isReadOnlyRenderDiv(): boolean; get inputStyle(): any; } export declare class FlowPanel extends FlowPanelModel { constructor(name?: string); koElementType: any; koElementAfterRender: any; placeHolder: string; protected onCreating(): void; protected getHtmlForQuestion(question: any): string; } /* * A Model for a button group question. */ export declare class QuestionButtonGroupModel extends QuestionCheckboxBase { constructor(name: string); getType(): string; protected getItemValueType(): string; supportOther(): boolean; } /* * A Model for a checkbox question */ export declare class QuestionCheckboxModel extends QuestionCheckboxBase { constructor(name: string); selectAllItemValue: ItemValue; invisibleOldValues: any; get ariaRole(): string; getType(): string; protected onCreating(): void; protected getFirstInputElementId(): string; /* * Returns the select all item. By using this property, you may change programmatically it's value and text. */ get selectAllItem(): ItemValue; /* * Use this property to set the different text for Select All item. */ get selectAllText(): string; set selectAllText(val: string); get locSelectAllText(): LocalizableString; /* * Set this property to true, to show the "Select All" item on the top. If end-user checks this item, then all items are checked. */ get hasSelectAll(): boolean; set hasSelectAll(val: boolean); /* * Returns true if all items are selected */ get isAllSelected(): boolean; set isAllSelected(val: boolean); /* * It will select all items, except other and none. If all items have been already selected then it will clear the value */ toggleSelectAll(): void; /* * Select all items, except other and none. */ selectAll(): void; /* * Returns true if item is checked */ isItemSelected(item: ItemValue): boolean; /* * Set this property different to 0 to limit the number of selected choices in the checkbox. */ get maxSelectedChoices(): number; set maxSelectedChoices(val: number); /* * Return the selected items in the checkbox. Returns empty array if the value is empty */ get selectedItems(): any; protected onEnableItemCallBack(item: ItemValue): boolean; protected onAfterRunItemsEnableCondition(): void; protected getItemClassCore(item: any, options: any): string; updateValueFromSurvey(newValue: any): void; protected setDefaultValue(): void; protected hasValueToClearIncorrectValues(): boolean; protected setNewValue(newValue: any): void; protected getIsMultipleValue(): boolean; protected getCommentFromValue(newValue: any): string; protected setOtherValueIntoValue(newValue: any): any; protected canUseFilteredChoices(): boolean; protected supportSelectAll(): boolean; protected addToVisibleChoices(items: any, isAddAll: boolean): void; protected isBuiltInChoice(item: ItemValue, question: QuestionSelectBase): boolean; /* * For internal use in SurveyJS Creator V2. */ isItemInList(item: ItemValue): boolean; protected getDisplayValueCore(keysAsText: boolean, value: any): any; protected clearIncorrectValuesCore(): void; protected clearDisabledValuesCore(): void; isChangingValueOnClearIncorrect: boolean; getConditionJson(operator?: string, path?: string): any; isAnswerCorrect(): boolean; protected setDefaultValueWithOthers(): void; protected getHasOther(val: any): boolean; protected valueFromData(val: any): any; protected renderedValueFromDataCore(val: any): any; protected rendredValueToDataCore(val: any): any; get checkBoxSvgPath(): string; } export declare class QuestionComment extends QuestionCommentModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionComposite extends QuestionCompositeModel { constructor(name: string, questionJSON: any); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionCustom extends QuestionCustomModel { constructor(name: string, questionJSON: any); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionDropdown extends QuestionDropdownModel { constructor(name: string); _implementor: QuestionDropdownImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionHtml extends QuestionHtmlModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionImage extends QuestionImageModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } /* * A Model for a select image question. */ export declare class QuestionImagePickerModel extends QuestionCheckboxBase { constructor(name: string); getType(): string; supportGoNextPageAutomatic(): boolean; get hasSingleInput(): boolean; protected getItemValueType(): string; get isCompositeQuestion(): boolean; supportOther(): boolean; supportNone(): boolean; isAnswerCorrect(): boolean; /* * Multi select option. If set to true, then allows to select multiple images. */ get multiSelect(): boolean; set multiSelect(val: boolean); /* * Returns true if item is checked */ isItemSelected(item: ItemValue): boolean; clearIncorrectValues(): void; /* * Show label under the image. */ get showLabel(): boolean; set showLabel(val: boolean); endLoadingFromJson(): void; protected getValueCore(): any; protected renderedValueFromDataCore(val: any): any; protected rendredValueToDataCore(val: any): any; /* * The image height. */ get imageHeight(): string; set imageHeight(val: string); get renderedImageHeight(): string; /* * The image width. */ get imageWidth(): string; set imageWidth(val: string); get renderedImageWidth(): string; /* * The image fit mode. */ get imageFit(): string; set imageFit(val: string); /* * The content mode. */ get contentMode(): string; set contentMode(val: string); protected convertDefaultValue(val: any): any; get hasColumns(): boolean; get inputType(): "checkbox" | "radio"; } export declare class QuestionMatrix extends QuestionMatrixModel { constructor(name: string); _implementor: QuestionImplementor; koVisibleRows: any; koVisibleColumns: any; protected onBaseCreating(): void; protected onColumnsChanged(): void; protected onRowsChanged(): void; onSurveyLoad(): void; protected onMatrixRowCreated(row: any): void; protected getVisibleRows(): Array<MatrixRowModel>; dispose(): void; } /* * A Model for a matrix dropdown question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors. */ export declare class QuestionMatrixDropdownModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData { constructor(name: string); getType(): string; /* * Set this property to show it on the first column for the total row. */ get totalText(): string; set totalText(val: string); get locTotalText(): LocalizableString; getFooterText(): LocalizableString; /* * The column width for the first column, row title column. */ get rowTitleWidth(): string; set rowTitleWidth(val: string); getRowTitleWidth(): string; protected getDisplayValueCore(keysAsText: boolean, value: any): any; protected getConditionObjectRowName(index: number): string; protected getConditionObjectRowText(index: number): string; protected getConditionObjectsRowIndeces(): Array<any>; clearIncorrectValues(): void; protected clearValueIfInvisibleCore(): void; protected generateRows(): Array<MatrixDropdownRowModel>; protected createMatrixRow(item: ItemValue, value: any): MatrixDropdownRowModel; protected getSearchableItemValueKeys(keys: any): void; } /* * A Model for a matrix dymanic question. You may use a dropdown, checkbox, radiogroup, text and comment questions as a cell editors. * An end-user may dynamically add/remove rows, unlike in matrix dropdown question. */ export declare class QuestionMatrixDynamicModel extends QuestionMatrixDropdownModelBase implements IMatrixDropdownData { constructor(name: string); onGetValueForNewRowCallBack: any; rowCounter: number; initialRowCount: number; setRowCountValueFromData: boolean; dragDropMatrixRows: DragDropMatrixRows; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; draggedRow: MatrixDropdownRowModelBase; onPointerDown(pointerDownEvent: any, row: MatrixDropdownRowModelBase): void; startDragMatrixRow: any; getType(): string; get isRowsDynamic(): boolean; /* * Set it to true, to show a confirmation dialog on removing a row */ get confirmDelete(): boolean; set confirmDelete(val: boolean); /* * Set it to a column name and the library shows duplication error, if there are same values in different rows in the column. */ get keyName(): string; set keyName(val: string); /* * If it is not empty, then this value is set to every new row, including rows created initially, unless the defaultValue is not empty */ get defaultRowValue(): any; set defaultRowValue(val: any); /* * Set it to true to copy the value into new added row from the last row. If defaultRowValue is set and this property equals to true, * then the value for new added row is merging. */ get defaultValueFromLastRow(): boolean; set defaultValueFromLastRow(val: boolean); protected isDefaultValueEmpty(): boolean; protected valueFromData(val: any): any; protected setDefaultValue(): void; moveRowByIndex: any; /* * The number of rows in the matrix. */ get rowCount(): number; set rowCount(val: number); /* * Set this property to true, to allow rows drag and drop. */ get allowRowsDragAndDrop(): boolean; set allowRowsDragAndDrop(val: boolean); protected createRenderedTable(): QuestionMatrixDropdownRenderedTable; /* * The minimum row count. A user could not delete a row if the rowCount equals to minRowCount */ get minRowCount(): number; set minRowCount(val: number); /* * The maximum row count. A user could not add a row if the rowCount equals to maxRowCount */ get maxRowCount(): number; set maxRowCount(val: number); /* * Set this property to false to disable ability to add new rows. "Add new Row" button becomes invsible in UI */ get allowAddRows(): boolean; set allowAddRows(val: boolean); /* * Set this property to false to disable ability to remove rows. "Remove" row buttons become invsible in UI */ get allowRemoveRows(): boolean; set allowRemoveRows(val: boolean); /* * Returns true, if a new row can be added. */ get canAddRow(): boolean; canRemoveRowsCallback: any; /* * Returns true, if row can be removed. */ get canRemoveRows(): boolean; canRemoveRow(row: MatrixDropdownRowModelBase): boolean; /* * Creates and add a new row and focus the cell in the first column. */ addRowUI(): void; /* * Creates and add a new row. */ addRow(): void; /* * Set this property to true to show detail panel immediately on adding a new row. */ get detailPanelShowOnAdding(): boolean; set detailPanelShowOnAdding(val: boolean); protected hasRowsAsItems(): boolean; unbindValue(): void; protected isValueSurveyElement(val: any): boolean; /* * Removes a row by it's index. If confirmDelete is true, show a confirmation dialog */ removeRowUI(value: any): void; isRequireConfirmOnRowDelete(index: number): boolean; /* * Removes a row by it's index. */ removeRow(index: number): void; /* * Use this property to change the default text showing in the confirmation delete dialog on removing a row. */ get confirmDeleteText(): string; set confirmDeleteText(val: string); get locConfirmDeleteText(): LocalizableString; /* * Use this property to change the default value of add row button text. */ get addRowText(): string; set addRowText(val: string); get locAddRowText(): LocalizableString; /* * By default the 'Add Row' button is shown on bottom if columnLayout is horizontal and on top if columnLayout is vertical. <br/> * You may set it to "top", "bottom" or "topBottom" (to show on top and bottom). */ get addRowLocation(): string; set addRowLocation(val: string); getAddRowLocation(): string; /* * Set this property to true to hide matrix columns when there is no any row. */ get hideColumnsIfEmpty(): boolean; set hideColumnsIfEmpty(val: boolean); getShowColumnsIfEmpty(): boolean; /* * Use this property to change the default value of remove row button text. */ get removeRowText(): string; set removeRowText(val: string); get locRemoveRowText(): LocalizableString; /* * Use this property to change the default value of remove row button text. */ get emptyRowsText(): string; set emptyRowsText(val: string); get locEmptyRowsText(): LocalizableString; protected getDisplayValueCore(keysAsText: boolean, value: any): any; protected getConditionObjectRowName(index: number): string; protected getConditionObjectsRowIndeces(): Array<any>; supportGoNextPageAutomatic(): boolean; get hasRowText(): boolean; protected onCheckForErrors(errors: any, isOnValueChanged: boolean): void; protected getUniqueColumns(): Array<MatrixDropdownColumn>; protected generateRows(): Array<MatrixDynamicRowModel>; protected createMatrixRow(value: any): MatrixDynamicRowModel; protected onBeforeValueChanged(val: any): void; protected createNewValue(): any; protected deleteRowValue(newValue: any, row: MatrixDropdownRowModelBase): any; protected getRowValueCore(row: MatrixDropdownRowModelBase, questionValue: any, create?: boolean): any; getAddRowButtonCss(isEmptySection?: boolean): string; getRemoveRowButtonCss(): string; getRootCss(): string; } /* * A Model for a radiogroup question. */ export declare class QuestionRadiogroupModel extends QuestionCheckboxBase { constructor(name: string); getType(): string; get ariaRole(): string; protected getFirstInputElementId(): string; /* * Return the selected item in the radio group. Returns null if the value is empty */ get selectedItem(): ItemValue; /* * Show "clear button" flag. */ get showClearButton(): boolean; set showClearButton(val: boolean); get canShowClearButton(): boolean; get clearButtonCaption(): any; supportGoNextPageAutomatic(): boolean; } export declare class QuestionText extends QuestionTextModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionButtonGroup extends QuestionButtonGroupModel { constructor(name: string); _implementor: QuestionCheckboxBaseImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionCheckbox extends QuestionCheckboxModel { constructor(name: string); koAllSelected: any; isAllSelectedUpdating: boolean; _implementor: QuestionCheckboxImplementor; protected onBaseCreating(): void; onSurveyValueChanged(newValue: any): void; protected onVisibleChoicesChanged(): void; protected updateAllSelected(): void; dispose(): void; } export declare class QuestionImagePicker extends QuestionImagePickerModel { constructor(name: string); _implementor: QuestionImagePickerImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionMatrixDropdown extends QuestionMatrixDropdownModel { constructor(name: string); _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionMatrixDynamic extends QuestionMatrixDynamicModel { constructor(name: string); _implementor: QuestionMatrixDynamicImplementor; protected onBaseCreating(): void; dispose(): void; } export declare class QuestionRadiogroup extends QuestionRadiogroupModel { constructor(name: string); _implementor: QuestionCheckboxBaseImplementor; protected onBaseCreating(): void; dispose(): void; } /* * A Model for a ranking question */ export declare class QuestionRankingModel extends QuestionCheckboxModel { constructor(name: string); domNode: any; getType(): string; get rootClass(): string; protected getItemClassCore(item: ItemValue, options: any): string; protected isItemCurrentDropTarget(item: ItemValue): boolean; get ghostPositionCssClass(): string; getNumberByIndex(index: number): string; setSurveyImpl(value: ISurveyImpl, isLight?: boolean): void; isAnswerCorrect(): boolean; onSurveyValueChanged(newValue: any): void; protected onVisibleChoicesChanged: any; localeChanged: any; get rankingChoices(): any; dragDropRankingChoices: DragDropRankingChoices; currentDropTarget: ItemValue; dropTargetNodeMove: string; endLoadingFromJson(): void; handlePointerDown: any; afterRenderQuestionElement(el: any): void; beforeDestroyQuestionElement(el: any): void; handleKeydown: any; protected supportSelectAll(): boolean; supportOther(): boolean; supportNone(): boolean; handleArrowUp: any; handleArrowDown: any; focusItem: any; setValue: any; setValueFromUI: any; syncNumbers: any; setGhostText: any; getIconHoverCss(): string; getIconFocusCss(): string; } export declare class QuestionRanking extends QuestionRankingModel { _implementor: QuestionImplementor; protected onBaseCreating(): void; dispose(): void; koHandleKeydown: any; koHandlePointerDown: any; } export declare function property(options?: any): any; export declare function propertyArray(options?: IArrayPropertyDecoratorOptions): any; export declare function createPopupModalViewModel(componentName: string, data: any, onApply: any, onCancel?: any, onHide?: any, onShow?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): PopupBaseViewModel; export declare function unwrap<T>(value: any): T; export declare function getSize(value: any): any; export declare function getCurrecyCodes(): Array<any>; export declare function showModal(componentName: string, data: any, onApply: any, onCancel?: any, cssClass?: string, title?: string, displayMode?: "popup" | "overlay"): void; /* * Global survey settings */ export declare var settings: { /* * Options for SurveyJS comparator. By default we trim strings and compare them as case insensitive. To change the behavior you can use following code: * settings.comparator.trimStrings = false; //"abc " will not equal to "abc". They are equal by default. * settings.comparator.caseSensitive = true; //"abc " will not equal to "Abc". They are equal by default. */ comparator: { trimStrings: boolean, caseSensitive: boolean, }, /* * The prefix that uses to store the question comment, as {questionName} + {commentPrefix}. * The default */ commentPrefix: string, /* * Encode parameter on calling restful web API */ webserviceEncodeParameters: boolean, /* * Cache the result for choices getting from web services. Set this property to false, to disable the caching. */ useCachingForChoicesRestful: boolean, useCachingForChoicesRestfull: boolean, /* * SurveyJS web service API url */ surveyServiceUrl: string, /* * separator that can allow to set value and text of ItemValue object in one string as: "value|text" */ itemValueSeparator: string, /* * Set it to true to serialize itemvalue instance always as object even if text property is empty * const item = new Survey.ItemValue(5); * item.toJSON(); //will return {value: 5}, instead of 5 by default. */ itemValueAlwaysSerializeAsObject: boolean, /* * Set it to true to serialize itemvalue text property, even if it is empty or equals to value * const item = new Survey.ItemValue("item1"); * item.toJSON(); //will return {value: item1, text: "item1"}, instead of "item1" by default. */ itemValueAlwaysSerializeText: boolean, /* * default locale name for localizable strings that uses during serialization, {"default": "My text", "de": "Mein Text"} */ defaultLocaleName: string, /* * Default row name for matrix (single choice) */ matrixDefaultRowName: string, /* * Default cell type for dropdown and dynamic matrices */ matrixDefaultCellType: string, /* * Total value postfix for dropdown and dynamic matrices. The total value stores as: {matrixName} + {postfix} */ matrixTotalValuePostFix: string, /* * Maximum row count in dynamic matrix */ matrixMaximumRowCount: number, /* * Maximum rowCount that returns in addConditionObjectsByContext function */ matrixMaxRowCountInCondition: number, /* * Maximum panel count in dynamic panel */ panelMaximumPanelCount: number, /* * Maximum rate value count in rating question */ ratingMaximumRateValueCount: number, /* * Disable the question while choices are getting from the web service */ disableOnGettingChoicesFromWeb: boolean, /* * Set to true to always serialize the localization string as object even if there is only one value for default locale. Instead of string "MyStr" serialize as {default: "MyStr"} */ serializeLocalizableStringAsObject: boolean, /* * Set to false to hide empty page title and description in design mode */ allowShowEmptyTitleInDesignMode: boolean, /* * Set to false to hide empty page description in design mode */ allowShowEmptyDescriptionInDesignMode: boolean, /* * Set this property to true to execute the complete trigger on value change instead of on next page. */ executeCompleteTriggerOnValueChanged: boolean, /* * Set this property to false to execute the skip trigger on next page instead of on value change. */ executeSkipTriggerOnValueChanged: boolean, /* * Specifies how the input field of [Comment](https://surveyjs.io/Documentation/Library?id=questioncommentmodel) questions is rendered in the read-only mode. * Available values: * "textarea" (default) - A 'textarea' element is used to render a Comment question's input field. * "div" - A 'div' element is used to render a Comment question's input field. */ readOnlyCommentRenderMode: string, /* * Specifies how the input field of [Text](https://surveyjs.io/Documentation/Library?id=questiontextmodel) questions is rendered in the read-only mode. * Available values: * "input" (default) - An 'input' element is used to render a Text question's input field. * "div" - A 'div' element is used to render a Text question's input field. */ readOnlyTextRenderMode: string, /* * Override this function, set your function, if you want to show your own dialog confirm window instead of standard browser window. */ confirmActionFunc: any, /* * Set this property to change the default value of the minWidth constraint */ minWidth: string, /* * Set this property to change the default value of the minWidth constraint */ maxWidth: string, /* * This property tells how many times survey re-run expressions on value changes during condition running. We need it to avoid recursions in the expressions */ maximumConditionRunCountOnValueChanged: number, /* * By default visibleIndex for question with titleLocation = "hidden" is -1, and survey doesn't count these questions when set questions numbers. * Set it true, and a question next to a question with hidden title will increase it's number. */ setQuestionVisibleIndexForHiddenTitle: boolean, /* * By default visibleIndex for question with hideNumber = true is -1, and survey doesn't count these questions when set questions numbers. * Set it true, and a question next to a question with hidden title number will increase it's number. */ setQuestionVisibleIndexForHiddenNumber: boolean, /* * By default all rows are rendered no matters whwther they are visible. * Set it true, and survey markup rows will be rendered only if they are visible in viewport. * This feature is experimantal and might do not support all the use cases. */ lazyRowsRendering: boolean, lazyRowsRenderingStartRow: number, /* * By default checkbox and radiogroup items are ordered in rows. * Set it "column", and items will be ordered in columns. */ showItemsInOrder: string, /* * Supported validators by question types. You can modify this variable to add validators for new question types or add/remove for existing question types. */ supportedValidators: { question: any, comment: any, text: any, checkbox: any, imagepicker: any, }, /* * Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that less than this value */ minDate: string, /* * Set the value as string "yyyy-mm-dd". text questions with inputType "date" will not allow to set to survey date that greater than this value */ maxDate: string, showModal: any, supportCreatorV2: boolean, /* * Specifies a list of custom icons. * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons. * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value. * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon" */ customIcons: any, titleTags: { survey: string, page: string, panel: string, question: string, }, }; export declare var surveyLocalization: { currentLocaleValue: string, defaultLocaleValue: string, locales: any, localeNames: any, supportedLocales: any, currentLocale: string, defaultLocale: string, getLocaleStrings: any, getCurrentStrings: any, getString: any, getLocales: any, }; export declare var surveyStrings: any; /* * An alias for the metadata object. It contains object properties' runtime information and allows you to modify it. */ export declare var Serializer: JsonMetadata; export declare var registerFunction: any; export declare var parse: any; export declare var defaultActionBarCss: { root: string, item: string, itemActive: string, itemPressed: string, itemIcon: string, itemTitle: string, itemTitleWithIcon: string, }; export declare var FOCUS_INPUT_SELECTOR: any; export declare var surveyCss: { currentType: string, getCss: any, }; export declare var defaultStandardCss: { root: string, container: string, header: string, body: string, bodyEmpty: string, footer: string, title: string, description: string, logo: string, logoImage: string, headerText: string, navigationButton: string, completedPage: string, navigation: { complete: string, prev: string, next: string, start: string, preview: string, edit: string, }, progress: string, progressBar: string, progressTextInBar: string, progressButtonsContainerCenter: string, progressButtonsContainer: string, progressButtonsImageButtonLeft: string, progressButtonsImageButtonRight: string, progressButtonsImageButtonHidden: string, progressButtonsListContainer: string, progressButtonsList: string, progressButtonsListElementPassed: string, progressButtonsListElementCurrent: string, progressButtonsListElementNonClickable: string, progressButtonsPageTitle: string, progressButtonsPageDescription: string, page: { root: string, title: string, description: string, }, pageTitle: string, pageDescription: string, row: string, question: { mainRoot: string, flowRoot: string, header: string, headerLeft: string, content: string, contentLeft: string, titleLeftRoot: string, requiredText: string, title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, number: string, description: string, comment: string, required: string, titleRequired: string, hasError: string, indent: number, footer: string, formGroup: string, asCell: string, icon: string, iconExpanded: string, disabled: string, }, panel: { title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, titleOnError: string, icon: string, iconExpanded: string, description: string, container: string, footer: string, number: string, requiredText: string, }, error: { root: string, icon: string, item: string, locationTop: string, locationBottom: string, }, boolean: { root: string, item: string, control: string, itemChecked: string, itemIndeterminate: string, itemDisabled: string, switch: string, slider: string, label: string, disabledLabel: string, materialDecorator: string, itemDecorator: string, checkedPath: string, uncheckedPath: string, indeterminatePath: string, }, checkbox: { root: string, item: string, itemSelectAll: string, itemNone: string, itemChecked: string, itemInline: string, label: string, labelChecked: string, itemControl: string, itemDecorator: string, controlLabel: string, other: string, column: string, }, ranking: { root: string, rootMobileMod: string, rootDragMod: string, rootDisabled: string, item: string, itemContent: string, itemIndex: string, controlLabel: string, itemGhostNode: string, itemIconContainer: string, itemIcon: string, itemIconHoverMod: string, itemIconFocusMod: string, itemGhostMod: string, itemDragMod: string, }, comment: string, dropdown: { root: string, control: string, selectWrapper: string, other: string, }, html: { root: string, }, image: { root: string, image: string, }, matrix: { root: string, label: string, itemChecked: string, itemDecorator: string, cell: string, cellText: string, cellTextSelected: string, cellLabel: string, }, matrixdropdown: { root: string, cell: string, headerCell: string, row: string, rowAdditional: string, detailRow: string, detailRowText: string, detailCell: string, choiceCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, }, matrixdynamic: { root: string, button: string, buttonAdd: string, buttonRemove: string, iconAdd: string, iconRemove: string, iconDrag: string, cell: string, headerCell: string, row: string, detailRow: string, detailCell: string, choiceCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, emptyRowsSection: string, emptyRowsText: string, emptyRowsButton: string, ghostRow: string, }, paneldynamic: { root: string, title: string, button: string, buttonAdd: string, buttonRemove: string, buttonRemoveRight: string, buttonPrev: string, buttonNext: string, progressContainer: string, progress: string, progressBar: string, progressText: string, panelWrapper: string, panelWrapperInRow: string, footer: string, progressBtnIcon: string, }, multipletext: { root: string, itemTitle: string, item: string, row: string, itemLabel: string, itemValue: string, }, radiogroup: { root: string, item: string, itemChecked: string, itemInline: string, itemDecorator: string, label: string, labelChecked: string, itemControl: string, controlLabel: string, other: string, clearButton: string, column: string, }, buttongroup: { root: string, item: string, itemIcon: string, itemDecorator: string, itemCaption: string, itemHover: string, itemSelected: string, itemDisabled: string, itemControl: string, }, imagepicker: { root: string, item: string, itemChecked: string, label: string, itemControl: string, image: string, itemInline: string, itemText: string, clearButton: string, }, rating: { root: string, item: string, selected: string, minText: string, itemText: string, maxText: string, }, text: string, expression: string, file: { root: string, placeholderInput: string, preview: string, removeButton: string, fileInput: string, removeFile: string, fileDecorator: string, fileSign: string, chooseFile: string, noFileChosen: string, dragAreaPlaceholder: string, fileList: string, }, signaturepad: { root: string, controls: string, placeholder: string, clearButton: string, }, saveData: { root: string, saving: string, error: string, success: string, saveAgainButton: string, }, window: { root: string, body: string, header: { root: string, title: string, button: string, buttonExpanded: string, buttonCollapsed: string, }, }, }; export declare var surveyTimerFunctions: { setTimeout: any, clearTimeout: any, }; export declare var matrixDropdownColumnTypes: { dropdown: { onCellQuestionUpdate: any, }, checkbox: { onCellQuestionUpdate: any, }, radiogroup: { onCellQuestionUpdate: any, }, text: any, comment: any, boolean: { onCellQuestionUpdate: any, }, expression: any, rating: any, }; export declare var _isMobile: boolean; export declare var vendor: any; export declare var _IPad: boolean; export declare var IsMobile: boolean; export declare var _isTouch: boolean; export declare var IsTouch: boolean; export declare var minMaxTypes: any; export declare var youtubeTags: any; export declare var videoSuffics: any; export declare var defaultWidth: number; export declare var defaultHeight: number; export declare var Version: string; export declare var defaultBootstrapCss: { root: string, container: string, header: string, body: string, bodyEmpty: string, footer: string, title: string, description: string, logo: string, logoImage: string, headerText: string, navigationButton: string, completedPage: string, navigation: { complete: string, prev: string, next: string, start: string, preview: string, edit: string, }, progress: string, progressBar: string, progressTextUnderBar: string, progressButtonsContainerCenter: string, progressButtonsContainer: string, progressButtonsImageButtonLeft: string, progressButtonsImageButtonRight: string, progressButtonsImageButtonHidden: string, progressButtonsListContainer: string, progressButtonsList: string, progressButtonsListElementPassed: string, progressButtonsListElementCurrent: string, progressButtonsListElementNonClickable: string, progressButtonsPageTitle: string, progressButtonsPageDescription: string, page: { root: string, title: string, description: string, }, pageTitle: string, pageDescription: string, row: string, question: { mainRoot: string, flowRoot: string, header: string, headerLeft: string, content: string, contentLeft: string, titleLeftRoot: string, title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, number: string, description: string, descriptionUnderInput: string, requiredText: string, comment: string, required: string, titleRequired: string, hasError: string, indent: number, formGroup: string, }, panel: { title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, titleOnError: string, icon: string, iconExpanded: string, description: string, container: string, footer: string, number: string, requiredText: string, }, error: { root: string, icon: string, item: string, locationTop: string, locationBottom: string, }, boolean: { root: string, item: string, control: string, itemChecked: string, itemIndeterminate: string, itemDisabled: string, switch: string, slider: string, label: string, disabledLabel: string, materialDecorator: string, itemDecorator: string, checkedPath: string, uncheckedPath: string, indeterminatePath: string, }, checkbox: { root: string, item: string, itemChecked: string, itemSelectAll: string, itemNone: string, itemInline: string, itemControl: string, itemDecorator: string, label: string, labelChecked: string, controlLabel: string, materialDecorator: string, other: string, column: string, }, ranking: { root: string, rootMobileMod: string, rootDragMod: string, rootDisabled: string, item: string, itemContent: string, itemIndex: string, controlLabel: string, itemGhostNode: string, itemIconContainer: string, itemIcon: string, itemIconHoverMod: string, itemIconFocusMod: string, itemGhostMod: string, itemDragMod: string, }, comment: string, dropdown: { root: string, control: string, other: string, }, html: { root: string, }, image: { root: string, image: string, }, matrix: { root: string, label: string, itemChecked: string, itemDecorator: string, cellText: string, cellTextSelected: string, cellLabel: string, }, matrixdropdown: { root: string, cell: string, headerCell: string, row: string, rowAdditional: string, detailRow: string, detailRowText: string, detailCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, }, matrixdynamic: { root: string, button: string, buttonAdd: string, buttonRemove: string, iconAdd: string, iconRemove: string, iconDrag: string, headerCell: string, row: string, detailRow: string, detailCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, emptyRowsSection: string, emptyRowsText: string, emptyRowsButton: string, ghostRow: string, }, paneldynamic: { root: string, navigation: string, progressTop: string, progressBottom: string, title: string, button: string, buttonAdd: string, buttonRemove: string, buttonRemoveRight: string, buttonPrev: string, buttonNext: string, progressContainer: string, progress: string, progressBar: string, progressText: string, panelWrapper: string, panelWrapperInRow: string, footer: string, progressBtnIcon: string, }, multipletext: { root: string, itemTitle: string, item: string, itemLabel: string, row: string, itemValue: string, }, radiogroup: { root: string, item: string, itemChecked: string, itemInline: string, label: string, labelChecked: string, itemControl: string, itemDecorator: string, controlLabel: string, materialDecorator: string, other: string, clearButton: string, column: string, }, buttongroup: { root: string, item: string, itemIcon: string, itemDecorator: string, itemCaption: string, itemHover: string, itemSelected: string, itemDisabled: string, itemControl: string, }, imagepicker: { root: string, item: string, itemChecked: string, itemInline: string, label: string, itemControl: string, image: string, itemText: string, clearButton: string, }, rating: { root: string, item: string, selected: string, minText: string, itemText: string, maxText: string, disabled: string, }, text: string, expression: string, file: { root: string, placeholderInput: string, preview: string, removeButton: string, fileInput: string, removeFile: string, fileDecorator: string, fileSign: string, removeButtonBottom: string, dragAreaPlaceholder: string, fileList: string, }, signaturepad: { root: string, controls: string, placeholder: string, clearButton: string, }, saveData: { root: string, saving: string, error: string, success: string, saveAgainButton: string, }, window: { root: string, body: string, header: { root: string, title: string, button: string, buttonExpanded: string, buttonCollapsed: string, }, }, }; export declare var defaultBootstrapMaterialCss: { root: string, container: string, header: string, body: string, bodyEmpty: string, footer: string, title: string, description: string, logo: string, logoImage: string, headerText: string, navigationButton: string, completedPage: string, navigation: { complete: string, prev: string, next: string, start: string, preview: string, edit: string, }, progress: string, progressBar: string, progressTextUnderBar: string, progressButtonsContainerCenter: string, progressButtonsContainer: string, progressButtonsImageButtonLeft: string, progressButtonsImageButtonRight: string, progressButtonsImageButtonHidden: string, progressButtonsListContainer: string, progressButtonsList: string, progressButtonsListElementPassed: string, progressButtonsListElementCurrent: string, progressButtonsListElementNonClickable: string, progressButtonsPageTitle: string, progressButtonsPageDescription: string, page: { root: string, title: string, description: string, }, pageTitle: string, pageDescription: string, row: string, question: { mainRoot: string, flowRoot: string, header: string, headerLeft: string, content: string, contentLeft: string, titleLeftRoot: string, requiredText: string, title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, number: string, description: string, descriptionUnderInput: string, comment: string, required: string, titleRequired: string, hasError: string, indent: number, formGroup: string, }, panel: { title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, titleOnError: string, icon: string, iconExpanded: string, description: string, container: string, footer: string, number: string, requiredText: string, }, error: { root: string, icon: string, item: string, locationTop: string, locationBottom: string, }, boolean: { root: string, item: string, control: string, itemChecked: string, itemIndeterminate: string, itemDisabled: string, switch: string, slider: string, label: string, disabledLabel: string, materialDecorator: string, itemDecorator: string, checkedPath: string, uncheckedPath: string, indeterminatePath: string, }, checkbox: { root: string, item: string, itemChecked: string, itemSelectAll: string, itemNone: string, itemInline: string, itemDecorator: string, itemControl: string, label: string, labelChecked: string, controlLabel: string, materialDecorator: string, other: string, column: string, }, ranking: { root: string, rootMobileMod: string, rootDragMod: string, rootDisabled: string, item: string, itemContent: string, itemIndex: string, controlLabel: string, itemGhostNode: string, itemIconContainer: string, itemIcon: string, itemIconHoverMod: string, itemIconFocusMod: string, itemGhostMod: string, itemDragMod: string, }, comment: string, dropdown: { root: string, control: string, other: string, }, html: { root: string, }, image: { root: string, image: string, }, matrix: { root: string, row: string, label: string, cellText: string, cellTextSelected: string, cellLabel: string, itemValue: string, itemChecked: string, itemDecorator: string, materialDecorator: string, }, matrixdropdown: { root: string, itemValue: string, headerCell: string, row: string, rowAdditional: string, detailRow: string, detailRowText: string, detailCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, }, matrixdynamic: { mainRoot: string, flowRoot: string, root: string, button: string, itemValue: string, buttonAdd: string, buttonRemove: string, iconAdd: string, iconRemove: string, iconDrag: string, headerCell: string, row: string, detailRow: string, detailCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, emptyRowsSection: string, emptyRowsText: string, emptyRowsButton: string, ghostRow: string, }, paneldynamic: { root: string, navigation: string, progressTop: string, progressBottom: string, title: string, button: string, buttonAdd: string, buttonRemove: string, buttonRemoveRight: string, buttonPrev: string, buttonNext: string, progressContainer: string, progress: string, progressBar: string, progressText: string, panelWrapper: string, panelWrapperInRow: string, progressBtnIcon: string, footer: string, }, multipletext: { root: string, itemTitle: string, item: string, itemLabel: string, row: string, itemValue: string, }, radiogroup: { root: string, item: string, itemChecked: string, itemInline: string, itemDecorator: string, label: string, labelChecked: string, itemControl: string, controlLabel: string, materialDecorator: string, other: string, clearButton: string, column: string, }, buttongroup: { root: string, item: string, itemIcon: string, itemDecorator: string, itemCaption: string, itemSelected: string, itemHover: string, itemDisabled: string, itemControl: string, }, imagepicker: { root: string, item: string, itemChecked: string, itemInline: string, label: string, itemControl: string, image: string, itemText: string, clearButton: string, }, rating: { root: string, item: string, selected: string, minText: string, itemText: string, maxText: string, disabled: string, }, text: string, expression: string, file: { root: string, placeholderInput: string, preview: string, removeButton: string, fileInput: string, fileSign: string, removeFile: string, fileDecorator: string, removeButtonBottom: string, dragAreaPlaceholder: string, fileList: string, }, signaturepad: { root: string, controls: string, placeholder: string, clearButton: string, }, saveData: { root: string, saving: string, error: string, success: string, saveAgainButton: string, }, window: { root: string, body: string, header: { root: string, title: string, button: string, buttonExpanded: string, buttonCollapsed: string, }, }, }; export declare var defaultV2Css: { root: string, container: string, header: string, body: string, bodyEmpty: string, footer: string, title: string, description: string, logo: string, logoImage: string, headerText: string, navigationButton: string, completedPage: string, navigation: { complete: string, prev: string, next: string, start: string, preview: string, edit: string, }, panel: { title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, titleOnExpand: string, titleOnError: string, description: string, container: string, withFrame: string, content: string, icon: string, iconExpanded: string, footer: string, requiredText: string, header: string, collapsed: string, nested: string, invisible: string, }, paneldynamic: { mainRoot: string, empty: string, root: string, navigation: string, title: string, button: string, buttonRemove: string, buttonAdd: string, progressTop: string, progressBottom: string, buttonPrev: string, buttonNext: string, progressContainer: string, progress: string, progressBar: string, progressText: string, separator: string, panelWrapper: string, footer: string, footerButtonsContainer: string, panelWrapperInRow: string, progressBtnIcon: string, noEntriesPlaceholder: string, }, progress: string, progressBar: string, progressText: string, progressButtonsContainerCenter: string, progressButtonsContainer: string, progressButtonsImageButtonLeft: string, progressButtonsImageButtonRight: string, progressButtonsImageButtonHidden: string, progressButtonsListContainer: string, progressButtonsList: string, progressButtonsListElementPassed: string, progressButtonsListElementCurrent: string, progressButtonsListElementNonClickable: string, progressButtonsPageTitle: string, progressButtonsPageDescription: string, progressTextInBar: string, page: { root: string, title: string, description: string, }, pageTitle: string, pageDescription: string, row: string, rowMultiple: string, question: { mainRoot: string, flowRoot: string, withFrame: string, asCell: string, answered: string, header: string, headerLeft: string, headerTop: string, headerBottom: string, content: string, contentLeft: string, titleLeftRoot: string, titleOnAnswer: string, titleOnError: string, title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, requiredText: string, number: string, description: string, descriptionUnderInput: string, comment: string, other: string, required: string, titleRequired: string, indent: number, footer: string, formGroup: string, hasError: string, disabled: string, collapsed: string, nested: string, invisible: string, }, image: { mainRoot: string, root: string, image: string, withFrame: string, }, html: { mainRoot: string, root: string, withFrame: string, }, error: { root: string, icon: string, item: string, tooltip: string, aboveQuestion: string, locationTop: string, locationBottom: string, }, checkbox: { root: string, rootMultiColumn: string, item: string, itemOnError: string, itemSelectAll: string, itemNone: string, itemDisabled: string, itemChecked: string, itemHover: string, itemInline: string, label: string, labelChecked: string, itemControl: string, itemDecorator: string, itemSvgIconId: string, controlLabel: string, materialDecorator: string, other: string, column: string, }, radiogroup: { root: string, rootMultiColumn: string, item: string, itemOnError: string, itemInline: string, label: string, labelChecked: string, itemDisabled: string, itemChecked: string, itemHover: string, itemControl: string, itemDecorator: string, controlLabel: string, materialDecorator: string, other: string, clearButton: string, column: string, }, boolean: { mainRoot: string, root: string, item: string, itemOnError: string, control: string, itemChecked: string, itemIndeterminate: string, itemDisabled: string, label: string, switch: string, disabledLabel: string, itemDecorator: string, materialDecorator: string, sliderText: string, slider: string, }, text: { root: string, small: string, controlDisabled: string, onError: string, }, multipletext: { root: string, itemLabel: string, itemLabelOnError: string, item: string, itemTitle: string, row: string, cell: string, }, dropdown: { root: string, small: string, control: string, selectWrapper: string, other: string, onError: string, label: string, item: string, itemDisabled: string, itemChecked: string, itemHover: string, itemControl: string, itemDecorator: string, controlDisabled: string, controlLabel: string, controlEmpty: string, materialDecorator: string, }, imagepicker: { mainRoot: string, root: string, item: string, itemOnError: string, itemInline: string, itemChecked: string, itemDisabled: string, itemHover: string, label: string, itemDecorator: string, imageContainer: string, itemControl: string, image: string, itemText: string, clearButton: string, other: string, }, matrix: { mainRoot: string, tableWrapper: string, root: string, rowError: string, cell: string, headerCell: string, label: string, itemOnError: string, itemValue: string, itemChecked: string, itemDisabled: string, itemHover: string, materialDecorator: string, itemDecorator: string, cellText: string, cellTextSelected: string, cellTextDisabled: string, }, matrixdropdown: { mainRoot: string, root: string, cell: string, headerCell: string, rowTextCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailIconId: string, detailIconExpandedId: string, actionsCell: string, emptyCell: string, verticalCell: string, cellQuestionWrapper: string, }, matrixdynamic: { mainRoot: string, empty: string, root: string, cell: string, headerCell: string, rowTextCell: string, button: string, detailRow: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailIconId: string, detailIconExpandedId: string, detailPanelCell: string, actionsCell: string, buttonAdd: string, buttonRemove: string, iconAdd: string, iconRemove: string, footer: string, emptyRowsSection: string, iconDrag: string, ghostRow: string, emptyCell: string, verticalCell: string, cellQuestionWrapper: string, }, rating: { root: string, item: string, itemOnError: string, itemHover: string, selected: string, minText: string, itemText: string, maxText: string, itemDisabled: string, }, comment: { root: string, small: string, controlDisabled: string, onError: string, }, expression: string, file: { root: string, other: string, placeholderInput: string, preview: string, fileSign: string, fileList: string, fileSignBottom: string, fileDecorator: string, onError: string, fileDecoratorDrag: string, fileInput: string, noFileChosen: string, chooseFile: string, chooseFileAsText: string, chooseFileAsIcon: string, chooseFileIconId: string, disabled: string, removeButton: string, removeButtonBottom: string, removeButtonIconId: string, removeFile: string, removeFileSvg: string, removeFileSvgIconId: string, wrapper: string, defaultImage: string, removeFileButton: string, dragAreaPlaceholder: string, imageWrapper: string, single: string, singleImage: string, }, signaturepad: { mainRoot: string, root: string, small: string, controls: string, placeholder: string, clearButton: string, clearButtonIconId: string, }, saveData: { root: string, saving: string, error: string, success: string, saveAgainButton: string, }, window: { root: string, body: string, header: { root: string, title: string, button: string, buttonExpanded: string, buttonCollapsed: string, }, }, ranking: { root: string, rootMobileMod: string, rootDragMod: string, rootDisabled: string, item: string, itemContent: string, itemIndex: string, controlLabel: string, itemGhostNode: string, itemIconContainer: string, itemIcon: string, itemIconHoverMod: string, itemIconFocusMod: string, itemGhostMod: string, itemDragMod: string, itemOnError: string, }, actionBar: { root: string, item: string, itemPressed: string, itemAsIcon: string, itemIcon: string, }, }; export declare var modernCss: { root: string, container: string, header: string, headerClose: string, body: string, bodyEmpty: string, footer: string, title: string, description: string, logo: string, logoImage: string, headerText: string, navigationButton: string, completedPage: string, navigation: { complete: string, prev: string, next: string, start: string, preview: string, edit: string, }, panel: { title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, titleOnError: string, description: string, container: string, content: string, icon: string, iconExpanded: string, footer: string, requiredText: string, number: string, }, paneldynamic: { root: string, navigation: string, title: string, button: string, buttonRemove: string, buttonRemoveRight: string, buttonAdd: string, progressTop: string, progressBottom: string, buttonPrev: string, buttonNext: string, progressContainer: string, progress: string, progressBar: string, progressText: string, separator: string, panelWrapper: string, panelWrapperInRow: string, progressBtnIcon: string, footer: string, }, progress: string, progressBar: string, progressText: string, progressTextInBar: string, progressButtonsContainerCenter: string, progressButtonsContainer: string, progressButtonsImageButtonLeft: string, progressButtonsImageButtonRight: string, progressButtonsImageButtonHidden: string, progressButtonsListContainer: string, progressButtonsList: string, progressButtonsListElementPassed: string, progressButtonsListElementCurrent: string, progressButtonsListElementNonClickable: string, progressButtonsPageTitle: string, progressButtonsPageDescription: string, page: { root: string, title: string, description: string, }, pageTitle: string, pageDescription: string, row: string, question: { mainRoot: string, flowRoot: string, asCell: string, header: string, headerLeft: string, headerTop: string, headerBottom: string, content: string, contentLeft: string, titleLeftRoot: string, answered: string, titleOnAnswer: string, titleOnError: string, title: string, titleExpandable: string, titleExpanded: string, titleCollapsed: string, icon: string, iconExpanded: string, requiredText: string, number: string, description: string, descriptionUnderInput: string, comment: string, required: string, titleRequired: string, indent: number, footer: string, formGroup: string, hasError: string, disabled: string, }, image: { root: string, image: string, }, error: { root: string, icon: string, item: string, locationTop: string, locationBottom: string, }, checkbox: { root: string, item: string, itemSelectAll: string, itemNone: string, itemDisabled: string, itemChecked: string, itemHover: string, itemInline: string, label: string, labelChecked: string, itemControl: string, itemDecorator: string, itemSvgIconId: string, controlLabel: string, materialDecorator: string, other: string, column: string, }, ranking: { root: string, rootMobileMod: string, rootDragMod: string, rootDisabled: string, item: string, itemContent: string, itemIndex: string, controlLabel: string, itemGhostNode: string, itemIconContainer: string, itemIcon: string, itemIconHoverMod: string, itemIconFocusMod: string, itemGhostMod: string, itemDragMod: string, }, radiogroup: { root: string, item: string, itemInline: string, label: string, labelChecked: string, itemDisabled: string, itemChecked: string, itemHover: string, itemControl: string, itemDecorator: string, itemSvgIconId: string, controlLabel: string, materialDecorator: string, other: string, clearButton: string, column: string, }, buttongroup: { root: string, item: string, itemIcon: string, itemDecorator: string, itemCaption: string, itemSelected: string, itemHover: string, itemDisabled: string, itemControl: string, }, boolean: { root: string, small: string, item: string, control: string, itemChecked: string, itemIndeterminate: string, itemDisabled: string, switch: string, slider: string, label: string, disabledLabel: string, materialDecorator: string, itemDecorator: string, checkedPath: string, uncheckedPath: string, indeterminatePath: string, }, text: { root: string, small: string, onError: string, }, multipletext: { root: string, item: string, itemLabel: string, itemTitle: string, row: string, cell: string, }, dropdown: { root: string, small: string, control: string, selectWrapper: string, other: string, onError: string, }, imagepicker: { root: string, item: string, itemInline: string, itemChecked: string, itemDisabled: string, itemHover: string, label: string, itemControl: string, image: string, itemText: string, clearButton: string, other: string, }, matrix: { tableWrapper: string, root: string, rowError: string, cell: string, headerCell: string, label: string, itemValue: string, itemChecked: string, itemDisabled: string, itemHover: string, materialDecorator: string, itemDecorator: string, cellText: string, cellTextSelected: string, cellTextDisabled: string, }, matrixdropdown: { root: string, cell: string, headerCell: string, row: string, rowAdditional: string, detailRow: string, detailRowText: string, detailCell: string, choiceCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, }, matrixdynamic: { root: string, cell: string, headerCell: string, button: string, buttonAdd: string, buttonRemove: string, iconAdd: string, iconRemove: string, iconDrag: string, row: string, detailRow: string, detailCell: string, choiceCell: string, detailButton: string, detailButtonExpanded: string, detailIcon: string, detailIconExpanded: string, detailPanelCell: string, actionsCell: string, emptyRowsSection: string, emptyRowsText: string, emptyRowsButton: string, ghostRow: string, }, rating: { root: string, item: string, selected: string, minText: string, itemText: string, maxText: string, itemDisabled: string, }, comment: { root: string, small: string, }, expression: string, file: { root: string, other: string, placeholderInput: string, preview: string, fileSignBottom: string, fileDecorator: string, fileInput: string, noFileChosen: string, chooseFile: string, controlDisabled: string, removeButton: string, removeButtonBottom: string, removeFile: string, removeFileSvg: string, removeFileSvgIconId: string, wrapper: string, dragAreaPlaceholder: string, fileList: string, }, signaturepad: { root: string, small: string, controls: string, placeholder: string, clearButton: string, }, saveData: { root: string, saving: string, error: string, success: string, saveAgainButton: string, }, window: { root: string, body: string, header: { root: string, title: string, button: string, buttonExpanded: string, buttonCollapsed: string, }, }, }; export declare var SvgRegistry: SvgIconRegistry; export declare var SvgBundleViewModel: any; export declare var koTemplate: any; export declare var registerTemplateEngine: any; export declare var template: any; export declare var ActionBarItemViewModel: any; export declare var ActionBarItemDropdownViewModel: any; export declare var ActionBarSeparatorViewModel: any; export declare var CheckboxViewModel: any; export declare var templateBridge: any; export declare var TitleElementViewModel: any; export declare var TitleContentViewModel: any; export declare var TitleActionViewModel: any; export declare var StringViewerViewModel: any; export declare var LogoImageViewModel: any; export declare var Skeleton: any; export declare var ListItemViewComponent: any; export declare var ListViewComponent: any; export declare var SvgIconViewModel: any; export declare var SurveyQuestionMatrixDynamicRemoveButton: any; export declare var SurveyQuestionMatrixDetailButton: any; export declare var SurveyQuestionMatrixDynamicDragDropIcon: any;
{ "content_hash": "4b4327e7095f5bbc2da881db8c244bbd", "timestamp": "", "source": "github", "line_count": 10542, "max_line_length": 440, "avg_line_length": 36.5287421741605, "alnum_prop": 0.7307640371241748, "repo_name": "cdnjs/cdnjs", "id": "a71e3b0eaaa90540549e0454ec72d5ca23909186", "size": "385297", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "ajax/libs/survey-knockout/1.9.12/survey.ko.d.ts", "mode": "33188", "license": "mit", "language": [], "symlink_target": "" }
import ast from . import parsers from ..lexer import lexers from ..utils.parser import (build_call, build_class, build_yield, production, split_tag_args_string, update_source_pos) spg = parsers.spg """ Structure parser generator. Used to tokenize and split the template at ``{{``, ``}}``, ``{%``, ``%}``, ``{#`` and ``#}``. The overall rules are:: doc : CONTENT | var | tag | comment | doc CONTENT | doc var | doc tag | doc comment var : VS CONTENT VE tag : if | for if : TS IF CONTENT TE inner TS ENDIF TE | TS IF CONTENT TE inner TS ELSE TE inner TS ENDIF TE for : TS FOR CONTENT TE inner TS ENDFOR TE | TS FOR CONTENT TE inner TS ELSE TE inner TS ENDFOR TE | TS FOR CONTENT TE inner TS EMPTY TE inner TS ENDFOR TE comment : CS CONTENT CE inner : CONTENT | var | tag | comment | inner CONTENT | inner var | inner tag | inner comment """ spg.precedence = [] @production(spg, 'doc : CONTENT') def doc__CONTENT(state, p): klass, root_func = build_class() state.blocks.append(root_func) content = p[0] content = update_source_pos(ast.Str(s=content.getstr()), content) state.append_to_block(build_yield(content)) return klass @production(spg, 'doc : var', 'doc : tag', 'doc : comment') def doc__parsed(state, p): klass, root_func = build_class() state.blocks.append(root_func) state.append_to_block(p[0]) return klass @production(spg, 'doc : doc CONTENT') def doc__doc_CONTENT(state, p): doc, content = p content = update_source_pos(ast.Str(s=content.getstr()), content) state.append_to_block(build_yield(content)) return doc @production(spg, 'doc : doc var', 'doc : doc tag') def doc__doc_parsed(state, p): doc, parsed = p state.append_to_block(parsed) return doc @production(spg, 'doc : doc comment') def doc__doc_comment(state, p): doc, _ = p return doc @production(spg, 'var : VS CONTENT VE') def var__varstart_CONTENT_varend(state, p): content = parsers.fp.parse(lexers.fl.lex(p[1].getstr())) return build_yield(build_call( func=ast.Name(id='auto_escape', ctx=ast.Load()), args=[ update_source_pos(content, p[1]) ] )) @production(spg, 'tag : if', 'tag : for') def tag(state, p): return p[0] @production(spg, 'if : TS IF CONTENT TE inner TS ENDIF TE') def if__impl(state, p): ts, _, condition, _, body, _, _, _ = p test = parsers.fp.parse(lexers.fl.lex(condition.getstr())) return update_source_pos(ast.If( test=test, body=body, orelse=[] ), ts) @production(spg, 'if : TS IF CONTENT TE inner TS ELSE TE inner TS ENDIF TE') def if__else_impl(state, p): ts, _, condition, _, body, _, _, _, orelse, _, _, _ = p test = parsers.fp.parse(lexers.fl.lex(condition.getstr())) return update_source_pos(ast.If( test=test, body=body, orelse=orelse, ), ts) @production(spg, 'for : TS FOR CONTENT TE inner TS ENDFOR TE') def for__impl(state, p): ts, _, args, _, body, _, _, _ = p target, in_, var = split_tag_args_string(args.getstr()) if in_ != 'in': raise ValueError('"in" expected in for loop arguments') iterator = parsers.fp.parse(lexers.fl.lex(var)) return update_source_pos(ast.For( target=ast.Subscript( value=ast.Name(id='context', ctx=ast.Load()), slice=ast.Index(value=ast.Str(s=target)), ctx=ast.Store() ), iter=iterator, body=body, orelse=[] ), ts) @production(spg, 'for : TS FOR CONTENT TE inner TS ELSE TE inner TS ENDFOR TE', 'for : TS FOR CONTENT TE inner TS EMPTY TE inner TS ENDFOR TE') def for__else_impl(state, p): ts, _, args, _, body, _, _, _, orelse, _, _, _ = p target, in_, var = split_tag_args_string(args.getstr()) if in_ != 'in': raise ValueError('"in" expected in for loop arguments') iterator = parsers.fp.parse(lexers.fl.lex(var)) return update_source_pos(ast.For( target=ast.Subscript( value=ast.Name(id='context', ctx=ast.Load()), slice=ast.Index(value=ast.Str(s=target)), ctx=ast.Store() ), iter=iterator, body=body, orelse=orelse ), ts) @production(spg, 'comment : CS CONTENT CE') def comment(state, p): return build_yield(ast.Str(s='')) @production(spg, 'inner : CONTENT') def inner__CONTENT(state, p): content = p[0] content = update_source_pos(ast.Str(s=content.getstr()), content) return [build_yield(content)] @production(spg, 'inner : var', 'inner : tag', 'inner : comment') def inner__parsed(state, p): return p @production(spg, 'inner : inner CONTENT') def inner__inner_CONTENT(state, p): inner, content = p content = update_source_pos(ast.Str(s=content.getstr()), content) inner.append(build_yield(content)) return inner @production(spg, 'inner : inner var', 'inner : inner tag') def inner__inner_parsed(state, p): inner, parsed = p inner.append(parsed) return inner @production(spg, 'inner : inner comment') def inner__inner_comment(state, p): inner, _ = p return inner @spg.error def error(state, token): raise ValueError('Unexpected token: %r' % token)
{ "content_hash": "4c30b68cfb0b221d4554e98f218af0fc", "timestamp": "", "source": "github", "line_count": 224, "max_line_length": 77, "avg_line_length": 25.495535714285715, "alnum_prop": 0.5671511118893364, "repo_name": "funkybob/rattle", "id": "5c3e6ea3e891e60eb8def563609b1c5592fc8b46", "size": "5711", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "rattle/parser/structure.py", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "6816" }, { "name": "Python", "bytes": "78776" }, { "name": "Shell", "bytes": "794" } ], "symlink_target": "" }
package com.ibm.mysampleapp.core.activities.navigation; import android.os.Bundle; import android.speech.tts.TextToSpeech; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.ibm.mysampleapp.R; import java.util.ArrayList; import java.util.HashMap; import java.util.Locale; import java.util.Objects; /** * Trieda sluzi na postupne zobrazovanie obrazkov, ktore su ulozene v TraceListe * @author Martin Marič * @author Radoslav Sojak */ public class Navigation extends AppCompatActivity implements TraceList { private int pozicia = 0; private int distance = 0; private TextToSpeech tts_engine; private String language; private String intro_sk = "Vitajte."; private String intro_en = "Welcome."; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.building_navigation); TextView distanceView; final ImageView sceneImage = (ImageView) findViewById(R.id.imageView); final Button forwardArrow = (Button) findViewById(R.id.buttonForward); final Button leftArrow = (Button) findViewById(R.id.buttonLeft); final Button rightArrow = (Button) findViewById(R.id.buttonRight); distanceView = (TextView) findViewById(R.id.distance); forwardArrow.setVisibility(View.VISIBLE); setLanguage("Slovak"); textToSpeechInit(language); update(sceneImage, traceList, pozicia, distanceView, rightArrow, leftArrow, forwardArrow); textToSpeech("Inicializácia dokončená!"); forwardArrow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pozicia++; update(sceneImage, traceList, pozicia, distanceView, rightArrow, leftArrow, forwardArrow); // Vypne zobrazovanie sipky pokial sa dostaneme do ciela. if(pozicia == traceList.size() - 1){ forwardArrow.setVisibility(View.GONE); } } }); leftArrow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pozicia++; update(sceneImage, traceList, pozicia, distanceView, rightArrow, leftArrow, forwardArrow); } }); rightArrow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pozicia++; update(sceneImage, traceList, pozicia, distanceView, rightArrow, leftArrow, forwardArrow); } }); } /** * Metoda, ktorá ziska zo stringu ciselne id obrazka * a nasledne ho zobrazi na obrazovke */ private void update(ImageView sceneImage, ArrayList<StepImage> traceList, int pozicia, TextView distanceView, Button rightArrow, Button leftArrow, Button forwardArrow) { int imageID = sceneImage.getContext().getResources().getIdentifier( traceList.get(pozicia).getSceneImage(), "drawable", sceneImage.getContext().getPackageName() ); sceneImage.setImageResource(imageID); // Tu sa pri kazdom pohybe do noveho vrcholu vzdialenost prepocitava String text_vypis = distanceMessage(); distanceView.setText(text_vypis); textToSpeech(text_vypis); if (traceList.get(pozicia).getArrow() == Arrow.RIGHT){ rightArrow.setVisibility(View.VISIBLE); } else { rightArrow.setVisibility(View.GONE); } if (traceList.get(pozicia).getArrow() == Arrow.LEFT){ leftArrow.setVisibility(View.VISIBLE); } else { leftArrow.setVisibility(View.GONE); } if (traceList.get(pozicia).getArrow() == Arrow.FORWARD){ forwardArrow.setVisibility(View.VISIBLE); } else { forwardArrow.setVisibility(View.GONE); } } /** * Ak je na zaciatku scita cely zoznam vzdialenosti * ak je niekde na ceste odcita poslednu prejdenu vzdialenost * Poznamka, ak StepImage v traceListe na aktualnej pozicii ma getDistance (vzdialenost) * rovnu 0, to znamena ze sa dalej iba otocime, teda message zobrazi vyzvu na otocenie. * @return sprava na zobrazenie */ private String distanceMessage(){ if (pozicia == 0) { for (StepImage stepImage : traceList) { distance += stepImage.getDistance(); } } else{ distance -= traceList.get(pozicia - 1).getDistance(); } if(traceList.get(pozicia).getDistance() == 0 && traceList.get(pozicia).getArrow() == Arrow.LEFT){ return "Otočte sa doľava."; } else if(traceList.get(pozicia).getDistance() == 0 && traceList.get(pozicia).getArrow() == Arrow.RIGHT) { return "Otočte sa doprava."; } else { return "Vzdialenosť do ciela je: " + distance + (distance <= 4 && distance > 0 ? (distance >= 2 ? " metre." : " meter.") : " metrov."); } } /** * Inicializácia interfacu pre TextToSpeech funkciu. * @param language nastavenie lokalizácie */ private void textToSpeechInit(String language){ tts_engine = new TextToSpeech(this, new TextToSpeech.OnInitListener() { @Override public void onInit(int status) { if(status == TextToSpeech.SUCCESS) { if (Objects.equals(language, "Slovak")){ tts_engine.setLanguage(new Locale("sk", "SK")); textToSpeech(intro_sk); } else { tts_engine.setLanguage(new Locale("en", "US")); textToSpeech(intro_en); } } } }); } /** * Metóda, ktorá z daného stringu vytvorí hlasovú nahrávku, ktorú hneď prehrá. * @param text text na prehratie */ private void textToSpeech(String text){ HashMap<String, String> map = new HashMap<>(); map.put(TextToSpeech.Engine.KEY_PARAM_UTTERANCE_ID, "1337"); tts_engine.speak(text, TextToSpeech.QUEUE_FLUSH, map); } /** * Nastavenie jazyka (v nastavení aplikácie TODO) * @param lang jazyk */ private void setLanguage(String lang){ language = lang; } }
{ "content_hash": "33671756e854e40429d956609cd7a314", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 98, "avg_line_length": 35.3125, "alnum_prop": 0.5966076696165191, "repo_name": "VoidlifeGroup/navigation-for-autists", "id": "6ad9a0f43ebd6f83241d4139c523ac86f4daa8ac", "size": "6802", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/src/main/java/com/ibm/mysampleapp/core/activities/navigation/Navigation.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "91057" } ], "symlink_target": "" }
<?php use yii\helpers\Html; use yii\bootstrap\ActiveForm; use Yii\web\View; use yii\captcha\Captcha; use app\modules\merchant\Module; use yii\helpers\Url; use yii\helpers\ArrayHelper; /* @var $this yii\web\View */ /* @var $form yii\bootstrap\ActiveForm */ /* @var $model \common\models\LoginForm */ $this->title = Module::t('app', 'merchant_register'); $fieldOptions1 = [ 'options' => ['class' => 'form-group has-feedback'], 'inputTemplate' => "{input}<span class='glyphicon glyphicon-user form-control-feedback'></span>" ]; $fieldOptions2 = [ 'options' => ['class' => 'form-group has-feedback'], 'inputTemplate' => "{input}<span class='glyphicon glyphicon-lock form-control-feedback'></span>" ]; ?> <div class="login-box"> <div class="login-logo"> <a href="#"><?php echo $this->title;?></a> </div> <!-- /.login-logo --> <div class="login-box-body"> <!-- <p class="login-box-msg">Sign in to start your session</p> --> <?php $form = ActiveForm::begin(['id' => 'login-form', 'enableClientValidation' => true]); ?> <?= $form ->field($model, 'vip_id', $fieldOptions1) ->label(false) ->textInput(['placeholder' => $model->getAttributeLabel('vip_id')]) ?> <?= $form ->field($model, 'password', $fieldOptions2) ->label(false) ->passwordInput(['placeholder' => $model->getAttributeLabel('password')]) ?> <?= $form ->field($model, 'confirm_pwd', $fieldOptions2) ->label(false) ->passwordInput(['placeholder' => $model->getAttributeLabel('confirm_pwd')]) ?> <?= $form->field($model, 'verify_code') ->label(false) ->widget(Captcha::className(), [ 'template' => '<div class="row"><div class="col-sm-6">{input}</div><div class="col-sm-6">{image}</div></div>', 'options' => ['placeholder' => $model->getAttributeLabel('verify_code'),'class'=>'form-control',], 'captchaAction' => '/site/captcha', ]) ?> <?= $form->field($model, 'sms_code',['template' => '<div class="row"><div class="col-lg-6">{input}</div><div class="col-lg-6"><input type="button" url="'.Url::to(['/vip/member/system/sms/index']).'" value="获取验证码" class="btn btn-block btn-flat btn_sms"/></div></div>{error}',]) ->label(false) ->textInput([ 'placeholder' => $model->getAttributeLabel('sms_code'), ]) ?> <?= $form ->field($model,'vip_name') ->label(false) ->textInput(['placeholder' => '商户名称']) ?> <?= $form->field($model, 'vip_type_id') ->label(false) ->dropDownList(ArrayHelper::map($vipTypes, "id", "name"), ['prompt' => '--'.$model->getAttributeLabel('vip_type_id').'--']) ?> <div class="row"> <!-- /.col --> <div class="col-xs-12"> <?= Html::submitButton('注册', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']) ?> </div> <!-- /.col --> </div> <div class="row" style="margin-top: 20px;"> <div class="col-xs-12 icheck"> <?= $form->field($model, 'agreement')->checkbox(['label'=>'我同意遵守', 'template' => "{input}{label}<a href='#'>《婚礼兔商家协议》<a>{error}",]) ?> </div> </div> <?php ActiveForm::end(); ?> <!-- <a href="#">I forgot my password</a><br> <a href="register.html" class="text-center">Register a new membership</a> --> </div> <!-- /.login-box-body --> </div><!-- /.login-box --> <?php $this->registerJs("$(function () { $('input').iCheck({ checkboxClass: 'icheckbox_square-blue', radioClass: 'iradio_square-blue', increaseArea: '20%' // optional }); });",View::POS_END); $this->registerJsFile("js/common/sms.js",['depends' => [\yii\web\JqueryAsset::className()]]) ?>
{ "content_hash": "3517dcbd6c36472dd456df0f30e657a8", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 285, "avg_line_length": 36.69911504424779, "alnum_prop": 0.5124186158668917, "repo_name": "tigergithub01/b2b2c", "id": "26533e1738e9f4d81669a6d912dc13f598238ab1", "size": "4197", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "modules/merchant/views/system/register/index.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "250" }, { "name": "Batchfile", "bytes": "1030" }, { "name": "CSS", "bytes": "10063" }, { "name": "HTML", "bytes": "15328" }, { "name": "JavaScript", "bytes": "134259" }, { "name": "PHP", "bytes": "2422320" } ], "symlink_target": "" }
import numpy as np import pandas as pd import pytest from statsmodels.imputation import mice import statsmodels.api as sm from numpy.testing import assert_equal, assert_allclose import warnings try: import matplotlib.pyplot as plt except ImportError: pass pdf_output = False if pdf_output: from matplotlib.backends.backend_pdf import PdfPages pdf = PdfPages("test_mice.pdf") else: pdf = None def close_or_save(pdf, fig): if pdf_output: pdf.savefig(fig) def teardown_module(): if pdf_output: pdf.close() def gendat(): """ Create a data set with missing values. """ np.random.seed(34243) n = 200 p = 5 exog = np.random.normal(size=(n, p)) exog[:, 0] = exog[:, 1] - exog[:, 2] + 2*exog[:, 4] exog[:, 0] += np.random.normal(size=n) exog[:, 2] = 1*(exog[:, 2] > 0) endog = exog.sum(1) + np.random.normal(size=n) df = pd.DataFrame(exog) df.columns = ["x%d" % k for k in range(1, p+1)] df["y"] = endog df.x1[0:60] = np.nan df.x2[0:40] = np.nan df.x3[10:30:2] = np.nan df.x4[20:50:3] = np.nan df.x5[40:45] = np.nan df.y[30:100:2] = np.nan return df class TestMICEData(object): def test_default(self): # Test with all defaults. df = gendat() orig = df.copy() mx = pd.notnull(df) imp_data = mice.MICEData(df) nrow, ncol = df.shape assert_allclose(imp_data.ix_miss['x1'], np.arange(60)) assert_allclose(imp_data.ix_obs['x1'], np.arange(60, 200)) assert_allclose(imp_data.ix_miss['x2'], np.arange(40)) assert_allclose(imp_data.ix_miss['x3'], np.arange(10, 30, 2)) assert_allclose(imp_data.ix_obs['x3'], np.concatenate((np.arange(10), np.arange(11, 30, 2), np.arange(30, 200)))) assert_equal([set(imp_data.data[col]) for col in imp_data.data], [set(df[col].dropna()) for col in df]) for k in range(3): imp_data.update_all() assert_equal(imp_data.data.shape[0], nrow) assert_equal(imp_data.data.shape[1], ncol) assert_allclose(orig[mx], imp_data.data[mx]) assert_equal([set(imp_data.data[col]) for col in imp_data.data], [set(df[col].dropna()) for col in df]) fml = 'x1 ~ x2 + x3 + x4 + x5 + y' assert_equal(imp_data.conditional_formula['x1'], fml) assert_equal(imp_data._cycle_order, ['x5', 'x3', 'x4', 'y', 'x2', 'x1']) # Should make a copy assert(not (df is imp_data.data)) (endog_obs, exog_obs, exog_miss, predict_obs_kwds, predict_miss_kwds) = imp_data.get_split_data('x3') assert_equal(len(endog_obs), 190) assert_equal(exog_obs.shape, [190, 6]) assert_equal(exog_miss.shape, [10, 6]) def test_settingwithcopywarning(self): "Test that MICEData does not throw a SettingWithCopyWarning when imputing (https://github.com/statsmodels/statsmodels/issues/5430)" df = gendat() # There need to be some ints in here for the error to be thrown df['intcol'] = np.arange(len(df)) df['intcol'] = df.intcol.astype('int32') miceData = mice.MICEData(df) with pd.option_context('mode.chained_assignment', 'warn'): with warnings.catch_warnings(record=True) as ws: warnings.simplefilter('always') miceData.update_all() assert len(ws) == 0 def test_next_sample(self): df = gendat() imp_data = mice.MICEData(df) all_x = [] for j in range(2): x = imp_data.next_sample() assert(isinstance(x, pd.DataFrame)) assert_equal(df.shape, x.shape) all_x.append(x) # The returned dataframes are all the same object assert(all_x[0] is all_x[1]) def test_pertmeth(self): # Test with specified perturbation method. df = gendat() orig = df.copy() mx = pd.notnull(df) nrow, ncol = df.shape for pert_meth in "gaussian", "boot": imp_data = mice.MICEData(df, perturbation_method=pert_meth) for k in range(2): imp_data.update_all() assert_equal(imp_data.data.shape[0], nrow) assert_equal(imp_data.data.shape[1], ncol) assert_allclose(orig[mx], imp_data.data[mx]) assert_equal(imp_data._cycle_order, ['x5', 'x3', 'x4', 'y', 'x2', 'x1']) def test_phreg(self): np.random.seed(8742) n = 300 x1 = np.random.normal(size=n) x2 = np.random.normal(size=n) event_time = np.random.exponential(size=n) * np.exp(x1) obs_time = np.random.exponential(size=n) time = np.where(event_time < obs_time, event_time, obs_time) status = np.where(time == event_time, 1, 0) df = pd.DataFrame({"time": time, "status": status, "x1": x1, "x2": x2}) df.loc[10:40, 'time'] = np.nan df.loc[10:40, 'status'] = np.nan df.loc[30:50, 'x1'] = np.nan df.loc[40:60, 'x2'] = np.nan from statsmodels.duration.hazard_regression import PHReg # Save the dataset size at each iteration. hist = [] def cb(imp): hist.append(imp.data.shape) for pm in "gaussian", "boot": idata = mice.MICEData(df, perturbation_method=pm, history_callback=cb) idata.set_imputer("time", "0 + x1 + x2", model_class=PHReg, init_kwds={"status": mice.PatsyFormula("status")}, predict_kwds={"pred_type": "hr"}, perturbation_method=pm) x = idata.next_sample() assert(isinstance(x, pd.DataFrame)) assert(all([val == (299, 4) for val in hist])) def test_set_imputer(self): # Test with specified perturbation method. from statsmodels.regression.linear_model import RegressionResultsWrapper from statsmodels.genmod.generalized_linear_model import GLMResultsWrapper df = gendat() orig = df.copy() mx = pd.notnull(df) nrow, ncol = df.shape imp_data = mice.MICEData(df) imp_data.set_imputer('x1', 'x3 + x4 + x3*x4') imp_data.set_imputer('x2', 'x4 + I(x5**2)') imp_data.set_imputer('x3', model_class=sm.GLM, init_kwds={"family": sm.families.Binomial()}) imp_data.update_all() assert_equal(imp_data.data.shape[0], nrow) assert_equal(imp_data.data.shape[1], ncol) assert_allclose(orig[mx], imp_data.data[mx]) for j in range(1, 6): if j == 3: assert_equal(isinstance(imp_data.models['x3'], sm.GLM), True) assert_equal(isinstance(imp_data.models['x3'].family, sm.families.Binomial), True) assert_equal(isinstance(imp_data.results['x3'], GLMResultsWrapper), True) else: assert_equal(isinstance(imp_data.models['x%d' % j], sm.OLS), True) assert_equal(isinstance(imp_data.results['x%d' % j], RegressionResultsWrapper), True) fml = 'x1 ~ x3 + x4 + x3*x4' assert_equal(imp_data.conditional_formula['x1'], fml) fml = 'x4 ~ x1 + x2 + x3 + x5 + y' assert_equal(imp_data.conditional_formula['x4'], fml) assert_equal(imp_data._cycle_order, ['x5', 'x3', 'x4', 'y', 'x2', 'x1']) @pytest.mark.matplotlib def test_plot_missing_pattern(self, close_figures): df = gendat() imp_data = mice.MICEData(df) for row_order in "pattern", "raw": for hide_complete_rows in False, True: for color_row_patterns in False, True: plt.clf() fig = imp_data.plot_missing_pattern(row_order=row_order, hide_complete_rows=hide_complete_rows, color_row_patterns=color_row_patterns) close_or_save(pdf, fig) close_figures() @pytest.mark.matplotlib def test_plot_bivariate(self, close_figures): df = gendat() imp_data = mice.MICEData(df) imp_data.update_all() plt.clf() for plot_points in False, True: fig = imp_data.plot_bivariate('x2', 'x4', plot_points=plot_points) fig.get_axes()[0].set_title('plot_bivariate') close_or_save(pdf, fig) close_figures() @pytest.mark.matplotlib def test_fit_obs(self, close_figures): df = gendat() imp_data = mice.MICEData(df) imp_data.update_all() plt.clf() for plot_points in False, True: fig = imp_data.plot_fit_obs('x4', plot_points=plot_points) fig.get_axes()[0].set_title('plot_fit_scatterplot') close_or_save(pdf, fig) close_figures() @pytest.mark.matplotlib def test_plot_imputed_hist(self, close_figures): df = gendat() imp_data = mice.MICEData(df) imp_data.update_all() plt.clf() for plot_points in False, True: fig = imp_data.plot_imputed_hist('x4') fig.get_axes()[0].set_title('plot_imputed_hist') close_or_save(pdf, fig) close_figures() class TestMICE(object): def test_MICE(self): df = gendat() imp_data = mice.MICEData(df) mi = mice.MICE("y ~ x1 + x2 + x1:x2", sm.OLS, imp_data) result = mi.fit(1, 3) assert(issubclass(result.__class__, mice.MICEResults)) # Smoke test for results smr = result.summary() def test_MICE1(self): df = gendat() imp_data = mice.MICEData(df) mi = mice.MICE("y ~ x1 + x2 + x1:x2", sm.OLS, imp_data) from statsmodels.regression.linear_model import RegressionResultsWrapper for j in range(3): x = mi.next_sample() assert(issubclass(x.__class__, RegressionResultsWrapper)) def test_MICE1_regularized(self): df = gendat() imp = mice.MICEData(df, perturbation_method='boot') imp.set_imputer('x1', 'x2 + y', fit_kwds={'alpha': 1, 'L1_wt': 0}) imp.update_all() def test_MICE2(self): from statsmodels.genmod.generalized_linear_model import GLMResultsWrapper df = gendat() imp_data = mice.MICEData(df) mi = mice.MICE("x3 ~ x1 + x2", sm.GLM, imp_data, init_kwds={"family": sm.families.Binomial()}) for j in range(3): x = mi.next_sample() assert(isinstance(x, GLMResultsWrapper)) assert(isinstance(x.family, sm.families.Binomial)) @pytest.mark.slow def test_combine(self): np.random.seed(3897) x1 = np.random.normal(size=300) x2 = np.random.normal(size=300) y = x1 + x2 + np.random.normal(size=300) x1[0:100] = np.nan x2[250:] = np.nan df = pd.DataFrame({"x1": x1, "x2": x2, "y": y}) idata = mice.MICEData(df) mi = mice.MICE("y ~ x1 + x2", sm.OLS, idata, n_skip=20) result = mi.fit(10, 20) fmi = np.asarray([0.1778143, 0.11057262, 0.29626521]) assert_allclose(result.frac_miss_info, fmi, atol=1e-5) params = np.asarray([-0.03486102, 0.96236808, 0.9970371]) assert_allclose(result.params, params, atol=1e-5) tvalues = np.asarray([-0.54674776, 15.28091069, 13.61359403]) assert_allclose(result.tvalues, tvalues, atol=1e-5) def test_micedata_miss1(): # test for #4375 np.random.seed(0) data = pd.DataFrame(np.random.rand(50, 4)) data.columns = ['var1', 'var2', 'var3', 'var4'] # one column with a single missing value data.iloc[1, 1] = np.nan data.iloc[[1, 3], 2] = np.nan data_imp = mice.MICEData(data) data_imp.update_all() assert_equal(data_imp.data.isnull().values.sum(), 0) ix_miss = {'var1': np.array([], dtype=np.int64), 'var2': np.array([1], dtype=np.int64), 'var3': np.array([1, 3], dtype=np.int64), 'var4': np.array([], dtype=np.int64)} for k in ix_miss: assert_equal(data_imp.ix_miss[k], ix_miss[k])
{ "content_hash": "467b0fe7017d23c1408bd3d6b59b0069", "timestamp": "", "source": "github", "line_count": 395, "max_line_length": 139, "avg_line_length": 31.453164556962026, "alnum_prop": 0.5540083708950418, "repo_name": "jseabold/statsmodels", "id": "40492d2fec31404c8838ad52b70ab8c53bac46bd", "size": "12424", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "statsmodels/imputation/tests/test_mice.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AGS Script", "bytes": "457842" }, { "name": "Assembly", "bytes": "10509" }, { "name": "Batchfile", "bytes": "351" }, { "name": "C", "bytes": "12088" }, { "name": "HTML", "bytes": "148470" }, { "name": "Matlab", "bytes": "1383" }, { "name": "Python", "bytes": "8609450" }, { "name": "R", "bytes": "34228" }, { "name": "Stata", "bytes": "41179" } ], "symlink_target": "" }
@interface UIWindow (Doorbell) @end
{ "content_hash": "10363bc98494f2102bacfa106faeff63", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 30, "avg_line_length": 12.333333333333334, "alnum_prop": 0.7567567567567568, "repo_name": "doorbell/ios-sdk", "id": "e4798a3d92d9cb34793f0ae25b0ace055d462d08", "size": "62", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Classes/UIWindow+Doorbell.h", "mode": "33188", "license": "mit", "language": [ { "name": "Objective-C", "bytes": "53359" }, { "name": "Ruby", "bytes": "934" }, { "name": "Swift", "bytes": "487" } ], "symlink_target": "" }
This is the API documentation of the Stormpath SDK Node.js module/package. [Stormpath](https://www.stormpath.com) is a cloud-hosted user management service that automates best-in-class user security for your applications so you can ship your application faster and more securely. It provides applications safe user account and group/role management, authentication, best-practices password security, access control, automated security workflows like user registration, account email verification and password resets, social login with services like Facebook and Google Apps, secure sync for on-premise LDAP and Active Directory accounts, custom user and group data, and much more. ## <a name="install"></a>Install npm install stormpath ## <a name="quickstart"></a>Quickstart This quickstart assumes you have [signed up for Stormpath](http://docs.stormpath.com/rest/quickstart/#sign-up-for-stormpath), [downloaded your API Key file](http://docs.stormpath.com/rest/quickstart/#get-an-api-key), and saved it to `$HOME/.stormpath/apiKey.properties` ### Create a Stormpath Client The Stormpath `Client` object is your starting point for all interactions with the Stormpath REST API. You can create (and customize) the Stormpath client in a number of ways, but at a bare minimum you need to specify your Stormpath API Key. You can do this easily in one of two ways: * Reference your downloaded `apiKey.properties` file: ```javascript var stormpath = require('stormpath'); //Reference apiKey.properties in the process user's home dir. Works on both Windows and *nix systems: var homeDir = process.env[(process.platform === 'win32' ? 'USERPROFILE' : 'HOME')]; var apiKeyFilePath = homeDir + '/.stormpath/apiKey.properties'; var client = null; //available after the ApiKey file is asynchronously loaded from disk stormpath.loadApiKey(apiKeyFilePath, function apiKeyFileLoaded(err, apiKey) { if (err) throw err; client = new stormpath.Client({apiKey: apiKey}); }); ``` * Create an ApiKey object manually ```javascript var stormpath = require('stormpath'); //In this example, we'll reference the values from env vars (NEVER HARDCODE API KEY VALUES IN SOURCE CODE!) var apiKey = new stormpath.ApiKey(process.env['STORMPATH_API_KEY_ID'], process.env['STORMPATH_API_KEY_SECRET']); var client = new stormpath.Client({apiKey: apiKey}); ``` ### List Your Applications and Directories ```javascript client.getApplications(function(err, apps) { if (err) throw err; apps.each(function(err, app, offset) { //offset is an optional argument console.log(offset + ": " + app); }); }); //showing optional options argument (the callback function is always the last arg): client.getDirectories({expand: 'groups'}, function(err, dirs) { if (err) throw err; dirs.each(function(err, dir) { console.log(dir); }); }); ``` ### Retrieve a specific Application, Directory, Account, Group or GroupMembership: If you know a resource's `href`, you can retrieve it directly: ```javascript client.getApplication('https://api.stormpath.com/v1/applications/LYENsku3RYatufdNHL0d2', callback); client.getDirectory('https://api.stormpath.com/v1/directories/LYN1zLGlGV0qxVu7Cwg4C', callback); client.getAccount('https://api.stormpath.com/v1/groups/1NB5Ymg9Gh9WATB54MoIai', callback); client.getGroup('https://api.stormpath.com/v1/groups/2gdhVFXQMTpoUHAHzCXbn4', callback); client.getGroupMembership('https://api.stormpath.com/v1/groupMemberships/2ObFs1E4AB0LlqxxLtzlgi', callback); ``` `callback` accepts two arguments: an `Error` object, followed by the resource returned, for example: ```javascript client.getApplication(appHref, function (err, application) { console.log(application); }); ``` ### Create an Application Registering your Application with Stormpath is as easy as creating a new `Application` record: ```javascript var app = { name: 'My Awesome Application!', description: 'No, Srsly. It\'s Awesome.' }; client.createApplication(app, {createDirectory:true}, function onAppCreated(err, createdApp) { if (err) throw err; console.log(createdApp); }); ``` Did you see the optional options argument we specified: `{createDirectory:true}`? This will automatically create a new `Directory` to store all accounts and groups for that Application and assign it to the Application. For more advanced use cases, you can omit the `options` argument and set up different account stores for your Application later, for example: ```javascript var app = { name: 'My Awesome Application!', description: 'No, Srsly. It\'s Awesome.' }; client.createApplication(app, function onAppCreated(err, createdApp) { if (err) throw err; console.log(createdApp); }); ``` ### Create an Application Account Now that you've created an Application (and assigned it a Directory), you an add a user account! ```javascript var account = { givenName: 'Jean-Luc', surname: 'Picard', username: 'jlpicard', email: 'jlpicard@starfleet.com', password: 'Changeme1!' }; createdApp.createAccount(account, function onAccountCreated(err, createdAccount) { if (err) throw err; console.log(createdAccount); }); ``` ### Update an Account Change the fields you want and then call `save`: ```javascript createdAccount.middleName = 'Make it so.'; createdAccount.save(function onSave(err, savedAccount) { if (err) throw err; console.log(savedAccount); }); ``` ### Authenticate an Account You can authenticate an account during login: ```javascript var authcRequest = { username: 'jlpicard', //username can be an email address too password: 'Changeme1!' }; createdApp.authenticateAccount(authcRequest, function onAuthcResult(err, result) { if (err) throw err; //if successful, you can obtain the account by calling result.getAccount: return result.getAccount(function(err2, account) { //this is cached and will execute immediately (no server request): if(err) throw err; console.log(account); }); }; ``` ### Send a Password Reset Email If your end-user forgets their password, you can trigger the 'forgot password' reset workflow, and we'll send the email: ```javascript var emailOrUsername = 'jlpicard'; //or we could have entered 'jlpicard@starfleet.com'; createdApp.sendPasswordResetEmail(emailOrUsername, function onEmailSent(err, token) { if (err) throw err; console.log(token); }); ``` ### Create a Group In Stormpath, the best way to think about roles and permissions is with [Groups](http://docs.stormpath.com/rest/product-guide/#groups). Groups allow you to categorize Accounts and build complex permission systems. Creating a new Group is easy: ```javascript var group = {name: 'Administrators'} createdApp.createGroup(group, onGroupCreation(err, createdGroup) { if (err) throw err; console.log(createdGroup); }); ``` ### Add an Account to a Group: You can do this easily two ways: by interacting with the account or by interacting with the group: ```javascript //via the account //groupOrGroupHref may be the actual group or the group's href: account.addToGroup(groupOrGroupHref, onMembershipCreated(err, membership) { if (err) throw err; //membership is a GroupMembership resource that represents the pairing of the group to the account: console.log(membership); }); //via the group: group.addAccount(accountOrAccountHref, onMembershipCreated(err, membership) { if (err) throw err; //membership is a GroupMembership resource that represents the pairing of the group to the account: console.log(membership); }); ``` ### Retrieve an Account's Groups It is often useful to obtain an Account's Groups so you can perform access control - for example, see if an account is in the 'Administrators' group before allowing them to see certain data: ```javascript account.getGroups(function onGroups(err, groups) { if (err) throw err; groups.each(function(err, group) { if (group.name === 'Administrators') { console.log('We have an administrator!'); } }); }); ```
{ "content_hash": "71cab3e54cfe9423d21ab48756c06cb1", "timestamp": "", "source": "github", "line_count": 242, "max_line_length": 400, "avg_line_length": 33.231404958677686, "alnum_prop": 0.7394926635165382, "repo_name": "robertjd/stormpath-sdk-node", "id": "d1a9001b8e262cd920483182d7771dc2053ad092", "size": "8067", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "docs/app/views/main.md", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "4566" }, { "name": "JavaScript", "bytes": "252167" } ], "symlink_target": "" }
import { Drug } from './../drug'; import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'app-drug-form', moduleId: module.id, templateUrl: './drug-consumable-form.component.html', styleUrls: ['./drug-consumable-form.component.css'] }) export class DrugConsumableForm implements OnInit { @Input() model: Drug; @Output() formSubmitted: EventEmitter<Drug> = new EventEmitter(); submitted = false; constructor() { } ngOnInit() { } onSubmit() { this.submitted = true; this.formSubmitted.emit(this.model); } }
{ "content_hash": "1ee54958b74c29283b2199b5595c2223", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 79, "avg_line_length": 22.807692307692307, "alnum_prop": 0.6728499156829679, "repo_name": "talhaHavadar/emergency-service", "id": "d4f3af6ac6889ade5b4b9509d6e24b0ada0a6861", "size": "593", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/components/drug-consumables/drug-consumable-form/drug-consumable-form.component.ts", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "520" }, { "name": "HTML", "bytes": "101765" }, { "name": "JavaScript", "bytes": "52312" }, { "name": "TypeScript", "bytes": "108268" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML><HEAD><TITLE>Man page of ASPRINTF</TITLE> </HEAD><BODY> <H1>ASPRINTF</H1> Section: Linux Programmer's Manual (3)<BR>Updated: 2013-06-21<BR><A HREF="#index">Index</A> <A HREF="../index.html">Return to Main Contents</A><HR> <A NAME="lbAB">&nbsp;</A> <H2>NAME</H2> asprintf, vasprintf - print to allocated string <A NAME="lbAC">&nbsp;</A> <H2>SYNOPSIS</H2> <B>#define _GNU_SOURCE</B> /* See <A HREF="../man7/feature_test_macros.7.html">feature_test_macros</A>(7) */ <BR> <B>#include &lt;<A HREF="file:///usr/include/stdio.h">stdio.h</A>&gt;</B> <P> <B>int asprintf(char **</B><I>strp</I><B>, const char *</B><I>fmt</I><B>, ...);</B> <P> <B>int vasprintf(char **</B><I>strp</I><B>, const char *</B><I>fmt</I><B>, va_list </B><I>ap</I><B>);</B> <A NAME="lbAD">&nbsp;</A> <H2>DESCRIPTION</H2> The functions <B>asprintf</B>() and <B>vasprintf</B>() are analogs of <B><A HREF="../man3/sprintf.3.html">sprintf</A></B>(3) and <B><A HREF="../man3/vsprintf.3.html">vsprintf</A></B>(3), except that they allocate a string large enough to hold the output including the terminating null byte ('\0'), and return a pointer to it via the first argument. This pointer should be passed to <B><A HREF="../man3/free.3.html">free</A></B>(3) to release the allocated storage when it is no longer needed. <A NAME="lbAE">&nbsp;</A> <H2>RETURN VALUE</H2> When successful, these functions return the number of bytes printed, just like <B><A HREF="../man3/sprintf.3.html">sprintf</A></B>(3). If memory allocation wasn't possible, or some other error occurs, these functions will return -1, and the contents of <I>strp</I> is undefined. <A NAME="lbAF">&nbsp;</A> <H2>CONFORMING TO</H2> These functions are GNU extensions, not in C or POSIX. They are also available under *BSD. The FreeBSD implementation sets <I>strp</I> to NULL on error. <A NAME="lbAG">&nbsp;</A> <H2>SEE ALSO</H2> <B><A HREF="../man3/free.3.html">free</A></B>(3), <B><A HREF="../man3/malloc.3.html">malloc</A></B>(3), <B><A HREF="../man3/printf.3.html">printf</A></B>(3) <P> <HR> <A NAME="index">&nbsp;</A><H2>Index</H2> <DL> <DT><A HREF="#lbAB">NAME</A><DD> <DT><A HREF="#lbAC">SYNOPSIS</A><DD> <DT><A HREF="#lbAD">DESCRIPTION</A><DD> <DT><A HREF="#lbAE">RETURN VALUE</A><DD> <DT><A HREF="#lbAF">CONFORMING TO</A><DD> <DT><A HREF="#lbAG">SEE ALSO</A><DD> </DL> <HR> This document was created by <A HREF="/cgi-bin/man/man2html">man2html</A>, using the manual pages.<BR> Time: 02:55:18 GMT, September 18, 2014 </BODY> </HTML>
{ "content_hash": "eb362b6d1018e1c576973a3dba285e53", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 116, "avg_line_length": 26.45360824742268, "alnum_prop": 0.6453624318004677, "repo_name": "cs-education/sysassets", "id": "66d00990a2850c7530a1070b8c3eb9deb794e530", "size": "2566", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "man_pages/html/man3/asprintf.3.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "903770" }, { "name": "C++", "bytes": "68176" }, { "name": "HTML", "bytes": "7310436" }, { "name": "Logos", "bytes": "8558" }, { "name": "M4", "bytes": "116840" }, { "name": "Makefile", "bytes": "15176" }, { "name": "Objective-C", "bytes": "387" }, { "name": "Perl", "bytes": "256223" }, { "name": "Python", "bytes": "272243" }, { "name": "Ruby", "bytes": "678737" }, { "name": "Shell", "bytes": "157747" }, { "name": "Tcl", "bytes": "18233" }, { "name": "Vim script", "bytes": "154154" }, { "name": "XC", "bytes": "8205" }, { "name": "XS", "bytes": "8065" } ], "symlink_target": "" }
package com.uservoice.uservoicesdk.ui; import android.annotation.SuppressLint; import android.support.v4.app.FragmentActivity; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import com.uservoice.uservoicesdk.R; import com.uservoice.uservoicesdk.Session; import com.uservoice.uservoicesdk.babayaga.Babayaga; import com.uservoice.uservoicesdk.babayaga.Babayaga.Event; import com.uservoice.uservoicesdk.flow.SigninManager; import com.uservoice.uservoicesdk.model.Category; import com.uservoice.uservoicesdk.model.Suggestion; import java.util.ArrayList; import java.util.List; public class PostIdeaAdapter extends InstantAnswersAdapter { private static int DESCRIPTION = 8; private static int CATEGORY = 9; private static int HELP = 10; private static int TEXT_HEADING = 11; private Spinner categorySelect; private EditText descriptionField; public PostIdeaAdapter(FragmentActivity context) { super(context); continueButtonMessage = R.string.uv_post_idea_continue_button; } @Override public int getViewTypeCount() { return super.getViewTypeCount() + 4; } @Override protected List<Integer> getDetailRows() { List<Integer> rows = new ArrayList<Integer>(); rows.add(DESCRIPTION); if (Session.getInstance().getForum().getCategories().size() > 0) rows.add(CATEGORY); rows.add(SPACE); rows.add(EMAIL_FIELD); rows.add(NAME_FIELD); return rows; } @Override protected List<Integer> getRows() { List<Integer> rows = super.getRows(); rows.add(0, TEXT_HEADING); if (state == State.DETAILS) rows.add(HELP); return rows; } @Override @SuppressLint("CutPasteId") public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; int type = getItemViewType(position); if (view == null) { if (type == DESCRIPTION) { view = inflater.inflate(R.layout.uv_text_field_item, null); TextView title = (TextView) view.findViewById(R.id.uv_header_text); descriptionField = (EditText) view.findViewById(R.id.uv_text_field); title.setText(R.string.uv_idea_description_heading); descriptionField.setHint(R.string.uv_idea_description_hint); } else if (type == CATEGORY) { view = inflater.inflate(R.layout.uv_select_field_item, null); TextView title = (TextView) view.findViewById(R.id.uv_header_text); categorySelect = (Spinner) view.findViewById(R.id.uv_select_field); categorySelect.setAdapter(new SpinnerAdapter<Category>(context, Session.getInstance().getForum().getCategories())); title.setText(R.string.uv_category); } else if (type == HELP) { view = inflater.inflate(R.layout.uv_idea_help_item, null); } else if (type == TEXT_HEADING) { view = inflater.inflate(R.layout.uv_header_item, null); TextView textView = (TextView) view.findViewById(R.id.uv_header_text); textView.setText(R.string.uv_idea_text_heading); } else { view = super.getView(position, convertView, parent); } } if (type == DESCRIPTION || type == CATEGORY || type == HELP || type == TEXT_HEADING) { // just skip the else } else if (type == TEXT) { TextView textView = (TextView) view.findViewById(R.id.uv_text); textView.setHint(R.string.uv_idea_text_hint); textView.setMinLines(1); } else { return super.getView(position, view, parent); } return view; } @Override protected void doSubmit() { SigninManager.signIn(context, emailField.getText().toString(), nameField.getText().toString(), new Runnable() { @Override public void run() { Category category = categorySelect == null ? null : (Category) categorySelect.getSelectedItem(); Suggestion.createSuggestion(Session.getInstance().getForum(), category, textField.getText().toString(), descriptionField.getText().toString(), 1, new DefaultCallback<Suggestion>(context) { @Override public void onModel(Suggestion model) { Babayaga.track(Event.SUBMIT_IDEA); Toast.makeText(context, R.string.uv_msg_idea_created, Toast.LENGTH_SHORT).show(); context.finish(); } }); } }); } @Override protected String getSubmitString() { return context.getString(R.string.uv_submit_idea); } }
{ "content_hash": "f7a09c3b6e70eacba786782b2c856de7", "timestamp": "", "source": "github", "line_count": 128, "max_line_length": 204, "avg_line_length": 38.8125, "alnum_prop": 0.624194847020934, "repo_name": "goodev/android-discourse", "id": "e57f95021c2022e644d200e7236fd7dcf72e884c", "size": "4968", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "userVoiceSDK/src/main/java/com/uservoice/uservoicesdk/ui/PostIdeaAdapter.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "369" }, { "name": "HTML", "bytes": "3559" }, { "name": "Java", "bytes": "2300015" } ], "symlink_target": "" }
require 'rails_helper' # Specs in this file have access to a helper object that includes # the Admin::AsssetsHelper. For example: # # describe Admin::AsssetsHelper do # describe "string concat" do # it "concats two strings with spaces" do # expect(helper.concat_strings("this","that")).to eq("this that") # end # end # end module Patchwork RSpec.describe Admin::AsssetsHelper, :type => :helper do pending "add some examples to (or delete) #{__FILE__}" end end
{ "content_hash": "801d14400c5d4f4c98e04cfd4ea8b7db", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 71, "avg_line_length": 28.647058823529413, "alnum_prop": 0.6899383983572895, "repo_name": "onceatime/patchwork", "id": "44be83aaf9e786e2a23834e403d941d20da41025", "size": "487", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/helpers/patchwork/admin/asssets_helper_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "18263" }, { "name": "HTML", "bytes": "41978" }, { "name": "JavaScript", "bytes": "44080" }, { "name": "Ruby", "bytes": "56167" } ], "symlink_target": "" }
<?php /** * Generate a thumbnail * * @var modX $this->modx * @var array $scriptProperties * * @package modx * @subpackage processors.system */ class modSystemPhpThumbProcessor extends modProcessor { /** @var modPhpThumb $phpThumb */ public $phpThumb; /** @var modMediaSource|modFileMediaSource $source */ public $source; public function initialize() { $this->setDefaultProperties(array( 'wctx' => $this->modx->context->get('key'), 'src' => '', 'source' => 1, )); $this->modx->getService('fileHandler','modFileHandler','',array( 'context' => $this->getProperty('wctx') )); error_reporting(E_ALL); return true; } /** * {@inheritDoc} * * @return mixed */ public function process() { $src = $this->getProperty('src'); if (empty($src)) return $this->failure(); $this->unsetProperty('src'); $this->getSource($this->getProperty('source')); if (empty($this->source)) $this->failure($this->modx->lexicon('source_err_nf')); $src = $this->source->prepareSrcForThumb($src); if (empty($src)) return ''; $this->loadPhpThumb(); /* set source and generate thumbnail */ $this->phpThumb->set($src); /* check to see if there's a cached file of this already */ if ($this->phpThumb->checkForCachedFile()) { $this->phpThumb->loadCache(); return ''; } /* generate thumbnail */ $this->phpThumb->generate(); /* cache the thumbnail and output */ $this->phpThumb->cache(); $this->phpThumb->output(); return ''; } /** * Get the source to load the paths from * * @param int $sourceId * @return modMediaSource|modFileMediaSource */ public function getSource($sourceId) { /** @var modMediaSource|modFileMediaSource $source */ $this->modx->loadClass('sources.modMediaSource'); $this->source = modMediaSource::getDefaultSource($this->modx,$sourceId,false); if (empty($this->source)) return false; if (!$this->source->getWorkingContext()) { return false; } $this->source->setRequestProperties($this->getProperties()); $this->source->initialize(); return $this->source; } /** * Attempt to load modPhpThumb * * @return bool|modPhpThumb */ public function loadPhpThumb() { if (!$this->modx->loadClass('modPhpThumb',$this->modx->getOption('core_path').'model/phpthumb/',true,true)) { $this->modx->log(modX::LOG_LEVEL_ERROR,'Could not load modPhpThumb class.'); return false; } $this->phpThumb = new modPhpThumb($this->modx,$this->getProperties()); /* do initial setup */ $this->phpThumb->initialize(); return $this->phpThumb; } } return 'modSystemPhpThumbProcessor';
{ "content_hash": "fdd6232c15f081f02ca5c5c518507775", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 117, "avg_line_length": 29.184466019417474, "alnum_prop": 0.5652029274783765, "repo_name": "raadhuis/modx-basic", "id": "3adbd8576b7f764044edcc3713121d7513578d61", "size": "3006", "binary": false, "copies": "7", "ref": "refs/heads/master", "path": "core/model/modx/processors/system/phpthumb.class.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "555406" }, { "name": "Erlang", "bytes": "1712" }, { "name": "HTML", "bytes": "355501" }, { "name": "Java", "bytes": "14870" }, { "name": "JavaScript", "bytes": "2601562" }, { "name": "PHP", "bytes": "20682210" }, { "name": "SQLPL", "bytes": "4547" }, { "name": "Shell", "bytes": "1345" }, { "name": "Smarty", "bytes": "382369" } ], "symlink_target": "" }
''' Introduction to pandas ======================= Quick script to install dependencies and start the notebook server in the current directory. ''' import subprocess try: hasattr(raw_input, '__call__') input = raw_input except: pass pkgs = ['numpy', 'scipy', 'pandas', 'jupyter', 'notebook', 'ipython', 'matplotlib', 'seaborn', 'numba'] def install_pkgs(using='pip'): ''' pip install pkgs ''' cmd = [using, 'install'] if using == 'pip': cmd += pkgs + ['tables'] else: cmd += ['-y'] + pkgs + ['pytables'] subprocess.run(cmd) def start_notebook(): ''' Starts a jupyter notebook server in the current directory ''' subprocess.run(['jupyter', 'notebook']) if __name__ == '__main__': response = input('This script will install some dependencies. Continue [pip/conda/anaconda] (default: pip): ') if response is '' or response == 'pip': install_pkgs() elif response == 'conda': install_pkgs('conda') elif response == 'anaconda': install_pkgs('anaconda') else: raise Exception('Unknown option {0}'.format(response)) start_notebook()
{ "content_hash": "0630c8be67c098c659e7bdbde892b2d4", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 114, "avg_line_length": 23.56, "alnum_prop": 0.5831918505942275, "repo_name": "alexvmarch/pandas_intro", "id": "4cb5350c13dea3b93ee61a7e68df188e566c725c", "size": "1201", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "run.py", "mode": "33188", "license": "mit", "language": [ { "name": "Jupyter Notebook", "bytes": "39708" }, { "name": "Python", "bytes": "9374" } ], "symlink_target": "" }
import { Component } from 'react'; interface LoaderOptions { lines?: number; length?: number; width?: number; radius?: number; scale?: number; corners?: number; color?: string; opacity?: number; rotate?: number; direction?: number; speed?: number; trail?: number; fps?: number; zIndex?: number; top?: string; left?: string; shadow?: boolean; hwaccel?: boolean; position?: string; loadedClassName?: string; } interface LoaderProps extends LoaderOptions { loaded: boolean; options?: LoaderOptions; className?: string; } declare class ReactLoader extends Component<LoaderProps, any> { } declare namespace ReactLoader { } export = ReactLoader;
{ "content_hash": "39a7410976ba96e5a3a90db014f3e399", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 64, "avg_line_length": 17.605263157894736, "alnum_prop": 0.7115097159940209, "repo_name": "GiedriusGrabauskas/DefinitelyTyped", "id": "89d28e2e5d1f601a6648661b3d9f8189e2ff81db", "size": "898", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "types/react-loader/index.d.ts", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "1193" }, { "name": "TypeScript", "bytes": "25256981" } ], "symlink_target": "" }
require 'spec_helper_acceptance' describe 'curator class' do context 'defaults' do if fact('osfamily') == 'RedHat' it 'adds epel to and installs pip' do pp = "class { 'epel': }" apply_manifest(pp, :catch_failures => true) shell("yum -y install python-pip") # Hack for EL7-based machines -- https://tickets.puppetlabs.com/browse/PUP-3829 if fact('operatingsystemmajrelease').to_i > 6 shell('ln -s /bin/pip /bin/pip-python') end end end if fact('osfamily') == 'Debian' it 'installs pip' do shell("apt-get -y install python-pip") end end it 'should work idempotently with no errors' do pp = <<-EOS class { 'curator': } EOS # Run it twice and test for idempotency apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end describe command('which curator') do its(:exit_status) { should eq 0 } end end end
{ "content_hash": "313187dc58bef75f24bec0635e1cc35e", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 87, "avg_line_length": 27.243243243243242, "alnum_prop": 0.5922619047619048, "repo_name": "jlambert121/jlambert121-curator", "id": "32c1b7583c03ec2aee9fd73052216aa8c3aa1814", "size": "1008", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "spec/acceptance/class_spec.rb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Puppet", "bytes": "13641" }, { "name": "Ruby", "bytes": "19330" } ], "symlink_target": "" }
<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" id="funcsynopsis.decoration"> <refmeta> <refentrytitle>funcsynopsis.decoration</refentrytitle> <refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> <refname>funcsynopsis.decoration</refname> <refpurpose>Decorate elements of a FuncSynopsis?</refpurpose> </refnamediv> <refsynopsisdiv> <src:fragment id='funcsynopsis.decoration.frag'><xsl:param name="funcsynopsis.decoration" select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> <para>If true (non-zero), elements of the FuncSynopsis will be decorated (e.g. bold or italic). The decoration is controlled by functions that can be redefined in a customization layer. </para> </refsect1> </refentry>
{ "content_hash": "2b5353e8f8046dd5936e45e759f2a55b", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 117, "avg_line_length": 33.2, "alnum_prop": 0.7578313253012048, "repo_name": "conormcd/exemplar", "id": "be088ff3982584a24fdd4cfc431ce528218233c5", "size": "830", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "lib/docbook-xsl/params/funcsynopsis.decoration.xml", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Java", "bytes": "1609415" }, { "name": "JavaScript", "bytes": "89405" }, { "name": "Perl", "bytes": "2756" }, { "name": "Shell", "bytes": "27104" } ], "symlink_target": "" }
package net.fortuna.ical4j.model.property; import net.fortuna.ical4j.model.Escapable; import net.fortuna.ical4j.model.ParameterList; import net.fortuna.ical4j.model.Property; import net.fortuna.ical4j.model.PropertyFactoryImpl; import net.fortuna.ical4j.model.ValidationException; /** * $Id$ * * Created: [Apr 6, 2004] * * Defines a EXTENDED_ADDRESS iCalendar component property. * @author benf * @author Mike Douglass */ public class ExtendedAddress extends Property implements Escapable { private static final long serialVersionUID = 6506776332370144983L; private String value; /** * Default constructor. */ public ExtendedAddress() { super(EXTENDED_ADDRESS, PropertyFactoryImpl.getInstance()); } /** * @param aValue a value string for this component */ public ExtendedAddress(final String aValue) { super(EXTENDED_ADDRESS, PropertyFactoryImpl.getInstance()); setValue(aValue); } /** * @param aList a list of parameters for this component * @param aValue a value string for this component */ public ExtendedAddress(final ParameterList aList, final String aValue) { super(EXTENDED_ADDRESS, aList, PropertyFactoryImpl.getInstance()); setValue(aValue); } /** * {@inheritDoc} */ public final void validate() throws ValidationException { /* * ; the following is optional, ; and MAY occur more than once (";" xparam) */ } /** * {@inheritDoc} */ public final void setValue(final String aValue) { this.value = aValue; } /** * {@inheritDoc} */ public final String getValue() { return value; } }
{ "content_hash": "05fbbb22bc76db76849f9cbc9700f18a", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 83, "avg_line_length": 24.041666666666668, "alnum_prop": 0.6533795493934142, "repo_name": "djyf1/ical4j", "id": "4d2c24a81782ab8cf89729549053f5c867abc38e", "size": "3298", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "src/main/java/net/fortuna/ical4j/model/property/ExtendedAddress.java", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
@annotate: folktale.result.Error.prototype.bimap @annotate: folktale.result.Ok.prototype.bimap category: Transforming --- Transforms each side of a Result with a function, without changing the context of the computation. That is, Errors will still be Errors, Oks will still be Oks. ## Example:: const Result = require('folktale/result'); const inc = (x) => x + 1; const dec = (x) => x - 1; Result.Ok(1).bimap(inc, dec); // ==> Result.Ok(dec(1)) Result.Error(1).bimap(inc, dec); // ==> Result.Error(inc(1))
{ "content_hash": "c972d88516116fb05342e1c418a535a9", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 78, "avg_line_length": 24.26086956521739, "alnum_prop": 0.6397849462365591, "repo_name": "folktale/folktale", "id": "0669248ad7624401ac4c0c693fe9074eb23f2192", "size": "558", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "annotations/source/en/result/bimap.md", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "508" }, { "name": "Makefile", "bytes": "84" } ], "symlink_target": "" }
autocommit off; select price, avg(quantity), price * avg(quantity) from joe.inventory_c i, joe.product_c p where p.product_code = i.product.product_code group by price having price * avg(quantity) > $1000000; rollback;
{ "content_hash": "8f4a04ba1ca0d28ba78a058e91bb9212", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 52, "avg_line_length": 32.857142857142854, "alnum_prop": 0.7217391304347827, "repo_name": "CUBRID/cubrid-testcases", "id": "732f37f1bb5f96bd79fff31b05adbb45e8f0560c", "size": "230", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "medium/_02_xtests/cases/group15.sql", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "PLSQL", "bytes": "682246" }, { "name": "Roff", "bytes": "23262735" }, { "name": "TSQL", "bytes": "5619" }, { "name": "eC", "bytes": "710" } ], "symlink_target": "" }
package apps::monitoring::netdata::restapi::mode::memory; use base qw(centreon::plugins::templates::counter); use strict; use warnings; sub custom_usage_output { my ($self, %options) = @_; return sprintf( 'Ram total: %s %s used (-buffers/cache): %s %s (%.2f%%) free: %s %s (%.2f%%)', $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}), $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}), $self->{result_values}->{prct_used}, $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}), $self->{result_values}->{prct_free} ); } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'ram', type => 0, skipped_code => { -10 => 1 } } ]; $self->{maps_counters}->{ram} = [ { label => 'usage', nlabel => 'memory.usage.bytes', set => { key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ], closure_custom_output => $self->can('custom_usage_output'), perfdatas => [ { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1 } ] } }, { label => 'usage-free', display_ok => 0, nlabel => 'memory.free.bytes', set => { key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ], closure_custom_output => $self->can('custom_usage_output'), perfdatas => [ { template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1 } ] } }, { label => 'usage-prct', display_ok => 0, nlabel => 'memory.usage.percentage', set => { key_values => [ { name => 'prct_used' } ], output_template => 'Ram used : %.2f %%', perfdatas => [ { template => '%.2f', min => 0, max => 100, unit => '%' } ] } }, { label => 'buffer', nlabel => 'memory.buffer.bytes', set => { key_values => [ { name => 'buffers' } ], output_template => 'Buffer: %s %s', output_change_bytes => 1, perfdatas => [ { template => '%d', min => 0, unit => 'B' } ] } }, { label => 'cached', nlabel => 'memory.cached.bytes', set => { key_values => [ { name => 'cached' } ], output_template => 'Cached: %s %s', output_change_bytes => 1, perfdatas => [ { template => '%d', min => 0, unit => 'B' } ] } }, { label => 'shared', nlabel => 'memory.shared.bytes', set => { key_values => [ { name => 'memShared' } ], output_template => 'Shared: %s %s', output_change_bytes => 1, perfdatas => [ { template => '%d', min => 0, unit => 'B' } ] } } ]; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; $options{options}->add_options(arguments => { 'chart-period:s' => { name => 'chart_period', default => '300' }, 'chart-statistics:s' => { name => 'chart_statistics', default => 'average' } }); return $self; } sub manage_selection { my ($self, %options) = @_; my $result = $options{custom}->get_data( chart => 'system.ram', points => $self->{option_results}->{chart_point}, after_period => $self->{option_results}->{chart_period}, group => $self->{option_results}->{chart_statistics} ); foreach my $memory_value (@{$result->{data}}) { foreach my $memory_label (@{$result->{labels}}) { $self->{ram_data}->{$memory_label} = shift @{$memory_value}; } } my $total = $options{custom}->get_info(filter_info => 'ram_total'); my $used = $self->{ram_data}->{used} * 1024 * 1024; my $free = $self->{ram_data}->{free} * 1024 * 1024; my $prct_used = $used * 100 / $total; my $prct_free = 100 - $prct_used; my $cached = $self->{ram_data}->{cached} * 1024 * 1024; my $buffers = $self->{ram_data}->{buffers} * 1024 * 1024; $self->{ram} = { total => $total, used => $used, free => $free, prct_used => $prct_used, prct_free => $prct_free, cached => $cached, buffers => $buffers }; }; 1; __END__ =head1 MODE Check *nix based servers memory using the Netdata agent RestAPI. Example: perl centreon-plugins/centreon_plugins.pl --plugin=apps::monitoring::netdata::restapi::plugin --mode=memory --hostname=10.0.0.1 --chart-period=300 --warning-usage-prct=80 --critical-usage-prct=90 --verbose More information on 'https://learn.netdata.cloud/docs/agent/web/api'. =over 8 =item B<--chart-period> The period in seconds on which the values are calculated Default: 300 =item B<--chart-statistic> The statistic calculation method used to parse the collected data. Can be : average, sum, min, max Default: average =item B<--warning-usage> Warning threshold on used memory (in B). =item B<--critical-usage> Critical threshold on used memory (in B) =item B<--warning-usage-prct> Warning threshold on used memory (in %). =item B<--critical-usage-prct> Critical threshold on percentage used memory (in %) =item B<--warning-usage-free> Warning threshold on free memory (in B). =item B<--critical-usage-free> Critical threshold on free memory (in B) =item B<--warning-*> Warning threshold (in B) on other metrics where '*' can be: buffer,cached,shared =item B<--critical-*> Critical threshold (in B) on other metrics where '*' can be: buffer,cached,shared =back =cut
{ "content_hash": "a24651d513d5b8a929b20bf5d80d6a48", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 144, "avg_line_length": 31.329896907216494, "alnum_prop": 0.5102007239223428, "repo_name": "centreon/centreon-plugins", "id": "a8e304c03a4f1aeaeed812584ab17978162b14bc", "size": "6832", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "apps/monitoring/netdata/restapi/mode/memory.pm", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "719" }, { "name": "Perl", "bytes": "21731182" } ], "symlink_target": "" }
FROM balenalib/surface-go-debian:bookworm-build RUN apt-get update \ && apt-get install -y --no-install-recommends \ ca-certificates \ curl \ \ # .NET Core dependencies libc6 \ libgcc1 \ libgssapi-krb5-2 \ libicu67 \ libssl1.1 \ libstdc++6 \ zlib1g \ && rm -rf /var/lib/apt/lists/* # Configure web servers to bind to port 80 when present ENV ASPNETCORE_URLS=http://+:80 \ # Enable detection of running in a container DOTNET_RUNNING_IN_CONTAINER=true # Install .NET Core ENV DOTNET_VERSION 5.0.12 RUN curl -SL --output dotnet.tar.gz "https://dotnetcli.blob.core.windows.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz" \ && dotnet_sha512='32b5f86db3b1d4c21e3cf616d22f0e4a7374385dac0cf03cdebf3520dcf846460d9677ec1829a180920740a0237d64f6eaa2421d036a67f4fe9fb15d4f6b1db9' \ && echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ && mkdir -p /usr/share/dotnet \ && tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ && rm dotnet.tar.gz \ && ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet ENV ASPNETCORE_VERSION 5.0.12 RUN curl -SL --output aspnetcore.tar.gz "https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-x64.tar.gz" \ && aspnetcore_sha512='0529f23ffa651ac2c2807b70d6e5034f6ae4c88204afdaaa76965ef604d6533f9440d68d9f2cdd3a9f2ca37e9140e6c61a9f9207d430c71140094c7d5c33bf79' \ && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ && mkdir -p /usr/share/dotnet \ && tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ && rm aspnetcore.tar.gz CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/44e597e40f2010cdde15b3ba1e397aea3a5c5271/scripts/assets/tests/test-stack@dotnet.sh" \ && echo "Running test-stack@dotnet" \ && chmod +x test-stack@dotnet.sh \ && bash test-stack@dotnet.sh \ && rm -rf test-stack@dotnet.sh RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: Intel 64-bit (x86-64) \nOS: Debian Bookworm \nVariant: build variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \ndotnet 5.0-aspnet \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && cp /bin/sh /bin/sh.real \ && mv /bin/sh-shim /bin/sh
{ "content_hash": "6de0acc5570fa2e4d9df9fcf93115620", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 698, "avg_line_length": 55.839285714285715, "alnum_prop": 0.7147425647585546, "repo_name": "resin-io-library/base-images", "id": "fe0787c294ec113e7afda29361f8683a1a6560e7", "size": "3148", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "balena-base-images/dotnet/surface-go/debian/bookworm/5.0-aspnet/build/Dockerfile", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "71234697" }, { "name": "JavaScript", "bytes": "13096" }, { "name": "Shell", "bytes": "12051936" }, { "name": "Smarty", "bytes": "59789" } ], "symlink_target": "" }
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_ssl_key_cert short_description: Import/Delete SSL keys and certs from BIG-IP description: - This module imports/deletes SSL keys and certificates on a BIG-IP. Keys can be imported from key files on the local disk, in PEM format. Certificates can be imported from certificate and key files on the local disk, in PEM format. version_added: "1.6.0" options: key_content: description: - Sets the contents of a key directly to the specified value. This is used with lookup plugins, or for anything with formatting or templating. This must be provided when C(state) is C(present). type: str state: description: - When C(present), ensures the key and/or cert is uploaded to the device. When C(absent), ensures the key and/or cert is removed from the device. If the key and/or cert is currently in use, the module will not be able to remove the key. type: str choices: - present - absent default: present key_name: description: - The name of the key. type: str passphrase: description: - Passphrase on key. type: str cert_content: description: - Sets the contents of a certificate directly to the specified value. This is used with lookup plugins or for anything with formatting or - C(content) must be provided when C(state) is C(present). type: str cert_name: description: - SSL Certificate Name. This is the cert name used when importing a certificate into the BIG-IP. It also determines the filenames of the objects on the LTM. type: str issuer_cert: description: - Issuer certificate used for OCSP monitoring. - This parameter is only valid on versions of BIG-IP 13.0.0 or above. type: str partition: description: - Device partition to manage resources on. type: str default: Common extends_documentation_fragment: f5networks.f5_modules.f5 author: - Nitin Khanna (@nitinthewiz) ''' EXAMPLES = r''' - name: Import both key and cert bigip_ssl_key_cert: key_content: "{{ lookup('file', 'key.pem') }}" key_name: cert1 cert_content: "{{ lookup('file', 'cert.pem') }}" cert_name: cert1 state: present provider: password: secret server: lb.mydomain.com user: admin delegate_to: localhost ''' RETURN = r''' # only common fields returned ''' import hashlib import os import re from datetime import datetime from ansible.module_utils.basic import ( AnsibleModule, env_fallback ) from ..module_utils.bigip import F5RestClient from ..module_utils.common import ( F5ModuleError, AnsibleF5Parameters, transform_name, f5_argument_spec, fq_name, merge_two_dicts ) from ..module_utils.icontrol import ( TransactionContextManager, upload_file, tmos_version ) from ..module_utils.teem import send_teem try: from StringIO import StringIO except ImportError: from io import StringIO class Parameters(AnsibleF5Parameters): download_path = '/var/config/rest/downloads' api_map = { 'sourcePath': 'source_path', 'issuerCert': 'issuer_cert', } api_attributes = [ 'passphrase', 'sourcePath', 'issuerCert', ] returnables = [ 'checksum', 'source_path', 'issuer_cert', ] updatables = [ 'key_checksum', 'cert_checksum', 'content', 'issuer_cert', 'source_path', ] class ApiParameters(Parameters): @property def key_filename(self): if self._values['name'] is None: return None if not self._values['name'].endswith('.key'): return None return self._values['name'] @property def key_source_path(self): if self.key_filename is None: return None if self._values['key_source_path'] is None: return None else: return self._values['key_source_path'] @property def cert_filename(self): if self._values['name'] is None: return None if not self._values['name'].endswith('.crt'): return None return self._values['name'] @property def cert_source_path(self): if self.cert_filename is None: return None if self._values['cert_source_path'] is None: return None else: return self._values['cert_source_path'] @property def key_checksum(self): if self._values['key_checksum'] is None: return None pattern = r'SHA1:\d+:(?P<value>[\w+]{40})' matches = re.match(pattern, self._values['key_checksum']) if matches: return matches.group('value') @property def cert_checksum(self): if self._values['cert_checksum'] is None: return None pattern = r'SHA1:\d+:(?P<value>[\w+]{40})' matches = re.match(pattern, self._values['cert_checksum']) if matches: return matches.group('value') class ModuleParameters(Parameters): def _get_hash(self, content): k = hashlib.sha1() s = StringIO(content) while True: data = s.read(1024) if not data: break k.update(data.encode('utf-8')) return k.hexdigest() @property def issuer_cert(self): if self._values['issuer_cert'] is None: return None name = fq_name(self.partition, self._values['issuer_cert']) if name.endswith('.crt'): return name else: return name + '.crt' @property def key_filename(self): if self.key_name is None: return None if self.key_name.endswith('.key'): return self.key_name else: return self.key_name + '.key' @property def cert_filename(self): if self.cert_name is None: return None if self.cert_name.endswith('.crt'): return self.cert_name else: return self.cert_name + '.crt' @property def key_checksum(self): if self.key_content is None: return None return self._get_hash(self.key_content) @property def cert_checksum(self): if self.cert_content is None: return None return self._get_hash(self.cert_content) @property def key_source_path(self): result = 'file://' + os.path.join( self.download_path, self.key_filename ) return result @property def cert_source_path(self): result = 'file://' + os.path.join( self.download_path, self.cert_filename ) return result class Changes(Parameters): def to_return(self): result = {} try: for returnable in self.returnables: result[returnable] = getattr(self, returnable) result = self._filter_params(result) except Exception: raise return result class UsableChanges(Changes): pass class ReportableChanges(Changes): pass class Difference(object): def __init__(self, want, have=None): self.want = want self.have = have def compare(self, param): try: result = getattr(self, param) return result except AttributeError: return self.__default(param) def __default(self, param): attr1 = getattr(self.want, param) try: attr2 = getattr(self.have, param) if attr1 != attr2: return attr1 except AttributeError: return attr1 @property def key_checksum(self): if self.want.key_checksum is None: return None if self.want.key_checksum != self.have.key_checksum: return self.want.key_checksum @property def key_source_path(self): if self.want.key_source_path is None: return None if self.want.key_source_path == self.have.key_source_path: if self.key_checksum: return self.want.key_source_path if self.want.key_source_path != self.have.key_source_path: return self.want.key_source_path @property def cert_source_path(self): if self.want.source_path is None: return None if self.want.source_path == self.have.source_path: if self.cert_content: return self.want.source_path if self.want.source_path != self.have.source_path: return self.want.source_path @property def cert_content(self): if self.want.cert_checksum != self.have.checksum: result = dict( checksum=self.want.cert_checksum, content=self.want.cert_content ) return result class ModuleManager(object): def __init__(self, *args, **kwargs): self.module = kwargs.get('module', None) self.client = F5RestClient(**self.module.params) self.want = ModuleParameters(params=self.module.params) self.have = ApiParameters() self.changes = UsableChanges() def _set_changed_options(self): changed = {} for key in Parameters.returnables: if getattr(self.want, key) is not None: changed[key] = getattr(self.want, key) if changed: self.changes = UsableChanges(params=changed) def _update_changed_options(self): diff = Difference(self.want, self.have) updatables = Parameters.updatables changed = dict() for k in updatables: change = diff.compare(k) if change is None: continue else: if isinstance(change, dict): changed.update(change) else: changed[k] = change if changed: self.changes = UsableChanges(params=changed) return True return False def _announce_deprecations(self, result): warnings = result.pop('__warnings', []) for warning in warnings: self.client.module.deprecate( msg=warning['msg'], version=warning['version'] ) def exec_module(self): start = datetime.now().isoformat() version = tmos_version(self.client) changed = False result = dict() state = self.want.state if state == "present": changed = self.present() elif state == "absent": changed = self.absent() reportable = ReportableChanges(params=self.changes.to_return()) changes = reportable.to_return() result.update(**changes) result.update(dict(changed=changed)) self._announce_deprecations(result) send_teem(start, self.module, version) return result def present(self): if self.exists(): return self.update() else: return self.create() def absent(self): if self.exists(): return self.remove() return False def should_update(self): result = self._update_changed_options() if result: return True return False def update(self): self.have = self.read_current_from_device() if not self.should_update(): return False if self.module.check_mode: return True self.update_on_device() return True def remove(self): if self.module.check_mode: return True self.remove_from_device() if self.exists(): raise F5ModuleError("Failed to delete the resource.") return True def create(self): self._set_changed_options() if self.module.check_mode: return True self.create_on_device() if self.want.key_filename: self.remove_uploaded_file_from_device(self.want.key_filename) if self.want.cert_filename: self.remove_uploaded_file_from_device(self.want.cert_filename) return True def remove_uploaded_file_from_device(self, name): filepath = '/var/config/rest/downloads/{0}'.format(name) params = { "command": "run", "utilCmdArgs": filepath } uri = "https://{0}:{1}/mgmt/tm/util/unix-rm".format( self.client.provider['server'], self.client.provider['server_port'] ) resp = self.client.api.post(uri, json=params) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]: return True raise F5ModuleError(resp.content) def exists(self): # Can't use TransactionContextManager here because # it expects end result code to be 200 or so. 404 causes # TransactionContextManager to fail. if self.want.key_name: uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.key_filename) ) resp = self.client.api.get(uri) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if resp.status == 404 or 'code' in response and response['code'] == 404: return False # if resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]: # return True errors = [401, 403, 409, 500, 501, 502, 503, 504] if resp.status in errors or 'code' in response and response['code'] in errors: if 'message' in response: raise F5ModuleError(response['message']) else: raise F5ModuleError(resp.content) if self.want.cert_name: uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.cert_filename) ) resp = self.client.api.get(uri) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if resp.status == 404 or 'code' in response and response['code'] == 404: return False # if resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]: # return True errors = [401, 403, 409, 500, 501, 502, 503, 504] if resp.status in errors or 'code' in response and response['code'] in errors: if 'message' in response: raise F5ModuleError(response['message']) else: raise F5ModuleError(resp.content) return True def upload_file_to_device(self, content, name): url = 'https://{0}:{1}/mgmt/shared/file-transfer/uploads'.format( self.client.provider['server'], self.client.provider['server_port'] ) try: upload_file(self.client, url, content, name) except F5ModuleError: raise F5ModuleError( "Failed to upload the file." ) def _prepare_links(self): # this is to ensure no duplicates are in the provided collection links = list() if self.want.key_name: key_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.key_filename) ) links.append(key_link) if self.want.cert_name: cert_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.cert_filename) ) links.append(cert_link) return links def _prepare_links_for_update(self, params_dict): # this is to ensure no duplicates are in the provided collection links_and_params = list() if self.want.key_name: key_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.key_filename) ) key_params_dict = params_dict.copy() key_params_dict['sourcePath'] = self.want.key_source_path links_and_params.append({'link': key_link, 'params': key_params_dict}) if self.want.cert_name: cert_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.cert_filename) ) cert_params_dict = params_dict.copy() cert_params_dict['sourcePath'] = self.want.cert_source_path links_and_params.append({'link': cert_link, 'params': cert_params_dict}) return links_and_params def _prepare_links_for_create(self, params_dict): # this is to ensure no duplicates are in the provided collection links_and_params = list() if self.want.key_name: key_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key/".format( self.client.provider['server'], self.client.provider['server_port'] ) key_params_dict = params_dict.copy() key_params_dict['name'] = self.want.key_filename key_params_dict['sourcePath'] = self.want.key_source_path links_and_params.append({'link': key_link, 'params': key_params_dict}) if self.want.cert_name: cert_link = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/".format( self.client.provider['server'], self.client.provider['server_port'] ) cert_params_dict = params_dict.copy() cert_params_dict['name'] = self.want.cert_filename cert_params_dict['sourcePath'] = self.want.cert_source_path links_and_params.append({'link': cert_link, 'params': cert_params_dict}) return links_and_params def create_on_device(self): params = self.changes.api_params() params['partition'] = self.want.partition # params['name'] = self.want.name links_and_params = self._prepare_links_for_create(params) if self.want.key_name: key_content = StringIO(self.want.key_content) self.upload_file_to_device(key_content, self.want.key_filename) if self.want.cert_name: cert_content = StringIO(self.want.cert_content) self.upload_file_to_device(cert_content, self.want.cert_filename) with TransactionContextManager(self.client) as transact: for link in links_and_params: resp = transact.api.post(link['link'], json=link['params']) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if not (resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]): raise F5ModuleError(resp.content) # This needs to be done because of the way that BIG-IP creates certificates. # # The extra params (such as OCSP and issuer stuff) are not available in the # payload. In a nutshell, the available resource attributes *change* after # a create so that *more* are available. if self.want.cert_name: params = self.want.api_params() if params: uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.cert_filename) ) resp = self.client.api.put(uri, json=params) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if not (resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]): raise F5ModuleError(resp.content) return True def update_on_device(self): params = self.changes.api_params() if self.want.key_name: key_content = StringIO(self.want.key_content) self.upload_file_to_device(key_content, self.want.key_filename) if self.want.cert_name: cert_content = StringIO(self.want.cert_content) self.upload_file_to_device(cert_content, self.want.cert_filename) links_and_params = self._prepare_links_for_update(params) with TransactionContextManager(self.client) as transact: for link in links_and_params: resp = transact.api.patch(link['link'], json=link['params']) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if not (resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]): raise F5ModuleError(resp.content) return True def remove_from_device(self): links = self._prepare_links() with TransactionContextManager(self.client) as transact: for link in links: resp = transact.api.delete(link) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if not (resp.status in [200, 201]): raise F5ModuleError(resp.content) return True def read_current_from_device(self): final_response = {} # TransactionContextManager cannot be used for reading, for # whatever reason if self.want.key_name: uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-key/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.key_filename) ) resp = self.client.api.get(uri) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]: response['key_checksum'] = response['checksum'] response['key_source_path'] = response['sourcePath'] final_response = merge_two_dicts(final_response, response) else: raise F5ModuleError(resp.content) if self.want.cert_name: uri = "https://{0}:{1}/mgmt/tm/sys/file/ssl-cert/{2}".format( self.client.provider['server'], self.client.provider['server_port'], transform_name(self.want.partition, self.want.cert_filename) ) query = '?expandSubcollections=true' resp = self.client.api.get(uri + query) try: response = resp.json() except ValueError as ex: raise F5ModuleError(str(ex)) if resp.status in [200, 201] or 'code' in response and response['code'] in [200, 201]: response['cert_checksum'] = response['checksum'] response['cert_source_path'] = response['sourcePath'] final_response = merge_two_dicts(final_response, response) else: raise F5ModuleError(resp.content) return ApiParameters(params=final_response) class ArgumentSpec(object): def __init__(self): self.supports_check_mode = True argument_spec = dict( key_name=dict(), key_content=dict(), passphrase=dict( no_log=True ), cert_name=dict(), cert_content=dict(), issuer_cert=dict(), state=dict( required=False, default='present', choices=['absent', 'present'] ), partition=dict( default='Common', fallback=(env_fallback, ['F5_PARTITION']) ) ) self.argument_spec = {} self.argument_spec.update(f5_argument_spec) self.argument_spec.update(argument_spec) def main(): spec = ArgumentSpec() module = AnsibleModule( argument_spec=spec.argument_spec, supports_check_mode=spec.supports_check_mode ) try: mm = ModuleManager(module=module) results = mm.exec_module() module.exit_json(**results) except F5ModuleError as ex: module.fail_json(msg=str(ex)) if __name__ == '__main__': main()
{ "content_hash": "8e107ddd366ec2606b239d0992922fd9", "timestamp": "", "source": "github", "line_count": 793, "max_line_length": 108, "avg_line_length": 32.73770491803279, "alnum_prop": 0.5642694811447941, "repo_name": "F5Networks/f5-ansible-modules", "id": "2f27e0ddbc4edcd5296ec7751b6f0fc52f6bffe4", "size": "26138", "binary": false, "copies": "1", "ref": "refs/heads/doc-update", "path": "ansible_collections/f5networks/f5_modules/plugins/modules/bigip_ssl_key_cert.py", "mode": "33188", "license": "mit", "language": [ { "name": "Makefile", "bytes": "1931" }, { "name": "Python", "bytes": "345682" } ], "symlink_target": "" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Dom")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Dom")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c639c69d-4e70-4d89-a14e-bf24780c32e6")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "content_hash": "29089b43cf8d3a2c588fda6fb82603ef", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 84, "avg_line_length": 38.30555555555556, "alnum_prop": 0.7418419144307469, "repo_name": "prepare/DomQuery", "id": "8d76de22cd96de288094b176d2aaf749b4218cb5", "size": "1382", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "source/a_mini/Dom/Properties/AssemblyInfo.cs", "mode": "33261", "license": "mit", "language": [ { "name": "ASP", "bytes": "3859" }, { "name": "Batchfile", "bytes": "2474" }, { "name": "C#", "bytes": "8077156" }, { "name": "CSS", "bytes": "8743" }, { "name": "HTML", "bytes": "26142852" }, { "name": "JavaScript", "bytes": "838" }, { "name": "PowerShell", "bytes": "187" } ], "symlink_target": "" }
package org.ovirt.engine.ui.uicommonweb.models; import org.ovirt.engine.core.compat.PropertyChangedEventArgs; import org.ovirt.engine.core.compat.StringHelper; @SuppressWarnings("unused") public class ConfirmationModel extends ListModel { private EntityModel privateLatch; public EntityModel getLatch() { return privateLatch; } private void setLatch(EntityModel value) { privateLatch = value; } private String note; public String getNote() { return note; } public void setNote(String value) { if (!StringHelper.stringsEqual(note, value)) { note = value; OnPropertyChanged(new PropertyChangedEventArgs("Note")); } } public ConfirmationModel() { setLatch(new EntityModel()); getLatch().setEntity(false); getLatch().setIsAvailable(false); } public boolean Validate() { getLatch().setIsValid(true); if (getLatch().getIsAvailable() && !(Boolean) getLatch().getEntity()) { getLatch().getInvalidityReasons().add("You must approve the action by clicking on this checkbox."); getLatch().setIsValid(false); } return getLatch().getIsValid(); } }
{ "content_hash": "c06919844fa071a9b25a9834fdeb8259", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 111, "avg_line_length": 22.964285714285715, "alnum_prop": 0.6244167962674961, "repo_name": "raksha-rao/gluster-ovirt", "id": "9add3f9956ad6fb3a7454dcb38871e5663a5e430", "size": "1286", "binary": false, "copies": "2", "ref": "refs/heads/ovirt-upstream-rebased", "path": "frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/ConfirmationModel.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "4300" }, { "name": "Java", "bytes": "15806279" }, { "name": "JavaScript", "bytes": "28877" }, { "name": "Python", "bytes": "1057716" }, { "name": "Shell", "bytes": "78518" } ], "symlink_target": "" }
@interface PDAddressCell() { UIView *back; UILabel *address; NSMutableArray *list; } @end @implementation PDAddressCell -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { // CGFloat h = [PDAddressCell cellHeightWithData:nil]; back = [[UIView alloc] initWithFrame:CGRectMake(kCellLeftGap, kCellLeftGap, kAppWidth-2*kCellLeftGap, h-kCellLeftGap)]; [self addSubview:back]; back.layer.borderWidth = 0.5f; back.layer.borderColor = [[UIColor colorWithHexString:@"#e6e6e6"] CGColor]; address = [[UILabel alloc] initWithFrame:CGRectMake(kCellLeftGap, 0, back.width - 2*kCellLeftGap-20, back.height)]; [back addSubview:address]; address.numberOfLines = 2; address.font = [UIFont systemFontOfSize:15]; address.textColor = [UIColor colorWithHexString:@"#333333"]; UIButton *deletebutton=[[UIButton alloc] initWithFrame:CGRectMake(address.right, (back.height-20)/2, 20, 20)]; [deletebutton setBackgroundImage:[UIImage imageNamed:@"delete"] forState:UIControlStateNormal]; [deletebutton setBackgroundImage:[UIImage imageNamed:@"delete2"] forState:UIControlStateHighlighted]; [back addSubview:deletebutton]; [deletebutton handleControlEvents:UIControlEventTouchUpInside actionBlock:^(id sender) { if (self.delegate&&[self.delegate respondsToSelector:@selector(pdBaseTableViewCellDelegate:deleteAddressWithData:)]) { [self.delegate pdBaseTableViewCellDelegate:self deleteAddressWithData:self.data]; } }]; } return self; } -(void)configData:(id)data{ PDModelAddress *addressData = data; address.text = addressData.address; [address sizeToFit]; address.top = (back.height - address.height)/2; //[self showDebugRect]; } +(CGFloat )cellHeightWithData:(id)data{ return 50+kCellLeftGap; } @end
{ "content_hash": "74e20af1e5f5c221d5fd922c3bd89a69", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 130, "avg_line_length": 35.11864406779661, "alnum_prop": 0.6867760617760618, "repo_name": "dodubaby/fefsgdgg", "id": "de6871ba053e8cf92985efdb073aa1143e45efa6", "size": "2228", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Kitchen/PDKitchen/UI/Left/Address/PDAddressCell.m", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "5396" }, { "name": "HTML", "bytes": "4555" }, { "name": "Objective-C", "bytes": "2213706" }, { "name": "Objective-C++", "bytes": "25255" } ], "symlink_target": "" }
<?php namespace Nanbando\Backup; class BackupArchiveDecorator implements BackupArchiveInterface { /** * @var BackupArchiveInterface */ private $innerArchive; /** * @var string */ private $scriptName; public function __construct(string $scriptName, BackupArchiveInterface $innerArchive) { $this->scriptName = $scriptName; $this->innerArchive = $innerArchive; } public function storeFile(string $name, string $path, ?array $metadata = null): void { $this->innerArchive->storeFile(sprintf('%s/%s', $this->scriptName, $name), $path, $metadata); } public function storeMetadata(string $name, array $metadata): void { $this->innerArchive->storeMetadata(sprintf('%s/%s', $this->scriptName, $name), $metadata); } public function getFiles(): array { return $this->innerArchive->getFiles(); } public function set(string $name, $value): void { $this->innerArchive->set(sprintf('%s.%s', $this->scriptName, $name), $value); } public function get(string $name) { return $this->innerArchive->get(sprintf('%s.%s', $this->scriptName, $name)); } public function getWithDefault(string $name, $default) { return $this->innerArchive->getWithDefault(sprintf('%s.%s', $this->scriptName, $name), $default); } public function all(): array { $result = []; foreach ($this->innerArchive->all() as $key => $value) { $prefix = $this->scriptName . '.'; if ($prefix === substr($key, 0, strlen($prefix))) { $result[substr($key, strlen($prefix))] = $value; } } return $result; } }
{ "content_hash": "1688dc568f966806c74f36aaa8a44d86", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 105, "avg_line_length": 26.753846153846155, "alnum_prop": 0.5876940770557791, "repo_name": "nanbando/nanbando", "id": "4748c95e365afe6aa24206c4cdaba2eea2e4ef0f", "size": "1739", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Backup/BackupArchiveDecorator.php", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "693" }, { "name": "Gherkin", "bytes": "18167" }, { "name": "PHP", "bytes": "188456" }, { "name": "Shell", "bytes": "596" } ], "symlink_target": "" }
package org.apache.camel.builder.endpoint.dsl; import javax.annotation.Generated; import org.apache.camel.ExchangePattern; import org.apache.camel.builder.EndpointConsumerBuilder; import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; import org.apache.camel.spi.ExceptionHandler; /** * The spring-event component allows to listen for Spring Application Events. * * Generated by camel-package-maven-plugin - do not edit this file! */ @Generated("org.apache.camel.maven.packaging.EndpointDslMojo") public interface EventEndpointBuilderFactory { /** * Builder for endpoint consumers for the Spring Event component. */ public interface EventEndpointConsumerBuilder extends EndpointConsumerBuilder { default AdvancedEventEndpointConsumerBuilder advanced() { return (AdvancedEventEndpointConsumerBuilder) this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a * message and handled by the routing Error Handler. By default the * consumer will use the org.apache.camel.spi.ExceptionHandler to deal * with exceptions, that will be logged at WARN or ERROR level and * ignored. * * The option is a: <code>boolean</code> type. * * Default: false * Group: consumer */ default EventEndpointConsumerBuilder bridgeErrorHandler( boolean bridgeErrorHandler) { doSetProperty("bridgeErrorHandler", bridgeErrorHandler); return this; } /** * Allows for bridging the consumer to the Camel routing Error Handler, * which mean any exceptions occurred while the consumer is trying to * pickup incoming messages, or the likes, will now be processed as a * message and handled by the routing Error Handler. By default the * consumer will use the org.apache.camel.spi.ExceptionHandler to deal * with exceptions, that will be logged at WARN or ERROR level and * ignored. * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: consumer */ default EventEndpointConsumerBuilder bridgeErrorHandler( String bridgeErrorHandler) { doSetProperty("bridgeErrorHandler", bridgeErrorHandler); return this; } } /** * Advanced builder for endpoint consumers for the Spring Event component. */ public interface AdvancedEventEndpointConsumerBuilder extends EndpointConsumerBuilder { default EventEndpointConsumerBuilder basic() { return (EventEndpointConsumerBuilder) this; } /** * To let the consumer use a custom ExceptionHandler. Notice if the * option bridgeErrorHandler is enabled then this option is not in use. * By default the consumer will deal with exceptions, that will be * logged at WARN or ERROR level and ignored. * * The option is a: <code>org.apache.camel.spi.ExceptionHandler</code> * type. * * Group: consumer (advanced) */ default AdvancedEventEndpointConsumerBuilder exceptionHandler( ExceptionHandler exceptionHandler) { doSetProperty("exceptionHandler", exceptionHandler); return this; } /** * To let the consumer use a custom ExceptionHandler. Notice if the * option bridgeErrorHandler is enabled then this option is not in use. * By default the consumer will deal with exceptions, that will be * logged at WARN or ERROR level and ignored. * * The option will be converted to a * <code>org.apache.camel.spi.ExceptionHandler</code> type. * * Group: consumer (advanced) */ default AdvancedEventEndpointConsumerBuilder exceptionHandler( String exceptionHandler) { doSetProperty("exceptionHandler", exceptionHandler); return this; } /** * Sets the exchange pattern when the consumer creates an exchange. * * The option is a: <code>org.apache.camel.ExchangePattern</code> type. * * Group: consumer (advanced) */ default AdvancedEventEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; } /** * Sets the exchange pattern when the consumer creates an exchange. * * The option will be converted to a * <code>org.apache.camel.ExchangePattern</code> type. * * Group: consumer (advanced) */ default AdvancedEventEndpointConsumerBuilder exchangePattern( String exchangePattern) { doSetProperty("exchangePattern", exchangePattern); return this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointConsumerBuilder basicPropertyBinding( boolean basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointConsumerBuilder basicPropertyBinding( String basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointConsumerBuilder synchronous( boolean synchronous) { doSetProperty("synchronous", synchronous); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointConsumerBuilder synchronous( String synchronous) { doSetProperty("synchronous", synchronous); return this; } } /** * Builder for endpoint producers for the Spring Event component. */ public interface EventEndpointProducerBuilder extends EndpointProducerBuilder { default AdvancedEventEndpointProducerBuilder advanced() { return (AdvancedEventEndpointProducerBuilder) this; } /** * Whether the producer should be started lazy (on the first message). * By starting lazy you can use this to allow CamelContext and routes to * startup in situations where a producer may otherwise fail during * starting and cause the route to fail being started. By deferring this * startup to be lazy then the startup failure can be handled during * routing messages via Camel's routing error handlers. Beware that when * the first message is processed then creating and starting the * producer may take a little time and prolong the total processing time * of the processing. * * The option is a: <code>boolean</code> type. * * Default: false * Group: producer */ default EventEndpointProducerBuilder lazyStartProducer( boolean lazyStartProducer) { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } /** * Whether the producer should be started lazy (on the first message). * By starting lazy you can use this to allow CamelContext and routes to * startup in situations where a producer may otherwise fail during * starting and cause the route to fail being started. By deferring this * startup to be lazy then the startup failure can be handled during * routing messages via Camel's routing error handlers. Beware that when * the first message is processed then creating and starting the * producer may take a little time and prolong the total processing time * of the processing. * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: producer */ default EventEndpointProducerBuilder lazyStartProducer( String lazyStartProducer) { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } } /** * Advanced builder for endpoint producers for the Spring Event component. */ public interface AdvancedEventEndpointProducerBuilder extends EndpointProducerBuilder { default EventEndpointProducerBuilder basic() { return (EventEndpointProducerBuilder) this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointProducerBuilder basicPropertyBinding( boolean basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointProducerBuilder basicPropertyBinding( String basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointProducerBuilder synchronous( boolean synchronous) { doSetProperty("synchronous", synchronous); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointProducerBuilder synchronous( String synchronous) { doSetProperty("synchronous", synchronous); return this; } } /** * Builder for endpoint for the Spring Event component. */ public interface EventEndpointBuilder extends EventEndpointConsumerBuilder, EventEndpointProducerBuilder { default AdvancedEventEndpointBuilder advanced() { return (AdvancedEventEndpointBuilder) this; } } /** * Advanced builder for endpoint for the Spring Event component. */ public interface AdvancedEventEndpointBuilder extends AdvancedEventEndpointConsumerBuilder, AdvancedEventEndpointProducerBuilder { default EventEndpointBuilder basic() { return (EventEndpointBuilder) this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointBuilder basicPropertyBinding( boolean basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Whether the endpoint should use basic property binding (Camel 2.x) or * the newer property binding with additional capabilities. * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointBuilder basicPropertyBinding( String basicPropertyBinding) { doSetProperty("basicPropertyBinding", basicPropertyBinding); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option is a: <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointBuilder synchronous(boolean synchronous) { doSetProperty("synchronous", synchronous); return this; } /** * Sets whether synchronous processing should be strictly used, or Camel * is allowed to use asynchronous processing (if supported). * * The option will be converted to a <code>boolean</code> type. * * Default: false * Group: advanced */ default AdvancedEventEndpointBuilder synchronous(String synchronous) { doSetProperty("synchronous", synchronous); return this; } } public interface EventBuilders { /** * Spring Event (camel-spring) * The spring-event component allows to listen for Spring Application * Events. * * Category: spring,eventbus * Since: 1.4 * Maven coordinates: org.apache.camel:camel-spring * * Syntax: <code>spring-event:name</code> * * Path parameter: name * Name of endpoint */ default EventEndpointBuilder springEvent(String path) { return EventEndpointBuilderFactory.springEvent(path); } } /** * Spring Event (camel-spring) * The spring-event component allows to listen for Spring Application * Events. * * Category: spring,eventbus * Since: 1.4 * Maven coordinates: org.apache.camel:camel-spring * * Syntax: <code>spring-event:name</code> * * Path parameter: name * Name of endpoint */ static EventEndpointBuilder springEvent(String path) { class EventEndpointBuilderImpl extends AbstractEndpointBuilder implements EventEndpointBuilder, AdvancedEventEndpointBuilder { public EventEndpointBuilderImpl(String path) { super("spring-event", path); } } return new EventEndpointBuilderImpl(path); } }
{ "content_hash": "adb4bd718dfd61f9bbd8895e8d27acbf", "timestamp": "", "source": "github", "line_count": 432, "max_line_length": 134, "avg_line_length": 38.13194444444444, "alnum_prop": 0.6099678261397439, "repo_name": "CodeSmell/camel", "id": "e48d5353046846833fc603492751f2116bd2434d", "size": "17275", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/EventEndpointBuilderFactory.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6521" }, { "name": "Batchfile", "bytes": "2353" }, { "name": "CSS", "bytes": "5472" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "8015" }, { "name": "Groovy", "bytes": "20838" }, { "name": "HTML", "bytes": "915679" }, { "name": "Java", "bytes": "80453693" }, { "name": "JavaScript", "bytes": "100326" }, { "name": "Makefile", "bytes": "513" }, { "name": "RobotFramework", "bytes": "8461" }, { "name": "Shell", "bytes": "17295" }, { "name": "TSQL", "bytes": "28835" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "280849" } ], "symlink_target": "" }
title: "Integrated Genomic Characterization of Papillary Thyroid Carcinoma" members: - nils-gehlenborg type: article year: 2014 publisher: "http://www.cancerresearchuk.org/about-us/cancer-news/news-report/2014-10-23-large-study-sheds-light-on-the-genetic-causes-of-thyroid-cancer" cite: authors: "The Cancer Genome Atlas Network, incl. N Gehlenborg" published: "*Cell* **159**:676–690" --- Featured in Clinical Sequencing News, Deutsches Ärtzeblatt, Cancer Research UK News.
{ "content_hash": "e07350431b2135e76091a11e480839e6", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 152, "avg_line_length": 37.15384615384615, "alnum_prop": 0.7743271221532091, "repo_name": "hms-dbmi/gehlenborglab-website", "id": "93e3e421613b5a6b258a14b753f3bfa113090957", "size": "490", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "_publications/gehlenborg-2014-cell-thyroid.md", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "22340" }, { "name": "Ruby", "bytes": "1122" }, { "name": "SCSS", "bytes": "7045" }, { "name": "Shell", "bytes": "590" } ], "symlink_target": "" }
namespace Tvl.Graphing.Interop { using System.Runtime.InteropServices; [UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi, SetLastError = false)] public delegate int agusererrf(string message); }
{ "content_hash": "a883a3ed1add08413f25b688d46ed741", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 101, "avg_line_length": 33.285714285714285, "alnum_prop": 0.776824034334764, "repo_name": "tunnelvisionlabs/WpfGraphing", "id": "ec83d7865e49a92335b0ca1771f395eead194237", "size": "235", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Tvl.Graphing/Interop/agusererrf.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "164822" } ], "symlink_target": "" }
package org.locationtech.geomesa.curve import org.junit.runner.RunWith import org.locationtech.geomesa.curve.NormalizedDimension.{NormalizedLat, NormalizedLon} import org.specs2.mutable.Specification import org.specs2.runner.JUnitRunner @RunWith(classOf[JUnitRunner]) class NormalizedDimensionTest extends Specification { val precision = 31 val NormLat = NormalizedLat(precision) val NormLon = NormalizedLon(precision) val maxBin = (math.pow(2, precision) - 1).toInt // note: at 31 bits this is Int.MaxValue "NormalizedDimension" should { "Round-trip normalize minimum" >> { NormLat.normalize(NormLat.denormalize(0)) mustEqual 0 NormLon.normalize(NormLon.denormalize(0)) mustEqual 0 } "Round-trip normalize maximum" >> { NormLat.normalize(NormLat.denormalize(maxBin)) mustEqual maxBin NormLon.normalize(NormLon.denormalize(maxBin)) mustEqual maxBin } "Normalize mininimum" >> { NormLat.normalize(NormLat.min) mustEqual 0 NormLon.normalize(NormLon.min) mustEqual 0 } "Normalize maximum" >> { NormLat.normalize(NormLat.max) mustEqual maxBin NormLon.normalize(NormLon.max) mustEqual maxBin } "Denormalize [0,max - 1] to bin middle" >> { // for any index/bin denormalize will return value in middle of range of coordinates // that could result in index/bin from normalize call val latExtent = NormLat.max - NormLat.min val lonExtent = NormLon.max - NormLon.min val latWidth = latExtent / (maxBin.toLong + 1) val lonWidth = lonExtent / (maxBin.toLong + 1) NormLat.denormalize(0) mustEqual NormLat.min + latWidth / 2d NormLat.denormalize(maxBin) mustEqual NormLat.max - latWidth / 2d NormLon.denormalize(0) mustEqual NormLon.min + lonWidth / 2d NormLon.denormalize(maxBin) mustEqual NormLon.max - lonWidth / 2d } } }
{ "content_hash": "01acfd65eba530fdf23b6035d7443350", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 90, "avg_line_length": 34.870370370370374, "alnum_prop": 0.7169410515135423, "repo_name": "ronq/geomesa", "id": "805c5aa35d35d4fb69ba6267b16571cc264fb4a8", "size": "2346", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "geomesa-z3/src/test/scala/org/locationtech/geomesa/curve/NormalizedDimensionTest.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "11815" }, { "name": "JavaScript", "bytes": "7418" }, { "name": "Scala", "bytes": "1398073" }, { "name": "Shell", "bytes": "10760" } ], "symlink_target": "" }
''' Management of Pacemaker/Corosync clusters with PCS ================================================== A state module to manage Pacemaker/Corosync clusters with the Pacemaker/Corosync configuration system (PCS) .. versionadded:: 2016.110 :depends: pcs Walkthrough of a complete PCS cluster setup: http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/ Requirements: PCS is installed, pcs service is started and the password for the hacluster user is set and known. Remark on the cibname variable used in the examples: The use of the cibname variable is optional. Use it only if you want to deploy your changes into a cibfile first and then push it. This makes only sense if you want to deploy multiple changes (which require each other) at once to the cluster. At first the cibfile must be created: .. code-block:: yaml mysql_pcs__cib_present_cib_for_galera: pcs.cib_present: - cibname: cib_for_galera - scope: None - extra_args: None Then the cibfile can be modified by creating resources (creating only 1 resource for demonstration, see also 7.): .. code-block:: yaml mysql_pcs__resource_present_galera: pcs.resource_present: - resource_id: galera - resource_type: "ocf:heartbeat:galera" - resource_options: - 'wsrep_cluster_address=gcomm://node1.example.org,node2.example.org,node3.example.org' - '--master' - cibname: cib_for_galera After modifying the cibfile, it can be pushed to the live CIB in the cluster: .. code-block:: yaml mysql_pcs__cib_pushed_cib_for_galera: pcs.cib_pushed: - cibname: cib_for_galera - scope: None - extra_args: None Create a cluster from scratch: 1. Authorize nodes to each other: .. code-block:: yaml pcs_auth__auth: pcs.auth: - nodes: - node1.example.com - node2.example.com - pcsuser: hacluster - pcspasswd: hoonetorg - extra_args: [] 2. Do the initial cluster setup: .. code-block:: yaml pcs_setup__setup: pcs.cluster_setup: - nodes: - node1.example.com - node2.example.com - pcsclustername: pcscluster - extra_args: - '--start' - '--enable' 3. Optional: Set cluster properties: .. code-block:: yaml pcs_properties__prop_has_value_no-quorum-policy: pcs.prop_has_value: - prop: no-quorum-policy - value: ignore - cibname: cib_for_cluster_settings 4. Optional: Set resource defaults: .. code-block:: yaml pcs_properties__resource_defaults_to_resource-stickiness: pcs.resource_defaults_to: - default: resource-stickiness - value: 100 - cibname: cib_for_cluster_settings 5. Optional: Set resource op defaults: .. code-block:: yaml pcs_properties__resource_op_defaults_to_monitor-interval: pcs.resource_op_defaults_to: - op_default: monitor-interval - value: 60s - cibname: cib_for_cluster_settings 6. Configure Fencing (!is often not optional on production ready cluster!): .. code-block:: yaml pcs_stonith__created_eps_fence: pcs.stonith_present: - stonith_id: eps_fence - stonith_device_type: fence_eps - stonith_device_options: - 'pcmk_host_map=node1.example.org:01;node2.example.org:02' - 'ipaddr=myepsdevice.example.org' - 'power_wait=5' - 'verbose=1' - 'debug=/var/log/pcsd/eps_fence.log' - 'login=hidden' - 'passwd=hoonetorg' - cibname: cib_for_stonith 7. Add resources to your cluster: .. code-block:: yaml mysql_pcs__resource_present_galera: pcs.resource_present: - resource_id: galera - resource_type: "ocf:heartbeat:galera" - resource_options: - 'wsrep_cluster_address=gcomm://node1.example.org,node2.example.org,node3.example.org' - '--master' - cibname: cib_for_galera 8. Optional: Add constraints (locations, colocations, orders): .. code-block:: yaml haproxy_pcs__constraint_present_colocation-vip_galera-haproxy-clone-INFINITY: pcs.constraint_present: - constraint_id: colocation-vip_galera-haproxy-clone-INFINITY - constraint_type: colocation - constraint_options: - 'add' - 'vip_galera' - 'with' - 'haproxy-clone' - cibname: cib_for_haproxy .. versionadded:: 2016.3.0 ''' from __future__ import absolute_import, print_function, unicode_literals # Import Python libs import logging import os # Import Salt libs import salt.utils.files import salt.utils.path import salt.utils.stringutils # Import 3rd-party libs from salt.ext import six log = logging.getLogger(__name__) def __virtual__(): ''' Only load if pcs package is installed ''' if salt.utils.path.which('pcs'): return 'pcs' return False def _file_read(path): ''' Read a file and return content ''' content = False if os.path.exists(path): with salt.utils.files.fopen(path, 'r+') as fp_: content = salt.utils.stringutils.to_unicode(fp_.read()) fp_.close() return content def _file_write(path, content): ''' Write content to a file ''' with salt.utils.files.fopen(path, 'w+') as fp_: fp_.write(salt.utils.stringutils.to_str(content)) fp_.close() def _get_cibpath(): ''' Get the path to the directory on the minion where CIB's are saved ''' cibpath = os.path.join(__opts__['cachedir'], 'pcs', __env__) log.trace('cibpath: %s', cibpath) return cibpath def _get_cibfile(cibname): ''' Get the full path of a cached CIB-file with the name of the CIB ''' cibfile = os.path.join(_get_cibpath(), '{0}.{1}'.format(cibname, 'cib')) log.trace('cibfile: %s', cibfile) return cibfile def _get_cibfile_tmp(cibname): ''' Get the full path of a temporary CIB-file with the name of the CIB ''' cibfile_tmp = '{0}.tmp'.format(_get_cibfile(cibname)) log.trace('cibfile_tmp: %s', cibfile_tmp) return cibfile_tmp def _get_cibfile_cksum(cibname): ''' Get the full path of the file containing a checksum of a CIB-file with the name of the CIB ''' cibfile_cksum = '{0}.cksum'.format(_get_cibfile(cibname)) log.trace('cibfile_cksum: %s', cibfile_cksum) return cibfile_cksum def _item_present(name, item, item_id, item_type, show='show', create='create', extra_args=None, cibname=None): ''' Ensure that an item is created name Irrelevant, not used item config, property, resource, constraint etc. item_id id of the item item_type item type show show command (probably None, default: show) create create command (create or set f.e., default: create) extra_args additional options for the pcs command cibname use a cached CIB-file named like cibname instead of the live CIB ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} item_create_required = True cibfile = None if isinstance(cibname, six.string_types): cibfile = _get_cibfile(cibname) if not isinstance(extra_args, (list, tuple)): extra_args = [] # split off key and value (item_id contains =) item_id_key = item_id item_id_value = None if '=' in item_id: item_id_key = item_id.split('=')[0].strip() item_id_value = item_id.replace(item_id.split('=')[0] + '=', '').strip() log.trace('item_id_key=%s item_id_value=%s', item_id_key, item_id_value) # constraints, properties, resource defaults or resource op defaults # do not support specifying an id on 'show' command item_id_show = item_id if item in ['constraint'] or '=' in item_id: item_id_show = None is_existing = __salt__['pcs.item_show'](item=item, item_id=item_id_show, item_type=item_type, show=show, cibfile=cibfile) log.trace( 'Output of pcs.item_show item=%s item_id=%s item_type=%s cibfile=%s: %s', item, item_id_show, item_type, cibfile, is_existing ) # key,value pairs (item_id contains =) - match key and value if item_id_value is not None: for line in is_existing['stdout'].splitlines(): if len(line.split(':')) in [2]: key = line.split(':')[0].strip() value = line.split(':')[1].strip() if item_id_key in [key]: if item_id_value in [value]: item_create_required = False # constraints match on '(id:<id>)' elif item in ['constraint']: for line in is_existing['stdout'].splitlines(): if '(id:{0})'.format(item_id) in line: item_create_required = False # item_id was provided, # return code 0 indicates, that resource already exists else: if is_existing['retcode'] in [0]: item_create_required = False if not item_create_required: ret['comment'] += '{0} {1} ({2}) is already existing\n'.format( six.text_type(item), six.text_type(item_id), six.text_type(item_type) ) return ret if __opts__['test']: ret['result'] = None ret['comment'] += '{0} {1} ({2}) is set to be created\n'.format( six.text_type(item), six.text_type(item_id), six.text_type(item_type) ) return ret item_create = __salt__['pcs.item_create']( item=item, item_id=item_id, item_type=item_type, create=create, extra_args=extra_args, cibfile=cibfile) log.trace('Output of pcs.item_create: %s', item_create) if item_create['retcode'] in [0]: ret['comment'] += 'Created {0} {1} ({2})\n'.format(item, item_id, item_type) ret['changes'].update({item_id: {'old': '', 'new': six.text_type(item_id)}}) else: ret['result'] = False ret['comment'] += 'Failed to create {0} {1} ({2})\n'.format(item, item_id, item_type) log.trace('ret: %s', ret) return ret def auth(name, nodes, pcsuser='hacluster', pcspasswd='hacluster', extra_args=None): ''' Ensure all nodes are authorized to the cluster name Irrelevant, not used (recommended: pcs_auth__auth) nodes a list of nodes which should be authorized to the cluster pcsuser user for communication with pcs (default: hacluster) pcspasswd password for pcsuser (default: hacluster) extra_args list of extra args for the \'pcs cluster auth\' command Example: .. code-block:: yaml pcs_auth__auth: pcs.auth: - nodes: - node1.example.com - node2.example.com - pcsuser: hacluster - pcspasswd: hoonetorg - extra_args: [] ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} auth_required = False authorized = __salt__['pcs.is_auth'](nodes=nodes) log.trace('Output of pcs.is_auth: %s', authorized) authorized_dict = {} for line in authorized['stdout'].splitlines(): node = line.split(':')[0].strip() auth_state = line.split(':')[1].strip() if node in nodes: authorized_dict.update({node: auth_state}) log.trace('authorized_dict: %s', authorized_dict) for node in nodes: if node in authorized_dict and authorized_dict[node] == 'Already authorized': ret['comment'] += 'Node {0} is already authorized\n'.format(node) else: auth_required = True if __opts__['test']: ret['comment'] += 'Node is set to authorize: {0}\n'.format(node) if not auth_required: return ret if __opts__['test']: ret['result'] = None return ret if not isinstance(extra_args, (list, tuple)): extra_args = [] if '--force' not in extra_args: extra_args += ['--force'] authorize = __salt__['pcs.auth'](nodes=nodes, pcsuser=pcsuser, pcspasswd=pcspasswd, extra_args=extra_args) log.trace('Output of pcs.auth: %s', authorize) authorize_dict = {} for line in authorize['stdout'].splitlines(): node = line.split(':')[0].strip() auth_state = line.split(':')[1].strip() if node in nodes: authorize_dict.update({node: auth_state}) log.trace('authorize_dict: %s', authorize_dict) for node in nodes: if node in authorize_dict and authorize_dict[node] == 'Authorized': ret['comment'] += 'Authorized {0}\n'.format(node) ret['changes'].update({node: {'old': '', 'new': 'Authorized'}}) else: ret['result'] = False if node in authorized_dict: ret['comment'] += 'Authorization check for node {0} returned: {1}\n'.format(node, authorized_dict[node]) if node in authorize_dict: ret['comment'] += 'Failed to authorize {0} with error {1}\n'.format(node, authorize_dict[node]) return ret def cluster_setup(name, nodes, pcsclustername='pcscluster', extra_args=None): ''' Setup Pacemaker cluster on nodes. Should be run on one cluster node only (there may be races) name Irrelevant, not used (recommended: pcs_setup__setup) nodes a list of nodes which should be set up pcsclustername Name of the Pacemaker cluster extra_args list of extra args for the \'pcs cluster setup\' command Example: .. code-block:: yaml pcs_setup__setup: pcs.cluster_setup: - nodes: - node1.example.com - node2.example.com - pcsclustername: pcscluster - extra_args: - '--start' - '--enable' ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} setup_required = False nodes_firstring = [] for node in nodes: nodes_firstring += [ node.split(',')[0] ] log.trace('nodes_firstring %s', nodes_firstring) config_show = __salt__['pcs.config_show']() log.trace('Output of pcs.config_show: %s', config_show) for line in config_show['stdout'].splitlines(): if len(line.split(':')) in [2]: key = line.split(':')[0].strip() value = line.split(':')[1].strip() if key in ['Cluster Name']: if value in [pcsclustername]: ret['comment'] += 'Cluster {0} is already set up\n'.format(pcsclustername) else: setup_required = True if __opts__['test']: ret['comment'] += 'Cluster {0} is set to set up\n'.format(pcsclustername) if not setup_required: return ret if __opts__['test']: ret['result'] = None return ret if not isinstance(extra_args, (list, tuple)): extra_args = [] setup = __salt__['pcs.cluster_setup'](nodes=nodes, pcsclustername=pcsclustername, extra_args=extra_args) log.trace('Output of pcs.cluster_setup: %s', setup) setup_dict = {} for line in setup['stdout'].splitlines(): log.trace('line: %s', line) log.trace('line.split(:).len: %s', len(line.split(':'))) if len(line.split(':')) in [2]: node = line.split(':')[0].strip() setup_state = line.split(':')[1].strip() if node in nodes_firstring: setup_dict.update({node: setup_state}) log.trace('setup_dict: %s', setup_dict) for node in nodes_firstring: if node in setup_dict and setup_dict[node] in ['Succeeded', 'Success']: ret['comment'] += 'Set up {0}\n'.format(node) ret['changes'].update({node: {'old': '', 'new': 'Setup'}}) else: ret['result'] = False ret['comment'] += 'Failed to setup {0}\n'.format(node) if node in setup_dict: ret['comment'] += '{0}: setup_dict: {1}\n'.format(node, setup_dict[node]) ret['comment'] += six.text_type(setup) log.trace('ret: %s', ret) return ret def cluster_node_present(name, node, extra_args=None): ''' Add a node to the Pacemaker cluster via PCS Should be run on one cluster node only (there may be races) Can only be run on a already setup/added node name Irrelevant, not used (recommended: pcs_setup__node_add_{{node}}) node node that should be added extra_args list of extra args for the \'pcs cluster node add\' command Example: .. code-block:: yaml pcs_setup__node_add_node1.example.com: pcs.cluster_node_present: - node: node1.example.com - extra_args: - '--start' - '--enable' ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} node_add_required = True node_firstring = node.split(',')[0] log.trace('node_firstring %s', node_firstring) current_nodes = [] is_member_cmd = ['pcs', 'status', 'nodes', 'corosync'] is_member = __salt__['cmd.run_all'](is_member_cmd, output_loglevel='trace', python_shell=False) log.trace('Output of pcs status nodes corosync: %s', is_member) for line in is_member['stdout'].splitlines(): if len(line.split(':')) in [2]: key = line.split(':')[0].strip() value = line.split(':')[1].strip() if key in ['Offline', 'Online']: if len(value.split()) > 0: if node_firstring in value.split(): node_add_required = False ret['comment'] += 'Node {0} is already member of the cluster\n'.format(node_firstring) else: current_nodes += value.split() if not node_add_required: return ret if __opts__['test']: ret['result'] = None ret['comment'] += 'Node {0} is set to be added to the cluster with as follows: {1} \n'.format(node_firstring, node) return ret if not isinstance(extra_args, (list, tuple)): extra_args = [] node_add = __salt__['pcs.cluster_node_add'](node=node, extra_args=extra_args) log.trace('Output of pcs.cluster_node_add: %s', node_add) node_add_dict = {} for line in node_add['stdout'].splitlines(): log.trace('line: %s', line) log.trace('line.split(:).len: %s', len(line.split(':'))) if len(line.split(':')) in [2]: current_node = line.split(':')[0].strip() current_node_add_state = line.split(':')[1].strip() if current_node in current_nodes + [node_firstring]: node_add_dict.update({current_node: current_node_add_state}) log.trace('node_add_dict: %s', node_add_dict) for current_node in current_nodes: if current_node in node_add_dict: if node_add_dict[current_node] not in ['Corosync updated']: ret['result'] = False ret['comment'] += 'Failed to update corosync.conf on node {0}\n'.format(current_node) ret['comment'] += '{0}: node_add_dict: {1}\n'.format(current_node, node_add_dict[current_node]) else: ret['result'] = False ret['comment'] += 'Failed to update corosync.conf on node {0}\n'.format(current_node) if node_firstring in node_add_dict and node_add_dict[node_firstring] in ['Succeeded', 'Success']: ret['comment'] += 'Added node {0}\n'.format(node_firstring) ret['changes'].update({node_firstring: {'old': '', 'new': 'Added'}}) else: ret['result'] = False ret['comment'] += 'Failed to add node {0}\n'.format(node_firstring) if node_firstring in node_add_dict: ret['comment'] += '{0}: node_add_dict: {1}\n'.format(node_firstring, node_add_dict[node_firstring]) ret['comment'] += six.text_type(node_add) log.trace('ret: %s', ret) return ret def cib_present(name, cibname, scope=None, extra_args=None): ''' Ensure that a CIB-file with the content of the current live CIB is created Should be run on one cluster node only (there may be races) name Irrelevant, not used (recommended: {{formulaname}}__cib_present_{{cibname}}) cibname name/path of the file containing the CIB scope specific section of the CIB (default: extra_args additional options for creating the CIB-file Example: .. code-block:: yaml mysql_pcs__cib_present_cib_for_galera: pcs.cib_present: - cibname: cib_for_galera - scope: None - extra_args: None ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} cib_hash_form = 'sha256' cib_create_required = False cib_cksum_required = False cib_required = False cibpath = _get_cibpath() cibfile = _get_cibfile(cibname) cibfile_tmp = _get_cibfile_tmp(cibname) cibfile_cksum = _get_cibfile_cksum(cibname) if not os.path.exists(cibpath): os.makedirs(cibpath) if not isinstance(extra_args, (list, tuple)): extra_args = [] if os.path.exists(cibfile_tmp): __salt__['file.remove'](cibfile_tmp) cib_create = __salt__['pcs.cib_create'](cibfile=cibfile_tmp, scope=scope, extra_args=extra_args) log.trace('Output of pcs.cib_create: %s', cib_create) if cib_create['retcode'] not in [0] or not os.path.exists(cibfile_tmp): ret['result'] = False ret['comment'] += 'Failed to get live CIB\n' return ret cib_hash_live = '{0}:{1}'.format(cib_hash_form, __salt__['file.get_hash'](path=cibfile_tmp, form=cib_hash_form)) log.trace('cib_hash_live: %s', cib_hash_live) cib_hash_cur = _file_read(path=cibfile_cksum) if cib_hash_cur not in [cib_hash_live]: cib_cksum_required = True log.trace('cib_hash_cur: %s', cib_hash_cur) if not os.path.exists(cibfile) or not __salt__['file.check_hash'](path=cibfile, file_hash=cib_hash_live): cib_create_required = True if cib_cksum_required or cib_create_required: cib_required = True if not cib_create_required: __salt__['file.remove'](cibfile_tmp) ret['comment'] += 'CIB {0} is already equal to the live CIB\n'.format(cibname) if not cib_cksum_required: ret['comment'] += 'CIB {0} checksum is correct\n'.format(cibname) if not cib_required: return ret if __opts__['test']: __salt__['file.remove'](cibfile_tmp) ret['result'] = None if cib_create_required: ret['comment'] += 'CIB {0} is set to be created/updated\n'.format(cibname) if cib_cksum_required: ret['comment'] += 'CIB {0} checksum is set to be created/updated\n'.format(cibname) return ret if cib_create_required: __salt__['file.move'](cibfile_tmp, cibfile) if __salt__['file.check_hash'](path=cibfile, file_hash=cib_hash_live): ret['comment'] += 'Created/updated CIB {0}\n'.format(cibname) ret['changes'].update({'cibfile': cibfile}) else: ret['result'] = False ret['comment'] += 'Failed to create/update CIB {0}\n'.format(cibname) if cib_cksum_required: _file_write(cibfile_cksum, cib_hash_live) if _file_read(cibfile_cksum) in [cib_hash_live]: ret['comment'] += 'Created/updated checksum {0} of CIB {1}\n'.format(cib_hash_live, cibname) ret['changes'].update({'cibcksum': cib_hash_live}) else: ret['result'] = False ret['comment'] += 'Failed to create/update checksum {0} CIB {1}\n'.format(cib_hash_live, cibname) log.trace('ret: %s', ret) return ret def cib_pushed(name, cibname, scope=None, extra_args=None): ''' Ensure that a CIB-file is pushed if it is changed since the creation of it with pcs.cib_present Should be run on one cluster node only (there may be races) name Irrelevant, not used (recommended: {{formulaname}}__cib_pushed_{{cibname}}) cibname name/path of the file containing the CIB scope specific section of the CIB extra_args additional options for creating the CIB-file Example: .. code-block:: yaml mysql_pcs__cib_pushed_cib_for_galera: pcs.cib_pushed: - cibname: cib_for_galera - scope: None - extra_args: None ''' ret = {'name': name, 'result': True, 'comment': '', 'changes': {}} cib_hash_form = 'sha256' cib_push_required = False cibfile = _get_cibfile(cibname) cibfile_cksum = _get_cibfile_cksum(cibname) if not isinstance(extra_args, (list, tuple)): extra_args = [] if not os.path.exists(cibfile): ret['result'] = False ret['comment'] += 'CIB-file {0} does not exist\n'.format(cibfile) return ret cib_hash_cibfile = '{0}:{1}'.format(cib_hash_form, __salt__['file.get_hash'](path=cibfile, form=cib_hash_form)) log.trace('cib_hash_cibfile: %s', cib_hash_cibfile) if _file_read(cibfile_cksum) not in [cib_hash_cibfile]: cib_push_required = True if not cib_push_required: ret['comment'] += 'CIB {0} is not changed since creation through pcs.cib_present\n'.format(cibname) return ret if __opts__['test']: ret['result'] = None ret['comment'] += 'CIB {0} is set to be pushed as the new live CIB\n'.format(cibname) return ret cib_push = __salt__['pcs.cib_push'](cibfile=cibfile, scope=scope, extra_args=extra_args) log.trace('Output of pcs.cib_push: %s', cib_push) if cib_push['retcode'] in [0]: ret['comment'] += 'Pushed CIB {0}\n'.format(cibname) ret['changes'].update({'cibfile_pushed': cibfile}) else: ret['result'] = False ret['comment'] += 'Failed to push CIB {0}\n'.format(cibname) log.trace('ret: %s', ret) return ret def prop_has_value(name, prop, value, extra_args=None, cibname=None): ''' Ensure that a property in the cluster is set to a given value Should be run on one cluster node only (there may be races) name Irrelevant, not used (recommended: pcs_properties__prop_has_value_{{prop}}) prop name of the property value value of the property extra_args additional options for the pcs property command cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml pcs_properties__prop_has_value_no-quorum-policy: pcs.prop_has_value: - prop: no-quorum-policy - value: ignore - cibname: cib_for_cluster_settings ''' return _item_present(name=name, item='property', item_id='{0}={1}'.format(prop, value), item_type=None, create='set', extra_args=extra_args, cibname=cibname) def resource_defaults_to(name, default, value, extra_args=None, cibname=None): ''' Ensure a resource default in the cluster is set to a given value Should be run on one cluster node only (there may be races) Can only be run on a node with a functional pacemaker/corosync name Irrelevant, not used (recommended: pcs_properties__resource_defaults_to_{{default}}) default name of the default resource property value value of the default resource property extra_args additional options for the pcs command cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml pcs_properties__resource_defaults_to_resource-stickiness: pcs.resource_defaults_to: - default: resource-stickiness - value: 100 - cibname: cib_for_cluster_settings ''' return _item_present(name=name, item='resource', item_id='{0}={1}'.format(default, value), item_type=None, show='defaults', create='defaults', extra_args=extra_args, cibname=cibname) def resource_op_defaults_to(name, op_default, value, extra_args=None, cibname=None): ''' Ensure a resource operation default in the cluster is set to a given value Should be run on one cluster node only (there may be races) Can only be run on a node with a functional pacemaker/corosync name Irrelevant, not used (recommended: pcs_properties__resource_op_defaults_to_{{op_default}}) op_default name of the operation default resource property value value of the operation default resource property extra_args additional options for the pcs command cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml pcs_properties__resource_op_defaults_to_monitor-interval: pcs.resource_op_defaults_to: - op_default: monitor-interval - value: 60s - cibname: cib_for_cluster_settings ''' return _item_present(name=name, item='resource', item_id='{0}={1}'.format(op_default, value), item_type=None, show=['op', 'defaults'], create=['op', 'defaults'], extra_args=extra_args, cibname=cibname) def stonith_present(name, stonith_id, stonith_device_type, stonith_device_options=None, cibname=None): ''' Ensure that a fencing resource is created Should be run on one cluster node only (there may be races) Can only be run on a node with a functional pacemaker/corosync name Irrelevant, not used (recommended: pcs_stonith__created_{{stonith_id}}) stonith_id name for the stonith resource stonith_device_type name of the stonith agent fence_eps, fence_xvm f.e. stonith_device_options additional options for creating the stonith resource cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml pcs_stonith__created_eps_fence: pcs.stonith_present: - stonith_id: eps_fence - stonith_device_type: fence_eps - stonith_device_options: - 'pcmk_host_map=node1.example.org:01;node2.example.org:02' - 'ipaddr=myepsdevice.example.org' - 'power_wait=5' - 'verbose=1' - 'debug=/var/log/pcsd/eps_fence.log' - 'login=hidden' - 'passwd=hoonetorg' - cibname: cib_for_stonith ''' return _item_present(name=name, item='stonith', item_id=stonith_id, item_type=stonith_device_type, extra_args=stonith_device_options, cibname=cibname) def resource_present(name, resource_id, resource_type, resource_options=None, cibname=None): ''' Ensure that a resource is created Should be run on one cluster node only (there may be races) Can only be run on a node with a functional pacemaker/corosync name Irrelevant, not used (recommended: {{formulaname}}__resource_present_{{resource_id}}) resource_id name for the resource resource_type resource type (f.e. ocf:heartbeat:IPaddr2 or VirtualIP) resource_options additional options for creating the resource cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml mysql_pcs__resource_present_galera: pcs.resource_present: - resource_id: galera - resource_type: "ocf:heartbeat:galera" - resource_options: - 'wsrep_cluster_address=gcomm://node1.example.org,node2.example.org,node3.example.org' - '--master' - cibname: cib_for_galera ''' return _item_present(name=name, item='resource', item_id=resource_id, item_type=resource_type, extra_args=resource_options, cibname=cibname) def constraint_present(name, constraint_id, constraint_type, constraint_options=None, cibname=None): ''' Ensure that a constraint is created Should be run on one cluster node only (there may be races) Can only be run on a node with a functional pacemaker/corosync name Irrelevant, not used (recommended: {{formulaname}}__constraint_present_{{constraint_id}}) constraint_id name for the constraint (try first to create manually to find out the autocreated name) constraint_type constraint type (location, colocation, order) constraint_options options for creating the constraint cibname use a cached CIB-file named like cibname instead of the live CIB Example: .. code-block:: yaml haproxy_pcs__constraint_present_colocation-vip_galera-haproxy-clone-INFINITY: pcs.constraint_present: - constraint_id: colocation-vip_galera-haproxy-clone-INFINITY - constraint_type: colocation - constraint_options: - 'add' - 'vip_galera' - 'with' - 'haproxy-clone' - cibname: cib_for_haproxy ''' return _item_present(name=name, item='constraint', item_id=constraint_id, item_type=constraint_type, create=None, extra_args=constraint_options, cibname=cibname)
{ "content_hash": "d9c9973bb04be41d7a3f2a97ff1b6a90", "timestamp": "", "source": "github", "line_count": 1069, "max_line_length": 123, "avg_line_length": 33.042095416276894, "alnum_prop": 0.5685408527263461, "repo_name": "hoonetorg/salt-pcs-formula", "id": "9ba81c0f28fee04382d6ffd5545d96e4b4575cdb", "size": "35346", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "_states/pcs.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "1188" }, { "name": "Python", "bytes": "48971" }, { "name": "SaltStack", "bytes": "10459" } ], "symlink_target": "" }
<ion-view view-title="Putaway Result" ng-init="init()"> <ion-content padding="true" class="has-header"> <ul class="list"> <li class="item" ng-repeat="item in items"> <h2>{{item.Item.Id}}</h2> <div class="item-note"> <div class="list"> <label class="item item-input item-select" style="width: 130px"> <div class="input-label" style="padding-right: 0"> L. </div> <select ng-model="item.StorageLocation" ng-options="l for l in locations" style="padding-left: 0; padding-right: 0; margin-right: 28px"></select> </label> </div> </div> <p> Warehouse: {{item.StorageFacility}} - {{item.Quantity}} {{item.Unit}} </p> </li> </ul> <p></p> <ion-list ng-show="skippedSupplies.length > 0"> <ion-toggle ng-model="showSkippedSupplies" toggle-class="toggle-positive">Show Skipped Supplies</ion-toggle> <div class="item item-divider" ng-show="showSkippedSupplies"> Skipped Supplies (no stock) </div> <ion-item class="item" ng-repeat="supply in skippedSupplies" ng-show="showSkippedSupplies"> <h2>{{supply.Item.Id}}</h2> <h3>{{supply.Item.Description}}</h3> <div class="item-note"> {{supply.Quantity}} {{supply.Unit}} </div> </ion-item> </ion-list> </ion-content> <div class="bar bar-clear bar-footer"> <a ng-disabled="!enableFinish" ng-click="finished()" class="button button-positive pull-right">Finished</a> </div> </ion-view>
{ "content_hash": "e0ab12907432c45cdd699d9694a96ebd", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 173, "avg_line_length": 45.51219512195122, "alnum_prop": 0.4903536977491961, "repo_name": "RubenCordeiro/SINF-14-15", "id": "b8323c8849d25608c2b86c73eea7c677ff54bc0a", "size": "1866", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Client/www/templates/putawayResult.html", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "101" }, { "name": "C#", "bytes": "68995" }, { "name": "CSS", "bytes": "496927" }, { "name": "JavaScript", "bytes": "4217883" }, { "name": "Shell", "bytes": "616" }, { "name": "TeX", "bytes": "12261" } ], "symlink_target": "" }
/** * ContentBundleServiceSoapBindingStub.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.google.api.ads.dfp.v201311; public class ContentBundleServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.google.api.ads.dfp.v201311.ContentBundleServiceInterface { private java.util.Vector cachedSerClasses = new java.util.Vector(); private java.util.Vector cachedSerQNames = new java.util.Vector(); private java.util.Vector cachedSerFactories = new java.util.Vector(); private java.util.Vector cachedDeserFactories = new java.util.Vector(); static org.apache.axis.description.OperationDesc [] _operations; static { _operations = new org.apache.axis.description.OperationDesc[7]; _initOperationDesc1(); } private static void _initOperationDesc1(){ org.apache.axis.description.OperationDesc oper; org.apache.axis.description.ParameterDesc param; oper = new org.apache.axis.description.OperationDesc(); oper.setName("createContentBundle"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundle"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle"), com.google.api.ads.dfp.v201311.ContentBundle.class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundle.class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[0] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("createContentBundles"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundles"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle"), com.google.api.ads.dfp.v201311.ContentBundle[].class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundle[].class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[1] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("getContentBundle"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundleId"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), java.lang.Long.class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundle.class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[2] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("getContentBundlesByStatement"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "filterStatement"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Statement"), com.google.api.ads.dfp.v201311.Statement.class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundlePage")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundlePage.class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[3] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("performContentBundleAction"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundleAction"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundleAction"), com.google.api.ads.dfp.v201311.ContentBundleAction.class, false, false); param.setOmittable(true); oper.addParameter(param); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "filterStatement"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Statement"), com.google.api.ads.dfp.v201311.Statement.class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "UpdateResult")); oper.setReturnClass(com.google.api.ads.dfp.v201311.UpdateResult.class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[4] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("updateContentBundle"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundle"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle"), com.google.api.ads.dfp.v201311.ContentBundle.class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundle.class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[5] = oper; oper = new org.apache.axis.description.OperationDesc(); oper.setName("updateContentBundles"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "contentBundles"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle"), com.google.api.ads.dfp.v201311.ContentBundle[].class, false, false); param.setOmittable(true); oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle")); oper.setReturnClass(com.google.api.ads.dfp.v201311.ContentBundle[].class); oper.setReturnQName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "rval")); oper.setStyle(org.apache.axis.constants.Style.WRAPPED); oper.setUse(org.apache.axis.constants.Use.LITERAL); oper.addFault(new org.apache.axis.description.FaultDesc( new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiExceptionFault"), "com.google.api.ads.dfp.v201311.ApiException", new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"), true )); _operations[6] = oper; } public ContentBundleServiceSoapBindingStub() throws org.apache.axis.AxisFault { this(null); } public ContentBundleServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { this(service); super.cachedEndpoint = endpointURL; } public ContentBundleServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { if (service == null) { super.service = new org.apache.axis.client.Service(); } else { super.service = service; } ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2"); java.lang.Class cls; javax.xml.namespace.QName qName; javax.xml.namespace.QName qName2; java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class; java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class; java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class; qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ActivateContentBundles"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ActivateContentBundles.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ApiError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiException"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ApiException.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiVersionError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ApiVersionError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApiVersionError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ApiVersionErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ApplicationException"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ApplicationException.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Authentication"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.Authentication.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "AuthenticationError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.AuthenticationError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "AuthenticationError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.AuthenticationErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "BooleanValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.BooleanValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ClientLogin"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ClientLogin.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "CommonError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.CommonError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "CommonError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.CommonErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundle"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ContentBundle.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundleAction"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ContentBundleAction.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundlePage"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ContentBundlePage.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ContentBundleStatus"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ContentBundleStatus.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Date"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.Date.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "DateTime"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.DateTime.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "DateTimeValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.DateTimeValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "DateValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.DateValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "DeactivateContentBundles"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.DeactivateContentBundles.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ExcludeContentFromContentBundle"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ExcludeContentFromContentBundle.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "FeatureError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.FeatureError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "FeatureError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.FeatureErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "IncludeContentInContentBundle"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.IncludeContentInContentBundle.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "InternalApiError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.InternalApiError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "InternalApiError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.InternalApiErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "NotNullError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.NotNullError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "NotNullError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.NotNullErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "NumberValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.NumberValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "OAuth"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.OAuth.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PermissionError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PermissionError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PermissionError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PermissionErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PlacementError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PlacementError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PlacementError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PlacementErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PublisherQueryLanguageContextError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PublisherQueryLanguageContextError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PublisherQueryLanguageContextError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PublisherQueryLanguageContextErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PublisherQueryLanguageSyntaxError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PublisherQueryLanguageSyntaxError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "PublisherQueryLanguageSyntaxError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.PublisherQueryLanguageSyntaxErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "QuotaError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.QuotaError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "QuotaError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.QuotaErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "RequiredError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.RequiredError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "RequiredError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.RequiredErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ServerError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ServerError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "ServerError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.ServerErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "SetValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.SetValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "SoapRequestHeader"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.SoapRequestHeader.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "SoapResponseHeader"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.SoapResponseHeader.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Statement"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.Statement.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "StatementError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.StatementError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "StatementError.Reason"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.StatementErrorReason.class; cachedSerClasses.add(cls); cachedSerFactories.add(enumsf); cachedDeserFactories.add(enumdf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "String_ValueMapEntry"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.String_ValueMapEntry.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "TextValue"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.TextValue.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "UniqueError"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.UniqueError.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "UpdateResult"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.UpdateResult.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); qName = new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "Value"); cachedSerQNames.add(qName); cls = com.google.api.ads.dfp.v201311.Value.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); cachedDeserFactories.add(beandf); } protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedUsername != null) { _call.setUsername(super.cachedUsername); } if (super.cachedPassword != null) { _call.setPassword(super.cachedPassword); } if (super.cachedEndpoint != null) { _call.setTargetEndpointAddress(super.cachedEndpoint); } if (super.cachedTimeout != null) { _call.setTimeout(super.cachedTimeout); } if (super.cachedPortName != null) { _call.setPortName(super.cachedPortName); } java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); } // All the type mapping information is registered // when the first call is made. // The type mapping information is actually registered in // the TypeMappingRegistry of the service, which // is the reason why registration is only needed for the first call. synchronized (this) { if (firstCall()) { // must set encoding style before registering serializers _call.setEncodingStyle(null); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames.get(i); java.lang.Object x = cachedSerFactories.get(i); if (x instanceof Class) { java.lang.Class sf = (java.lang.Class) cachedSerFactories.get(i); java.lang.Class df = (java.lang.Class) cachedDeserFactories.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) { org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) cachedSerFactories.get(i); org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) cachedDeserFactories.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } } } } return _call; } catch (java.lang.Throwable _t) { throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); } } public com.google.api.ads.dfp.v201311.ContentBundle createContentBundle(com.google.api.ads.dfp.v201311.ContentBundle contentBundle) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "createContentBundle")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundle}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundle) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundle) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundle.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.ContentBundle[] createContentBundles(com.google.api.ads.dfp.v201311.ContentBundle[] contentBundles) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[1]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "createContentBundles")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundles}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundle[]) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundle[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundle[].class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.ContentBundle getContentBundle(java.lang.Long contentBundleId) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[2]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "getContentBundle")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundleId}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundle) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundle) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundle.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.ContentBundlePage getContentBundlesByStatement(com.google.api.ads.dfp.v201311.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[3]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "getContentBundlesByStatement")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {filterStatement}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundlePage) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundlePage) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundlePage.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.UpdateResult performContentBundleAction(com.google.api.ads.dfp.v201311.ContentBundleAction contentBundleAction, com.google.api.ads.dfp.v201311.Statement filterStatement) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[4]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "performContentBundleAction")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundleAction, filterStatement}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.UpdateResult) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.UpdateResult) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.UpdateResult.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.ContentBundle updateContentBundle(com.google.api.ads.dfp.v201311.ContentBundle contentBundle) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[5]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "updateContentBundle")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundle}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundle) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundle) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundle.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } public com.google.api.ads.dfp.v201311.ContentBundle[] updateContentBundles(com.google.api.ads.dfp.v201311.ContentBundle[] contentBundles) throws java.rmi.RemoteException, com.google.api.ads.dfp.v201311.ApiException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[6]); _call.setUseSOAPAction(true); _call.setSOAPActionURI(""); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201311", "updateContentBundles")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {contentBundles}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (com.google.api.ads.dfp.v201311.ContentBundle[]) _resp; } catch (java.lang.Exception _exception) { return (com.google.api.ads.dfp.v201311.ContentBundle[]) org.apache.axis.utils.JavaUtils.convert(_resp, com.google.api.ads.dfp.v201311.ContentBundle[].class); } } } catch (org.apache.axis.AxisFault axisFaultException) { if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.google.api.ads.dfp.v201311.ApiException) { throw (com.google.api.ads.dfp.v201311.ApiException) axisFaultException.detail; } } throw axisFaultException; } } }
{ "content_hash": "8c94f2bf199eefa7b04aa30cf41b173e", "timestamp": "", "source": "github", "line_count": 945, "max_line_length": 394, "avg_line_length": 55.99047619047619, "alnum_prop": 0.6543440872408384, "repo_name": "google-code-export/google-api-dfp-java", "id": "6de83141572bbfe9bb07c6f00345e609cc673b0e", "size": "52911", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/com/google/api/ads/dfp/v201311/ContentBundleServiceSoapBindingStub.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "39950935" } ], "symlink_target": "" }
ACCEPTED #### According to Index Fungorum #### Published in null #### Original name Lecanora ochromicra Nyl. ### Remarks null
{ "content_hash": "aaa746af92e52a174ff5d0ba84c3ddc4", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 24, "avg_line_length": 9.923076923076923, "alnum_prop": 0.7054263565891473, "repo_name": "mdoering/backbone", "id": "ec87bc15b9ed4ca3602e0d1443d364ffc84497b5", "size": "183", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Fungi/Ascomycota/Lecanoromycetes/Lecanorales/Hymeneliaceae/Ionaspis/Ionaspis ochromicra/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
<?php declare(strict_types=1); namespace Tests\Centreon\Domain\MetaServiceConfiguration\Exception; use Centreon\Domain\MetaServiceConfiguration\Exception\MetaServiceConfigurationException; use PHPUnit\Framework\TestCase; /** * @package Tests\Centreon\Domain\HostConfiguration\Exceptions */ class MetaServiceConfigurationExceptionTest extends TestCase { /** * Tests the arguments of the static method findM. */ public function testFindMetaServicesConfigurations(): void { $previousMessage1 = 'Error message 1'; $errorMessage = 'Error when searching for the meta services configurations'; $exception = MetaServiceConfigurationException::findMetaServicesConfigurations( new \Exception($previousMessage1) ); self::assertEquals(sprintf($errorMessage), $exception->getMessage()); self::assertNotNull($exception->getPrevious()); self::assertEquals($previousMessage1, $exception->getPrevious()->getMessage()); } /** * Tests the arguments of the static method findOneMetaServiceConfiguration. */ public function testFindOneMetaServiceConfiguration(): void { $previousMessage1 = 'Error message 1'; $errorMessage = 'Error when searching for the meta service configuration (%s)'; $exception = MetaServiceConfigurationException::findOneMetaServiceConfiguration( new \Exception($previousMessage1), 1 ); self::assertEquals(sprintf($errorMessage, 1), $exception->getMessage()); self::assertNotNull($exception->getPrevious()); self::assertEquals($previousMessage1, $exception->getPrevious()->getMessage()); } /** * Tests the arguments of the static method findOneMetaServiceConfigurationNotFound. */ public function testFindOneMetaServiceConfigurationNotFound(): void { $errorMessage = 'Meta service configuration (%s) not found'; $exception = MetaServiceConfigurationException::findOneMetaServiceConfigurationNotFound(1); self::assertEquals(sprintf($errorMessage, 1), $exception->getMessage()); } }
{ "content_hash": "66a686ea0683aa0efeac1b0d02e60674", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 99, "avg_line_length": 36.355932203389834, "alnum_prop": 0.7076923076923077, "repo_name": "centreon/centreon", "id": "313ccca2b261304e2923ab1db4bbfa6f8cc68ffd", "size": "2820", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "centreon/tests/php/Centreon/Domain/MetaServiceConfiguration/Exception/MetaServiceConfigurationExceptionTest.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "210043" }, { "name": "Gherkin", "bytes": "174313" }, { "name": "HTML", "bytes": "1276734" }, { "name": "JavaScript", "bytes": "865312" }, { "name": "Makefile", "bytes": "25883" }, { "name": "NewLisp", "bytes": "621" }, { "name": "PHP", "bytes": "15602217" }, { "name": "Perl", "bytes": "1866808" }, { "name": "Python", "bytes": "32748" }, { "name": "Raku", "bytes": "122" }, { "name": "Shell", "bytes": "473416" }, { "name": "Smarty", "bytes": "42689" }, { "name": "TypeScript", "bytes": "1698281" }, { "name": "XSLT", "bytes": "124586" } ], "symlink_target": "" }
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. Imports System.Collections.Immutable Imports Microsoft.CodeAnalysis.VisualBasic.Emit Imports Microsoft.CodeAnalysis.VisualBasic.Symbols Imports Microsoft.CodeAnalysis.VisualBasic.Symbols.Metadata.PE Imports MetadataOrDiagnostic = System.Object Namespace Microsoft.CodeAnalysis.VisualBasic Partial Public NotInheritable Class VisualBasicCompilation ''' <summary> ''' ReferenceManager encapsulates functionality to create an underlying SourceAssemblySymbol ''' (with underlying ModuleSymbols) for Compilation and AssemblySymbols for referenced assemblies ''' (with underlying ModuleSymbols) all properly linked together based on reference resolution ''' between them. ''' ''' ReferenceManager is also responsible for reuse of metadata readers for imported modules and ''' assemblies as well as existing AssemblySymbols for referenced assemblies. In order to do that, ''' it maintains global cache for metadata readers and AssemblySymbols associated with them. ''' The cache uses WeakReferences to refer to the metadata readers and AssemblySymbols to allow ''' memory and resources being reclaimed once they are no longer used. The tricky part about reusing ''' existing AssemblySymbols is to find a set of AssemblySymbols that are created for the referenced ''' assemblies, which (the AssemblySymbols from the set) are linked in a way, consistent with the ''' reference resolution between the referenced assemblies. ''' ''' When existing Compilation is used as a metadata reference, there are scenarios when its underlying ''' SourceAssemblySymbol cannot be used to provide symbols in context of the new Compilation. Consider ''' classic multi-targeting scenario: compilation C1 references v1 of Lib.dll and compilation C2 ''' references C1 and v2 of Lib.dll. In this case, SourceAssemblySymbol for C1 is linked to AssemblySymbol ''' for v1 of Lib.dll. However, given the set of references for C2, the same reference for C1 should be ''' resolved against v2 of Lib.dll. In other words, in context of C2, all types from v1 of Lib.dll ''' leaking through C1 (through method signatures, etc.) must be retargeted to the types from v2 of Lib.dll. ''' In this case, ReferenceManager creates a special RetargetingAssemblySymbol for C1, which is responsible ''' for the type retargeting. The RetargetingAssemblySymbols could also be reused for different ''' Compilations, ReferenceManager maintains a cache of RetargetingAssemblySymbols (WeakReferences) for each ''' Compilation. ''' ''' The only public entry point of this class is CreateSourceAssembly() method. ''' </summary> Friend NotInheritable Class ReferenceManager Inherits CommonReferenceManager(Of VisualBasicCompilation, AssemblySymbol) Public Sub New(simpleAssemblyName As String, identityComparer As AssemblyIdentityComparer, observedMetadata As Dictionary(Of MetadataReference, MetadataOrDiagnostic)) MyBase.New(simpleAssemblyName, identityComparer, observedMetadata) End Sub Protected Overrides Function GetActualBoundReferencesUsedBy(assemblySymbol As AssemblySymbol) As AssemblySymbol() Dim refs As New List(Of AssemblySymbol) For Each [module] In assemblySymbol.Modules refs.AddRange([module].GetReferencedAssemblySymbols()) Next For i As Integer = 0 To refs.Count - 1 Step 1 If refs(i).IsMissing Then refs(i) = Nothing ' Do not expose missing assembly symbols to ReferenceManager.Binder End If Next Return refs.ToArray() End Function Protected Overrides Function GetNoPiaResolutionAssemblies(candidateAssembly As AssemblySymbol) As ImmutableArray(Of AssemblySymbol) If TypeOf candidateAssembly Is SourceAssemblySymbol Then ' This is an optimization, if candidateAssembly links something or explicitly declares local type, ' common reference binder shouldn't reuse this symbol because candidateAssembly won't be in the ' set returned by GetNoPiaResolutionAssemblies(). This also makes things clearer. Return ImmutableArray(Of AssemblySymbol).Empty End If Return candidateAssembly.GetNoPiaResolutionAssemblies() End Function Protected Overrides Function IsLinked(candidateAssembly As AssemblySymbol) As Boolean Return candidateAssembly.IsLinked End Function Protected Overrides Function GetCorLibrary(candidateAssembly As AssemblySymbol) As AssemblySymbol Dim corLibrary As AssemblySymbol = candidateAssembly.CorLibrary ' Do not expose missing assembly symbols to ReferenceManager.Binder Return If(corLibrary.IsMissing, Nothing, corLibrary) End Function Protected Overrides ReadOnly Property MessageProvider As CommonMessageProvider Get Return VisualBasic.MessageProvider.Instance End Get End Property Protected Overrides Function CreateAssemblyDataForFile(assembly As PEAssembly, cachedSymbols As WeakList(Of IAssemblySymbol), documentationProvider As DocumentationProvider, sourceAssemblySimpleName As String, importOptions As MetadataImportOptions, embedInteropTypes As Boolean) As AssemblyData Return New AssemblyDataForFile(assembly, cachedSymbols, embedInteropTypes, documentationProvider, sourceAssemblySimpleName, importOptions) End Function Protected Overrides Function CreateAssemblyDataForCompilation(compilationReference As CompilationReference) As AssemblyData Dim vbReference = TryCast(compilationReference, VisualBasicCompilationReference) If vbReference Is Nothing Then Throw New NotSupportedException(String.Format(VBResources.CantReferenceCompilationFromTypes, compilationReference.GetType(), "Visual Basic")) End If Dim result As New AssemblyDataForCompilation(vbReference.Compilation, vbReference.Properties.EmbedInteropTypes) Debug.Assert(vbReference.Compilation._lazyAssemblySymbol IsNot Nothing) Return result End Function Protected Overrides Function CheckPropertiesConsistency(primaryReference As MetadataReference, duplicateReference As MetadataReference, diagnostics As DiagnosticBag) As Boolean Return True End Function ''' <summary> ''' VB allows two weak assembly references of the same simple name be passed to a compilation ''' as long as their versions are different. It ignores culture. ''' </summary> Protected Overrides Function WeakIdentityPropertiesEquivalent(identity1 As AssemblyIdentity, identity2 As AssemblyIdentity) As Boolean Return identity1.Version = identity2.Version End Function Public Sub CreateSourceAssemblyForCompilation(compilation As VisualBasicCompilation) ' We are reading the Reference Manager state outside of a lock by accessing ' IsBound and HasCircularReference properties. ' Once isBound flag is flipped the state of the manager is available and doesn't change. ' ' If two threads are building SourceAssemblySymbol and the first just updated ' set isBound flag to 1 but not yet set lazySourceAssemblySymbol, ' the second thread may end up reusing the Reference Manager data the first thread calculated. ' That's ok since ' 1) the second thread would produce the same data, ' 2) all results calculated by the second thread will be thrown away since the first thread ' already acquired SymbolCacheAndReferenceManagerStateGuard that is needed to publish the data. ' Given compilation is the first compilation that shares this manager and its symbols are requested. ' Perform full reference resolution and binding. If Not IsBound AndAlso CreateAndSetSourceAssemblyFullBind(compilation) Then ' we have successfully bound the references for the compilation ElseIf Not HasCircularReference Then ' Another compilation that shares the manager with the given compilation ' already bound its references and produced tables that we can use to construct ' source assembly symbol faster. CreateAndSetSourceAssemblyReuseData(compilation) Else ' We encountered a circular reference while binding the previous compilation. ' This compilation can't share bound references with other compilations. Create a new manager. ' NOTE: The CreateSourceAssemblyFullBind is going to replace compilation's reference manager with newManager. Dim newManager = New ReferenceManager(Me.SimpleAssemblyName, Me.IdentityComparer, Me.ObservedMetadata) Dim successful = newManager.CreateAndSetSourceAssemblyFullBind(compilation) ' The new manager isn't shared with any other compilation so there is no other ' thread but the current one could have initialized it. Debug.Assert(successful) newManager.AssertBound() End If AssertBound() Debug.Assert(compilation._lazyAssemblySymbol IsNot Nothing) End Sub ''' <summary> ''' Creates a <see cref="PEAssemblySymbol"/> from specified metadata. ''' </summary> ''' <remarks> ''' Used by EnC to create symbols for emit baseline. The PE symbols are used by <see cref="VisualBasicSymbolMatcher"/>. ''' ''' The assembly references listed in the metadata AssemblyRef table are matched to the resolved references ''' stored on this <see cref="ReferenceManager"/>. Each AssemblyRef is matched against the assembly identities ''' using an exact equality comparison. No unification Or further resolution is performed. ''' </remarks> Friend Function CreatePEAssemblyForAssemblyMetadata(metadata As AssemblyMetadata, importOptions As MetadataImportOptions) As PEAssemblySymbol AssertBound() ' If the compilation has a reference from metadata to source assembly we can't share the referenced PE symbols. Debug.Assert(Not HasCircularReference) Dim referencedAssembliesByIdentity = New Dictionary(Of AssemblyIdentity, AssemblySymbol)() For Each symbol In Me.ReferencedAssemblies referencedAssembliesByIdentity.Add(symbol.Identity, symbol) Next Dim assembly = metadata.GetAssembly Dim peReferences = assembly.AssemblyReferences.SelectAsArray(AddressOf MapAssemblyIdentityToResolvedSymbol, referencedAssembliesByIdentity) Dim assemblySymbol = New PEAssemblySymbol(assembly, DocumentationProvider.Default, isLinked:=False, importOptions:=importOptions) Dim unifiedAssemblies = Me.UnifiedAssemblies.WhereAsArray(Function(unified) referencedAssembliesByIdentity.ContainsKey(unified.OriginalReference)) InitializeAssemblyReuseData(assemblySymbol, peReferences, unifiedAssemblies) If assembly.ContainsNoPiaLocalTypes() Then assemblySymbol.SetNoPiaResolutionAssemblies(Me.ReferencedAssemblies) End If Return assemblySymbol End Function Private Shared Function MapAssemblyIdentityToResolvedSymbol(identity As AssemblyIdentity, map As Dictionary(Of AssemblyIdentity, AssemblySymbol)) As AssemblySymbol Dim symbol As AssemblySymbol = Nothing If map.TryGetValue(identity, symbol) Then Return symbol End If Return New MissingAssemblySymbol(identity) End Function Private Sub CreateAndSetSourceAssemblyReuseData(compilation As VisualBasicCompilation) AssertBound() ' If the compilation has a reference from metadata to source assembly we can't share the referenced PE symbols. Debug.Assert(Not HasCircularReference) Dim moduleName As String = compilation.MakeSourceModuleName() Dim assemblySymbol = New SourceAssemblySymbol(compilation, Me.SimpleAssemblyName, moduleName, Me.ReferencedModules) InitializeAssemblyReuseData(assemblySymbol, Me.ReferencedAssemblies, Me.UnifiedAssemblies) If compilation._lazyAssemblySymbol Is Nothing Then SyncLock SymbolCacheAndReferenceManagerStateGuard If compilation._lazyAssemblySymbol Is Nothing Then compilation._lazyAssemblySymbol = assemblySymbol Debug.Assert(compilation._referenceManager Is Me) End If End SyncLock End If End Sub Private Sub InitializeAssemblyReuseData(assemblySymbol As AssemblySymbol, referencedAssemblies As ImmutableArray(Of AssemblySymbol), unifiedAssemblies As ImmutableArray(Of UnifiedAssembly(Of AssemblySymbol))) AssertBound() assemblySymbol.SetCorLibrary(If(Me.CorLibraryOpt, assemblySymbol)) Dim sourceModuleReferences = New ModuleReferences(Of AssemblySymbol)(referencedAssemblies.SelectAsArray(Function(a) a.Identity), referencedAssemblies, unifiedAssemblies) assemblySymbol.Modules(0).SetReferences(sourceModuleReferences) Dim assemblyModules = assemblySymbol.Modules Dim referencedModulesReferences = Me.ReferencedModulesReferences Debug.Assert(assemblyModules.Length = referencedModulesReferences.Length + 1) For i = 1 To assemblyModules.Length - 1 assemblyModules(i).SetReferences(referencedModulesReferences(i - 1)) Next End Sub ' Returns false if another compilation sharing this manager finished binding earlier and we should reuse its results. Friend Function CreateAndSetSourceAssemblyFullBind(compilation As VisualBasicCompilation) As Boolean Dim boundReferenceDirectiveMap As IDictionary(Of String, MetadataReference) = Nothing Dim boundReferenceDirectives As ImmutableArray(Of MetadataReference) = Nothing Dim hasCircularReference As Boolean ' Let's process our references and separate Assembly refs from addmodule. Dim referencedAssemblies As ImmutableArray(Of AssemblyData) = Nothing Dim modules As ImmutableArray(Of PEModule) = Nothing ' To make sure the modules are not collected ahead of time. Dim references As ImmutableArray(Of MetadataReference) = Nothing Dim resolutionDiagnostics As ImmutableArray(Of Diagnostic) = Nothing Dim referenceMap As ImmutableArray(Of ResolvedReference) = Nothing Dim diagnostics = DiagnosticBag.GetInstance() Try referenceMap = ResolveMetadataReferences( compilation, references, boundReferenceDirectiveMap, boundReferenceDirectives, referencedAssemblies, modules, diagnostics) resolutionDiagnostics = diagnostics.ToReadOnly() Finally diagnostics.Free() End Try Dim assemblyBeingBuiltData As New AssemblyDataForAssemblyBeingBuilt(New AssemblyIdentity(name:=SimpleAssemblyName), referencedAssemblies, modules) Dim assembliesArray As AssemblyData() = New AssemblyData(referencedAssemblies.Length) {} assembliesArray(0) = assemblyBeingBuiltData For i = 1 To assembliesArray.Length - 1 assembliesArray(i) = referencedAssemblies(i - 1) Next Dim allAssemblies As ImmutableArray(Of AssemblyData) = assembliesArray.AsImmutableOrNull() ' Let's bind all the references Dim corLibraryIndex As Integer Dim bindingResult() As BoundInputAssembly = Bind(allAssemblies, hasCircularReference, corLibraryIndex) Debug.Assert(bindingResult.Length = allAssemblies.Length) ' Create AssemblySymbols for assemblies that can't use any existing symbols. Dim newSymbols As New List(Of Integer) For i As Integer = 1 To bindingResult.Length - 1 Step 1 If bindingResult(i).AssemblySymbol Is Nothing Then Dim compilationData = TryCast(allAssemblies(i), AssemblyDataForCompilation) If compilationData IsNot Nothing Then bindingResult(i).AssemblySymbol = New Retargeting.RetargetingAssemblySymbol(compilationData.Compilation.SourceAssembly, compilationData.IsLinked) Else Dim fileData = DirectCast(allAssemblies(i), AssemblyDataForFile) bindingResult(i).AssemblySymbol = New PEAssemblySymbol(fileData.Assembly, fileData.DocumentationProvider, fileData.IsLinked, fileData.EffectiveImportOptions) End If newSymbols.Add(i) End If Debug.Assert(allAssemblies(i).IsLinked = bindingResult(i).AssemblySymbol.IsLinked) Next Dim assemblySymbol = New SourceAssemblySymbol(compilation, SimpleAssemblyName, compilation.MakeSourceModuleName(), modules) Dim corLibrary As AssemblySymbol If corLibraryIndex = 0 Then corLibrary = assemblySymbol ElseIf corLibraryIndex > 0 Then corLibrary = bindingResult(corLibraryIndex).AssemblySymbol Else corLibrary = MissingCorLibrarySymbol.Instance End If assemblySymbol.SetCorLibrary(corLibrary) ' Setup bound references for newly created AssemblySymbols ' This should be done after we created/found all AssemblySymbols Dim missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol) = Nothing ' Setup bound references for newly created SourceAssemblySymbol Dim moduleReferences As ImmutableArray(Of ModuleReferences(Of AssemblySymbol)) = Nothing SetupReferencesForSourceAssembly(assemblySymbol, assemblyBeingBuiltData, bindingResult, missingAssemblies, moduleReferences) If newSymbols.Count > 0 Then ' Only if we detected that a referenced assembly refers to the assembly being built ' we allow the references to get ahold of the assembly being built. If hasCircularReference Then bindingResult(0).AssemblySymbol = assemblySymbol End If InitializeNewSymbols(newSymbols, assemblySymbol, allAssemblies, bindingResult, missingAssemblies) End If ' Calculate reference maps And aliases Dim referencedAssembliesMap = New Dictionary(Of MetadataReference, Integer)(referenceMap.Length) Dim referencedModulesMap = New Dictionary(Of MetadataReference, Integer)(modules.Length) Dim aliasesOfReferencedAssembliesBuilder = ArrayBuilder(Of ImmutableArray(Of String)).GetInstance(referencedAssemblies.Length) For i As Integer = 0 To referenceMap.Length - 1 Step 1 If referenceMap(i).IsSkipped Then Continue For End If If referenceMap(i).Kind = MetadataImageKind.Module Then ' add 1 for the manifest module Dim moduleIndex = 1 + referenceMap(i).Index referencedModulesMap.Add(references(i), moduleIndex) Else ' index into assembly data array Dim assemblyIndex = referenceMap(i).Index Debug.Assert(aliasesOfReferencedAssembliesBuilder.Count = assemblyIndex) referencedAssembliesMap.Add(references(i), assemblyIndex) aliasesOfReferencedAssembliesBuilder.Add(ImmutableArray(Of String).Empty) End If Next Dim aliasesOfReferencedAssemblies = aliasesOfReferencedAssembliesBuilder.ToImmutableAndFree() If compilation._lazyAssemblySymbol Is Nothing Then SyncLock SymbolCacheAndReferenceManagerStateGuard If compilation._lazyAssemblySymbol Is Nothing Then If IsBound Then ' Another thread has finished constructing AssemblySymbol for another compilation that shares this manager. ' Drop the results and reuse the symbols that were created for the other compilation. Return False End If UpdateSymbolCacheNoLock(newSymbols, allAssemblies, bindingResult) InitializeNoLock( referencedAssembliesMap, referencedModulesMap, boundReferenceDirectiveMap, boundReferenceDirectives, hasCircularReference, resolutionDiagnostics, If(corLibrary Is assemblySymbol, Nothing, corLibrary), modules, moduleReferences, assemblySymbol.SourceModule.GetReferencedAssemblySymbols(), aliasesOfReferencedAssemblies, assemblySymbol.SourceModule.GetUnifiedAssemblies()) ' Make sure that the given compilation holds on this instance of reference manager. Debug.Assert(compilation._referenceManager Is Me OrElse hasCircularReference) compilation._referenceManager = Me ' Finally, publish the source symbol after all data have been written. ' Once lazyAssemblySymbol is non-null other readers might start reading the data written above. compilation._lazyAssemblySymbol = assemblySymbol End If End SyncLock End If Return True End Function Private Shared Sub InitializeNewSymbols(newSymbols As List(Of Integer), assemblySymbol As SourceAssemblySymbol, assemblies As ImmutableArray(Of AssemblyData), bindingResult As BoundInputAssembly(), missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol)) Debug.Assert(newSymbols.Count > 0) Dim corLibrary = assemblySymbol.CorLibrary Debug.Assert(corLibrary IsNot Nothing) For Each i As Integer In newSymbols Dim compilationData = TryCast(assemblies(i), AssemblyDataForCompilation) If compilationData IsNot Nothing Then SetupReferencesForRetargetingAssembly(bindingResult, i, missingAssemblies, sourceAssemblyDebugOnly:=assemblySymbol) Else Dim fileData = DirectCast(assemblies(i), AssemblyDataForFile) SetupReferencesForFileAssembly(fileData, bindingResult, i, missingAssemblies, sourceAssemblyDebugOnly:=assemblySymbol) End If Next Dim linkedReferencedAssembliesBuilder = ArrayBuilder(Of AssemblySymbol).GetInstance() ' Setup CorLibrary and NoPia stuff for newly created assemblies For Each i As Integer In newSymbols If assemblies(i).ContainsNoPiaLocalTypes Then bindingResult(i).AssemblySymbol.SetNoPiaResolutionAssemblies( assemblySymbol.Modules(0).GetReferencedAssemblySymbols()) End If ' Setup linked referenced assemblies. linkedReferencedAssembliesBuilder.Clear() If assemblies(i).IsLinked Then linkedReferencedAssembliesBuilder.Add(bindingResult(i).AssemblySymbol) End If For Each referenceBinding In bindingResult(i).ReferenceBinding If referenceBinding.IsBound AndAlso assemblies(referenceBinding.DefinitionIndex).IsLinked Then linkedReferencedAssembliesBuilder.Add( bindingResult(referenceBinding.DefinitionIndex).AssemblySymbol) End If Next If linkedReferencedAssembliesBuilder.Count > 0 Then linkedReferencedAssembliesBuilder.RemoveDuplicates() bindingResult(i).AssemblySymbol.SetLinkedReferencedAssemblies(linkedReferencedAssembliesBuilder.ToImmutable()) End If bindingResult(i).AssemblySymbol.SetCorLibrary(corLibrary) Next linkedReferencedAssembliesBuilder.Free() If missingAssemblies IsNot Nothing Then For Each missingAssembly In missingAssemblies.Values missingAssembly.SetCorLibrary(corLibrary) Next End If End Sub Private Sub UpdateSymbolCacheNoLock(newSymbols As List(Of Integer), assemblies As ImmutableArray(Of AssemblyData), bindingResult As BoundInputAssembly()) ' Add new assembly symbols into the cache For Each i As Integer In newSymbols Dim compilationData = TryCast(assemblies(i), AssemblyDataForCompilation) If compilationData IsNot Nothing Then compilationData.Compilation.CacheRetargetingAssemblySymbolNoLock(bindingResult(i).AssemblySymbol) Else Dim fileData = DirectCast(assemblies(i), AssemblyDataForFile) fileData.CachedSymbols.Add(bindingResult(i).AssemblySymbol) End If Next End Sub Private Shared Sub SetupReferencesForRetargetingAssembly( bindingResult() As BoundInputAssembly, bindingIndex As Integer, ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol), sourceAssemblyDebugOnly As SourceAssemblySymbol ) Dim retargetingAssemblySymbol = DirectCast(bindingResult(bindingIndex).AssemblySymbol, Retargeting.RetargetingAssemblySymbol) Dim modules As ImmutableArray(Of ModuleSymbol) = retargetingAssemblySymbol.Modules Dim moduleCount = modules.Length Dim refsUsed As Integer = 0 For j As Integer = 0 To moduleCount - 1 Step 1 Dim referencedAssemblies As ImmutableArray(Of AssemblyIdentity) = retargetingAssemblySymbol.UnderlyingAssembly.Modules(j).GetReferencedAssemblies() ' For source module skip underlying linked references If j = 0 Then Dim underlyingReferencedAssemblySymbols As ImmutableArray(Of AssemblySymbol) = retargetingAssemblySymbol.UnderlyingAssembly.Modules(0).GetReferencedAssemblySymbols() Dim linkedUnderlyingReferences As Integer = 0 For Each asm As AssemblySymbol In underlyingReferencedAssemblySymbols If asm.IsLinked Then linkedUnderlyingReferences += 1 End If Next If linkedUnderlyingReferences > 0 Then Dim filteredReferencedAssemblies As AssemblyIdentity() = New AssemblyIdentity(referencedAssemblies.Length - linkedUnderlyingReferences - 1) {} Dim newIndex As Integer = 0 For k As Integer = 0 To underlyingReferencedAssemblySymbols.Length - 1 Step 1 If Not underlyingReferencedAssemblySymbols(k).IsLinked Then filteredReferencedAssemblies(newIndex) = referencedAssemblies(k) newIndex += 1 End If Next Debug.Assert(newIndex = filteredReferencedAssemblies.Length) referencedAssemblies = filteredReferencedAssemblies.AsImmutableOrNull() End If End If Dim refsCount As Integer = referencedAssemblies.Length Dim symbols(refsCount - 1) As AssemblySymbol Dim unifiedAssemblies As ArrayBuilder(Of UnifiedAssembly(Of AssemblySymbol)) = Nothing For k As Integer = 0 To refsCount - 1 Step 1 Dim referenceBinding = bindingResult(bindingIndex).ReferenceBinding(refsUsed + k) If referenceBinding.IsBound Then symbols(k) = GetAssemblyDefinitionSymbol(bindingResult, referenceBinding, unifiedAssemblies) Else symbols(k) = GetOrAddMissingAssemblySymbol(referencedAssemblies(k), missingAssemblies) End If Next Dim moduleReferences As New ModuleReferences(Of AssemblySymbol)(referencedAssemblies, symbols.AsImmutableOrNull(), unifiedAssemblies.AsImmutableOrEmpty()) modules(j).SetReferences(moduleReferences, sourceAssemblyDebugOnly) refsUsed += refsCount Next End Sub Private Shared Sub SetupReferencesForFileAssembly( fileData As AssemblyDataForFile, bindingResult() As BoundInputAssembly, bindingIndex As Integer, ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol), sourceAssemblyDebugOnly As SourceAssemblySymbol ) Dim peAssemblySymbol = DirectCast(bindingResult(bindingIndex).AssemblySymbol, Symbols.Metadata.PE.PEAssemblySymbol) Dim modules As ImmutableArray(Of ModuleSymbol) = peAssemblySymbol.Modules Dim moduleCount = modules.Length Dim refsUsed As Integer = 0 For j As Integer = 0 To moduleCount - 1 Step 1 Dim refsCount As Integer = fileData.Assembly.ModuleReferenceCounts(j) Dim names(refsCount - 1) As AssemblyIdentity Dim symbols(refsCount - 1) As AssemblySymbol fileData.AssemblyReferences.CopyTo(refsUsed, names, 0, refsCount) Dim unifiedAssemblies As ArrayBuilder(Of UnifiedAssembly(Of AssemblySymbol)) = Nothing For k As Integer = 0 To refsCount - 1 Step 1 Dim referenceBinding = bindingResult(bindingIndex).ReferenceBinding(refsUsed + k) If referenceBinding.IsBound Then symbols(k) = GetAssemblyDefinitionSymbol(bindingResult, referenceBinding, unifiedAssemblies) Else symbols(k) = GetOrAddMissingAssemblySymbol(names(k), missingAssemblies) End If Next Dim moduleReferences = New ModuleReferences(Of AssemblySymbol)(names.AsImmutableOrNull(), symbols.AsImmutableOrNull(), unifiedAssemblies.AsImmutableOrEmpty()) modules(j).SetReferences(moduleReferences, sourceAssemblyDebugOnly) refsUsed += refsCount Next End Sub Private Shared Sub SetupReferencesForSourceAssembly( sourceAssembly As SourceAssemblySymbol, assemblyBeingBuiltData As AssemblyDataForAssemblyBeingBuilt, bindingResult() As BoundInputAssembly, ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol), ByRef moduleReferences As ImmutableArray(Of ModuleReferences(Of AssemblySymbol)) ) Dim modules As ImmutableArray(Of ModuleSymbol) = sourceAssembly.Modules Dim moduleCount = modules.Length Dim refsUsed As Integer = 0 Dim moduleReferencesBuilder As ArrayBuilder(Of ModuleReferences(Of AssemblySymbol)) = If(moduleCount > 1, ArrayBuilder(Of ModuleReferences(Of AssemblySymbol)).GetInstance(), Nothing) For j As Integer = 0 To moduleCount - 1 Step 1 Dim refsCount As Integer = assemblyBeingBuiltData.ReferencesCountForModule(j) Dim names(refsCount - 1) As AssemblyIdentity Dim symbols(refsCount - 1) As AssemblySymbol assemblyBeingBuiltData.AssemblyReferences.CopyTo(refsUsed, names, 0, refsCount) Dim unifiedAssemblies As ArrayBuilder(Of UnifiedAssembly(Of AssemblySymbol)) = Nothing For k As Integer = 0 To refsCount - 1 Step 1 Dim referenceBinding = bindingResult(0).ReferenceBinding(refsUsed + k) If referenceBinding.IsBound Then symbols(k) = GetAssemblyDefinitionSymbol(bindingResult, referenceBinding, unifiedAssemblies) Else symbols(k) = GetOrAddMissingAssemblySymbol(names(k), missingAssemblies) End If Next Dim references = New ModuleReferences(Of AssemblySymbol)(names.AsImmutableOrNull(), symbols.AsImmutableOrNull(), unifiedAssemblies.AsImmutableOrEmpty()) If j > 0 Then moduleReferencesBuilder.Add(references) End If modules(j).SetReferences(references, sourceAssembly) refsUsed += refsCount Next moduleReferences = If(moduleReferencesBuilder Is Nothing, ImmutableArray(Of ModuleReferences(Of AssemblySymbol)).Empty, moduleReferencesBuilder.ToImmutableAndFree()) End Sub Private Shared Function GetAssemblyDefinitionSymbol(bindingResult As BoundInputAssembly(), referenceBinding As AssemblyReferenceBinding, ByRef unifiedAssemblies As ArrayBuilder(Of UnifiedAssembly(Of AssemblySymbol))) As AssemblySymbol Debug.Assert(referenceBinding.IsBound) Dim assembly = bindingResult(referenceBinding.DefinitionIndex).AssemblySymbol Debug.Assert(assembly IsNot Nothing) If referenceBinding.VersionDifference <> 0 Then If unifiedAssemblies Is Nothing Then unifiedAssemblies = New ArrayBuilder(Of UnifiedAssembly(Of AssemblySymbol))() End If unifiedAssemblies.Add(New UnifiedAssembly(Of AssemblySymbol)(assembly, referenceBinding.ReferenceIdentity)) End If Return assembly End Function Private Shared Function GetOrAddMissingAssemblySymbol( identity As AssemblyIdentity, ByRef missingAssemblies As Dictionary(Of AssemblyIdentity, MissingAssemblySymbol) ) As MissingAssemblySymbol Dim missingAssembly As MissingAssemblySymbol = Nothing If missingAssemblies Is Nothing Then missingAssemblies = New Dictionary(Of AssemblyIdentity, MissingAssemblySymbol)() ElseIf missingAssemblies.TryGetValue(identity, missingAssembly) Then Return missingAssembly End If missingAssembly = New MissingAssemblySymbol(identity) missingAssemblies.Add(identity, missingAssembly) Return missingAssembly End Function Private MustInherit Class AssemblyDataForMetadataOrCompilation Inherits AssemblyData Private _assemblies As List(Of AssemblySymbol) Private ReadOnly m_Identity As AssemblyIdentity Private ReadOnly m_ReferencedAssemblies As ImmutableArray(Of AssemblyIdentity) Private ReadOnly m_EmbedInteropTypes As Boolean 'This is the name of the compilation that is being built. 'This should be the assembly name w/o the extension. It is 'used to compute whether or not it is possible that this 'assembly will give friend access to the compilation. Protected ReadOnly m_CompilationName As String Protected Sub New(identity As AssemblyIdentity, referencedAssemblies As ImmutableArray(Of AssemblyIdentity), embedInteropTypes As Boolean, compilationName As String) Debug.Assert(identity IsNot Nothing) Debug.Assert(Not referencedAssemblies.IsDefault) m_EmbedInteropTypes = embedInteropTypes m_Identity = identity m_ReferencedAssemblies = referencedAssemblies m_CompilationName = compilationName End Sub Public Overrides ReadOnly Property Identity As AssemblyIdentity Get Return m_Identity End Get End Property Public Overrides ReadOnly Property AvailableSymbols As IEnumerable(Of AssemblySymbol) Get If (_assemblies Is Nothing) Then _assemblies = New List(Of AssemblySymbol)() ' This should be done lazy because while we creating ' instances of this type, creation of new SourceAssembly symbols ' might change the set of available AssemblySymbols. AddAvailableSymbols(_assemblies) End If Return _assemblies End Get End Property Protected MustOverride Sub AddAvailableSymbols(assemblies As List(Of AssemblySymbol)) Public Overrides ReadOnly Property AssemblyReferences As ImmutableArray(Of AssemblyIdentity) Get Return m_ReferencedAssemblies End Get End Property Public Overrides Function BindAssemblyReferences(assemblies As ImmutableArray(Of AssemblyData), assemblyIdentityComparer As AssemblyIdentityComparer) As AssemblyReferenceBinding() Return ResolveReferencedAssemblies(m_ReferencedAssemblies, assemblies, assemblyIdentityComparer, okToResolveAgainstCompilationBeingCreated:=True) End Function Public NotOverridable Overrides ReadOnly Property IsLinked As Boolean Get Return m_EmbedInteropTypes End Get End Property End Class Private NotInheritable Class AssemblyDataForFile Inherits AssemblyDataForMetadataOrCompilation Private ReadOnly _assembly As PEAssembly Private ReadOnly _cachedSymbols As WeakList(Of IAssemblySymbol) Private ReadOnly _documentationProvider As DocumentationProvider Private ReadOnly _compilationImportOptions As MetadataImportOptions Public ReadOnly Property Assembly As PEAssembly Get Return _assembly End Get End Property ''' <summary> ''' Guarded by <see cref="CommonReferenceManager.SymbolCacheAndReferenceManagerStateGuard"/>. ''' </summary> Public ReadOnly Property CachedSymbols As WeakList(Of IAssemblySymbol) Get Return _cachedSymbols End Get End Property Public ReadOnly Property DocumentationProvider As DocumentationProvider Get Return _documentationProvider End Get End Property Public Sub New(assembly As PEAssembly, cachedSymbols As WeakList(Of IAssemblySymbol), embedInteropTypes As Boolean, documentationProvider As DocumentationProvider, compilationName As String, compilationImportOptions As MetadataImportOptions) MyBase.New(assembly.Identity, assembly.AssemblyReferences, embedInteropTypes, compilationName) Debug.Assert(cachedSymbols IsNot Nothing) _cachedSymbols = cachedSymbols _assembly = assembly _documentationProvider = If(documentationProvider, DocumentationProvider.Default) _compilationImportOptions = compilationImportOptions End Sub Private _internalsVisibleComputed As Boolean = False Private _internalsVisibleToCompilation As Boolean = False Friend ReadOnly Property InternalsMayBeVisibleToCompilation As Boolean Get If Not _internalsVisibleComputed Then _internalsVisibleToCompilation = InternalsMayBeVisibleToAssemblyBeingCompiled(m_CompilationName, _assembly) _internalsVisibleComputed = True End If Return _internalsVisibleToCompilation End Get End Property Friend ReadOnly Property EffectiveImportOptions As MetadataImportOptions Get If InternalsMayBeVisibleToCompilation AndAlso _compilationImportOptions = MetadataImportOptions.Public Then Return MetadataImportOptions.Internal End If Return _compilationImportOptions End Get End Property Protected Overrides Sub AddAvailableSymbols(assemblies As List(Of AssemblySymbol)) Dim internalsMayBeVisibleToCompilation = Me.InternalsMayBeVisibleToCompilation ' accessing cached symbols requires a lock SyncLock SymbolCacheAndReferenceManagerStateGuard For Each assemblySymbol In _cachedSymbols Dim peAssembly = TryCast(assemblySymbol, PEAssemblySymbol) If IsMatchingAssembly(peAssembly) Then assemblies.Add(peAssembly) End If Next End SyncLock End Sub Public Overrides Function IsMatchingAssembly(candidateAssembly As AssemblySymbol) As Boolean Return IsMatchingAssembly(TryCast(candidateAssembly, PEAssemblySymbol)) End Function Private Overloads Function IsMatchingAssembly(peAssembly As PEAssemblySymbol) As Boolean If peAssembly Is Nothing Then Return False End If If peAssembly.Assembly IsNot Me.Assembly Then Return False End If If EffectiveImportOptions <> peAssembly.PrimaryModule.ImportOptions Then Return False End If ' TODO (tomat): ' We shouldn't need to compare documentation providers. All symbols in the cachedSymbols list ' should share the same provider - as they share the same metadata. ' Removing the Equals call also avoids calling user code while holding a lock. If Not peAssembly.DocumentationProvider.Equals(DocumentationProvider) Then Return False End If Return True End Function Public Overrides ReadOnly Property ContainsNoPiaLocalTypes() As Boolean Get Return _assembly.ContainsNoPiaLocalTypes() End Get End Property Public Overrides ReadOnly Property DeclaresTheObjectClass As Boolean Get Return _assembly.DeclaresTheObjectClass End Get End Property Public Overrides ReadOnly Property SourceCompilation As Compilation Get Return Nothing End Get End Property End Class Private NotInheritable Class AssemblyDataForCompilation Inherits AssemblyDataForMetadataOrCompilation Public ReadOnly Compilation As VisualBasicCompilation Public Sub New(compilation As VisualBasicCompilation, embedInteropTypes As Boolean) MyBase.New(compilation.Assembly.Identity, GetReferencedAssemblies(compilation), embedInteropTypes, compilation.AssemblyName) Debug.Assert(compilation IsNot Nothing) Me.Compilation = compilation End Sub Private Shared Function GetReferencedAssemblies(compilation As VisualBasicCompilation) As ImmutableArray(Of AssemblyIdentity) ' Collect information about references Dim refs = ArrayBuilder(Of AssemblyIdentity).GetInstance() Dim modules = compilation.Assembly.Modules ' Filter out linked assemblies referenced by the source module. Dim sourceReferencedAssemblies = modules(0).GetReferencedAssemblies() Dim sourceReferencedAssemblySymbols = modules(0).GetReferencedAssemblySymbols() Debug.Assert(sourceReferencedAssemblies.Length = sourceReferencedAssemblySymbols.Length) For i = 0 To sourceReferencedAssemblies.Length - 1 If Not sourceReferencedAssemblySymbols(i).IsLinked Then refs.Add(sourceReferencedAssemblies(i)) End If Next For i = 1 To modules.Length - 1 refs.AddRange(modules(i).GetReferencedAssemblies()) Next Return refs.ToImmutableAndFree() End Function Protected Overrides Sub AddAvailableSymbols(assemblies As List(Of AssemblySymbol)) assemblies.Add(Compilation.Assembly) ' accessing cached symbols requires a lock SyncLock SymbolCacheAndReferenceManagerStateGuard Compilation.AddRetargetingAssemblySymbolsNoLock(assemblies) End SyncLock End Sub Public Overrides Function IsMatchingAssembly(candidateAssembly As AssemblySymbol) As Boolean Dim retargeting = TryCast(candidateAssembly, Retargeting.RetargetingAssemblySymbol) Dim asm As AssemblySymbol If retargeting IsNot Nothing Then asm = retargeting.UnderlyingAssembly Else asm = TryCast(candidateAssembly, SourceAssemblySymbol) End If Debug.Assert(Not (TypeOf asm Is Retargeting.RetargetingAssemblySymbol)) Return asm Is Compilation.Assembly End Function Public Overrides ReadOnly Property ContainsNoPiaLocalTypes As Boolean Get Return Compilation.MightContainNoPiaLocalTypes() End Get End Property Public Overrides ReadOnly Property DeclaresTheObjectClass As Boolean Get Return Compilation.DeclaresTheObjectClass End Get End Property Public Overrides ReadOnly Property SourceCompilation As Compilation Get Return Compilation End Get End Property End Class ''' <summary> ''' For testing purposes only. ''' </summary> Friend Shared Function IsSourceAssemblySymbolCreated(compilation As VisualBasicCompilation) As Boolean Return compilation._lazyAssemblySymbol IsNot Nothing End Function ''' <summary> ''' For testing purposes only. ''' </summary> Friend Shared Function IsReferenceManagerInitialized(compilation As VisualBasicCompilation) As Boolean Return compilation._referenceManager.IsBound End Function End Class End Class End Namespace
{ "content_hash": "51cf9e803c572f10d2b56cb66c27be97", "timestamp": "", "source": "github", "line_count": 982, "max_line_length": 220, "avg_line_length": 53.82281059063136, "alnum_prop": 0.6006167934309607, "repo_name": "grianggrai/roslyn", "id": "43c4310a28c8ad19ca255d16152bece45082f758", "size": "52856", "binary": false, "copies": "6", "ref": "refs/heads/master", "path": "src/Compilers/VisualBasic/Portable/Symbols/ReferenceManager.vb", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "9526" }, { "name": "C#", "bytes": "72370870" }, { "name": "C++", "bytes": "3744" }, { "name": "F#", "bytes": "421" }, { "name": "PowerShell", "bytes": "7571" }, { "name": "Shell", "bytes": "8395" }, { "name": "Visual Basic", "bytes": "58864215" } ], "symlink_target": "" }
<footer class="site-footer"> <p>Copyright &copy; <a href="{{ site.url }}/">{{site.title}}</a></p> <p>Powered by <a href="https://github.com/jekyll/jekyll">Jekyll</a> on {% if site.github_username %} <a href="https://github.com/">Github</a> {% else %} GitHub {% endif %} | Design by <a href="http://yulijia.net">Lijia Yu</a> <div style="display:none;"><script src="http://s95.cnzz.com/stat.php?id=1253600585&web_id=1253600585" language="JavaScript"></script></div> </footer>
{ "content_hash": "9cb3301ac2132560599417934c5786fd", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 139, "avg_line_length": 37.92307692307692, "alnum_prop": 0.6348884381338742, "repo_name": "sunxianchao/sunxianchao.github.io", "id": "ddcdd74fc37aaf06152548ccd35a6de2fc14fb78", "size": "493", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "_includes/footer.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "20834" }, { "name": "HTML", "bytes": "322358" }, { "name": "VimL", "bytes": "11492" } ], "symlink_target": "" }
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import './app/app.js'; import './app/app.controller.js'; import './app/handsontable/handsonHelper.js'; import './app/notebook/notebook.controller.js'; /** start: global variable `zeppelin` related files */ import './app/tabledata/tabledata.js'; import './app/tabledata/transformation.js'; import './app/tabledata/pivot.js'; import './app/tabledata/passthrough.js'; import './app/tabledata/columnselector.js'; import './app/visualization/visualization.js'; import './app/visualization/builtins/visualization-table.js'; import './app/visualization/builtins/visualization-nvd3chart.js'; import './app/visualization/builtins/visualization-barchart.js'; import './app/visualization/builtins/visualization-piechart.js'; import './app/visualization/builtins/visualization-areachart.js'; import './app/visualization/builtins/visualization-linechart.js'; import './app/visualization/builtins/visualization-scatterchart.js'; import './app/visualization/builtins/storage-areachart.js'; /** end: global variable `zeppelin` related files */ import './app/credential/credential.controller.js'; import './app/configuration/configuration.controller.js'; import './app/configuration/configuration.filter.js'; import './app/notebook/paragraph/paragraph.controller.js'; import './app/notebook/paragraph/result/result.controller.js'; import './app/search/result-list.controller.js'; import './app/notebookRepos/notebookRepos.controller.js'; import './app/helium/helium.controller.js'; import './components/arrayOrderingSrv/arrayOrdering.service.js'; import './components/clipboard/clipboard.controller.js'; import './components/navbar/navbar.controller.js'; import './components/ngescape/ngescape.directive.js'; import './components/interpreter/interpreter.directive.js'; import './components/expandCollapse/expandCollapse.directive.js'; import './components/popover-html-unsafe/popover-html-unsafe.directive.js'; import './components/popover-html-unsafe/popover-html-unsafe-popup.directive.js'; import './components/editor/codeEditor.directive.js'; import './components/ngenter/ngenter.directive.js'; import './components/dropdowninput/dropdowninput.directive.js'; import './components/resizable/resizable.directive.js'; import './components/baseUrl/baseUrl.service.js'; import './components/browser-detect/browserDetect.service.js'; import './components/saveAs/saveAs.service.js'; import './components/searchService/search.service.js'; import './components/login/login.controller.js'; import './components/newPassword/newPassword.controller.js'; import './components/elasticInputCtrl/elasticInput.controller.js'; import './components/notevarshareService/notevarshare.service.js'; import './components/helium/helium.service.js'; import './app/dashboard/i18n.js'; import './app/dashing/tables/smart-table.js'; import './app/dashing/dashing.js'; import './app/dashboard/services/locator.js'; import './app/dashboard/services/restapi.js'; import './app/dashboard/services/health_check_service.js'; import './app/dashboard/services/models/models.js'; import './app/dashboard/views/cluster/cluster_hottestFiles.js'; import './app/dashboard/views/cluster/cluster_fileInCache.js'; import './app/dashboard/views/cluster/storage/storage.js'; import './app/dashboard/views/cluster/storage/bigChart.js' import './app/dashboard/views/cluster/nodeinfo/nodes.js'; import './app/dashboard/views/cluster/storage/storages.js'; import './app/dashboard/views/actions/actions.js'; import './app/dashboard/views/actions/action/action.js'; import './app/dashboard/views/actions/submit/submit.js'; import './app/dashboard/views/rules/rules.js'; import './app/dashboard/views/rules/rule/rule.js'; import './app/dashboard/views/rules/submit/submit.js'; import './app/dashboard/views/rules/rule/alerts_table.js'; import './app/dashboard/views/rules/rule/cmdlets_table.js'; import './app/dashboard/views/helper.js'; import './app/dashboard/views/mover/mover.js'; import './app/dashboard/views/copy/copy.js'; import './app/dashboard/views/mover/detail/moverActions.js'; import './app/dashboard/views/copy/detail/copyActions.js';
{ "content_hash": "aff9838a6b52e47c80f989b1957d4e78", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 81, "avg_line_length": 51.065934065934066, "alnum_prop": 0.7781364321067356, "repo_name": "qiyuangong/SSM", "id": "1ee2fa822ec81b2071801894b0dc869c8a92e8c1", "size": "4647", "binary": false, "copies": "1", "ref": "refs/heads/trunk", "path": "smart-zeppelin/zeppelin-web/src/index.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "6212" }, { "name": "Batchfile", "bytes": "11970" }, { "name": "C", "bytes": "65351" }, { "name": "C++", "bytes": "6401" }, { "name": "CMake", "bytes": "17721" }, { "name": "CSS", "bytes": "77302" }, { "name": "HTML", "bytes": "194727" }, { "name": "Java", "bytes": "5095408" }, { "name": "JavaScript", "bytes": "420787" }, { "name": "Python", "bytes": "86997" }, { "name": "Roff", "bytes": "60995" }, { "name": "Scala", "bytes": "31517" }, { "name": "Shell", "bytes": "80007" }, { "name": "Thrift", "bytes": "4680" }, { "name": "XSLT", "bytes": "7956" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GEmblem: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="icons.html" title="Icons"> <link rel="prev" href="GEmblemedIcon.html" title="GEmblemedIcon"> <link rel="next" href="failable_initialization.html" title="Failable Initialization"> <meta name="generator" content="GTK-Doc V1.24 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span>  <a href="#GEmblem.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span>  <a href="#GEmblem.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span>  <a href="#GEmblem.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span>  <a href="#GEmblem.properties" class="shortcut">Properties</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="icons.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="GEmblemedIcon.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="failable_initialization.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GEmblem"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GEmblem.top_of_page"></a>GEmblem</span></h2> <p>GEmblem — An object for emblems</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GEmblem.functions"></a><h2>Functions</h2> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="functions_return"> <col class="functions_name"> </colgroup> <tbody> <tr> <td class="function_type"> <a class="link" href="GEmblem.html" title="GEmblem"><span class="returnvalue">GEmblem</span></a> * </td> <td class="function_name"> <a class="link" href="GEmblem.html#g-emblem-new" title="g_emblem_new ()">g_emblem_new</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GEmblem.html" title="GEmblem"><span class="returnvalue">GEmblem</span></a> * </td> <td class="function_name"> <a class="link" href="GEmblem.html#g-emblem-new-with-origin" title="g_emblem_new_with_origin ()">g_emblem_new_with_origin</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * </td> <td class="function_name"> <a class="link" href="GEmblem.html#g-emblem-get-icon" title="g_emblem_get_icon ()">g_emblem_get_icon</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin"><span class="returnvalue">GEmblemOrigin</span></a> </td> <td class="function_name"> <a class="link" href="GEmblem.html#g-emblem-get-origin" title="g_emblem_get_origin ()">g_emblem_get_origin</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GEmblem.properties"></a><h2>Properties</h2> <div class="informaltable"><table border="0"> <colgroup> <col width="150px" class="properties_type"> <col width="300px" class="properties_name"> <col width="200px" class="properties_flags"> </colgroup> <tbody> <tr> <td class="property_type"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *</td> <td class="property_name"><a class="link" href="GEmblem.html#GEmblem--icon" title="The “icon” property">icon</a></td> <td class="property_flags">Read / Write / Construct Only</td> </tr> <tr> <td class="property_type"><a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin"><span class="type">GEmblemOrigin</span></a></td> <td class="property_name"><a class="link" href="GEmblem.html#GEmblem--origin" title="The “origin” property">origin</a></td> <td class="property_flags">Read / Write / Construct Only</td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GEmblem.other"></a><h2>Types and Values</h2> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="name"> <col class="description"> </colgroup> <tbody> <tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GEmblem.html#GEmblem-struct" title="GEmblem">GEmblem</a></td> </tr> <tr> <td class="datatype_keyword">enum</td> <td class="function_name"><a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin">GEmblemOrigin</a></td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GEmblem.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> <span class="lineart">╰──</span> GEmblem </pre> </div> <div class="refsect1"> <a name="GEmblem.implemented-interfaces"></a><h2>Implemented Interfaces</h2> <p> GEmblem implements <a class="link" href="GIcon.html" title="GIcon">GIcon</a>.</p> </div> <div class="refsect1"> <a name="GEmblem.includes"></a><h2>Includes</h2> <pre class="synopsis">#include &lt;gio/gio.h&gt; </pre> </div> <div class="refsect1"> <a name="GEmblem.description"></a><h2>Description</h2> <p><a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a> is an implementation of <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> that supports having an emblem, which is an icon with additional properties. It can than be added to a <a class="link" href="GEmblemedIcon.html" title="GEmblemedIcon"><span class="type">GEmblemedIcon</span></a>.</p> <p>Currently, only metainformation about the emblem's origin is supported. More may be added in the future.</p> </div> <div class="refsect1"> <a name="GEmblem.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="g-emblem-new"></a><h3>g_emblem_new ()</h3> <pre class="programlisting"><a class="link" href="GEmblem.html" title="GEmblem"><span class="returnvalue">GEmblem</span></a> * g_emblem_new (<em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon</code></em>);</pre> <p>Creates a new emblem for <em class="parameter"><code>icon</code></em> .</p> <div class="refsect3"> <a name="id-1.4.10.8.10.2.5"></a><h4>Parameters</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>icon</p></td> <td class="parameter_description"><p>a GIcon containing the icon.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="id-1.4.10.8.10.2.6"></a><h4>Returns</h4> <p> a new <a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a>.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p> </div> <hr> <div class="refsect2"> <a name="g-emblem-new-with-origin"></a><h3>g_emblem_new_with_origin ()</h3> <pre class="programlisting"><a class="link" href="GEmblem.html" title="GEmblem"><span class="returnvalue">GEmblem</span></a> * g_emblem_new_with_origin (<em class="parameter"><code><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> *icon</code></em>, <em class="parameter"><code><a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin"><span class="type">GEmblemOrigin</span></a> origin</code></em>);</pre> <p>Creates a new emblem for <em class="parameter"><code>icon</code></em> .</p> <div class="refsect3"> <a name="id-1.4.10.8.10.3.5"></a><h4>Parameters</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>icon</p></td> <td class="parameter_description"><p>a GIcon containing the icon.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>origin</p></td> <td class="parameter_description"><p>a GEmblemOrigin enum defining the emblem's origin</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="id-1.4.10.8.10.3.6"></a><h4>Returns</h4> <p> a new <a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a>.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p> </div> <hr> <div class="refsect2"> <a name="g-emblem-get-icon"></a><h3>g_emblem_get_icon ()</h3> <pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon"><span class="returnvalue">GIcon</span></a> * g_emblem_get_icon (<em class="parameter"><code><a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a> *emblem</code></em>);</pre> <p>Gives back the icon from <em class="parameter"><code>emblem</code></em> .</p> <div class="refsect3"> <a name="id-1.4.10.8.10.4.5"></a><h4>Parameters</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>emblem</p></td> <td class="parameter_description"><p>a <a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a> from which the icon should be extracted.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="id-1.4.10.8.10.4.6"></a><h4>Returns</h4> <p> a <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>. The returned object belongs to the emblem and should not be modified or freed. </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p> </div> <hr> <div class="refsect2"> <a name="g-emblem-get-origin"></a><h3>g_emblem_get_origin ()</h3> <pre class="programlisting"><a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin"><span class="returnvalue">GEmblemOrigin</span></a> g_emblem_get_origin (<em class="parameter"><code><a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a> *emblem</code></em>);</pre> <p>Gets the origin of the emblem.</p> <div class="refsect3"> <a name="id-1.4.10.8.10.5.5"></a><h4>Parameters</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>emblem</p></td> <td class="parameter_description"><p>a <a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a></p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="id-1.4.10.8.10.5.6"></a><h4>Returns</h4> <p> the origin of the emblem. </p> <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p> </div> <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p> </div> </div> <div class="refsect1"> <a name="GEmblem.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GEmblem-struct"></a><h3>GEmblem</h3> <pre class="programlisting">typedef struct _GEmblem GEmblem;</pre> <p>An object for Emblems</p> </div> <hr> <div class="refsect2"> <a name="GEmblemOrigin"></a><h3>enum GEmblemOrigin</h3> <p>GEmblemOrigin is used to add information about the origin of the emblem to <a class="link" href="GEmblem.html" title="GEmblem"><span class="type">GEmblem</span></a>.</p> <div class="refsect3"> <a name="id-1.4.10.8.11.3.4"></a><h4>Members</h4> <div class="informaltable"><table width="100%" border="0"> <colgroup> <col width="300px" class="enum_members_name"> <col class="enum_members_description"> <col width="200px" class="enum_members_annotations"> </colgroup> <tbody> <tr> <td class="enum_member_name"><p><a name="G-EMBLEM-ORIGIN-UNKNOWN:CAPS"></a>G_EMBLEM_ORIGIN_UNKNOWN</p></td> <td class="enum_member_description"> <p>Emblem of unknown origin</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="G-EMBLEM-ORIGIN-DEVICE:CAPS"></a>G_EMBLEM_ORIGIN_DEVICE</p></td> <td class="enum_member_description"> <p>Emblem adds device-specific information</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="G-EMBLEM-ORIGIN-LIVEMETADATA:CAPS"></a>G_EMBLEM_ORIGIN_LIVEMETADATA</p></td> <td class="enum_member_description"> <p>Emblem depicts live metadata, such as "readonly"</p> </td> <td class="enum_member_annotations"> </td> </tr> <tr> <td class="enum_member_name"><p><a name="G-EMBLEM-ORIGIN-TAG:CAPS"></a>G_EMBLEM_ORIGIN_TAG</p></td> <td class="enum_member_description"> <p>Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)</p> </td> <td class="enum_member_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-18.html#api-index-2.18">2.18</a></p> </div> </div> <div class="refsect1"> <a name="GEmblem.property-details"></a><h2>Property Details</h2> <div class="refsect2"> <a name="GEmblem--icon"></a><h3>The <code class="literal">“icon”</code> property</h3> <pre class="programlisting"> “icon” <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *</pre> <p>The actual icon of the emblem.</p> <p>Flags: Read / Write / Construct Only</p> </div> <hr> <div class="refsect2"> <a name="GEmblem--origin"></a><h3>The <code class="literal">“origin”</code> property</h3> <pre class="programlisting"> “origin” <a class="link" href="GEmblem.html#GEmblemOrigin" title="enum GEmblemOrigin"><span class="type">GEmblemOrigin</span></a></pre> <p>Tells which origin the emblem is derived from.</p> <p>Flags: Read / Write / Construct Only</p> <p>Default value: G_EMBLEM_ORIGIN_UNKNOWN</p> </div> </div> <div class="refsect1"> <a name="GEmblem.see-also"></a><h2>See Also</h2> <p><a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a>, <a class="link" href="GEmblemedIcon.html" title="GEmblemedIcon"><span class="type">GEmblemedIcon</span></a>, <a class="link" href="GLoadableIcon.html" title="GLoadableIcon"><span class="type">GLoadableIcon</span></a>, <a class="link" href="GThemedIcon.html" title="GThemedIcon"><span class="type">GThemedIcon</span></a></p> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.24</div> </body> </html>
{ "content_hash": "fca06c45c456be0299335f08135da272", "timestamp": "", "source": "github", "line_count": 351, "max_line_length": 411, "avg_line_length": 45.98005698005698, "alnum_prop": 0.6773653881900985, "repo_name": "imx6uldev/depedency_tools", "id": "41d9ad142d9f633e8c5f57e02f04a2b1f8cc2834", "size": "16213", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "glib/glib-2.46.2/docs/reference/gio/html/GEmblem.html", "mode": "33188", "license": "mit", "language": [ { "name": "Ada", "bytes": "1150302" }, { "name": "Assembly", "bytes": "650566" }, { "name": "Awk", "bytes": "67115" }, { "name": "Batchfile", "bytes": "20795" }, { "name": "C", "bytes": "48212133" }, { "name": "C#", "bytes": "55626" }, { "name": "C++", "bytes": "800706" }, { "name": "CLIPS", "bytes": "5291" }, { "name": "CMake", "bytes": "146683" }, { "name": "CSS", "bytes": "38144" }, { "name": "DIGITAL Command Language", "bytes": "27303" }, { "name": "DTrace", "bytes": "1133" }, { "name": "GDB", "bytes": "62" }, { "name": "Groff", "bytes": "2729395" }, { "name": "HTML", "bytes": "23035012" }, { "name": "Inno Setup", "bytes": "5523" }, { "name": "Java", "bytes": "68140" }, { "name": "JavaScript", "bytes": "7059" }, { "name": "M4", "bytes": "530743" }, { "name": "Makefile", "bytes": "6893113" }, { "name": "Module Management System", "bytes": "3625" }, { "name": "Objective-C", "bytes": "1178" }, { "name": "PHP", "bytes": "531" }, { "name": "Pascal", "bytes": "70297" }, { "name": "Perl", "bytes": "277052" }, { "name": "Perl6", "bytes": "110" }, { "name": "Python", "bytes": "551681" }, { "name": "SAS", "bytes": "1847" }, { "name": "Shell", "bytes": "3852976" }, { "name": "TeX", "bytes": "551521" }, { "name": "XSLT", "bytes": "5347" }, { "name": "Yacc", "bytes": "25923" } ], "symlink_target": "" }
package org.openo.nfvo.resmanagement.test; import java.io.File; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.openo.baseservice.remoteservice.exception.ServiceException; import org.openo.nfvo.resmanagement.mocoserver.VimDriverSuccessServer; import org.openo.nfvo.resmanagement.util.MyTestManager; /** * <br> * <p> * </p> * * @author * @version NFVO 0.5 Oct 15, 2016 */ public class ITResOperateRoaSuccess extends MyTestManager { private VimDriverSuccessServer driver = new VimDriverSuccessServer(); private static final String POST_PATH = "src/integration-test/resources/testcase/resoperateroa/addresourcesuccess1.json"; private static final String PUT_PATH = "src/integration-test/resources/testcase/resoperateroa/modresourcesuccess1.json"; private static final String DEL_PATH = "src/integration-test/resources/testcase/resoperateroa/deleteresourcesuccess1.json"; @Before public void setup() throws ServiceException, InterruptedException { driver.start(); // Thread.sleep(30 * 1000); } @After public void tearDown() throws ServiceException { driver.stop(); } @Test public void testOperateSuccess() throws ServiceException { execTestCase(new File(POST_PATH)); execTestCase(new File(PUT_PATH)); execTestCase(new File(DEL_PATH)); } }
{ "content_hash": "bc54f09bfdb294d880146d8324ccf0ab", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 96, "avg_line_length": 27.423076923076923, "alnum_prop": 0.7131837307152875, "repo_name": "open-o/nfvo", "id": "718d688fe22004f4bc6d2aa166e4f51fc981c67d", "size": "2038", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "resmanagement/ResmanagementService/service/src/integration-test/java/org/openo/nfvo/resmanagement/test/ITResOperateRoaSuccess.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "14087" }, { "name": "CSS", "bytes": "142275" }, { "name": "HTML", "bytes": "16551" }, { "name": "Java", "bytes": "4094327" }, { "name": "JavaScript", "bytes": "1026839" }, { "name": "Python", "bytes": "904472" }, { "name": "Shell", "bytes": "43267" } ], "symlink_target": "" }
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/renderer/pepper/video_decoder_shim.h" #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> #include "base/bind.h" #ifndef NDEBUG #include "base/logging.h" #endif #include "base/numerics/safe_conversions.h" #include "base/single_thread_task_runner.h" #include "cc/blink/context_provider_web_context.h" #include "content/public/renderer/render_thread.h" #include "content/renderer/pepper/pepper_video_decoder_host.h" #include "content/renderer/render_thread_impl.h" #include "gpu/command_buffer/client/gles2_implementation.h" #include "media/base/decoder_buffer.h" #include "media/base/limits.h" #include "media/base/video_decoder.h" #include "media/blink/skcanvas_video_renderer.h" #include "media/filters/ffmpeg_video_decoder.h" #include "media/filters/vpx_video_decoder.h" #include "media/video/picture.h" #include "media/video/video_decode_accelerator.h" #include "ppapi/c/pp_errors.h" #include "third_party/skia/include/gpu/GrTypes.h" namespace content { static const uint32_t kGrInvalidateState = kRenderTarget_GrGLBackendState | kTextureBinding_GrGLBackendState | kView_GrGLBackendState | kVertex_GrGLBackendState | kProgram_GrGLBackendState | kPixelStore_GrGLBackendState; // YUV->RGB converter class using a shader and FBO. class VideoDecoderShim::YUVConverter { public: YUVConverter(const scoped_refptr<cc_blink::ContextProviderWebContext>&); ~YUVConverter(); bool Initialize(); void Convert(const scoped_refptr<media::VideoFrame>& frame, GLuint tex_out); private: GLuint CreateShader(); GLuint CompileShader(const char* name, GLuint type, const char* code); GLuint CreateProgram(const char* name, GLuint vshader, GLuint fshader); GLuint CreateTexture(); scoped_refptr<cc_blink::ContextProviderWebContext> context_provider_; gpu::gles2::GLES2Interface* gl_; GLuint frame_buffer_; GLuint vertex_buffer_; GLuint program_; GLuint y_texture_; GLuint u_texture_; GLuint v_texture_; GLuint a_texture_; GLuint internal_format_; GLuint format_; media::VideoFrame::Format video_format_; GLuint y_width_; GLuint y_height_; GLuint uv_width_; GLuint uv_height_; uint32_t uv_height_divisor_; uint32_t uv_width_divisor_; GLint yuv_matrix_loc_; GLint yuv_adjust_loc_; DISALLOW_COPY_AND_ASSIGN(YUVConverter); }; VideoDecoderShim::YUVConverter::YUVConverter( const scoped_refptr<cc_blink::ContextProviderWebContext>& context_provider) : context_provider_(context_provider), gl_(context_provider_->ContextGL()), frame_buffer_(0), vertex_buffer_(0), program_(0), y_texture_(0), u_texture_(0), v_texture_(0), a_texture_(0), internal_format_(0), format_(0), video_format_(media::VideoFrame::UNKNOWN), y_width_(2), y_height_(2), uv_width_(2), uv_height_(2), uv_height_divisor_(1), uv_width_divisor_(1), yuv_matrix_loc_(0), yuv_adjust_loc_(0) { DCHECK(gl_); } VideoDecoderShim::YUVConverter::~YUVConverter() { if (y_texture_) gl_->DeleteTextures(1, &y_texture_); if (u_texture_) gl_->DeleteTextures(1, &u_texture_); if (v_texture_) gl_->DeleteTextures(1, &v_texture_); if (a_texture_) gl_->DeleteTextures(1, &a_texture_); if (frame_buffer_) gl_->DeleteFramebuffers(1, &frame_buffer_); if (vertex_buffer_) gl_->DeleteBuffers(1, &vertex_buffer_); if (program_) gl_->DeleteProgram(program_); } GLuint VideoDecoderShim::YUVConverter::CreateTexture() { GLuint tex = 0; gl_->GenTextures(1, &tex); gl_->BindTexture(GL_TEXTURE_2D, tex); // Create texture with default size - will be resized upon first frame. gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, 2, 2, 0, format_, GL_UNSIGNED_BYTE, NULL); gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); gl_->BindTexture(GL_TEXTURE_2D, 0); return tex; } GLuint VideoDecoderShim::YUVConverter::CompileShader(const char* name, GLuint type, const char* code) { GLuint shader = gl_->CreateShader(type); gl_->ShaderSource(shader, 1, (const GLchar**)&code, NULL); gl_->CompileShader(shader); #ifndef NDEBUG GLint status = 0; gl_->GetShaderiv(shader, GL_COMPILE_STATUS, &status); if (status != GL_TRUE) { GLint max_length = 0; GLint actual_length = 0; gl_->GetShaderiv(shader, GL_INFO_LOG_LENGTH, &max_length); // The max_length includes the NULL character. std::string error_log(max_length, 0); gl_->GetShaderInfoLog(shader, max_length, &actual_length, &error_log[0]); LOG(ERROR) << name << " shader compilation failed: " << error_log.c_str(); gl_->DeleteShader(shader); return 0; } #endif return shader; } GLuint VideoDecoderShim::YUVConverter::CreateProgram(const char* name, GLuint vshader, GLuint fshader) { GLuint program = gl_->CreateProgram(); gl_->AttachShader(program, vshader); gl_->AttachShader(program, fshader); gl_->BindAttribLocation(program, 0, "position"); gl_->LinkProgram(program); #ifndef NDEBUG GLint status = 0; gl_->GetProgramiv(program, GL_LINK_STATUS, &status); if (status != GL_TRUE) { GLint max_length = 0; GLint actual_length = 0; gl_->GetProgramiv(program, GL_INFO_LOG_LENGTH, &max_length); // The max_length includes the NULL character. std::string error_log(max_length, 0); gl_->GetProgramInfoLog(program, max_length, &actual_length, &error_log[0]); LOG(ERROR) << name << " program linking failed: " << error_log.c_str(); return 0; } #endif return program; } GLuint VideoDecoderShim::YUVConverter::CreateShader() { const char* vert_shader = "precision mediump float;\n" "attribute vec2 position;\n" "varying vec2 texcoord;\n" "void main()\n" "{\n" " gl_Position = vec4( position.xy, 0, 1 );\n" " texcoord = position*0.5+0.5;\n" "}"; const char* frag_shader = "precision mediump float;\n" "varying vec2 texcoord;\n" "uniform sampler2D y_sampler;\n" "uniform sampler2D u_sampler;\n" "uniform sampler2D v_sampler;\n" "uniform sampler2D a_sampler;\n" "uniform mat3 yuv_matrix;\n" "uniform vec3 yuv_adjust;\n" "void main()\n" "{\n" " vec3 yuv = vec3(texture2D(y_sampler, texcoord).x,\n" " texture2D(u_sampler, texcoord).x,\n" " texture2D(v_sampler, texcoord).x) +\n" " yuv_adjust;\n" " gl_FragColor = vec4(yuv_matrix * yuv, texture2D(a_sampler, " "texcoord).x);\n" "}"; GLuint vertex_shader = CompileShader("Vertex Shader", GL_VERTEX_SHADER, vert_shader); if (!vertex_shader) { return 0; } GLuint fragment_shader = CompileShader("Fragment Shader", GL_FRAGMENT_SHADER, frag_shader); if (!fragment_shader) { gl_->DeleteShader(vertex_shader); return 0; } GLuint program = CreateProgram("YUVConverter Program", vertex_shader, fragment_shader); gl_->DeleteShader(vertex_shader); gl_->DeleteShader(fragment_shader); if (!program) { return 0; } gl_->UseProgram(program); GLint uniform_location; uniform_location = gl_->GetUniformLocation(program, "y_sampler"); DCHECK(uniform_location != -1); gl_->Uniform1i(uniform_location, 0); uniform_location = gl_->GetUniformLocation(program, "u_sampler"); DCHECK(uniform_location != -1); gl_->Uniform1i(uniform_location, 1); uniform_location = gl_->GetUniformLocation(program, "v_sampler"); DCHECK(uniform_location != -1); gl_->Uniform1i(uniform_location, 2); uniform_location = gl_->GetUniformLocation(program, "a_sampler"); DCHECK(uniform_location != -1); gl_->Uniform1i(uniform_location, 3); gl_->UseProgram(0); yuv_matrix_loc_ = gl_->GetUniformLocation(program, "yuv_matrix"); DCHECK(yuv_matrix_loc_ != -1); yuv_adjust_loc_ = gl_->GetUniformLocation(program, "yuv_adjust"); DCHECK(yuv_adjust_loc_ != -1); return program; } bool VideoDecoderShim::YUVConverter::Initialize() { // If texture_rg extension is not available, use slower GL_LUMINANCE. if (context_provider_->ContextCapabilities().gpu.texture_rg) { internal_format_ = GL_RED_EXT; format_ = GL_RED_EXT; } else { internal_format_ = GL_LUMINANCE; format_ = GL_LUMINANCE; } if (context_provider_->ContextCapabilities().gpu.max_texture_image_units < 4) { // We support YUVA textures and require 4 texture units in the fragment // stage. return false; } gl_->PushGroupMarkerEXT(0, "YUVConverterContext"); gl_->GenFramebuffers(1, &frame_buffer_); y_texture_ = CreateTexture(); u_texture_ = CreateTexture(); v_texture_ = CreateTexture(); a_texture_ = CreateTexture(); // Vertex positions. Also converted to texcoords in vertex shader. GLfloat vertex_positions[] = {-1.f, -1.f, 1.f, -1.f, -1.f, 1.f, 1.f, 1.f}; gl_->GenBuffers(1, &vertex_buffer_); gl_->BindBuffer(GL_ARRAY_BUFFER, vertex_buffer_); gl_->BufferData(GL_ARRAY_BUFFER, 2 * sizeof(GLfloat) * 4, vertex_positions, GL_STATIC_DRAW); gl_->BindBuffer(GL_ARRAY_BUFFER, 0); program_ = CreateShader(); gl_->PopGroupMarkerEXT(); context_provider_->InvalidateGrContext(kGrInvalidateState); return (program_ != 0); } void VideoDecoderShim::YUVConverter::Convert( const scoped_refptr<media::VideoFrame>& frame, GLuint tex_out) { const float* yuv_matrix = 0; const float* yuv_adjust = 0; if (video_format_ != frame->format()) { // The constants below were taken from cc/output/gl_renderer.cc. // These values are magic numbers that are used in the transformation from // YUV to RGB color values. They are taken from the following webpage: // http://www.fourcc.org/fccyvrgb.php const float yuv_to_rgb_rec601[9] = { 1.164f, 1.164f, 1.164f, 0.0f, -.391f, 2.018f, 1.596f, -.813f, 0.0f, }; const float yuv_to_rgb_jpeg[9] = { 1.f, 1.f, 1.f, 0.0f, -.34414f, 1.772f, 1.402f, -.71414f, 0.0f, }; const float yuv_to_rgb_rec709[9] = { 1.164f, 1.164f, 1.164f, 0.0f, -0.213f, 2.112f, 1.793f, -0.533f, 0.0f, }; // These values map to 16, 128, and 128 respectively, and are computed // as a fraction over 256 (e.g. 16 / 256 = 0.0625). // They are used in the YUV to RGBA conversion formula: // Y - 16 : Gives 16 values of head and footroom for overshooting // U - 128 : Turns unsigned U into signed U [-128,127] // V - 128 : Turns unsigned V into signed V [-128,127] const float yuv_adjust_constrained[3] = { -0.0625f, -0.5f, -0.5f, }; // Same as above, but without the head and footroom. const float yuv_adjust_full[3] = { 0.0f, -0.5f, -0.5f, }; switch (frame->format()) { case media::VideoFrame::YV12: // 420 case media::VideoFrame::YV12A: case media::VideoFrame::I420: uv_height_divisor_ = 2; uv_width_divisor_ = 2; yuv_matrix = yuv_to_rgb_rec601; yuv_adjust = yuv_adjust_constrained; break; case media::VideoFrame::YV12HD: // 420 uv_height_divisor_ = 2; uv_width_divisor_ = 2; yuv_matrix = yuv_to_rgb_rec709; yuv_adjust = yuv_adjust_constrained; break; case media::VideoFrame::YV12J: // 420 uv_height_divisor_ = 2; uv_width_divisor_ = 2; yuv_matrix = yuv_to_rgb_jpeg; yuv_adjust = yuv_adjust_full; break; case media::VideoFrame::YV16: // 422 uv_width_divisor_ = 2; uv_height_divisor_ = 1; yuv_matrix = yuv_to_rgb_rec601; yuv_adjust = yuv_adjust_constrained; break; case media::VideoFrame::YV24: // 444 uv_width_divisor_ = 1; uv_height_divisor_ = 1; yuv_matrix = yuv_to_rgb_rec601; yuv_adjust = yuv_adjust_constrained; break; default: NOTREACHED(); } video_format_ = frame->format(); // Zero these so everything is reset below. y_width_ = y_height_ = 0; } gl_->PushGroupMarkerEXT(0, "YUVConverterContext"); uint32_t ywidth = frame->coded_size().width(); uint32_t yheight = frame->coded_size().height(); DCHECK_EQ(frame->stride(media::VideoFrame::kUPlane), frame->stride(media::VideoFrame::kVPlane)); uint32_t ystride = frame->stride(media::VideoFrame::kYPlane); uint32_t uvstride = frame->stride(media::VideoFrame::kUPlane); // The following code assumes that extended GLES 2.0 state like // UNPACK_SKIP* (if available) are set to defaults. gl_->PixelStorei(GL_UNPACK_ALIGNMENT, 1); if (ywidth != y_width_ || yheight != y_height_) { y_width_ = ywidth; y_height_ = yheight; uv_width_ = y_width_ / uv_width_divisor_; uv_height_ = y_height_ / uv_height_divisor_; // Re-create to resize the textures and upload data. gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, ystride); gl_->ActiveTexture(GL_TEXTURE0); gl_->BindTexture(GL_TEXTURE_2D, y_texture_); gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, y_width_, y_height_, 0, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kYPlane)); if (video_format_ == media::VideoFrame::YV12A) { DCHECK_EQ(frame->stride(media::VideoFrame::kYPlane), frame->stride(media::VideoFrame::kAPlane)); gl_->ActiveTexture(GL_TEXTURE3); gl_->BindTexture(GL_TEXTURE_2D, a_texture_); gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, y_width_, y_height_, 0, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kAPlane)); } else { // if there is no alpha channel, then create a 2x2 texture with full // alpha. gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, 0); const uint8_t alpha[4] = {0xff, 0xff, 0xff, 0xff}; gl_->ActiveTexture(GL_TEXTURE3); gl_->BindTexture(GL_TEXTURE_2D, a_texture_); gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, 2, 2, 0, format_, GL_UNSIGNED_BYTE, alpha); } gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, uvstride); gl_->ActiveTexture(GL_TEXTURE1); gl_->BindTexture(GL_TEXTURE_2D, u_texture_); gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, uv_width_, uv_height_, 0, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kUPlane)); gl_->ActiveTexture(GL_TEXTURE2); gl_->BindTexture(GL_TEXTURE_2D, v_texture_); gl_->TexImage2D(GL_TEXTURE_2D, 0, internal_format_, uv_width_, uv_height_, 0, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kVPlane)); } else { // Bind textures and upload texture data gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, ystride); gl_->ActiveTexture(GL_TEXTURE0); gl_->BindTexture(GL_TEXTURE_2D, y_texture_); gl_->TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, y_width_, y_height_, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kYPlane)); if (video_format_ == media::VideoFrame::YV12A) { DCHECK_EQ(frame->stride(media::VideoFrame::kYPlane), frame->stride(media::VideoFrame::kAPlane)); gl_->ActiveTexture(GL_TEXTURE3); gl_->BindTexture(GL_TEXTURE_2D, a_texture_); gl_->TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, y_width_, y_height_, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kAPlane)); } else { gl_->ActiveTexture(GL_TEXTURE3); gl_->BindTexture(GL_TEXTURE_2D, a_texture_); } gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, uvstride); gl_->ActiveTexture(GL_TEXTURE1); gl_->BindTexture(GL_TEXTURE_2D, u_texture_); gl_->TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, uv_width_, uv_height_, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kUPlane)); gl_->ActiveTexture(GL_TEXTURE2); gl_->BindTexture(GL_TEXTURE_2D, v_texture_); gl_->TexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, uv_width_, uv_height_, format_, GL_UNSIGNED_BYTE, frame->data(media::VideoFrame::kVPlane)); } gl_->BindFramebuffer(GL_FRAMEBUFFER, frame_buffer_); gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex_out, 0); #ifndef NDEBUG // We should probably check for framebuffer complete here, but that // will slow this method down so check only in debug mode. GLint status = gl_->CheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { return; } #endif gl_->Viewport(0, 0, ywidth, yheight); gl_->UseProgram(program_); if (yuv_matrix) { gl_->UniformMatrix3fv(yuv_matrix_loc_, 1, 0, yuv_matrix); gl_->Uniform3fv(yuv_adjust_loc_, 1, yuv_adjust); } gl_->BindBuffer(GL_ARRAY_BUFFER, vertex_buffer_); gl_->EnableVertexAttribArray(0); gl_->VertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(GLfloat), static_cast<const void*>(0)); gl_->DrawArrays(GL_TRIANGLE_STRIP, 0, 4); // The YUVConverter shares the context with Skia and possibly other modules // that may make OpenGL calls. To be a "good OpenGL citizen" for other // (non-Skia) modules that may share this context we restore // buffer/texture/state bindings to OpenGL defaults here. If we were only // sharing the context with Skia this may not be necessary as we also // Invalidate the GrContext below so that Skia is aware that its state // caches need to be reset. gl_->BindBuffer(GL_ARRAY_BUFFER, 0); gl_->DisableVertexAttribArray(0); gl_->UseProgram(0); gl_->BindFramebuffer(GL_FRAMEBUFFER, 0); gl_->BindTexture(GL_TEXTURE_2D, 0); gl_->ActiveTexture(GL_TEXTURE2); gl_->BindTexture(GL_TEXTURE_2D, 0); gl_->ActiveTexture(GL_TEXTURE1); gl_->BindTexture(GL_TEXTURE_2D, 0); gl_->ActiveTexture(GL_TEXTURE0); gl_->BindTexture(GL_TEXTURE_2D, 0); gl_->PixelStorei(GL_UNPACK_ROW_LENGTH, 0); gl_->PopGroupMarkerEXT(); context_provider_->InvalidateGrContext(kGrInvalidateState); } struct VideoDecoderShim::PendingDecode { PendingDecode(uint32_t decode_id, const scoped_refptr<media::DecoderBuffer>& buffer); ~PendingDecode(); const uint32_t decode_id; const scoped_refptr<media::DecoderBuffer> buffer; }; VideoDecoderShim::PendingDecode::PendingDecode( uint32_t decode_id, const scoped_refptr<media::DecoderBuffer>& buffer) : decode_id(decode_id), buffer(buffer) { } VideoDecoderShim::PendingDecode::~PendingDecode() { } struct VideoDecoderShim::PendingFrame { explicit PendingFrame(uint32_t decode_id); PendingFrame(uint32_t decode_id, const scoped_refptr<media::VideoFrame>& frame); ~PendingFrame(); const uint32_t decode_id; scoped_refptr<media::VideoFrame> video_frame; private: // This could be expensive to copy, so guard against that. DISALLOW_COPY_AND_ASSIGN(PendingFrame); }; VideoDecoderShim::PendingFrame::PendingFrame(uint32_t decode_id) : decode_id(decode_id) { } VideoDecoderShim::PendingFrame::PendingFrame( uint32_t decode_id, const scoped_refptr<media::VideoFrame>& frame) : decode_id(decode_id), video_frame(frame) { } VideoDecoderShim::PendingFrame::~PendingFrame() { } // DecoderImpl runs the underlying VideoDecoder on the media thread, receiving // calls from the VideoDecodeShim on the main thread and sending results back. // This class is constructed on the main thread, but used and destructed on the // media thread. class VideoDecoderShim::DecoderImpl { public: explicit DecoderImpl(const base::WeakPtr<VideoDecoderShim>& proxy); ~DecoderImpl(); void Initialize(media::VideoDecoderConfig config); void Decode(uint32_t decode_id, scoped_refptr<media::DecoderBuffer> buffer); void Reset(); void Stop(); private: void OnPipelineStatus(media::PipelineStatus status); void DoDecode(); void OnDecodeComplete(media::VideoDecoder::Status status); void OnOutputComplete(const scoped_refptr<media::VideoFrame>& frame); void OnResetComplete(); // WeakPtr is bound to main_message_loop_. Use only in shim callbacks. base::WeakPtr<VideoDecoderShim> shim_; scoped_ptr<media::VideoDecoder> decoder_; scoped_refptr<base::MessageLoopProxy> main_message_loop_; // Queue of decodes waiting for the decoder. typedef std::queue<PendingDecode> PendingDecodeQueue; PendingDecodeQueue pending_decodes_; bool awaiting_decoder_; // VideoDecoder returns pictures without information about the decode buffer // that generated it, but VideoDecoder implementations used in this class // (media::FFmpegVideoDecoder and media::VpxVideoDecoder) always generate // corresponding frames before decode is finished. |decode_id_| is used to // store id of the current buffer while Decode() call is pending. uint32_t decode_id_; }; VideoDecoderShim::DecoderImpl::DecoderImpl( const base::WeakPtr<VideoDecoderShim>& proxy) : shim_(proxy), main_message_loop_(base::MessageLoopProxy::current()), awaiting_decoder_(false), decode_id_(0) { } VideoDecoderShim::DecoderImpl::~DecoderImpl() { DCHECK(pending_decodes_.empty()); } void VideoDecoderShim::DecoderImpl::Initialize( media::VideoDecoderConfig config) { DCHECK(!decoder_); #if !defined(MEDIA_DISABLE_LIBVPX) if (config.codec() == media::kCodecVP9) { decoder_.reset( new media::VpxVideoDecoder(base::MessageLoopProxy::current())); } else #endif { scoped_ptr<media::FFmpegVideoDecoder> ffmpeg_video_decoder( new media::FFmpegVideoDecoder(base::MessageLoopProxy::current())); ffmpeg_video_decoder->set_decode_nalus(true); decoder_ = ffmpeg_video_decoder.Pass(); } // VpxVideoDecoder and FFmpegVideoDecoder support only one pending Decode() // request. DCHECK_EQ(decoder_->GetMaxDecodeRequests(), 1); // We can use base::Unretained() safely in decoder callbacks because // |decoder_| is owned by DecoderImpl. During Stop(), the |decoder_| will be // destroyed and all outstanding callbacks will be fired. decoder_->Initialize( config, true /* low_delay */, base::Bind(&VideoDecoderShim::DecoderImpl::OnPipelineStatus, base::Unretained(this)), base::Bind(&VideoDecoderShim::DecoderImpl::OnOutputComplete, base::Unretained(this))); } void VideoDecoderShim::DecoderImpl::Decode( uint32_t decode_id, scoped_refptr<media::DecoderBuffer> buffer) { DCHECK(decoder_); pending_decodes_.push(PendingDecode(decode_id, buffer)); DoDecode(); } void VideoDecoderShim::DecoderImpl::Reset() { DCHECK(decoder_); // Abort all pending decodes. while (!pending_decodes_.empty()) { const PendingDecode& decode = pending_decodes_.front(); scoped_ptr<PendingFrame> pending_frame(new PendingFrame(decode.decode_id)); main_message_loop_->PostTask(FROM_HERE, base::Bind(&VideoDecoderShim::OnDecodeComplete, shim_, media::VideoDecoder::kAborted, decode.decode_id)); pending_decodes_.pop(); } decoder_->Reset(base::Bind(&VideoDecoderShim::DecoderImpl::OnResetComplete, base::Unretained(this))); } void VideoDecoderShim::DecoderImpl::Stop() { DCHECK(decoder_); // Clear pending decodes now. We don't want OnDecodeComplete to call DoDecode // again. while (!pending_decodes_.empty()) pending_decodes_.pop(); decoder_.reset(); // This instance is deleted once we exit this scope. } void VideoDecoderShim::DecoderImpl::OnPipelineStatus( media::PipelineStatus status) { int32_t result; switch (status) { case media::PIPELINE_OK: result = PP_OK; break; case media::DECODER_ERROR_NOT_SUPPORTED: result = PP_ERROR_NOTSUPPORTED; break; default: result = PP_ERROR_FAILED; break; } // Calculate how many textures the shim should create. uint32_t shim_texture_pool_size = media::limits::kMaxVideoFrames + 1; main_message_loop_->PostTask( FROM_HERE, base::Bind(&VideoDecoderShim::OnInitializeComplete, shim_, result, shim_texture_pool_size)); } void VideoDecoderShim::DecoderImpl::DoDecode() { if (pending_decodes_.empty() || awaiting_decoder_) return; awaiting_decoder_ = true; const PendingDecode& decode = pending_decodes_.front(); decode_id_ = decode.decode_id; decoder_->Decode(decode.buffer, base::Bind(&VideoDecoderShim::DecoderImpl::OnDecodeComplete, base::Unretained(this))); pending_decodes_.pop(); } void VideoDecoderShim::DecoderImpl::OnDecodeComplete( media::VideoDecoder::Status status) { DCHECK(awaiting_decoder_); awaiting_decoder_ = false; int32_t result; switch (status) { case media::VideoDecoder::kOk: case media::VideoDecoder::kAborted: result = PP_OK; break; case media::VideoDecoder::kDecodeError: result = PP_ERROR_RESOURCE_FAILED; break; default: NOTREACHED(); result = PP_ERROR_FAILED; break; } main_message_loop_->PostTask( FROM_HERE, base::Bind( &VideoDecoderShim::OnDecodeComplete, shim_, result, decode_id_)); DoDecode(); } void VideoDecoderShim::DecoderImpl::OnOutputComplete( const scoped_refptr<media::VideoFrame>& frame) { // Software decoders are expected to generated frames only when a Decode() // call is pending. DCHECK(awaiting_decoder_); scoped_ptr<PendingFrame> pending_frame; if (!frame->end_of_stream()) { pending_frame.reset(new PendingFrame(decode_id_, frame)); } else { pending_frame.reset(new PendingFrame(decode_id_)); } main_message_loop_->PostTask(FROM_HERE, base::Bind(&VideoDecoderShim::OnOutputComplete, shim_, base::Passed(&pending_frame))); } void VideoDecoderShim::DecoderImpl::OnResetComplete() { main_message_loop_->PostTask( FROM_HERE, base::Bind(&VideoDecoderShim::OnResetComplete, shim_)); } VideoDecoderShim::VideoDecoderShim(PepperVideoDecoderHost* host) : state_(UNINITIALIZED), host_(host), media_task_runner_( RenderThreadImpl::current()->GetMediaThreadTaskRunner()), context_provider_( RenderThreadImpl::current()->SharedMainThreadContextProvider()), texture_pool_size_(0), num_pending_decodes_(0), yuv_converter_(new YUVConverter(context_provider_)), weak_ptr_factory_(this) { DCHECK(host_); DCHECK(media_task_runner_.get()); DCHECK(context_provider_.get()); decoder_impl_.reset(new DecoderImpl(weak_ptr_factory_.GetWeakPtr())); } VideoDecoderShim::~VideoDecoderShim() { DCHECK(RenderThreadImpl::current()); // Delete any remaining textures. TextureIdMap::iterator it = texture_id_map_.begin(); for (; it != texture_id_map_.end(); ++it) DeleteTexture(it->second); texture_id_map_.clear(); FlushCommandBuffer(); weak_ptr_factory_.InvalidateWeakPtrs(); // No more callbacks from the delegate will be received now. // The callback now holds the only reference to the DecoderImpl, which will be // deleted when Stop completes. media_task_runner_->PostTask( FROM_HERE, base::Bind(&VideoDecoderShim::DecoderImpl::Stop, base::Owned(decoder_impl_.release()))); } bool VideoDecoderShim::Initialize( media::VideoCodecProfile profile, media::VideoDecodeAccelerator::Client* client) { DCHECK_EQ(client, host_); DCHECK(RenderThreadImpl::current()); DCHECK_EQ(state_, UNINITIALIZED); media::VideoCodec codec = media::kUnknownVideoCodec; if (profile <= media::H264PROFILE_MAX) codec = media::kCodecH264; else if (profile <= media::VP8PROFILE_MAX) codec = media::kCodecVP8; else if (profile <= media::VP9PROFILE_MAX) codec = media::kCodecVP9; DCHECK_NE(codec, media::kUnknownVideoCodec); if (!yuv_converter_->Initialize()) { return false; } media::VideoDecoderConfig config( codec, profile, media::VideoFrame::YV12, gfx::Size(32, 24), // Small sizes that won't fail. gfx::Rect(32, 24), gfx::Size(32, 24), NULL /* extra_data */, // TODO(bbudge) Verify this isn't needed. 0 /* extra_data_size */, false /* decryption */); media_task_runner_->PostTask( FROM_HERE, base::Bind(&VideoDecoderShim::DecoderImpl::Initialize, base::Unretained(decoder_impl_.get()), config)); // Return success, even though we are asynchronous, to mimic // media::VideoDecodeAccelerator. return true; } void VideoDecoderShim::Decode(const media::BitstreamBuffer& bitstream_buffer) { DCHECK(RenderThreadImpl::current()); DCHECK_EQ(state_, DECODING); // We need the address of the shared memory, so we can copy the buffer. const uint8_t* buffer = host_->DecodeIdToAddress(bitstream_buffer.id()); DCHECK(buffer); media_task_runner_->PostTask( FROM_HERE, base::Bind( &VideoDecoderShim::DecoderImpl::Decode, base::Unretained(decoder_impl_.get()), bitstream_buffer.id(), media::DecoderBuffer::CopyFrom(buffer, bitstream_buffer.size()))); num_pending_decodes_++; } void VideoDecoderShim::AssignPictureBuffers( const std::vector<media::PictureBuffer>& buffers) { DCHECK(RenderThreadImpl::current()); DCHECK_EQ(state_, DECODING); if (buffers.empty()) { NOTREACHED(); return; } DCHECK_EQ(buffers.size(), pending_texture_mailboxes_.size()); GLuint num_textures = base::checked_cast<GLuint>(buffers.size()); std::vector<uint32_t> local_texture_ids(num_textures); gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); for (uint32_t i = 0; i < num_textures; i++) { local_texture_ids[i] = gles2->CreateAndConsumeTextureCHROMIUM( GL_TEXTURE_2D, pending_texture_mailboxes_[i].name); // Map the plugin texture id to the local texture id. uint32_t plugin_texture_id = buffers[i].texture_id(); texture_id_map_[plugin_texture_id] = local_texture_ids[i]; available_textures_.insert(plugin_texture_id); } pending_texture_mailboxes_.clear(); SendPictures(); } void VideoDecoderShim::ReusePictureBuffer(int32 picture_buffer_id) { DCHECK(RenderThreadImpl::current()); uint32_t texture_id = static_cast<uint32_t>(picture_buffer_id); if (textures_to_dismiss_.find(texture_id) != textures_to_dismiss_.end()) { DismissTexture(texture_id); } else if (texture_id_map_.find(texture_id) != texture_id_map_.end()) { available_textures_.insert(texture_id); SendPictures(); } else { NOTREACHED(); } } void VideoDecoderShim::Flush() { DCHECK(RenderThreadImpl::current()); DCHECK_EQ(state_, DECODING); state_ = FLUSHING; } void VideoDecoderShim::Reset() { DCHECK(RenderThreadImpl::current()); DCHECK_EQ(state_, DECODING); state_ = RESETTING; media_task_runner_->PostTask( FROM_HERE, base::Bind(&VideoDecoderShim::DecoderImpl::Reset, base::Unretained(decoder_impl_.get()))); } void VideoDecoderShim::Destroy() { delete this; } void VideoDecoderShim::OnInitializeComplete(int32_t result, uint32_t texture_pool_size) { DCHECK(RenderThreadImpl::current()); DCHECK(host_); if (result == PP_OK) { state_ = DECODING; texture_pool_size_ = texture_pool_size; } host_->OnInitializeComplete(result); } void VideoDecoderShim::OnDecodeComplete(int32_t result, uint32_t decode_id) { DCHECK(RenderThreadImpl::current()); DCHECK(host_); if (result == PP_ERROR_RESOURCE_FAILED) { host_->NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); return; } num_pending_decodes_--; completed_decodes_.push(decode_id); // If frames are being queued because we're out of textures, don't notify // the host that decode has completed. This exerts "back pressure" to keep // the host from sending buffers that will cause pending_frames_ to grow. if (pending_frames_.empty()) NotifyCompletedDecodes(); } void VideoDecoderShim::OnOutputComplete(scoped_ptr<PendingFrame> frame) { DCHECK(RenderThreadImpl::current()); DCHECK(host_); if (frame->video_frame) { if (texture_size_ != frame->video_frame->coded_size()) { // If the size has changed, all current textures must be dismissed. Add // all textures to |textures_to_dismiss_| and dismiss any that aren't in // use by the plugin. We will dismiss the rest as they are recycled. for (TextureIdMap::const_iterator it = texture_id_map_.begin(); it != texture_id_map_.end(); ++it) { textures_to_dismiss_.insert(it->first); } for (TextureIdSet::const_iterator it = available_textures_.begin(); it != available_textures_.end(); ++it) { DismissTexture(*it); } available_textures_.clear(); FlushCommandBuffer(); DCHECK(pending_texture_mailboxes_.empty()); for (uint32_t i = 0; i < texture_pool_size_; i++) pending_texture_mailboxes_.push_back(gpu::Mailbox::Generate()); host_->RequestTextures(texture_pool_size_, frame->video_frame->coded_size(), GL_TEXTURE_2D, pending_texture_mailboxes_); texture_size_ = frame->video_frame->coded_size(); } pending_frames_.push(linked_ptr<PendingFrame>(frame.release())); SendPictures(); } } void VideoDecoderShim::SendPictures() { DCHECK(RenderThreadImpl::current()); DCHECK(host_); while (!pending_frames_.empty() && !available_textures_.empty()) { const linked_ptr<PendingFrame>& frame = pending_frames_.front(); TextureIdSet::iterator it = available_textures_.begin(); uint32_t texture_id = *it; available_textures_.erase(it); uint32_t local_texture_id = texture_id_map_[texture_id]; yuv_converter_->Convert(frame->video_frame, local_texture_id); host_->PictureReady(media::Picture(texture_id, frame->decode_id, frame->video_frame->visible_rect(), false)); pending_frames_.pop(); } FlushCommandBuffer(); if (pending_frames_.empty()) { // If frames aren't backing up, notify the host of any completed decodes so // it can send more buffers. NotifyCompletedDecodes(); if (state_ == FLUSHING && !num_pending_decodes_) { state_ = DECODING; host_->NotifyFlushDone(); } } } void VideoDecoderShim::OnResetComplete() { DCHECK(RenderThreadImpl::current()); DCHECK(host_); while (!pending_frames_.empty()) pending_frames_.pop(); NotifyCompletedDecodes(); // Dismiss any old textures now. while (!textures_to_dismiss_.empty()) DismissTexture(*textures_to_dismiss_.begin()); state_ = DECODING; host_->NotifyResetDone(); } void VideoDecoderShim::NotifyCompletedDecodes() { while (!completed_decodes_.empty()) { host_->NotifyEndOfBitstreamBuffer(completed_decodes_.front()); completed_decodes_.pop(); } } void VideoDecoderShim::DismissTexture(uint32_t texture_id) { DCHECK(host_); textures_to_dismiss_.erase(texture_id); DCHECK(texture_id_map_.find(texture_id) != texture_id_map_.end()); DeleteTexture(texture_id_map_[texture_id]); texture_id_map_.erase(texture_id); host_->DismissPictureBuffer(texture_id); } void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); gles2->DeleteTextures(1, &texture_id); } void VideoDecoderShim::FlushCommandBuffer() { context_provider_->ContextGL()->Flush(); } } // namespace content
{ "content_hash": "bfe606a249e9803a50c5b94bd81ca91e", "timestamp": "", "source": "github", "line_count": 1126, "max_line_length": 80, "avg_line_length": 32.52664298401421, "alnum_prop": 0.6509215017064847, "repo_name": "PeterWangIntel/chromium-crosswalk", "id": "faf6446fd247884c47f3dc737c71327b80b43233", "size": "36625", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "content/renderer/pepper/video_decoder_shim.cc", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "AppleScript", "bytes": "6973" }, { "name": "Arduino", "bytes": "464" }, { "name": "Assembly", "bytes": "34367" }, { "name": "Batchfile", "bytes": "8451" }, { "name": "C", "bytes": "9385814" }, { "name": "C++", "bytes": "234925784" }, { "name": "CSS", "bytes": "951745" }, { "name": "DM", "bytes": "60" }, { "name": "Emacs Lisp", "bytes": "988" }, { "name": "Groff", "bytes": "2494" }, { "name": "HTML", "bytes": "29070071" }, { "name": "Java", "bytes": "10107231" }, { "name": "JavaScript", "bytes": "20170506" }, { "name": "Makefile", "bytes": "68234" }, { "name": "Objective-C", "bytes": "1845625" }, { "name": "Objective-C++", "bytes": "9478782" }, { "name": "PHP", "bytes": "97817" }, { "name": "PLpgSQL", "bytes": "178732" }, { "name": "Perl", "bytes": "63937" }, { "name": "Protocol Buffer", "bytes": "465313" }, { "name": "Python", "bytes": "8153532" }, { "name": "Shell", "bytes": "473684" }, { "name": "Standard ML", "bytes": "5034" }, { "name": "XSLT", "bytes": "418" }, { "name": "nesC", "bytes": "18347" } ], "symlink_target": "" }
package edu.cmu.lti.oaqa.gerp.uima.components; import static java.util.stream.Collectors.toSet; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; import org.apache.uima.UimaContext; import org.apache.uima.analysis_engine.AnalysisEngine; import org.apache.uima.analysis_engine.AnalysisEngineProcessException; import org.apache.uima.cas.AbstractCas; import org.apache.uima.fit.component.JCasMultiplier_ImplBase; import org.apache.uima.fit.factory.AnalysisEngineFactory; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.cas.StringList; import org.apache.uima.jcas.cas.TOP; import org.apache.uima.resource.ResourceInitializationException; import org.apache.uima.util.CasCopier; import edu.cmu.lti.oaqa.gerp.uima.type.Evidence; import edu.cmu.lti.oaqa.gerp.uima.type.GeneratorInfo; import edu.cmu.lti.oaqa.gerp.uima.type.GerpBase; import edu.cmu.lti.oaqa.gerp.uima.type.PruningDecision; import edu.cmu.lti.oaqa.gerp.uima.type.Rank; import edu.cmu.lti.oaqa.gerp.uima.util.GerpUtil; /** * Component that supports 4-step processing: candidate Generation -> Evidencing -> Ranking -> * Pruning, each of which corresponds to a reusable UIMA component with different input/output * capabilities. The AE descriptors should be specified in the parameters <code>generators</code>, * <code>evidencers</code>, <code>rankers</code>, and <code>pruners</code> as {@link StringList}. In * addition, the type that will be gerpped from the component should be specified by the * <code>type</code> parameter. * <p> * Specifically, the class defines a specific workflow to execute all the components as follows: * <ol> * <li> * Generators described by AEs will be executed in a random order as normal UIMA components, * generators are also expected to create {@link GeneratorInfo} in additional to the raw types.</li> * <li> * All raw types and types from all previous steps will then be added to the same CAS and processed * by each evidencer specified in <code>evidencers</code>. {@link Evidence}s are required to be * created for all raw input types in each evidencer.</li> * <li> * All {@link Evidence}s will be passed to each ranker specified in the <code>rankers</code> list. * Each ranker should be able to collect the {@link Evidence}s and group them by the raw types, and * produce a {@link Rank}.</li> * <li> * Finally, all {@link Rank} types are delivered to each pruner from <code>pruners</code> , and each * pruner should produce a {@link PruningDecision} for each raw type.</li> * </li> * <p> * * @see {@link SequentialGerpExecutor}, {@link ParallelGerpExecutor} * * @author Zi Yang <ziy@cs.cmu.edu> * */ public abstract class AbstractGerpExecutor<T extends TOP> extends JCasMultiplier_ImplBase { protected Class<T> type; protected Set<AnalysisEngine> generators; protected Set<AnalysisEngine> evidencers; protected Set<AnalysisEngine> rankers; protected Set<AnalysisEngine> pruners; protected Iterator<Entry<TOP, List<GerpBase>>> iter; public AbstractGerpExecutor() { super(); } @SuppressWarnings("unchecked") @Override public void initialize(UimaContext context) throws ResourceInitializationException { super.initialize(context); try { type = (Class<T>) Class.forName((String) context.getConfigParameterValue("type")).asSubclass( TOP.class); } catch (ClassNotFoundException e) { throw new ResourceInitializationException(e); } generators = createEngines((String[]) context.getConfigParameterValue("generators")); evidencers = createEngines((String[]) context.getConfigParameterValue("evidencers")); rankers = createEngines((String[]) context.getConfigParameterValue("rankers")); pruners = createEngines((String[]) context.getConfigParameterValue("pruners")); } private static Set<AnalysisEngine> createEngines(String[] descriptorNames) { return Arrays.stream(descriptorNames).map(name -> createEngine(name)).collect(toSet()); } private static AnalysisEngine createEngine(String name) { try { return AnalysisEngineFactory.createEngine(name); } catch (Exception e) { throw new RuntimeException(e); } } @Override public void process(JCas jcas) throws AnalysisEngineProcessException { gerp(jcas); // group types in jcas by raw types @SuppressWarnings("unchecked") Map<TOP, List<GerpBase>> raw2fs = Stream .of(GeneratorInfo.class, Evidence.class, Rank.class, PruningDecision.class) .flatMap(clazz -> (Stream<GerpBase>) GerpUtil.stream(jcas, clazz, type)) .collect(Collectors.groupingBy(GerpBase::getRaw)); iter = raw2fs.entrySet().iterator(); } protected abstract void gerp(JCas jcas) throws AnalysisEngineProcessException; @Override public boolean hasNext() throws AnalysisEngineProcessException { return iter.hasNext(); } @Override public AbstractCas next() throws AnalysisEngineProcessException { Entry<TOP, List<GerpBase>> next = iter.next(); JCas jcas = getEmptyJCas(); CasCopier copier = new CasCopier(next.getKey().getCAS(), jcas.getCas()); jcas.addFsToIndexes(copier.copyFs(next.getKey())); next.getValue().stream().forEach(fs -> jcas.addFsToIndexes(copier.copyFs(fs))); return jcas; } @Override public void collectionProcessComplete() throws AnalysisEngineProcessException { super.collectionProcessComplete(); Stream.of(generators, evidencers, rankers, pruners).flatMap(aes -> aes.stream()) .forEach(ae -> collectionProcessComplete(ae)); } private static void collectionProcessComplete(AnalysisEngine ae) { try { ae.collectionProcessComplete(); } catch (Exception e) { throw new RuntimeException(e); } } }
{ "content_hash": "91d5f75c20b4489d6a7155deeae0d3d6", "timestamp": "", "source": "github", "line_count": 155, "max_line_length": 100, "avg_line_length": 38.16129032258065, "alnum_prop": 0.7382924767540152, "repo_name": "oaqa/gerp", "id": "a963fbb139ea01c594f1e2f7580f12da71dac09f", "size": "5915", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/edu/cmu/lti/oaqa/gerp/uima/components/AbstractGerpExecutor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "96364" } ], "symlink_target": "" }
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic); /*! * AdminLTE v2.3.8 * Author: Almsaeed Studio * Website: Almsaeed Studio <http://almsaeedstudio.com> * License: Open source - MIT * Please visit http://opensource.org/licenses/MIT for more information !*/ /* * Core: General Layout Style * ------------------------- */ html, body { height: 100%; } .layout-boxed html, .layout-boxed body { height: 100%; } body { font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 400; overflow-x: hidden; overflow-y: auto; } /* Layout */ .wrapper { height: 100%; position: relative; overflow-x: hidden; overflow-y: auto; } .wrapper:before, .wrapper:after { content: " "; display: table; } .wrapper:after { clear: both; } .layout-boxed .wrapper { max-width: 1250px; margin: 0 auto; min-height: 100%; box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); position: relative; } .layout-boxed { background: url('../img/boxed-bg.jpg') repeat fixed; } /* * Content Wrapper - contains the main content * ```.right-side has been deprecated as of v2.0.0 in favor of .content-wrapper ``` */ .content-wrapper, .right-side, .main-footer { -webkit-transition: -webkit-transform 0.3s ease-in-out, margin 0.3s ease-in-out; -moz-transition: -moz-transform 0.3s ease-in-out, margin 0.3s ease-in-out; -o-transition: -o-transform 0.3s ease-in-out, margin 0.3s ease-in-out; transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out; margin-left: 230px; z-index: 820; } .layout-top-nav .content-wrapper, .layout-top-nav .right-side, .layout-top-nav .main-footer { margin-left: 0; } @media (max-width: 767px) { .content-wrapper, .right-side, .main-footer { margin-left: 0; } } @media (min-width: 768px) { .sidebar-collapse .content-wrapper, .sidebar-collapse .right-side, .sidebar-collapse .main-footer { margin-left: 0; }, } @media (max-width: 767px) { .sidebar-open .content-wrapper, .sidebar-open .right-side, .sidebar-open .main-footer { -webkit-transform: translate(230px, 0); -ms-transform: translate(230px, 0); -o-transform: translate(230px, 0); transform: translate(230px, 0); } } .content-wrapper, .right-side { min-height: 100%; background-color: #ecf0f5; z-index: 800; } .main-footer { background: #fff; padding: 15px; color: #444; border-top: 1px solid #d2d6de; } /* Fixed layout */ .fixed .main-header, .fixed .main-sidebar, .fixed .left-side { position: fixed; } .fixed .main-header { top: 0; right: 0; left: 0; } .fixed .content-wrapper, .fixed .right-side { padding-top: 50px; } @media (max-width: 767px) { .fixed .content-wrapper, .fixed .right-side { padding-top: 100px; } } .fixed.layout-boxed .wrapper { max-width: 100%; } body.hold-transition .content-wrapper, body.hold-transition .right-side, body.hold-transition .main-footer, body.hold-transition .main-sidebar, body.hold-transition .left-side, body.hold-transition .main-header .navbar, body.hold-transition .main-header .logo { /* Fix for IE */ -webkit-transition: none; -o-transition: none; transition: none; } /* Content */ .content { min-height: 250px; padding: 15px; margin-right: auto; margin-left: auto; padding-left: 15px; padding-right: 15px; } /* H1 - H6 font */ h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: 'Source Sans Pro', sans-serif; } /* General Links */ a { color: #3c8dbc; } a:hover, a:active, a:focus { outline: none; text-decoration: none; color: #72afd2; } /* Page Header */ .page-header { margin: 10px 0 20px 0; font-size: 22px; } .page-header > small { color: #666; display: block; margin-top: 5px; } /* * Component: Main Header * ---------------------- */ .main-header { position: relative; max-height: 100px; z-index: 1030; } .main-header .navbar { -webkit-transition: margin-left 0.3s ease-in-out; -o-transition: margin-left 0.3s ease-in-out; transition: margin-left 0.3s ease-in-out; margin-bottom: 0; margin-left: 230px; border: none; min-height: 50px; border-radius: 0; } .layout-top-nav .main-header .navbar { margin-left: 0; } .main-header #navbar-search-input.form-control { background: rgba(255, 255, 255, 0.2); border-color: transparent; } .main-header #navbar-search-input.form-control:focus, .main-header #navbar-search-input.form-control:active { border-color: rgba(0, 0, 0, 0.1); background: rgba(255, 255, 255, 0.9); } .main-header #navbar-search-input.form-control::-moz-placeholder { color: #ccc; opacity: 1; } .main-header #navbar-search-input.form-control:-ms-input-placeholder { color: #ccc; } .main-header #navbar-search-input.form-control::-webkit-input-placeholder { color: #ccc; } .main-header .navbar-custom-menu, .main-header .navbar-right { float: right; } @media (max-width: 991px) { .main-header .navbar-custom-menu a, .main-header .navbar-right a { color: inherit; background: transparent; } } @media (max-width: 767px) { .main-header .navbar-right { float: none; } .navbar-collapse .main-header .navbar-right { margin: 7.5px -15px; } .main-header .navbar-right > li { color: inherit; border: 0; } } .main-header .sidebar-toggle { float: left; background-color: transparent; background-image: none; padding: 15px 15px; font-family: fontAwesome; } .main-header .sidebar-toggle:before { content: "\f0c9"; } .main-header .sidebar-toggle:hover { color: #fff; } .main-header .sidebar-toggle:focus, .main-header .sidebar-toggle:active { background: transparent; } .main-header .sidebar-toggle .icon-bar { display: none; } .main-header .navbar .nav > li.user > a > .fa, .main-header .navbar .nav > li.user > a > .glyphicon, .main-header .navbar .nav > li.user > a > .ion { margin-right: 5px; } .main-header .navbar .nav > li > a > .label { position: absolute; top: 9px; right: 7px; text-align: center; font-size: 9px; padding: 2px 3px; line-height: .9; } .main-header .logo { -webkit-transition: width 0.3s ease-in-out; -o-transition: width 0.3s ease-in-out; transition: width 0.3s ease-in-out; display: block; float: left; height: 50px; font-size: 20px; line-height: 50px; text-align: center; width: 230px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 0 15px; font-weight: 300; overflow: hidden; } .main-header .logo .logo-lg { display: block; } .main-header .logo .logo-mini { display: none; } .main-header .navbar-brand { color: #fff; } .content-header { position: relative; padding: 15px 15px 0 15px; } .content-header > h1 { margin: 0; font-size: 24px; } .content-header > h1 > small { font-size: 15px; display: inline-block; padding-left: 4px; font-weight: 300; } .content-header > .breadcrumb { float: right; background: transparent; margin-top: 0; margin-bottom: 0; font-size: 12px; padding: 7px 5px; position: absolute; top: 15px; right: 10px; border-radius: 2px; } .content-header > .breadcrumb > li > a { color: #444; text-decoration: none; display: inline-block; } .content-header > .breadcrumb > li > a > .fa, .content-header > .breadcrumb > li > a > .glyphicon, .content-header > .breadcrumb > li > a > .ion { margin-right: 5px; } .content-header > .breadcrumb > li + li:before { content: '>\00a0'; } @media (max-width: 991px) { .content-header > .breadcrumb { position: relative; margin-top: 5px; top: 0; right: 0; float: none; background: #d2d6de; padding-left: 10px; } .content-header > .breadcrumb li:before { color: #97a0b3; } } .navbar-toggle { color: #fff; border: 0; margin: 0; padding: 15px 15px; } @media (max-width: 991px) { .navbar-custom-menu .navbar-nav > li { float: left; } .navbar-custom-menu .navbar-nav { margin: 0; float: left; } .navbar-custom-menu .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; line-height: 20px; } } @media (max-width: 767px) { .main-header { position: relative; } .main-header .logo, .main-header .navbar { width: 100%; float: none; } .main-header .navbar { margin: 0; } .main-header .navbar-custom-menu { float: right; } } @media (max-width: 991px) { .navbar-collapse.pull-left { float: none !important; } .navbar-collapse.pull-left + .navbar-custom-menu { display: block; position: absolute; top: 0; right: 40px; } } /* * Component: Sidebar * ------------------ */ .main-sidebar, .left-side { position: absolute; top: 0; left: 0; padding-top: 50px; min-height: 100%; width: 230px; z-index: 810; -webkit-transition: -webkit-transform 0.3s ease-in-out, width 0.3s ease-in-out; -moz-transition: -moz-transform 0.3s ease-in-out, width 0.3s ease-in-out; -o-transition: -o-transform 0.3s ease-in-out, width 0.3s ease-in-out; transition: transform 0.3s ease-in-out, width 0.3s ease-in-out; } @media (max-width: 767px) { .main-sidebar, .left-side { padding-top: 100px; } } @media (max-width: 767px) { .main-sidebar, .left-side { -webkit-transform: translate(-230px, 0); -ms-transform: translate(-230px, 0); -o-transform: translate(-230px, 0); transform: translate(-230px, 0); } } @media (min-width: 768px) { .sidebar-collapse .main-sidebar, .sidebar-collapse .left-side { -webkit-transform: translate(-230px, 0); -ms-transform: translate(-230px, 0); -o-transform: translate(-230px, 0); transform: translate(-230px, 0); } } @media (max-width: 767px) { .sidebar-open .main-sidebar, .sidebar-open .left-side { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } } .sidebar { padding-bottom: 10px; } .sidebar-form input:focus { border-color: transparent; } .user-panel { position: relative; width: 100%; padding: 10px; overflow: hidden; } .user-panel:before, .user-panel:after { content: " "; display: table; } .user-panel:after { clear: both; } .user-panel > .image > img { width: 100%; max-width: 45px; height: auto; } .user-panel > .info { padding: 5px 5px 5px 15px; line-height: 1; position: absolute; left: 55px; } .user-panel > .info > p { font-weight: 600; margin-bottom: 9px; } .user-panel > .info > a { text-decoration: none; padding-right: 5px; margin-top: 3px; font-size: 11px; } .user-panel > .info > a > .fa, .user-panel > .info > a > .ion, .user-panel > .info > a > .glyphicon { margin-right: 3px; } .sidebar-menu { list-style: none; margin: 0; padding: 0; } .sidebar-menu > li { position: relative; margin: 0; padding: 0; } .sidebar-menu > li > a { padding: 12px 5px 12px 15px; display: block; } .sidebar-menu > li > a > .fa, .sidebar-menu > li > a > .glyphicon, .sidebar-menu > li > a > .ion { width: 20px; } .sidebar-menu > li .label, .sidebar-menu > li .badge { margin-right: 5px; } .sidebar-menu > li .badge { margin-top: 3px; } .sidebar-menu li.header { padding: 10px 25px 10px 15px; font-size: 12px; } .sidebar-menu li > a > .fa-angle-left, .sidebar-menu li > a > .pull-right-container > .fa-angle-left { width: auto; height: auto; padding: 0; margin-right: 10px; } .sidebar-menu li > a > .fa-angle-left { position: absolute; top: 50%; right: 10px; margin-top: -8px; } .sidebar-menu li.active > a > .fa-angle-left, .sidebar-menu li.active > a > .pull-right-container > .fa-angle-left { -webkit-transform: rotate(-90deg); -ms-transform: rotate(-90deg); -o-transform: rotate(-90deg); transform: rotate(-90deg); } .sidebar-menu li.active > .treeview-menu { display: block; } .sidebar-menu .treeview-menu { display: none; list-style: none; padding: 0; margin: 0; padding-left: 5px; } .sidebar-menu .treeview-menu .treeview-menu { padding-left: 20px; } .sidebar-menu .treeview-menu > li { margin: 0; } .sidebar-menu .treeview-menu > li > a { padding: 5px 5px 5px 15px; display: block; font-size: 14px; } .sidebar-menu .treeview-menu > li > a > .fa, .sidebar-menu .treeview-menu > li > a > .glyphicon, .sidebar-menu .treeview-menu > li > a > .ion { width: 20px; } .sidebar-menu .treeview-menu > li > a > .pull-right-container > .fa-angle-left, .sidebar-menu .treeview-menu > li > a > .pull-right-container > .fa-angle-down, .sidebar-menu .treeview-menu > li > a > .fa-angle-left, .sidebar-menu .treeview-menu > li > a > .fa-angle-down { width: auto; } /* * Component: Sidebar Mini */ @media (min-width: 768px) { .sidebar-mini.sidebar-collapse .content-wrapper, .sidebar-mini.sidebar-collapse .right-side, .sidebar-mini.sidebar-collapse .main-footer { margin-left: 50px !important; z-index: 840; } .sidebar-mini.sidebar-collapse .main-sidebar { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); width: 50px !important; z-index: 850; } .sidebar-mini.sidebar-collapse .sidebar-menu > li { position: relative; } .sidebar-mini.sidebar-collapse .sidebar-menu > li > a { margin-right: 0; } .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span { border-top-right-radius: 4px; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:not(.treeview) > a > span { border-bottom-right-radius: 4px; } .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu { padding-top: 5px; padding-bottom: 5px; border-bottom-right-radius: 4px; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right), .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu { display: block !important; position: absolute; width: 220px; left: 50px; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span { top: 0; margin-left: -3px; padding: 12px 5px 12px 20px; background-color: inherit; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container { position: relative!important; float: right; width: auto!important; left: 180px !important; top: -22px !important; z-index: 900; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > .pull-right-container > .label:not(:first-of-type) { display: none; } .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu { top: 44px; margin-left: 0; } .sidebar-mini.sidebar-collapse .main-sidebar .user-panel > .info, .sidebar-mini.sidebar-collapse .sidebar-form, .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span, .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu, .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > .pull-right, .sidebar-mini.sidebar-collapse .sidebar-menu li.header { display: none !important; -webkit-transform: translateZ(0); } .sidebar-mini.sidebar-collapse .main-header .logo { width: 50px; } .sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini { display: block; margin-left: -15px; margin-right: -15px; font-size: 13px; } .sidebar-mini.sidebar-collapse .main-header .logo > .logo-lg { display: none; } .sidebar-mini.sidebar-collapse .main-header .navbar { margin-left: 50px; } } .sidebar-menu, .main-sidebar .user-panel, .sidebar-menu > li.header { white-space: normal; overflow: hidden; } .sidebar-menu:hover { overflow: visible; } .sidebar-form, .sidebar-menu > li.header { overflow: hidden; text-overflow: clip; } .sidebar-menu li > a { position: relative; } .sidebar-menu li > a > .pull-right-container { position: absolute; right: 10px; top: 50%; margin-top: -7px; } /* * Component: Control sidebar. By default, this is the right sidebar. */ .control-sidebar-bg { position: fixed; z-index: 1000; bottom: 0; } .control-sidebar-bg, .control-sidebar { top: 0; right: -230px; width: 230px; -webkit-transition: right 0.3s ease-in-out; -o-transition: right 0.3s ease-in-out; transition: right 0.3s ease-in-out; } .control-sidebar { position: absolute; padding-top: 50px; z-index: 1010; } @media (max-width: 768px) { .control-sidebar { padding-top: 100px; } } .control-sidebar > .tab-content { padding: 10px 15px; } .control-sidebar.control-sidebar-open, .control-sidebar.control-sidebar-open + .control-sidebar-bg { right: 0; } .control-sidebar-open .control-sidebar-bg, .control-sidebar-open .control-sidebar { right: 0; } @media (min-width: 768px) { .control-sidebar-open .content-wrapper, .control-sidebar-open .right-side, .control-sidebar-open .main-footer { margin-right: 230px; } } .nav-tabs.control-sidebar-tabs > li:first-of-type > a, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:hover, .nav-tabs.control-sidebar-tabs > li:first-of-type > a:focus { border-left-width: 0; } .nav-tabs.control-sidebar-tabs > li > a { border-radius: 0; } .nav-tabs.control-sidebar-tabs > li > a, .nav-tabs.control-sidebar-tabs > li > a:hover { border-top: none; border-right: none; border-left: 1px solid transparent; border-bottom: 1px solid transparent; } .nav-tabs.control-sidebar-tabs > li > a .icon { font-size: 16px; } .nav-tabs.control-sidebar-tabs > li.active > a, .nav-tabs.control-sidebar-tabs > li.active > a:hover, .nav-tabs.control-sidebar-tabs > li.active > a:focus, .nav-tabs.control-sidebar-tabs > li.active > a:active { border-top: none; border-right: none; border-bottom: none; } @media (max-width: 768px) { .nav-tabs.control-sidebar-tabs { display: table; } .nav-tabs.control-sidebar-tabs > li { display: table-cell; } } .control-sidebar-heading { font-weight: 400; font-size: 16px; padding: 10px 0; margin-bottom: 10px; } .control-sidebar-subheading { display: block; font-weight: 400; font-size: 14px; } .control-sidebar-menu { list-style: none; padding: 0; margin: 0 -15px; } .control-sidebar-menu > li > a { display: block; padding: 10px 15px; } .control-sidebar-menu > li > a:before, .control-sidebar-menu > li > a:after { content: " "; display: table; } .control-sidebar-menu > li > a:after { clear: both; } .control-sidebar-menu > li > a > .control-sidebar-subheading { margin-top: 0; } .control-sidebar-menu .menu-icon { float: left; width: 35px; height: 35px; border-radius: 50%; text-align: center; line-height: 35px; } .control-sidebar-menu .menu-info { margin-left: 45px; margin-top: 3px; } .control-sidebar-menu .menu-info > .control-sidebar-subheading { margin: 0; } .control-sidebar-menu .menu-info > p { margin: 0; font-size: 11px; } .control-sidebar-menu .progress { margin: 0; } .control-sidebar-dark { color: #b8c7ce; } .control-sidebar-dark, .control-sidebar-dark + .control-sidebar-bg { background: #222d32; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs { border-bottom: #1c2529; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a { background: #181f23; color: #b8c7ce; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus { border-left-color: #141a1d; border-bottom-color: #141a1d; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:active { background: #1c2529; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover { color: #fff; } .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:hover, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:focus, .control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:active { background: #222d32; color: #fff; } .control-sidebar-dark .control-sidebar-heading, .control-sidebar-dark .control-sidebar-subheading { color: #fff; } .control-sidebar-dark .control-sidebar-menu > li > a:hover { background: #1e282c; } .control-sidebar-dark .control-sidebar-menu > li > a .menu-info > p { color: #b8c7ce; } .control-sidebar-light { color: #5e5e5e; } .control-sidebar-light, .control-sidebar-light + .control-sidebar-bg { background: #f9fafc; border-left: 1px solid #d2d6de; } .control-sidebar-light .nav-tabs.control-sidebar-tabs { border-bottom: #d2d6de; } .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a { background: #e8ecf4; color: #444444; } .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus { border-left-color: #d2d6de; border-bottom-color: #d2d6de; } .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:active { background: #eff1f7; } .control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:hover, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:focus, .control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:active { background: #f9fafc; color: #111; } .control-sidebar-light .control-sidebar-heading, .control-sidebar-light .control-sidebar-subheading { color: #111; } .control-sidebar-light .control-sidebar-menu { margin-left: -14px; } .control-sidebar-light .control-sidebar-menu > li > a:hover { background: #f4f4f5; } .control-sidebar-light .control-sidebar-menu > li > a .menu-info > p { color: #5e5e5e; } /* * Component: Dropdown menus * ------------------------- */ /*Dropdowns in general*/ .dropdown-menu { box-shadow: none; border-color: #eee; } .dropdown-menu > li > a { color: #777; } .dropdown-menu > li > a > .glyphicon, .dropdown-menu > li > a > .fa, .dropdown-menu > li > a > .ion { margin-right: 10px; } .dropdown-menu > li > a:hover { background-color: #e1e3e9; color: #333; } .dropdown-menu > .divider { background-color: #eee; } .navbar-nav > .notifications-menu > .dropdown-menu, .navbar-nav > .messages-menu > .dropdown-menu, .navbar-nav > .tasks-menu > .dropdown-menu { width: 280px; padding: 0 0 0 0; margin: 0; top: 100%; } .navbar-nav > .notifications-menu > .dropdown-menu > li, .navbar-nav > .messages-menu > .dropdown-menu > li, .navbar-nav > .tasks-menu > .dropdown-menu > li { position: relative; } .navbar-nav > .notifications-menu > .dropdown-menu > li.header, .navbar-nav > .messages-menu > .dropdown-menu > li.header, .navbar-nav > .tasks-menu > .dropdown-menu > li.header { border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; background-color: #ffffff; padding: 7px 10px; border-bottom: 1px solid #f4f4f4; color: #444444; font-size: 14px; } .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a, .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a, .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; font-size: 12px; background-color: #fff; padding: 7px 10px; border-bottom: 1px solid #eeeeee; color: #444 !important; text-align: center; } @media (max-width: 991px) { .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a, .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a, .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a { background: #fff !important; color: #444 !important; } } .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a:hover, .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a:hover, .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a:hover { text-decoration: none; font-weight: normal; } .navbar-nav > .notifications-menu > .dropdown-menu > li .menu, .navbar-nav > .messages-menu > .dropdown-menu > li .menu, .navbar-nav > .tasks-menu > .dropdown-menu > li .menu { max-height: 200px; margin: 0; padding: 0; list-style: none; overflow-x: hidden; } .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a, .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a, .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a { display: block; white-space: nowrap; /* Prevent text from breaking */ border-bottom: 1px solid #f4f4f4; } .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a:hover, .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:hover, .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a:hover { background: #f4f4f4; text-decoration: none; } .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a { color: #444444; overflow: hidden; text-overflow: ellipsis; padding: 10px; } .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon, .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa, .navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion { width: 20px; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a { margin: 0; padding: 10px 10px; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img { margin: auto 10px auto auto; width: 40px; height: 40px; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 { padding: 0; margin: 0 0 0 45px; color: #444444; font-size: 15px; position: relative; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 > small { color: #999999; font-size: 10px; position: absolute; top: 0; right: 0; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > p { margin: 0 0 0 45px; font-size: 12px; color: #888888; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:before, .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after { content: " "; display: table; } .navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after { clear: both; } .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a { padding: 10px; } .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > h3 { font-size: 14px; padding: 0; margin: 0 0 10px 0; color: #666666; } .navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > .progress { padding: 0; margin: 0; } .navbar-nav > .user-menu > .dropdown-menu { border-top-right-radius: 0; border-top-left-radius: 0; padding: 1px 0 0 0; border-top-width: 0; width: 415px!important; } .navbar-nav > .user-menu > .dropdown-menu, .navbar-nav > .user-menu > .dropdown-menu > .user-body { border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; } .navbar-nav > .user-menu > .dropdown-menu > li.user-header { height: 175px; padding: 10px; text-align: center; } .navbar-nav > .user-menu > .dropdown-menu > li.user-header > img { z-index: 5; height: 90px; width: 90px; border: 3px solid; border-color: transparent; border-color: rgba(255, 255, 255, 0.2); } .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { z-index: 5; color: #fff; color: rgba(255, 255, 255, 0.8); font-size: 17px; margin-top: 10px; } .navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small { display: block; font-size: 12px; } .navbar-nav > .user-menu > .dropdown-menu > .user-body { padding: 15px; border-bottom: 1px solid #f4f4f4; border-top: 1px solid #dddddd; } .navbar-nav > .user-menu > .dropdown-menu > .user-body:before, .navbar-nav > .user-menu > .dropdown-menu > .user-body:after { content: " "; display: table; } .navbar-nav > .user-menu > .dropdown-menu > .user-body:after { clear: both; } .navbar-nav > .user-menu > .dropdown-menu > .user-body a { color: #444 !important; } @media (max-width: 991px) { .navbar-nav > .user-menu > .dropdown-menu > .user-body a { background: #fff !important; color: #444 !important; } } .navbar-nav > .user-menu > .dropdown-menu > .user-footer { background-color: #f9f9f9; padding: 10px; } .navbar-nav > .user-menu > .dropdown-menu > .user-footer:before, .navbar-nav > .user-menu > .dropdown-menu > .user-footer:after { content: " "; display: table; } .navbar-nav > .user-menu > .dropdown-menu > .user-footer:after { clear: both; } .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default { color: #666666; } @media (max-width: 991px) { .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default:hover { background-color: #f9f9f9; } } .navbar-nav > .user-menu .user-image { float: left; width: 25px; height: 25px; border-radius: 50%; margin-right: 10px; margin-top: -2px; } @media (max-width: 767px) { .navbar-nav > .user-menu .user-image { float: none; margin-right: 0; margin-top: -8px; line-height: 10px; } } /* Add fade animation to dropdown menus by appending the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)*/ .open:not(.dropup) > .animated-dropdown-menu { backface-visibility: visible !important; -webkit-animation: flipInX 0.7s both; -o-animation: flipInX 0.7s both; animation: flipInX 0.7s both; } @keyframes flipInX { 0% { transform: perspective(400px) rotate3d(1, 0, 0, 90deg); transition-timing-function: ease-in; opacity: 0; } 40% { transform: perspective(400px) rotate3d(1, 0, 0, -20deg); transition-timing-function: ease-in; } 60% { transform: perspective(400px) rotate3d(1, 0, 0, 10deg); opacity: 1; } 80% { transform: perspective(400px) rotate3d(1, 0, 0, -5deg); } 100% { transform: perspective(400px); } } @-webkit-keyframes flipInX { 0% { -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg); -webkit-transition-timing-function: ease-in; opacity: 0; } 40% { -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg); -webkit-transition-timing-function: ease-in; } 60% { -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg); opacity: 1; } 80% { -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg); } 100% { -webkit-transform: perspective(400px); } } /* Fix dropdown menu in navbars */ .navbar-custom-menu > .navbar-nav > li { position: relative; } .navbar-custom-menu > .navbar-nav > li > .dropdown-menu { position: absolute; right: 0; left: auto; } @media (max-width: 991px) { .navbar-custom-menu > .navbar-nav { float: right; } .navbar-custom-menu > .navbar-nav > li { position: static; } .navbar-custom-menu > .navbar-nav > li > .dropdown-menu { position: absolute; right: 5%; left: auto; border: 1px solid #ddd; background: #fff; } } /* * Component: Form * --------------- */ .form-control { border-radius: 0; box-shadow: none; border-color: #d2d6de; } .form-control:focus { border-color: #3c8dbc; box-shadow: none; } .form-control::-moz-placeholder, .form-control:-ms-input-placeholder, .form-control::-webkit-input-placeholder { color: #bbb; opacity: 1; } .form-control:not(select) { -webkit-appearance: none; -moz-appearance: none; appearance: none; } .form-group.has-success label { color: #00a65a; } .form-group.has-success .form-control, .form-group.has-success .input-group-addon { border-color: #00a65a; box-shadow: none; } .form-group.has-success .help-block { color: #00a65a; } .form-group.has-warning label { color: #f39c12; } .form-group.has-warning .form-control, .form-group.has-warning .input-group-addon { border-color: #f39c12; box-shadow: none; } .form-group.has-warning .help-block { color: #f39c12; } .form-group.has-error label { color: #dd4b39; } .form-group.has-error .form-control, .form-group.has-error .input-group-addon { border-color: #dd4b39; box-shadow: none; } .form-group.has-error .help-block { color: #dd4b39; } /* Input group */ .input-group .input-group-addon { border-radius: 0; border-color: #d2d6de; background-color: #fff; } /* button groups */ .btn-group-vertical .btn.btn-flat:first-of-type, .btn-group-vertical .btn.btn-flat:last-of-type { border-radius: 0; } .icheck > label { padding-left: 0; } /* support Font Awesome icons in form-control */ .form-control-feedback.fa { line-height: 34px; } .input-lg + .form-control-feedback.fa, .input-group-lg + .form-control-feedback.fa, .form-group-lg .form-control + .form-control-feedback.fa { line-height: 46px; } .input-sm + .form-control-feedback.fa, .input-group-sm + .form-control-feedback.fa, .form-group-sm .form-control + .form-control-feedback.fa { line-height: 30px; } /* * Component: Progress Bar * ----------------------- */ .progress, .progress > .progress-bar { -webkit-box-shadow: none; box-shadow: none; } .progress, .progress > .progress-bar, .progress .progress-bar, .progress > .progress-bar .progress-bar { border-radius: 1px; } /* size variation */ .progress.sm, .progress-sm { height: 10px; } .progress.sm, .progress-sm, .progress.sm .progress-bar, .progress-sm .progress-bar { border-radius: 1px; } .progress.xs, .progress-xs { height: 7px; } .progress.xs, .progress-xs, .progress.xs .progress-bar, .progress-xs .progress-bar { border-radius: 1px; } .progress.xxs, .progress-xxs { height: 3px; } .progress.xxs, .progress-xxs, .progress.xxs .progress-bar, .progress-xxs .progress-bar { border-radius: 1px; } /* Vertical bars */ .progress.vertical { position: relative; width: 30px; height: 200px; display: inline-block; margin-right: 10px; } .progress.vertical > .progress-bar { width: 100%; position: absolute; bottom: 0; } .progress.vertical.sm, .progress.vertical.progress-sm { width: 20px; } .progress.vertical.xs, .progress.vertical.progress-xs { width: 10px; } .progress.vertical.xxs, .progress.vertical.progress-xxs { width: 3px; } .progress-group .progress-text { font-weight: 600; } .progress-group .progress-number { float: right; } /* Remove margins from progress bars when put in a table */ .table tr > td .progress { margin: 0; } .progress-bar-light-blue, .progress-bar-primary { background-color: #3c8dbc; } .progress-striped .progress-bar-light-blue, .progress-striped .progress-bar-primary { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-green, .progress-bar-success { background-color: #00a65a; } .progress-striped .progress-bar-green, .progress-striped .progress-bar-success { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-aqua, .progress-bar-info { background-color: #00c0ef; } .progress-striped .progress-bar-aqua, .progress-striped .progress-bar-info { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-yellow, .progress-bar-warning { background-color: #f39c12; } .progress-striped .progress-bar-yellow, .progress-striped .progress-bar-warning { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } .progress-bar-red, .progress-bar-danger { background-color: #dd4b39; } .progress-striped .progress-bar-red, .progress-striped .progress-bar-danger { background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); } /* * Component: Small Box * -------------------- */ .small-box { border-radius: 2px; position: relative; display: block; margin-bottom: 20px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } .small-box > .inner { padding: 10px; } .small-box > .small-box-footer { position: relative; text-align: center; padding: 3px 0; color: #fff; color: rgba(255, 255, 255, 0.8); display: block; z-index: 10; background: rgba(0, 0, 0, 0.1); text-decoration: none; } .small-box > .small-box-footer:hover { color: #fff; background: rgba(0, 0, 0, 0.15); } .small-box h3 { font-size: 38px; font-weight: bold; margin: 0 0 10px 0; white-space: nowrap; padding: 0; } .small-box p { font-size: 15px; } .small-box p > small { display: block; color: #f9f9f9; font-size: 13px; margin-top: 5px; } .small-box h3, .small-box p { z-index: 5; } .small-box .icon { -webkit-transition: all 0.3s linear; -o-transition: all 0.3s linear; transition: all 0.3s linear; position: absolute; top: -10px; right: 10px; z-index: 0; font-size: 90px; color: rgba(0, 0, 0, 0.15); } .small-box:hover { text-decoration: none; color: #f9f9f9; } .small-box:hover .icon { font-size: 95px; } @media (max-width: 767px) { .small-box { text-align: center; } .small-box .icon { display: none; } .small-box p { font-size: 12px; } } /* * Component: Box * -------------- */ .box { position: relative; border-radius: 3px; background: #ffffff; border-top: 3px solid #d2d6de; margin-bottom: 20px; width: 100%; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); } .box.box-primary { border-top-color: #3c8dbc; } .box.box-info { border-top-color: #00c0ef; } .box.box-danger { border-top-color: #dd4b39; } .box.box-warning { border-top-color: #f39c12; } .box.box-success { border-top-color: #00a65a; } .box.box-default { border-top-color: #d2d6de; } .box.collapsed-box .box-body, .box.collapsed-box .box-footer { display: none; } .box .nav-stacked > li { border-bottom: 1px solid #f4f4f4; margin: 0; } .box .nav-stacked > li:last-of-type { border-bottom: none; } .box.height-control .box-body { max-height: 300px; overflow: auto; } .box .border-right { border-right: 1px solid #f4f4f4; } .box .border-left { border-left: 1px solid #f4f4f4; } .box.box-solid { border-top: 0; } .box.box-solid > .box-header .btn.btn-default { background: transparent; } .box.box-solid > .box-header .btn:hover, .box.box-solid > .box-header a:hover { background: rgba(0, 0, 0, 0.1); } .box.box-solid.box-default { border: 1px solid #d2d6de; } .box.box-solid.box-default > .box-header { color: #444444; background: #d2d6de; background-color: #d2d6de; } .box.box-solid.box-default > .box-header a, .box.box-solid.box-default > .box-header .btn { color: #444444; } .box.box-solid.box-primary { border: 1px solid #3c8dbc; } .box.box-solid.box-primary > .box-header { color: #ffffff; background: #3c8dbc; background-color: #3c8dbc; } .box.box-solid.box-primary > .box-header a, .box.box-solid.box-primary > .box-header .btn { color: #ffffff; } .box.box-solid.box-info { border: 1px solid #00c0ef; } .box.box-solid.box-info > .box-header { color: #ffffff; background: #00c0ef; background-color: #00c0ef; } .box.box-solid.box-info > .box-header a, .box.box-solid.box-info > .box-header .btn { color: #ffffff; } .box.box-solid.box-danger { border: 1px solid #dd4b39; } .box.box-solid.box-danger > .box-header { color: #ffffff; background: #dd4b39; background-color: #dd4b39; } .box.box-solid.box-danger > .box-header a, .box.box-solid.box-danger > .box-header .btn { color: #ffffff; } .box.box-solid.box-warning { border: 1px solid #f39c12; } .box.box-solid.box-warning > .box-header { color: #ffffff; background: #f39c12; background-color: #f39c12; } .box.box-solid.box-warning > .box-header a, .box.box-solid.box-warning > .box-header .btn { color: #ffffff; } .box.box-solid.box-success { border: 1px solid #00a65a; } .box.box-solid.box-success > .box-header { color: #ffffff; background: #00a65a; background-color: #00a65a; } .box.box-solid.box-success > .box-header a, .box.box-solid.box-success > .box-header .btn { color: #ffffff; } .box.box-solid > .box-header > .box-tools .btn { border: 0; box-shadow: none; } .box.box-solid[class*='bg'] > .box-header { color: #fff; } .box .box-group > .box { margin-bottom: 5px; } .box .knob-label { text-align: center; color: #333; font-weight: 100; font-size: 12px; margin-bottom: 0.3em; } .box > .overlay, .overlay-wrapper > .overlay, .box > .loading-img, .overlay-wrapper > .loading-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .box .overlay, .overlay-wrapper .overlay { z-index: 50; background: rgba(255, 255, 255, 0.7); border-radius: 3px; } .box .overlay > .fa, .overlay-wrapper .overlay > .fa { position: absolute; top: 50%; left: 50%; margin-left: -15px; margin-top: -15px; color: #000; font-size: 30px; } .box .overlay.dark, .overlay-wrapper .overlay.dark { background: rgba(0, 0, 0, 0.5); } .box-header:before, .box-body:before, .box-footer:before, .box-header:after, .box-body:after, .box-footer:after { content: " "; display: table; } .box-header:after, .box-body:after, .box-footer:after { clear: both; } .box-header { color: #444; display: block; padding: 10px; position: relative; } .box-header.with-border { border-bottom: 1px solid #f4f4f4; } .collapsed-box .box-header.with-border { border-bottom: none; } .box-header > .fa, .box-header > .glyphicon, .box-header > .ion, .box-header .box-title { display: inline-block; font-size: 18px; margin: 0; line-height: 1; } .box-header > .fa, .box-header > .glyphicon, .box-header > .ion { margin-right: 5px; } .box-header > .box-tools { position: absolute; right: 10px; top: 5px; } .box-header > .box-tools [data-toggle="tooltip"] { position: relative; } .box-header > .box-tools.pull-right .dropdown-menu { right: 0; left: auto; } .box-header > .box-tools .dropdown-menu > li > a { color: #444!important; } .btn-box-tool { padding: 5px; font-size: 12px; background: transparent; color: #97a0b3; } .open .btn-box-tool, .btn-box-tool:hover { color: #606c84; } .btn-box-tool.btn:active { box-shadow: none; } .box-body { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; padding: 10px; } .no-header .box-body { border-top-right-radius: 3px; border-top-left-radius: 3px; } .box-body > .table { margin-bottom: 0; } .box-body .fc { margin-top: 5px; } .box-body .full-width-chart { margin: -19px; } .box-body.no-padding .full-width-chart { margin: -9px; } .box-body .box-pane { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 3px; } .box-body .box-pane-right { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 0; } .box-footer { border-top-left-radius: 0; border-top-right-radius: 0; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; border-top: 1px solid #f4f4f4; padding: 10px; background-color: #ffffff; } .chart-legend { margin: 10px 0; } @media (max-width: 991px) { .chart-legend > li { float: left; margin-right: 10px; } } .box-comments { background: #f7f7f7; } .box-comments .box-comment { padding: 8px 0; border-bottom: 1px solid #eee; } .box-comments .box-comment:before, .box-comments .box-comment:after { content: " "; display: table; } .box-comments .box-comment:after { clear: both; } .box-comments .box-comment:last-of-type { border-bottom: 0; } .box-comments .box-comment:first-of-type { padding-top: 0; } .box-comments .box-comment img { float: left; } .box-comments .comment-text { margin-left: 40px; color: #555; } .box-comments .username { color: #444; display: block; font-weight: 600; } .box-comments .text-muted { font-weight: 400; font-size: 12px; } /* Widget: TODO LIST */ .todo-list { margin: 0; padding: 0; list-style: none; overflow: auto; } .todo-list > li { border-radius: 2px; padding: 10px; background: #f4f4f4; margin-bottom: 2px; border-left: 2px solid #e6e7e8; color: #444; } .todo-list > li:last-of-type { margin-bottom: 0; } .todo-list > li > input[type='checkbox'] { margin: 0 10px 0 5px; } .todo-list > li .text { display: inline-block; margin-left: 5px; font-weight: 600; } .todo-list > li .label { margin-left: 10px; font-size: 9px; } .todo-list > li .tools { display: none; float: right; color: #dd4b39; } .todo-list > li .tools > .fa, .todo-list > li .tools > .glyphicon, .todo-list > li .tools > .ion { margin-right: 5px; cursor: pointer; } .todo-list > li:hover .tools { display: inline-block; } .todo-list > li.done { color: #999; } .todo-list > li.done .text { text-decoration: line-through; font-weight: 500; } .todo-list > li.done .label { background: #d2d6de !important; } .todo-list .danger { border-left-color: #dd4b39; } .todo-list .warning { border-left-color: #f39c12; } .todo-list .info { border-left-color: #00c0ef; } .todo-list .success { border-left-color: #00a65a; } .todo-list .primary { border-left-color: #3c8dbc; } .todo-list .handle { display: inline-block; cursor: move; margin: 0 5px; } /* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/ .chat { padding: 5px 20px 5px 10px; } .chat .item { margin-bottom: 10px; } .chat .item:before, .chat .item:after { content: " "; display: table; } .chat .item:after { clear: both; } .chat .item > img { width: 40px; height: 40px; border: 2px solid transparent; border-radius: 50%; } .chat .item > .online { border: 2px solid #00a65a; } .chat .item > .offline { border: 2px solid #dd4b39; } .chat .item > .message { margin-left: 55px; margin-top: -40px; } .chat .item > .message > .name { display: block; font-weight: 600; } .chat .item > .attachment { border-radius: 3px; background: #f4f4f4; margin-left: 65px; margin-right: 15px; padding: 10px; } .chat .item > .attachment > h4 { margin: 0 0 5px 0; font-weight: 600; font-size: 14px; } .chat .item > .attachment > p, .chat .item > .attachment > .filename { font-weight: 600; font-size: 13px; font-style: italic; margin: 0; } .chat .item > .attachment:before, .chat .item > .attachment:after { content: " "; display: table; } .chat .item > .attachment:after { clear: both; } .box-input { max-width: 200px; } .modal .panel-body { color: #444; } /* * Component: Info Box * ------------------- */ .info-box { display: block; min-height: 90px; background: #fff; width: 100%; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); border-radius: 2px; margin-bottom: 15px; } .info-box small { font-size: 14px; } .info-box .progress { background: rgba(0, 0, 0, 0.2); margin: 5px -10px 5px -10px; height: 2px; } .info-box .progress, .info-box .progress .progress-bar { border-radius: 0; } .info-box .progress .progress-bar { background: #fff; } .info-box-icon { border-top-left-radius: 2px; border-top-right-radius: 0; border-bottom-right-radius: 0; border-bottom-left-radius: 2px; display: block; float: left; height: 90px; width: 90px; text-align: center; font-size: 45px; line-height: 90px; background: rgba(0, 0, 0, 0.2); } .info-box-icon > img { max-width: 100%; } .info-box-content { padding: 5px 10px; margin-left: 90px; } .info-box-number { display: block; font-weight: bold; font-size: 18px; } .progress-description, .info-box-text { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .info-box-text { text-transform: uppercase; } .info-box-more { display: block; } .progress-description { margin: 0; } /* * Component: Timeline * ------------------- */ .timeline { position: relative; margin: 0 0 30px 0; padding: 0; list-style: none; } .timeline:before { content: ''; position: absolute; top: 0; bottom: 0; width: 4px; background: #ddd; left: 31px; margin: 0; border-radius: 2px; } .timeline > li { position: relative; margin-right: 10px; margin-bottom: 15px; } .timeline > li:before, .timeline > li:after { content: " "; display: table; } .timeline > li:after { clear: both; } .timeline > li > .timeline-item { -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); border-radius: 3px; margin-top: 0; background: #fff; color: #444; margin-left: 60px; margin-right: 15px; padding: 0; position: relative; } .timeline > li > .timeline-item > .time { color: #999; float: right; padding: 10px; font-size: 12px; } .timeline > li > .timeline-item > .timeline-header { margin: 0; color: #555; border-bottom: 1px solid #f4f4f4; padding: 10px; font-size: 16px; line-height: 1.1; } .timeline > li > .timeline-item > .timeline-header > a { font-weight: 600; } .timeline > li > .timeline-item > .timeline-body, .timeline > li > .timeline-item > .timeline-footer { padding: 10px; } .timeline > li > .fa, .timeline > li > .glyphicon, .timeline > li > .ion { width: 30px; height: 30px; font-size: 15px; line-height: 30px; position: absolute; color: #666; background: #d2d6de; border-radius: 50%; text-align: center; left: 18px; top: 0; } .timeline > .time-label > span { font-weight: 600; padding: 5px; display: inline-block; background-color: #fff; border-radius: 4px; } .timeline-inverse > li > .timeline-item { background: #f0f0f0; border: 1px solid #ddd; -webkit-box-shadow: none; box-shadow: none; } .timeline-inverse > li > .timeline-item > .timeline-header { border-bottom-color: #ddd; } /* * Component: Button * ----------------- */ .btn { border-radius: 3px; -webkit-box-shadow: none; box-shadow: none; border: 1px solid transparent; } .btn.uppercase { text-transform: uppercase; } .btn.btn-flat { border-radius: 0; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; border-width: 1px; } .btn:active { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn:focus { outline: none; } .btn.btn-file { position: relative; overflow: hidden; } .btn.btn-file > input[type='file'] { position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%; font-size: 100px; text-align: right; opacity: 0; filter: alpha(opacity=0); outline: none; background: white; cursor: inherit; display: block; } .btn-default { background-color: #f4f4f4; color: #444; border-color: #ddd; } .btn-default:hover, .btn-default:active, .btn-default.hover { background-color: #e7e7e7; } .btn-primary { background-color: #3c8dbc; border-color: #367fa9; } .btn-primary:hover, .btn-primary:active, .btn-primary.hover { background-color: #367fa9; } .btn-success { background-color: #00a65a; border-color: #008d4c; } .btn-success:hover, .btn-success:active, .btn-success.hover { background-color: #008d4c; } .btn-info { background-color: #00c0ef; border-color: #00acd6; } .btn-info:hover, .btn-info:active, .btn-info.hover { background-color: #00acd6; } .btn-danger { background-color: #dd4b39; border-color: #d73925; } .btn-danger:hover, .btn-danger:active, .btn-danger.hover { background-color: #d73925; } .btn-warning { background-color: #f39c12; border-color: #e08e0b; } .btn-warning:hover, .btn-warning:active, .btn-warning.hover { background-color: #e08e0b; } .btn-outline { border: 1px solid #fff; background: transparent; color: #fff; } .btn-outline:hover, .btn-outline:focus, .btn-outline:active { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.7); } .btn-link { -webkit-box-shadow: none; box-shadow: none; } .btn[class*='bg-']:hover { -webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2); box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2); } .btn-app { border-radius: 3px; position: relative; padding: 15px 5px; margin: 0 0 10px 10px; min-width: 80px; height: 60px; text-align: center; color: #666; border: 1px solid #ddd; background-color: #f4f4f4; font-size: 12px; } .btn-app > .fa, .btn-app > .glyphicon, .btn-app > .ion { font-size: 20px; display: block; } .btn-app:hover { background: #f4f4f4; color: #444; border-color: #aaa; } .btn-app:active, .btn-app:focus { -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); } .btn-app > .badge { position: absolute; top: -3px; right: -10px; font-size: 10px; font-weight: 400; } /* * Component: Callout * ------------------ */ .callout { border-radius: 3px; margin: 0 0 20px 0; padding: 15px 30px 15px 15px; border-left: 5px solid #eee; } .callout a { color: #fff; text-decoration: underline; } .callout a:hover { color: #eee; } .callout h4 { margin-top: 0; font-weight: 600; } .callout p:last-child { margin-bottom: 0; } .callout code, .callout .highlight { background-color: #fff; } .callout.callout-danger { border-color: #c23321; } .callout.callout-warning { border-color: #c87f0a; } .callout.callout-info { border-color: #0097bc; } .callout.callout-success { border-color: #00733e; } /* * Component: alert * ---------------- */ .alert { border-radius: 3px; } .alert h4 { font-weight: 600; } .alert .icon { margin-right: 10px; } .alert .close { color: #000; opacity: 0.2; filter: alpha(opacity=20); } .alert .close:hover { opacity: 0.5; filter: alpha(opacity=50); } .alert a { color: #fff; text-decoration: underline; } .alert-success { border-color: #008d4c; } .alert-danger, .alert-error { border-color: #d73925; } .alert-warning { border-color: #e08e0b; } .alert-info { border-color: #00acd6; } /* * Component: Nav * -------------- */ .nav > li > a:hover, .nav > li > a:active, .nav > li > a:focus { color: #444; background: #f7f7f7; } /* NAV PILLS */ .nav-pills > li > a { border-radius: 0; border-top: 3px solid transparent; color: #444; } .nav-pills > li > a > .fa, .nav-pills > li > a > .glyphicon, .nav-pills > li > a > .ion { margin-right: 5px; } .nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { border-top-color: #3c8dbc; } .nav-pills > li.active > a { font-weight: 600; } /* NAV STACKED */ .nav-stacked > li > a { border-radius: 0; border-top: 0; border-left: 3px solid transparent; color: #444; } .nav-stacked > li.active > a, .nav-stacked > li.active > a:hover { background: transparent; color: #444; border-top: 0; border-left-color: #3c8dbc; } .nav-stacked > li.header { border-bottom: 1px solid #ddd; color: #777; margin-bottom: 10px; padding: 5px 10px; text-transform: uppercase; } /* NAV TABS */ .nav-tabs-custom { margin-bottom: 20px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); border-radius: 3px; } .nav-tabs-custom > .nav-tabs { margin: 0; border-bottom-color: #f4f4f4; border-top-right-radius: 3px; border-top-left-radius: 3px; } .nav-tabs-custom > .nav-tabs > li { border-top: 3px solid transparent; margin-bottom: -2px; margin-right: 5px; } .nav-tabs-custom > .nav-tabs > li > a { color: #444; border-radius: 0; } .nav-tabs-custom > .nav-tabs > li > a.text-muted { color: #999; } .nav-tabs-custom > .nav-tabs > li > a, .nav-tabs-custom > .nav-tabs > li > a:hover { background: transparent; margin: 0; } .nav-tabs-custom > .nav-tabs > li > a:hover { color: #999; } .nav-tabs-custom > .nav-tabs > li:not(.active) > a:hover, .nav-tabs-custom > .nav-tabs > li:not(.active) > a:focus, .nav-tabs-custom > .nav-tabs > li:not(.active) > a:active { border-color: transparent; } .nav-tabs-custom > .nav-tabs > li.active { border-top-color: #3c8dbc; } .nav-tabs-custom > .nav-tabs > li.active > a, .nav-tabs-custom > .nav-tabs > li.active:hover > a { background-color: #fff; color: #444; } .nav-tabs-custom > .nav-tabs > li.active > a { border-top-color: transparent; border-left-color: #f4f4f4; border-right-color: #f4f4f4; } .nav-tabs-custom > .nav-tabs > li:first-of-type { margin-left: 0; } .nav-tabs-custom > .nav-tabs > li:first-of-type.active > a { border-left-color: transparent; } .nav-tabs-custom > .nav-tabs.pull-right { float: none !important; } .nav-tabs-custom > .nav-tabs.pull-right > li { float: right; } .nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type { margin-right: 0; } .nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type > a { border-left-width: 1px; } .nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type.active > a { border-left-color: #f4f4f4; border-right-color: transparent; } .nav-tabs-custom > .nav-tabs > li.header { line-height: 35px; padding: 0 10px; font-size: 20px; color: #444; } .nav-tabs-custom > .nav-tabs > li.header > .fa, .nav-tabs-custom > .nav-tabs > li.header > .glyphicon, .nav-tabs-custom > .nav-tabs > li.header > .ion { margin-right: 5px; } .nav-tabs-custom > .tab-content { background: #fff; padding: 10px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; } .nav-tabs-custom .dropdown.open > a:active, .nav-tabs-custom .dropdown.open > a:focus { background: transparent; color: #999; } .nav-tabs-custom.tab-primary > .nav-tabs > li.active { border-top-color: #3c8dbc; } .nav-tabs-custom.tab-info > .nav-tabs > li.active { border-top-color: #00c0ef; } .nav-tabs-custom.tab-danger > .nav-tabs > li.active { border-top-color: #dd4b39; } .nav-tabs-custom.tab-warning > .nav-tabs > li.active { border-top-color: #f39c12; } .nav-tabs-custom.tab-success > .nav-tabs > li.active { border-top-color: #00a65a; } .nav-tabs-custom.tab-default > .nav-tabs > li.active { border-top-color: #d2d6de; } /* PAGINATION */ .pagination > li > a { background: #fafafa; color: #666; } .pagination.pagination-flat > li > a { border-radius: 0 !important; } /* * Component: Products List * ------------------------ */ .products-list { list-style: none; margin: 0; padding: 0; } .products-list > .item { border-radius: 3px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); padding: 10px 0; background: #fff; } .products-list > .item:before, .products-list > .item:after { content: " "; display: table; } .products-list > .item:after { clear: both; } .products-list .product-img { float: left; } .products-list .product-img img { width: 50px; height: 50px; } .products-list .product-info { margin-left: 60px; } .products-list .product-title { font-weight: 600; } .products-list .product-description { display: block; color: #999; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .product-list-in-box > .item { -webkit-box-shadow: none; box-shadow: none; border-radius: 0; border-bottom: 1px solid #f4f4f4; } .product-list-in-box > .item:last-of-type { border-bottom-width: 0; } /* * Component: Table * ---------------- */ .table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td { border-top: 1px solid #f4f4f4; } .table > thead > tr > th { border-bottom: 2px solid #f4f4f4; } .table tr td .progress { margin-top: 5px; } .table-bordered { border: 1px solid #f4f4f4; } .table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th, .table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td { border: 1px solid #f4f4f4; } .table-bordered > thead > tr > th, .table-bordered > thead > tr > td { border-bottom-width: 2px; } .table.no-border, .table.no-border td, .table.no-border th { border: 0; } /* .text-center in tables */ table.text-center, table.text-center td, table.text-center th { text-align: center; } .table.align th { text-align: left; } .table.align td { text-align: right; } /* * Component: Label * ---------------- */ .label-default { background-color: #d2d6de; color: #444; } /* * Component: Direct Chat * ---------------------- */ .direct-chat .box-body { border-bottom-right-radius: 0; border-bottom-left-radius: 0; position: relative; overflow-x: hidden; padding: 0; } .direct-chat.chat-pane-open .direct-chat-contacts { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .direct-chat-messages { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); padding: 10px; height: 250px; overflow: auto; } .direct-chat-msg, .direct-chat-text { display: block; } .direct-chat-msg { margin-bottom: 10px; } .direct-chat-msg:before, .direct-chat-msg:after { content: " "; display: table; } .direct-chat-msg:after { clear: both; } .direct-chat-messages, .direct-chat-contacts { -webkit-transition: -webkit-transform 0.5s ease-in-out; -moz-transition: -moz-transform 0.5s ease-in-out; -o-transition: -o-transform 0.5s ease-in-out; transition: transform 0.5s ease-in-out; } .direct-chat-text { border-radius: 5px; position: relative; padding: 5px 10px; background: #d2d6de; border: 1px solid #d2d6de; margin: 5px 0 0 50px; color: #444444; } .direct-chat-text:after, .direct-chat-text:before { position: absolute; right: 100%; top: 15px; border: solid transparent; border-right-color: #d2d6de; content: ' '; height: 0; width: 0; pointer-events: none; } .direct-chat-text:after { border-width: 5px; margin-top: -5px; } .direct-chat-text:before { border-width: 6px; margin-top: -6px; } .right .direct-chat-text { margin-right: 50px; margin-left: 0; } .right .direct-chat-text:after, .right .direct-chat-text:before { right: auto; left: 100%; border-right-color: transparent; border-left-color: #d2d6de; } .direct-chat-img { border-radius: 50%; float: left; width: 40px; height: 40px; } .right .direct-chat-img { float: right; } .direct-chat-info { display: block; margin-bottom: 2px; font-size: 12px; } .direct-chat-name { font-weight: 600; } .direct-chat-timestamp { color: #999; } .direct-chat-contacts-open .direct-chat-contacts { -webkit-transform: translate(0, 0); -ms-transform: translate(0, 0); -o-transform: translate(0, 0); transform: translate(0, 0); } .direct-chat-contacts { -webkit-transform: translate(101%, 0); -ms-transform: translate(101%, 0); -o-transform: translate(101%, 0); transform: translate(101%, 0); position: absolute; top: 0; bottom: 0; height: 250px; width: 100%; background: #222d32; color: #fff; overflow: auto; } .contacts-list > li { border-bottom: 1px solid rgba(0, 0, 0, 0.2); padding: 10px; margin: 0; } .contacts-list > li:before, .contacts-list > li:after { content: " "; display: table; } .contacts-list > li:after { clear: both; } .contacts-list > li:last-of-type { border-bottom: none; } .contacts-list-img { border-radius: 50%; width: 40px; float: left; } .contacts-list-info { margin-left: 45px; color: #fff; } .contacts-list-name, .contacts-list-status { display: block; } .contacts-list-name { font-weight: 600; } .contacts-list-status { font-size: 12px; } .contacts-list-date { color: #aaa; font-weight: normal; } .contacts-list-msg { color: #999; } .direct-chat-danger .right > .direct-chat-text { background: #dd4b39; border-color: #dd4b39; color: #ffffff; } .direct-chat-danger .right > .direct-chat-text:after, .direct-chat-danger .right > .direct-chat-text:before { border-left-color: #dd4b39; } .direct-chat-primary .right > .direct-chat-text { background: #3c8dbc; border-color: #3c8dbc; color: #ffffff; } .direct-chat-primary .right > .direct-chat-text:after, .direct-chat-primary .right > .direct-chat-text:before { border-left-color: #3c8dbc; } .direct-chat-warning .right > .direct-chat-text { background: #f39c12; border-color: #f39c12; color: #ffffff; } .direct-chat-warning .right > .direct-chat-text:after, .direct-chat-warning .right > .direct-chat-text:before { border-left-color: #f39c12; } .direct-chat-info .right > .direct-chat-text { background: #00c0ef; border-color: #00c0ef; color: #ffffff; } .direct-chat-info .right > .direct-chat-text:after, .direct-chat-info .right > .direct-chat-text:before { border-left-color: #00c0ef; } .direct-chat-success .right > .direct-chat-text { background: #00a65a; border-color: #00a65a; color: #ffffff; } .direct-chat-success .right > .direct-chat-text:after, .direct-chat-success .right > .direct-chat-text:before { border-left-color: #00a65a; } /* * Component: Users List * --------------------- */ .users-list > li { width: 25%; float: left; padding: 10px; text-align: center; } .users-list > li img { border-radius: 50%; max-width: 100%; height: auto; } .users-list > li > a:hover, .users-list > li > a:hover .users-list-name { color: #999; } .users-list-name, .users-list-date { display: block; } .users-list-name { font-weight: 600; color: #444; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .users-list-date { color: #999; font-size: 12px; } /* * Component: Carousel * ------------------- */ .carousel-control.left, .carousel-control.right { background-image: none; } .carousel-control > .fa { font-size: 40px; position: absolute; top: 50%; z-index: 5; display: inline-block; margin-top: -20px; } /* * Component: modal * ---------------- */ .modal { background: rgba(0, 0, 0, 0.3); } .modal-content { border-radius: 0; -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125); border: 0; } @media (min-width: 768px) { .modal-content { -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125); } } .modal-header { border-bottom-color: #f4f4f4; } .modal-footer { border-top-color: #f4f4f4; } .modal-primary .modal-header, .modal-primary .modal-footer { border-color: #307095; } .modal-warning .modal-header, .modal-warning .modal-footer { border-color: #c87f0a; } .modal-info .modal-header, .modal-info .modal-footer { border-color: #0097bc; } .modal-success .modal-header, .modal-success .modal-footer { border-color: #00733e; } .modal-danger .modal-header, .modal-danger .modal-footer { border-color: #c23321; } /* * Component: Social Widgets * ------------------------- */ .box-widget { border: none; position: relative; } .widget-user .widget-user-header { padding: 20px; height: 120px; border-top-right-radius: 3px; border-top-left-radius: 3px; } .widget-user .widget-user-username { margin-top: 0; margin-bottom: 5px; font-size: 25px; font-weight: 300; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); } .widget-user .widget-user-desc { margin-top: 0; } .widget-user .widget-user-image { position: absolute; top: 65px; left: 50%; margin-left: -45px; } .widget-user .widget-user-image > img { width: 90px; height: auto; border: 3px solid #fff; } .widget-user .box-footer { padding-top: 30px; } .widget-user-2 .widget-user-header { padding: 20px; border-top-right-radius: 3px; border-top-left-radius: 3px; } .widget-user-2 .widget-user-username { margin-top: 5px; margin-bottom: 5px; font-size: 25px; font-weight: 300; } .widget-user-2 .widget-user-desc { margin-top: 0; } .widget-user-2 .widget-user-username, .widget-user-2 .widget-user-desc { margin-left: 75px; } .widget-user-2 .widget-user-image > img { width: 65px; height: auto; float: left; } /* * Page: Mailbox * ------------- */ .mailbox-messages > .table { margin: 0; } .mailbox-controls { padding: 5px; } .mailbox-controls.with-border { border-bottom: 1px solid #f4f4f4; } .mailbox-read-info { border-bottom: 1px solid #f4f4f4; padding: 10px; } .mailbox-read-info h3 { font-size: 20px; margin: 0; } .mailbox-read-info h5 { margin: 0; padding: 5px 0 0 0; } .mailbox-read-time { color: #999; font-size: 13px; } .mailbox-read-message { padding: 10px; } .mailbox-attachments li { float: left; width: 200px; border: 1px solid #eee; margin-bottom: 10px; margin-right: 10px; } .mailbox-attachment-name { font-weight: bold; color: #666; } .mailbox-attachment-icon, .mailbox-attachment-info, .mailbox-attachment-size { display: block; } .mailbox-attachment-info { padding: 10px; background: #f4f4f4; } .mailbox-attachment-size { color: #999; font-size: 12px; } .mailbox-attachment-icon { text-align: center; font-size: 65px; color: #666; padding: 20px 10px; } .mailbox-attachment-icon.has-img { padding: 0; } .mailbox-attachment-icon.has-img > img { max-width: 100%; height: auto; } /* * Page: Lock Screen * ----------------- */ /* ADD THIS CLASS TO THE <BODY> TAG */ .lockscreen { background: #d2d6de; } .lockscreen-logo { font-size: 35px; text-align: center; margin-bottom: 25px; font-weight: 300; } .lockscreen-logo a { color: #444; } .lockscreen-wrapper { max-width: 400px; margin: 0 auto; margin-top: 10%; } /* User name [optional] */ .lockscreen .lockscreen-name { text-align: center; font-weight: 600; } /* Will contain the image and the sign in form */ .lockscreen-item { border-radius: 4px; padding: 0; background: #fff; position: relative; margin: 10px auto 30px auto; width: 290px; } /* User image */ .lockscreen-image { border-radius: 50%; position: absolute; left: -10px; top: -25px; background: #fff; padding: 5px; z-index: 10; } .lockscreen-image > img { border-radius: 50%; width: 70px; height: 70px; } /* Contains the password input and the login button */ .lockscreen-credentials { margin-left: 70px; } .lockscreen-credentials .form-control { border: 0; } .lockscreen-credentials .btn { background-color: #fff; border: 0; padding: 0 10px; } .lockscreen-footer { margin-top: 10px; } /* * Page: Login & Register * ---------------------- */ .login-logo, .register-logo { font-size: 35px; text-align: center; margin-bottom: 25px; font-weight: 300; } .login-logo a, .register-logo a { color: #444; } .login-page, .register-page { background: #d2d6de; } .login-box, .register-box { width: 360px; margin: 7% auto; } @media (max-width: 768px) { .login-box, .register-box { width: 90%; margin-top: 20px; } } .login-box-body, .register-box-body { background: #fff; padding: 20px; border-top: 0; color: #666; } .login-box-body .form-control-feedback, .register-box-body .form-control-feedback { color: #777; } .login-box-msg, .register-box-msg { margin: 0; text-align: center; padding: 0 20px 20px 20px; } .social-auth-links { margin: 10px 0; } /* * Page: 400 and 500 error pages * ------------------------------ */ .error-page { width: 600px; margin: 20px auto 0 auto; } @media (max-width: 991px) { .error-page { width: 100%; } } .error-page > .headline { float: left; font-size: 100px; font-weight: 300; } @media (max-width: 991px) { .error-page > .headline { float: none; text-align: center; } } .error-page > .error-content { margin-left: 190px; display: block; } @media (max-width: 991px) { .error-page > .error-content { margin-left: 0; } } .error-page > .error-content > h3 { font-weight: 300; font-size: 25px; } @media (max-width: 991px) { .error-page > .error-content > h3 { text-align: center; } } /* * Page: Invoice * ------------- */ .invoice { position: relative; background: #fff; border: 1px solid #f4f4f4; padding: 20px; margin: 10px 25px; } .invoice-title { margin-top: 0; } /* * Page: Profile * ------------- */ .profile-user-img { margin: 0 auto; width: 100px; padding: 3px; border: 3px solid #d2d6de; } .profile-username { font-size: 21px; margin-top: 5px; } .post { border-bottom: 1px solid #d2d6de; margin-bottom: 15px; padding-bottom: 15px; color: #666; } .post:last-of-type { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; } .post .user-block { margin-bottom: 15px; } /* * Social Buttons for Bootstrap * * Copyright 2013-2015 Panayiotis Lipiridis * Licensed under the MIT License * * https://github.com/lipis/bootstrap-social */ .btn-social { position: relative; padding-left: 44px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .btn-social > :first-child { position: absolute; left: 0; top: 0; bottom: 0; width: 32px; line-height: 34px; font-size: 1.6em; text-align: center; border-right: 1px solid rgba(0, 0, 0, 0.2); } .btn-social.btn-lg { padding-left: 61px; } .btn-social.btn-lg > :first-child { line-height: 45px; width: 45px; font-size: 1.8em; } .btn-social.btn-sm { padding-left: 38px; } .btn-social.btn-sm > :first-child { line-height: 28px; width: 28px; font-size: 1.4em; } .btn-social.btn-xs { padding-left: 30px; } .btn-social.btn-xs > :first-child { line-height: 20px; width: 20px; font-size: 1.2em; } .btn-social-icon { position: relative; padding-left: 44px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 34px; width: 34px; padding: 0; } .btn-social-icon > :first-child { position: absolute; left: 0; top: 0; bottom: 0; width: 32px; line-height: 34px; font-size: 1.6em; text-align: center; border-right: 1px solid rgba(0, 0, 0, 0.2); } .btn-social-icon.btn-lg { padding-left: 61px; } .btn-social-icon.btn-lg > :first-child { line-height: 45px; width: 45px; font-size: 1.8em; } .btn-social-icon.btn-sm { padding-left: 38px; } .btn-social-icon.btn-sm > :first-child { line-height: 28px; width: 28px; font-size: 1.4em; } .btn-social-icon.btn-xs { padding-left: 30px; } .btn-social-icon.btn-xs > :first-child { line-height: 20px; width: 20px; font-size: 1.2em; } .btn-social-icon > :first-child { border: none; text-align: center; width: 100%; } .btn-social-icon.btn-lg { height: 45px; width: 45px; padding-left: 0; padding-right: 0; } .btn-social-icon.btn-sm { height: 30px; width: 30px; padding-left: 0; padding-right: 0; } .btn-social-icon.btn-xs { height: 22px; width: 22px; padding-left: 0; padding-right: 0; } .btn-adn { color: #ffffff; background-color: #d87a68; border-color: rgba(0, 0, 0, 0.2); } .btn-adn:focus, .btn-adn.focus { color: #ffffff; background-color: #ce563f; border-color: rgba(0, 0, 0, 0.2); } .btn-adn:hover { color: #ffffff; background-color: #ce563f; border-color: rgba(0, 0, 0, 0.2); } .btn-adn:active, .btn-adn.active, .open > .dropdown-toggle.btn-adn { color: #ffffff; background-color: #ce563f; border-color: rgba(0, 0, 0, 0.2); } .btn-adn:active, .btn-adn.active, .open > .dropdown-toggle.btn-adn { background-image: none; } .btn-adn .badge { color: #d87a68; background-color: #ffffff; } .btn-bitbucket { color: #ffffff; background-color: #205081; border-color: rgba(0, 0, 0, 0.2); } .btn-bitbucket:focus, .btn-bitbucket.focus { color: #ffffff; background-color: #163758; border-color: rgba(0, 0, 0, 0.2); } .btn-bitbucket:hover { color: #ffffff; background-color: #163758; border-color: rgba(0, 0, 0, 0.2); } .btn-bitbucket:active, .btn-bitbucket.active, .open > .dropdown-toggle.btn-bitbucket { color: #ffffff; background-color: #163758; border-color: rgba(0, 0, 0, 0.2); } .btn-bitbucket:active, .btn-bitbucket.active, .open > .dropdown-toggle.btn-bitbucket { background-image: none; } .btn-bitbucket .badge { color: #205081; background-color: #ffffff; } .btn-dropbox { color: #ffffff; background-color: #1087dd; border-color: rgba(0, 0, 0, 0.2); } .btn-dropbox:focus, .btn-dropbox.focus { color: #ffffff; background-color: #0d6aad; border-color: rgba(0, 0, 0, 0.2); } .btn-dropbox:hover { color: #ffffff; background-color: #0d6aad; border-color: rgba(0, 0, 0, 0.2); } .btn-dropbox:active, .btn-dropbox.active, .open > .dropdown-toggle.btn-dropbox { color: #ffffff; background-color: #0d6aad; border-color: rgba(0, 0, 0, 0.2); } .btn-dropbox:active, .btn-dropbox.active, .open > .dropdown-toggle.btn-dropbox { background-image: none; } .btn-dropbox .badge { color: #1087dd; background-color: #ffffff; } .btn-facebook { color: #ffffff; background-color: #3b5998; border-color: rgba(0, 0, 0, 0.2); } .btn-facebook:focus, .btn-facebook.focus { color: #ffffff; background-color: #2d4373; border-color: rgba(0, 0, 0, 0.2); } .btn-facebook:hover { color: #ffffff; background-color: #2d4373; border-color: rgba(0, 0, 0, 0.2); } .btn-facebook:active, .btn-facebook.active, .open > .dropdown-toggle.btn-facebook { color: #ffffff; background-color: #2d4373; border-color: rgba(0, 0, 0, 0.2); } .btn-facebook:active, .btn-facebook.active, .open > .dropdown-toggle.btn-facebook { background-image: none; } .btn-facebook .badge { color: #3b5998; background-color: #ffffff; } .btn-flickr { color: #ffffff; background-color: #ff0084; border-color: rgba(0, 0, 0, 0.2); } .btn-flickr:focus, .btn-flickr.focus { color: #ffffff; background-color: #cc006a; border-color: rgba(0, 0, 0, 0.2); } .btn-flickr:hover { color: #ffffff; background-color: #cc006a; border-color: rgba(0, 0, 0, 0.2); } .btn-flickr:active, .btn-flickr.active, .open > .dropdown-toggle.btn-flickr { color: #ffffff; background-color: #cc006a; border-color: rgba(0, 0, 0, 0.2); } .btn-flickr:active, .btn-flickr.active, .open > .dropdown-toggle.btn-flickr { background-image: none; } .btn-flickr .badge { color: #ff0084; background-color: #ffffff; } .btn-foursquare { color: #ffffff; background-color: #f94877; border-color: rgba(0, 0, 0, 0.2); } .btn-foursquare:focus, .btn-foursquare.focus { color: #ffffff; background-color: #f71752; border-color: rgba(0, 0, 0, 0.2); } .btn-foursquare:hover { color: #ffffff; background-color: #f71752; border-color: rgba(0, 0, 0, 0.2); } .btn-foursquare:active, .btn-foursquare.active, .open > .dropdown-toggle.btn-foursquare { color: #ffffff; background-color: #f71752; border-color: rgba(0, 0, 0, 0.2); } .btn-foursquare:active, .btn-foursquare.active, .open > .dropdown-toggle.btn-foursquare { background-image: none; } .btn-foursquare .badge { color: #f94877; background-color: #ffffff; } .btn-github { color: #ffffff; background-color: #444444; border-color: rgba(0, 0, 0, 0.2); } .btn-github:focus, .btn-github.focus { color: #ffffff; background-color: #2b2b2b; border-color: rgba(0, 0, 0, 0.2); } .btn-github:hover { color: #ffffff; background-color: #2b2b2b; border-color: rgba(0, 0, 0, 0.2); } .btn-github:active, .btn-github.active, .open > .dropdown-toggle.btn-github { color: #ffffff; background-color: #2b2b2b; border-color: rgba(0, 0, 0, 0.2); } .btn-github:active, .btn-github.active, .open > .dropdown-toggle.btn-github { background-image: none; } .btn-github .badge { color: #444444; background-color: #ffffff; } .btn-google { color: #ffffff; background-color: #dd4b39; border-color: rgba(0, 0, 0, 0.2); } .btn-google:focus, .btn-google.focus { color: #ffffff; background-color: #c23321; border-color: rgba(0, 0, 0, 0.2); } .btn-google:hover { color: #ffffff; background-color: #c23321; border-color: rgba(0, 0, 0, 0.2); } .btn-google:active, .btn-google.active, .open > .dropdown-toggle.btn-google { color: #ffffff; background-color: #c23321; border-color: rgba(0, 0, 0, 0.2); } .btn-google:active, .btn-google.active, .open > .dropdown-toggle.btn-google { background-image: none; } .btn-google .badge { color: #dd4b39; background-color: #ffffff; } .btn-instagram { color: #ffffff; background-color: #3f729b; border-color: rgba(0, 0, 0, 0.2); } .btn-instagram:focus, .btn-instagram.focus { color: #ffffff; background-color: #305777; border-color: rgba(0, 0, 0, 0.2); } .btn-instagram:hover { color: #ffffff; background-color: #305777; border-color: rgba(0, 0, 0, 0.2); } .btn-instagram:active, .btn-instagram.active, .open > .dropdown-toggle.btn-instagram { color: #ffffff; background-color: #305777; border-color: rgba(0, 0, 0, 0.2); } .btn-instagram:active, .btn-instagram.active, .open > .dropdown-toggle.btn-instagram { background-image: none; } .btn-instagram .badge { color: #3f729b; background-color: #ffffff; } .btn-linkedin { color: #ffffff; background-color: #007bb6; border-color: rgba(0, 0, 0, 0.2); } .btn-linkedin:focus, .btn-linkedin.focus { color: #ffffff; background-color: #005983; border-color: rgba(0, 0, 0, 0.2); } .btn-linkedin:hover { color: #ffffff; background-color: #005983; border-color: rgba(0, 0, 0, 0.2); } .btn-linkedin:active, .btn-linkedin.active, .open > .dropdown-toggle.btn-linkedin { color: #ffffff; background-color: #005983; border-color: rgba(0, 0, 0, 0.2); } .btn-linkedin:active, .btn-linkedin.active, .open > .dropdown-toggle.btn-linkedin { background-image: none; } .btn-linkedin .badge { color: #007bb6; background-color: #ffffff; } .btn-microsoft { color: #ffffff; background-color: #2672ec; border-color: rgba(0, 0, 0, 0.2); } .btn-microsoft:focus, .btn-microsoft.focus { color: #ffffff; background-color: #125acd; border-color: rgba(0, 0, 0, 0.2); } .btn-microsoft:hover { color: #ffffff; background-color: #125acd; border-color: rgba(0, 0, 0, 0.2); } .btn-microsoft:active, .btn-microsoft.active, .open > .dropdown-toggle.btn-microsoft { color: #ffffff; background-color: #125acd; border-color: rgba(0, 0, 0, 0.2); } .btn-microsoft:active, .btn-microsoft.active, .open > .dropdown-toggle.btn-microsoft { background-image: none; } .btn-microsoft .badge { color: #2672ec; background-color: #ffffff; } .btn-openid { color: #ffffff; background-color: #f7931e; border-color: rgba(0, 0, 0, 0.2); } .btn-openid:focus, .btn-openid.focus { color: #ffffff; background-color: #da7908; border-color: rgba(0, 0, 0, 0.2); } .btn-openid:hover { color: #ffffff; background-color: #da7908; border-color: rgba(0, 0, 0, 0.2); } .btn-openid:active, .btn-openid.active, .open > .dropdown-toggle.btn-openid { color: #ffffff; background-color: #da7908; border-color: rgba(0, 0, 0, 0.2); } .btn-openid:active, .btn-openid.active, .open > .dropdown-toggle.btn-openid { background-image: none; } .btn-openid .badge { color: #f7931e; background-color: #ffffff; } .btn-pinterest { color: #ffffff; background-color: #cb2027; border-color: rgba(0, 0, 0, 0.2); } .btn-pinterest:focus, .btn-pinterest.focus { color: #ffffff; background-color: #9f191f; border-color: rgba(0, 0, 0, 0.2); } .btn-pinterest:hover { color: #ffffff; background-color: #9f191f; border-color: rgba(0, 0, 0, 0.2); } .btn-pinterest:active, .btn-pinterest.active, .open > .dropdown-toggle.btn-pinterest { color: #ffffff; background-color: #9f191f; border-color: rgba(0, 0, 0, 0.2); } .btn-pinterest:active, .btn-pinterest.active, .open > .dropdown-toggle.btn-pinterest { background-image: none; } .btn-pinterest .badge { color: #cb2027; background-color: #ffffff; } .btn-reddit { color: #000000; background-color: #eff7ff; border-color: rgba(0, 0, 0, 0.2); } .btn-reddit:focus, .btn-reddit.focus { color: #000000; background-color: #bcddff; border-color: rgba(0, 0, 0, 0.2); } .btn-reddit:hover { color: #000000; background-color: #bcddff; border-color: rgba(0, 0, 0, 0.2); } .btn-reddit:active, .btn-reddit.active, .open > .dropdown-toggle.btn-reddit { color: #000000; background-color: #bcddff; border-color: rgba(0, 0, 0, 0.2); } .btn-reddit:active, .btn-reddit.active, .open > .dropdown-toggle.btn-reddit { background-image: none; } .btn-reddit .badge { color: #eff7ff; background-color: #000000; } .btn-soundcloud { color: #ffffff; background-color: #ff5500; border-color: rgba(0, 0, 0, 0.2); } .btn-soundcloud:focus, .btn-soundcloud.focus { color: #ffffff; background-color: #cc4400; border-color: rgba(0, 0, 0, 0.2); } .btn-soundcloud:hover { color: #ffffff; background-color: #cc4400; border-color: rgba(0, 0, 0, 0.2); } .btn-soundcloud:active, .btn-soundcloud.active, .open > .dropdown-toggle.btn-soundcloud { color: #ffffff; background-color: #cc4400; border-color: rgba(0, 0, 0, 0.2); } .btn-soundcloud:active, .btn-soundcloud.active, .open > .dropdown-toggle.btn-soundcloud { background-image: none; } .btn-soundcloud .badge { color: #ff5500; background-color: #ffffff; } .btn-tumblr { color: #ffffff; background-color: #2c4762; border-color: rgba(0, 0, 0, 0.2); } .btn-tumblr:focus, .btn-tumblr.focus { color: #ffffff; background-color: #1c2d3f; border-color: rgba(0, 0, 0, 0.2); } .btn-tumblr:hover { color: #ffffff; background-color: #1c2d3f; border-color: rgba(0, 0, 0, 0.2); } .btn-tumblr:active, .btn-tumblr.active, .open > .dropdown-toggle.btn-tumblr { color: #ffffff; background-color: #1c2d3f; border-color: rgba(0, 0, 0, 0.2); } .btn-tumblr:active, .btn-tumblr.active, .open > .dropdown-toggle.btn-tumblr { background-image: none; } .btn-tumblr .badge { color: #2c4762; background-color: #ffffff; } .btn-twitter { color: #ffffff; background-color: #55acee; border-color: rgba(0, 0, 0, 0.2); } .btn-twitter:focus, .btn-twitter.focus { color: #ffffff; background-color: #2795e9; border-color: rgba(0, 0, 0, 0.2); } .btn-twitter:hover { color: #ffffff; background-color: #2795e9; border-color: rgba(0, 0, 0, 0.2); } .btn-twitter:active, .btn-twitter.active, .open > .dropdown-toggle.btn-twitter { color: #ffffff; background-color: #2795e9; border-color: rgba(0, 0, 0, 0.2); } .btn-twitter:active, .btn-twitter.active, .open > .dropdown-toggle.btn-twitter { background-image: none; } .btn-twitter .badge { color: #55acee; background-color: #ffffff; } .btn-vimeo { color: #ffffff; background-color: #1ab7ea; border-color: rgba(0, 0, 0, 0.2); } .btn-vimeo:focus, .btn-vimeo.focus { color: #ffffff; background-color: #1295bf; border-color: rgba(0, 0, 0, 0.2); } .btn-vimeo:hover { color: #ffffff; background-color: #1295bf; border-color: rgba(0, 0, 0, 0.2); } .btn-vimeo:active, .btn-vimeo.active, .open > .dropdown-toggle.btn-vimeo { color: #ffffff; background-color: #1295bf; border-color: rgba(0, 0, 0, 0.2); } .btn-vimeo:active, .btn-vimeo.active, .open > .dropdown-toggle.btn-vimeo { background-image: none; } .btn-vimeo .badge { color: #1ab7ea; background-color: #ffffff; } .btn-vk { color: #ffffff; background-color: #587ea3; border-color: rgba(0, 0, 0, 0.2); } .btn-vk:focus, .btn-vk.focus { color: #ffffff; background-color: #466482; border-color: rgba(0, 0, 0, 0.2); } .btn-vk:hover { color: #ffffff; background-color: #466482; border-color: rgba(0, 0, 0, 0.2); } .btn-vk:active, .btn-vk.active, .open > .dropdown-toggle.btn-vk { color: #ffffff; background-color: #466482; border-color: rgba(0, 0, 0, 0.2); } .btn-vk:active, .btn-vk.active, .open > .dropdown-toggle.btn-vk { background-image: none; } .btn-vk .badge { color: #587ea3; background-color: #ffffff; } .btn-yahoo { color: #ffffff; background-color: #720e9e; border-color: rgba(0, 0, 0, 0.2); } .btn-yahoo:focus, .btn-yahoo.focus { color: #ffffff; background-color: #500a6f; border-color: rgba(0, 0, 0, 0.2); } .btn-yahoo:hover { color: #ffffff; background-color: #500a6f; border-color: rgba(0, 0, 0, 0.2); } .btn-yahoo:active, .btn-yahoo.active, .open > .dropdown-toggle.btn-yahoo { color: #ffffff; background-color: #500a6f; border-color: rgba(0, 0, 0, 0.2); } .btn-yahoo:active, .btn-yahoo.active, .open > .dropdown-toggle.btn-yahoo { background-image: none; } .btn-yahoo .badge { color: #720e9e; background-color: #ffffff; } /* * Plugin: Full Calendar * --------------------- */ .fc-button { background: #f4f4f4; background-image: none; color: #444; border-color: #ddd; border-bottom-color: #ddd; } .fc-button:hover, .fc-button:active, .fc-button.hover { background-color: #e9e9e9; } .fc-header-title h2 { font-size: 15px; line-height: 1.6em; color: #666; margin-left: 10px; } .fc-header-right { padding-right: 10px; } .fc-header-left { padding-left: 10px; } .fc-widget-header { background: #fafafa; } .fc-grid { width: 100%; border: 0; } .fc-widget-header:first-of-type, .fc-widget-content:first-of-type { border-left: 0; border-right: 0; } .fc-widget-header:last-of-type, .fc-widget-content:last-of-type { border-right: 0; } .fc-toolbar { padding: 10px; margin: 0; } .fc-day-number { font-size: 20px; font-weight: 300; padding-right: 10px; } .fc-color-picker { list-style: none; margin: 0; padding: 0; } .fc-color-picker > li { float: left; font-size: 30px; margin-right: 5px; line-height: 30px; } .fc-color-picker > li .fa { -webkit-transition: -webkit-transform linear 0.3s; -moz-transition: -moz-transform linear 0.3s; -o-transition: -o-transform linear 0.3s; transition: transform linear 0.3s; } .fc-color-picker > li .fa:hover { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); -o-transform: rotate(30deg); transform: rotate(30deg); } #add-new-event { -webkit-transition: all linear 0.3s; -o-transition: all linear 0.3s; transition: all linear 0.3s; } .external-event { padding: 5px 10px; font-weight: bold; margin-bottom: 4px; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); border-radius: 3px; cursor: move; } .external-event:hover { box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2); } /* * Plugin: Select2 * --------------- */ .select2-container--default.select2-container--focus, .select2-selection.select2-container--focus, .select2-container--default:focus, .select2-selection:focus, .select2-container--default:active, .select2-selection:active { outline: none; } .select2-container--default .select2-selection--single, .select2-selection .select2-selection--single { border: 1px solid #d2d6de; border-radius: 0; padding: 6px 12px; height: 34px; } .select2-container--default.select2-container--open { border-color: #3c8dbc; } .select2-dropdown { border: 1px solid #d2d6de; border-radius: 0; } .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: #3c8dbc; color: white; } .select2-results__option { padding: 6px 12px; user-select: none; -webkit-user-select: none; } .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 0; padding-right: 0; height: auto; margin-top: -4px; } .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered { padding-right: 6px; padding-left: 20px; } .select2-container--default .select2-selection--single .select2-selection__arrow { height: 28px; right: 3px; } .select2-container--default .select2-selection--single .select2-selection__arrow b { margin-top: 0; } .select2-dropdown .select2-search__field, .select2-search--inline .select2-search__field { border: 1px solid #d2d6de; } .select2-dropdown .select2-search__field:focus, .select2-search--inline .select2-search__field:focus { outline: none; border: 1px solid #3c8dbc; } .select2-container--default .select2-results__option[aria-disabled=true] { color: #999; } .select2-container--default .select2-results__option[aria-selected=true] { background-color: #ddd; } .select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[aria-selected=true]:hover { color: #444; } .select2-container--default .select2-selection--multiple { border: 1px solid #d2d6de; border-radius: 0; } .select2-container--default .select2-selection--multiple:focus { border-color: #3c8dbc; } .select2-container--default.select2-container--focus .select2-selection--multiple { border-color: #d2d6de; } .select2-container--default .select2-selection--multiple .select2-selection__choice { background-color: #3c8dbc; border-color: #367fa9; padding: 1px 10px; color: #fff; } .select2-container--default .select2-selection--multiple .select2-selection__choice__remove { margin-right: 5px; color: rgba(255, 255, 255, 0.7); } .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover { color: #fff; } .select2-container .select2-selection--single .select2-selection__rendered { padding-right: 10px; } /* * General: Miscellaneous * ---------------------- */ .pad { padding: 10px; } .margin { margin: 10px; } .margin-bottom { margin-bottom: 20px; } .margin-bottom-none { margin-bottom: 0; } .margin-r-5 { margin-right: 5px; } .inline { display: inline; } .description-block { display: block; margin: 10px 0; text-align: center; } .description-block.margin-bottom { margin-bottom: 25px; } .description-block > .description-header { margin: 0; padding: 0; font-weight: 600; font-size: 16px; } .description-block > .description-text { text-transform: uppercase; } .bg-red, .bg-yellow, .bg-aqua, .bg-blue, .bg-light-blue, .bg-green, .bg-navy, .bg-teal, .bg-olive, .bg-lime, .bg-orange, .bg-fuchsia, .bg-purple, .bg-maroon, .bg-black, .bg-red-active, .bg-yellow-active, .bg-aqua-active, .bg-blue-active, .bg-light-blue-active, .bg-green-active, .bg-navy-active, .bg-teal-active, .bg-olive-active, .bg-lime-active, .bg-orange-active, .bg-fuchsia-active, .bg-purple-active, .bg-maroon-active, .bg-black-active, .callout.callout-danger, .callout.callout-warning, .callout.callout-info, .callout.callout-success, .alert-success, .alert-danger, .alert-error, .alert-warning, .alert-info, .label-danger, .label-info, .label-warning, .label-primary, .label-success, .modal-primary .modal-body, .modal-primary .modal-header, .modal-primary .modal-footer, .modal-warning .modal-body, .modal-warning .modal-header, .modal-warning .modal-footer, .modal-info .modal-body, .modal-info .modal-header, .modal-info .modal-footer, .modal-success .modal-body, .modal-success .modal-header, .modal-success .modal-footer, .modal-danger .modal-body, .modal-danger .modal-header, .modal-danger .modal-footer { color: #fff !important; } .bg-gray { color: #000; background-color: #d2d6de !important; } .bg-gray-light { background-color: #f7f7f7; } .bg-black { background-color: #111111 !important; } .bg-red, .callout.callout-danger, .alert-danger, .alert-error, .label-danger, .modal-danger .modal-body { background-color: #dd4b39 !important; } .bg-yellow, .callout.callout-warning, .alert-warning, .label-warning, .modal-warning .modal-body { background-color: #f39c12 !important; } .bg-aqua, .callout.callout-info, .alert-info, .label-info, .modal-info .modal-body { background-color: #00c0ef !important; } .bg-blue { background-color: #0073b7 !important; } .bg-light-blue, .label-primary, .modal-primary .modal-body { background-color: #3c8dbc !important; } .bg-green, .callout.callout-success, .alert-success, .label-success, .modal-success .modal-body { background-color: #00a65a !important; } .bg-navy { background-color: #001f3f !important; } .bg-teal { background-color: #39cccc !important; } .bg-olive { background-color: #3d9970 !important; } .bg-lime { background-color: #01ff70 !important; } .bg-orange { background-color: #ff851b !important; } .bg-fuchsia { background-color: #f012be !important; } .bg-purple { background-color: #605ca8 !important; } .bg-maroon { background-color: #d81b60 !important; } .bg-gray-active { color: #000; background-color: #b5bbc8 !important; } .bg-black-active { background-color: #000000 !important; } .bg-red-active, .modal-danger .modal-header, .modal-danger .modal-footer { background-color: #d33724 !important; } .bg-yellow-active, .modal-warning .modal-header, .modal-warning .modal-footer { background-color: #db8b0b !important; } .bg-aqua-active, .modal-info .modal-header, .modal-info .modal-footer { background-color: #00a7d0 !important; } .bg-blue-active { background-color: #005384 !important; } .bg-light-blue-active, .modal-primary .modal-header, .modal-primary .modal-footer { background-color: #357ca5 !important; } .bg-green-active, .modal-success .modal-header, .modal-success .modal-footer { background-color: #008d4c !important; } .bg-navy-active { background-color: #001a35 !important; } .bg-teal-active { background-color: #30bbbb !important; } .bg-olive-active { background-color: #368763 !important; } .bg-lime-active { background-color: #00e765 !important; } .bg-orange-active { background-color: #ff7701 !important; } .bg-fuchsia-active { background-color: #db0ead !important; } .bg-purple-active { background-color: #555299 !important; } .bg-maroon-active { background-color: #ca195a !important; } [class^="bg-"].disabled { opacity: 0.65; filter: alpha(opacity=65); } .text-red { color: #dd4b39 !important; } .text-yellow { color: #f39c12 !important; } .text-aqua { color: #00c0ef !important; } .text-blue { color: #0073b7 !important; } .text-black { color: #111111 !important; } .text-light-blue { color: #3c8dbc !important; } .text-green { color: #00a65a !important; } .text-gray { color: #d2d6de !important; } .text-navy { color: #001f3f !important; } .text-teal { color: #39cccc !important; } .text-olive { color: #3d9970 !important; } .text-lime { color: #01ff70 !important; } .text-orange { color: #ff851b !important; } .text-fuchsia { color: #f012be !important; } .text-purple { color: #605ca8 !important; } .text-maroon { color: #d81b60 !important; } .link-muted { color: #7a869d; } .link-muted:hover, .link-muted:focus { color: #606c84; } .link-black { color: #666; } .link-black:hover, .link-black:focus { color: #999; } .hide { display: none !important; } .no-border { border: 0 !important; } .no-padding { padding: 0 !important; } .no-margin { margin: 0 !important; } .no-shadow { box-shadow: none !important; } .list-unstyled, .chart-legend, .contacts-list, .users-list, .mailbox-attachments { list-style: none; margin: 0; padding: 0; } .list-group-unbordered > .list-group-item { border-left: 0; border-right: 0; border-radius: 0; padding-left: 0; padding-right: 0; } .flat { border-radius: 0 !important; } .text-bold, .text-bold.table td, .text-bold.table th { font-weight: 700; } .text-sm { font-size: 12px; } .jqstooltip { padding: 5px !important; width: auto !important; height: auto !important; } .bg-teal-gradient { background: #39cccc !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #39cccc), color-stop(1, #7adddd)) !important; background: -ms-linear-gradient(bottom, #39cccc, #7adddd) !important; background: -moz-linear-gradient(center bottom, #39cccc 0%, #7adddd 100%) !important; background: -o-linear-gradient(#7adddd, #39cccc) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39cccc', GradientType=0) !important; color: #fff; } .bg-light-blue-gradient { background: #3c8dbc !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important; background: -ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important; background: -moz-linear-gradient(center bottom, #3c8dbc 0%, #67a8ce 100%) !important; background: -o-linear-gradient(#67a8ce, #3c8dbc) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important; color: #fff; } .bg-blue-gradient { background: #0073b7 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important; background: -ms-linear-gradient(bottom, #0073b7, #0089db) !important; background: -moz-linear-gradient(center bottom, #0073b7 0%, #0089db 100%) !important; background: -o-linear-gradient(#0089db, #0073b7) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important; color: #fff; } .bg-aqua-gradient { background: #00c0ef !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important; background: -ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important; background: -moz-linear-gradient(center bottom, #00c0ef 0%, #14d1ff 100%) !important; background: -o-linear-gradient(#14d1ff, #00c0ef) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important; color: #fff; } .bg-yellow-gradient { background: #f39c12 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important; background: -ms-linear-gradient(bottom, #f39c12, #f7bc60) !important; background: -moz-linear-gradient(center bottom, #f39c12 0%, #f7bc60 100%) !important; background: -o-linear-gradient(#f7bc60, #f39c12) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important; color: #fff; } .bg-purple-gradient { background: #605ca8 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important; background: -ms-linear-gradient(bottom, #605ca8, #9491c4) !important; background: -moz-linear-gradient(center bottom, #605ca8 0%, #9491c4 100%) !important; background: -o-linear-gradient(#9491c4, #605ca8) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important; color: #fff; } .bg-green-gradient { background: #00a65a !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important; background: -ms-linear-gradient(bottom, #00a65a, #00ca6d) !important; background: -moz-linear-gradient(center bottom, #00a65a 0%, #00ca6d 100%) !important; background: -o-linear-gradient(#00ca6d, #00a65a) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important; color: #fff; } .bg-red-gradient { background: #dd4b39 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important; background: -ms-linear-gradient(bottom, #dd4b39, #e47365) !important; background: -moz-linear-gradient(center bottom, #dd4b39 0%, #e47365 100%) !important; background: -o-linear-gradient(#e47365, #dd4b39) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important; color: #fff; } .bg-black-gradient { background: #111111 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #111111), color-stop(1, #2b2b2b)) !important; background: -ms-linear-gradient(bottom, #111111, #2b2b2b) !important; background: -moz-linear-gradient(center bottom, #111111 0%, #2b2b2b 100%) !important; background: -o-linear-gradient(#2b2b2b, #111111) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111111', GradientType=0) !important; color: #fff; } .bg-maroon-gradient { background: #d81b60 !important; background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #d81b60), color-stop(1, #e73f7c)) !important; background: -ms-linear-gradient(bottom, #d81b60, #e73f7c) !important; background: -moz-linear-gradient(center bottom, #d81b60 0%, #e73f7c 100%) !important; background: -o-linear-gradient(#e73f7c, #d81b60) !important; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#d81b60', GradientType=0) !important; color: #fff; } .description-block .description-icon { font-size: 16px; } .no-pad-top { padding-top: 0; } .position-static { position: static !important; } .list-header { font-size: 15px; padding: 10px 4px; font-weight: bold; color: #666; } .list-seperator { height: 1px; background: #f4f4f4; margin: 15px 0 9px 0; } .list-link > a { padding: 4px; color: #777; } .list-link > a:hover { color: #222; } .font-light { font-weight: 300; } .user-block:before, .user-block:after { content: " "; display: table; } .user-block:after { clear: both; } .user-block img { width: 40px; height: 40px; float: left; } .user-block .username, .user-block .description, .user-block .comment { display: block; margin-left: 50px; } .user-block .username { font-size: 16px; font-weight: 600; } .user-block .description { color: #999; font-size: 13px; } .user-block.user-block-sm .username, .user-block.user-block-sm .description, .user-block.user-block-sm .comment { margin-left: 40px; } .user-block.user-block-sm .username { font-size: 14px; } .img-sm, .img-md, .img-lg, .box-comments .box-comment img, .user-block.user-block-sm img { float: left; } .img-sm, .box-comments .box-comment img, .user-block.user-block-sm img { width: 30px !important; height: 30px !important; } .img-sm + .img-push { margin-left: 40px; } .img-md { width: 60px; height: 60px; } .img-md + .img-push { margin-left: 70px; } .img-lg { width: 100px; height: 100px; } .img-lg + .img-push { margin-left: 110px; } .img-bordered { border: 3px solid #d2d6de; padding: 3px; } .img-bordered-sm { border: 2px solid #d2d6de; padding: 2px; } .attachment-block { border: 1px solid #f4f4f4; padding: 5px; margin-bottom: 10px; background: #f7f7f7; } .attachment-block .attachment-img { max-width: 100px; max-height: 100px; height: auto; float: left; } .attachment-block .attachment-pushed { margin-left: 110px; } .attachment-block .attachment-heading { margin: 0; } .attachment-block .attachment-text { color: #555; } .connectedSortable { min-height: 100px; } .ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .sort-highlight { background: #f4f4f4; border: 1px dashed #ddd; margin-bottom: 10px; } .full-opacity-hover { opacity: 0.65; filter: alpha(opacity=65); } .full-opacity-hover:hover { opacity: 1; filter: alpha(opacity=100); } .chart { position: relative; overflow: hidden; width: 100%; } .chart svg, .chart canvas { width: 100% !important; } /* * Misc: print * ----------- */ @media print { .no-print, .main-sidebar, .left-side, .main-header, .content-header { display: none !important; } .content-wrapper, .right-side, .main-footer { margin-left: 0 !important; min-height: 0 !important; -webkit-transform: translate(0, 0) !important; -ms-transform: translate(0, 0) !important; -o-transform: translate(0, 0) !important; transform: translate(0, 0) !important; } .fixed .content-wrapper, .fixed .right-side { padding-top: 0 !important; } .invoice { width: 100%; border: 0; margin: 0; padding: 0; } .invoice-col { float: left; width: 33.3333333%; } .table-responsive { overflow: auto; } .table-responsive > .table tr th, .table-responsive > .table tr td { white-space: normal !important; } }
{ "content_hash": "eabed5ba234a3ec0a9c14b1775bd8ded", "timestamp": "", "source": "github", "line_count": 4942, "max_line_length": 208, "avg_line_length": 22.347632537434237, "alnum_prop": 0.6595769725285671, "repo_name": "ggaquin/SisLeg", "id": "94ccdb8efeccf7f2e47671a1ff38e3303d3a9042", "size": "110442", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/AppBundle/Resources/Public/css/consejo.css", "mode": "33261", "license": "mit", "language": [ { "name": "CSS", "bytes": "797184" }, { "name": "HTML", "bytes": "4099143" }, { "name": "JavaScript", "bytes": "2892613" }, { "name": "PHP", "bytes": "1562458" }, { "name": "PLSQL", "bytes": "7108" }, { "name": "PLpgSQL", "bytes": "7197" }, { "name": "SQLPL", "bytes": "73562" }, { "name": "Shell", "bytes": "139" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>Storm.Endpoint</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="ExDoc"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/elixir.css"> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="row row-offcanvas row-offcanvas-left"> <section id="sidebar" class="col-xs-6 col-sm-3 sidebar-offcanvas"> <p class="pull-right visible-xs"> <button type="button" class="btn btn-default btn-sm" data-toggle="offcanvas"> <span class="glyphicon glyphicon-search"></span> </button> </p> <h1 id="full_list_header"> storm v0.0.1 </h1> <h2 id="sub_list_header"> <a href="overview.html">Overview</a> </h2> <div class="nav"> <span><a id="modules_list" href="#full_list">Modules</a></span> <span role="presentation" class="disabled">Exceptions</span> <span role="presentation" class="disabled">Protocols</span> </div> <div id="search" class="row"> <div class="col-xs-10"> <div class="input-group input-group-sm"> <label for="search_field" class="sr-only">Search</label> <input type="text" id="search_field" class="form-control" placeholder="Search" autocomplete="off" autofocus="autofocus" results="0"> <span class="input-group-btn"> <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-search"></span></button> </span> </div><!-- /input-group --> </div><!-- /.col-xs-10 --> <div class="col-xs-2" id="spinning"> <span></span> </div><!-- /.col-xs-2 --> </div><!-- /#search .row --> <script src="sidebar_items.js" defer></script> <ul id="full_list"> </ul> <div id="no_results"></div> </section><!--/.sidebar-offcanvas --> <section id="content" class="col-xs-12 col-sm-9"> <div class="breadcrumbs"> <button type="button" class="btn btn-default btn-sm" data-toggle="offcanvas"> <span class="glyphicon glyphicon-menu-hamburger"></span> </button> storm v0.0.1 &rarr; <a href="overview.html">Overview</a> &rarr; <a href="Storm.html#content">Storm</a> &rarr; <a href="Storm.Endpoint.html#content">Endpoint</a> </div> <h1> Storm.Endpoint </h1> <ul class="summary_links"> <li><a href="#summary_details">Summary</a></li> <li><a href="#functions_details">Functions</a></li> </ul> <section id="summary_details" class="details_list"> <h1>Summary</h1> <table class="summary"> <tr> <td class="summary_signature"><a href="#__sockets__/0">__sockets__()</a></td> <td class="summary_synopsis"><p>Returns all sockets configured in this endpoint</p> </td> </tr> <tr> <td class="summary_signature"><a href="#broadcast!/3">broadcast!(topic, event, msg)</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#broadcast/3">broadcast(topic, event, msg)</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#broadcast_from!/4">broadcast_from!(from, topic, event, msg)</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#broadcast_from/4">broadcast_from(from, topic, event, msg)</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#call/2">call(conn, opts)</a></td> <td class="summary_synopsis"><p>Callback implementation for <code class="inline">c:Plug.call/2</code></p> </td> </tr> <tr> <td class="summary_signature"><a href="#config/2">config(key, default \\ nil)</a></td> <td class="summary_synopsis"><p>Returns the endpoint configuration for <code class="inline">key</code></p> </td> </tr> <tr> <td class="summary_signature"><a href="#config_change/2">config_change(changed, removed)</a></td> <td class="summary_synopsis"><p>Reloads the configuration given the application environment changes</p> </td> </tr> <tr> <td class="summary_signature"><a href="#init/1">init(opts)</a></td> <td class="summary_synopsis"><p>Callback implementation for <code class="inline">c:Plug.init/1</code></p> </td> </tr> <tr> <td class="summary_signature"><a href="#path/1">path(path)</a></td> <td class="summary_synopsis"><p>Generates the path information when routing to this endpoint</p> </td> </tr> <tr> <td class="summary_signature"><a href="#start_link/0">start_link()</a></td> <td class="summary_synopsis"><p>Starts the endpoint supervision tree</p> </td> </tr> <tr> <td class="summary_signature"><a href="#static_path/1">static_path(path)</a></td> <td class="summary_synopsis"><p>Generates a route to a static file in <code class="inline">priv/static</code></p> </td> </tr> <tr> <td class="summary_signature"><a href="#static_url/0">static_url()</a></td> <td class="summary_synopsis"><p>Generates the static URL without any path information</p> </td> </tr> <tr> <td class="summary_signature"><a href="#subscribe/3">subscribe(pid, topic, opts \\ [])</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#unsubscribe/2">unsubscribe(pid, topic)</a></td> <td class="summary_synopsis"></td> </tr> <tr> <td class="summary_signature"><a href="#url/0">url()</a></td> <td class="summary_synopsis"><p>Generates the endpoint base URL without any path information</p> </td> </tr> </table> </section> <section id="functions_details" class="details_list"> <h1>Functions</h1> <section class="detail"> <div class="detail_header" id="__sockets__/0"> <span class="signature"><strong>__sockets__()</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#__sockets__/0" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Returns all sockets configured in this endpoint.</p> </section> </section> <section class="detail"> <div class="detail_header" id="broadcast/3"> <span class="signature"><strong>broadcast(topic, event, msg)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#broadcast/3" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="broadcast!/3"> <span class="signature"><strong>broadcast!(topic, event, msg)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#broadcast!/3" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="broadcast_from/4"> <span class="signature"><strong>broadcast_from(from, topic, event, msg)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#broadcast_from/4" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="broadcast_from!/4"> <span class="signature"><strong>broadcast_from!(from, topic, event, msg)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#broadcast_from!/4" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="call/2"> <span class="signature"><strong>call(conn, opts)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#call/2" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Callback implementation for <code class="inline">c:Plug.call/2</code>.</p> </section> </section> <section class="detail"> <div class="detail_header" id="config/2"> <span class="signature"><strong>config(key, default \\ nil)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#config/2" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Returns the endpoint configuration for <code class="inline">key</code></p> <p>Returns <code class="inline">default</code> if the key does not exist.</p> </section> </section> <section class="detail"> <div class="detail_header" id="config_change/2"> <span class="signature"><strong>config_change(changed, removed)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#config_change/2" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Reloads the configuration given the application environment changes.</p> </section> </section> <section class="detail"> <div class="detail_header" id="init/1"> <span class="signature"><strong>init(opts)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#init/1" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Callback implementation for <code class="inline">c:Plug.init/1</code>.</p> </section> </section> <section class="detail"> <div class="detail_header" id="path/1"> <span class="signature"><strong>path(path)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#path/1" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Generates the path information when routing to this endpoint.</p> </section> </section> <section class="detail"> <div class="detail_header" id="start_link/0"> <span class="signature"><strong>start_link()</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#start_link/0" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Starts the endpoint supervision tree.</p> </section> </section> <section class="detail"> <div class="detail_header" id="static_path/1"> <span class="signature"><strong>static_path(path)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#static_path/1" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Generates a route to a static file in <code class="inline">priv/static</code>.</p> </section> </section> <section class="detail"> <div class="detail_header" id="static_url/0"> <span class="signature"><strong>static_url()</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#static_url/0" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Generates the static URL without any path information.</p> </section> </section> <section class="detail"> <div class="detail_header" id="subscribe/3"> <span class="signature"><strong>subscribe(pid, topic, opts \\ [])</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#subscribe/3" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="unsubscribe/2"> <span class="signature"><strong>unsubscribe(pid, topic)</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#unsubscribe/2" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> </section> </section> <section class="detail"> <div class="detail_header" id="url/0"> <span class="signature"><strong>url()</strong></span> <div class="detail_header_links"> <span class="detail_type">(function)</span> <a href="#url/0" class="detail_link" title="Link to this function">#</a> <a class="to_top_link" href="#content" title="To the top of the page">&uarr;</a> </div> </div> <section class="docstring"> <p>Generates the endpoint base URL without any path information.</p> </section> </section> </section> </section> <!--/content --> </div><!--/row --> <!-- Scripts --> <script> relpath = ''; if (relpath != '') relpath += '/'; </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/jquery.js"><\/script>')</script> <script src="js/highlight.pack.js"></script> <script src="js/app.js"></script> </body> </html>
{ "content_hash": "e2811d339327cb9816d96fd9b63f2464", "timestamp": "", "source": "github", "line_count": 465, "max_line_length": 168, "avg_line_length": 32.46236559139785, "alnum_prop": 0.6165617754223253, "repo_name": "nsarno/storm", "id": "cd6ca79ddce80344299aa30ff8acd485d38df7d3", "size": "15095", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "doc/Storm.Endpoint.html", "mode": "33188", "license": "mit", "language": [ { "name": "Elixir", "bytes": "53951" } ], "symlink_target": "" }
<?php require_once 'includes/login-script.php'; ?> <?php require_once 'templates/unregistered-header.html'; ?> <div class="col-sm-2"> </div> <div class="col-sm-8 row"> <h2> Login </h2> <h3> Please log in to view your notes. </h3> <p> Don't have an account? <a href="register.php">Register here!</a> </p> <form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <div class="form-group"> <label for="user-email"> Email address </label> <input type="email" name="username" class="form-control" id="user-email" placeholder="Email"> </div> <div class="form-group"> <label for="user-password"> Password </label> <input type="password" name="password" class="form-control" id="user-password" placeholder="Password"> <?php if(isset($login)) { if($login->error !== '') echo $login->error; } ?> </div> <button type="submit" name="login-button" class="btn btn-default"> Submit </button> </form> <form method="POST" action="password-reset.php"> <div class="password_reset_container"> <button class="password_reset" name="password_reset" type="submit"> Forgot your password </button> </div> </form> </div> <div class="col-sm-2"> </div> <?php include 'templates/footer.html'; ?>
{ "content_hash": "78eb25707dd48fdc5f4f72d2b90fdbf7", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 106, "avg_line_length": 28.043478260869566, "alnum_prop": 0.6193798449612403, "repo_name": "lukecahill/Note-keeper", "id": "9fe4dc1fd74c2c1dad8b8b4c886ffc163608f8c3", "size": "1290", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "login.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "10852" }, { "name": "HTML", "bytes": "9043" }, { "name": "JavaScript", "bytes": "40315" }, { "name": "PHP", "bytes": "53913" } ], "symlink_target": "" }
#include "cpcheat.h" char watermark[] = "IH CP.C0M (§"; typedef FARPROC (_stdcall *GetProcAddress_t)(HMODULE, LPCSTR); GetProcAddress_t pGetProcAddress = 0; FARPROC _stdcall _GetProcAddress(HMODULE hModule, LPCSTR lpProcName) { FARPROC result = (*pGetProcAddress)(hModule, lpProcName); if(HIWORD(lpProcName)) { if(!lstrcmp(lpProcName, "GetProcAddress")) return (FARPROC)&_GetProcAddress; if(!lstrcmp(lpProcName, "HUD_GetStudioModelInterface") && !hModule) { char* retaddress = (char*)__builtin_return_address(0)/*gcc _ReturnAddress*/; pStudio = *(struct engine_studio_api_s**)(retaddress+0xA); // engstudio ppStudioInterface = *(struct r_studio_interface_s***)(retaddress+0xF); // studio interface retaddress++; DWORD exporttableaddr = *(DWORD*)retaddress - 0x9C; // exporttable exporttable = (struct exporttable_s*)(exporttableaddr); CreateThread(0, 0, (LPTHREAD_START_ROUTINE)hookclient, 0, 0, 0); } } return result; } void initcheat() { initsettings(); initfont(); initplayers(); } void cleanup() { destroysettings(); destroyconsole(); } void __attribute__ ((noinline)) junkfunc() { destroyconsole(); void *junk = calloc(753, 912); if(junk) goto end; free(junk); end: printf("%X%s%i", 0x1553434, watermark, 757843); } extern BOOL APIENTRY DllMain(HINSTANCE hinst, DWORD reason, LPVOID reserved) { if(reason == DLL_PROCESS_ATTACH) { junkfunc(); CreateThread(0, 0, (LPTHREAD_START_ROUTINE)findengine, 0, 0, 0); if(!hookiat("KERNEL32.dll", "GetProcAddress", (DWORD)&_GetProcAddress, (PDWORD)&pGetProcAddress)) return FALSE; initcheat(); } else if(reason == DLL_PROCESS_DETACH) { cleanup(); } return TRUE; }
{ "content_hash": "27120a005e96090319bc3845649bb79d", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 105, "avg_line_length": 27.01388888888889, "alnum_prop": 0.6020565552699229, "repo_name": "hrkfdn/cpcheat", "id": "7051febc32b2be4e28aa14dff042bc96705089b2", "size": "1945", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "main.c", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "55855" } ], "symlink_target": "" }
Does nothing
{ "content_hash": "793189d1115d192a774e701f666c3869", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 12, "avg_line_length": 13, "alnum_prop": 0.8461538461538461, "repo_name": "marcermarc/marcerBackup", "id": "ea39b4cc00f04149d666ec72a9a3e04a4bd3a6dd", "size": "28", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "9388" } ], "symlink_target": "" }
module Azure::Network::Mgmt::V2017_10_01 module Models # # Model object. # # class Error include MsRestAzure # @return [String] attr_accessor :code # @return [String] attr_accessor :message # @return [String] attr_accessor :target # @return [Array<ErrorDetails>] attr_accessor :details # @return [String] attr_accessor :inner_error # # Mapper for Error class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { client_side_validation: true, required: false, serialized_name: 'Error', type: { name: 'Composite', class_name: 'Error', model_properties: { code: { client_side_validation: true, required: false, serialized_name: 'code', type: { name: 'String' } }, message: { client_side_validation: true, required: false, serialized_name: 'message', type: { name: 'String' } }, target: { client_side_validation: true, required: false, serialized_name: 'target', type: { name: 'String' } }, details: { client_side_validation: true, required: false, serialized_name: 'details', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'ErrorDetailsElementType', type: { name: 'Composite', class_name: 'ErrorDetails' } } } }, inner_error: { client_side_validation: true, required: false, serialized_name: 'innerError', type: { name: 'String' } } } } } end end end end
{ "content_hash": "f3e357d260e5ea7f52a03a47396b407b", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 65, "avg_line_length": 25.473684210526315, "alnum_prop": 0.3975206611570248, "repo_name": "Azure/azure-sdk-for-ruby", "id": "b91154ebeb2e7c02ded527fecf00f42d257f1dc3", "size": "2584", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "management/azure_mgmt_network/lib/2017-10-01/generated/azure_mgmt_network/models/error.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Ruby", "bytes": "345216400" }, { "name": "Shell", "bytes": "305" } ], "symlink_target": "" }
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.Linq; using System.Reflection; namespace JavaJanitor.Areas.HelpPage { /// <summary> /// This class will create an object of a given type and populate it with sample data. /// </summary> public class ObjectGenerator { internal const int DefaultCollectionSize = 2; private readonly SimpleTypeObjectGenerator SimpleObjectGenerator = new SimpleTypeObjectGenerator(); /// <summary> /// Generates an object for a given type. The type needs to be public, have a public default constructor and settable public properties/fields. Currently it supports the following types: /// Simple types: <see cref="int"/>, <see cref="string"/>, <see cref="Enum"/>, <see cref="DateTime"/>, <see cref="Uri"/>, etc. /// Complex types: POCO types. /// Nullables: <see cref="Nullable{T}"/>. /// Arrays: arrays of simple types or complex types. /// Key value pairs: <see cref="KeyValuePair{TKey,TValue}"/> /// Tuples: <see cref="Tuple{T1}"/>, <see cref="Tuple{T1,T2}"/>, etc /// Dictionaries: <see cref="IDictionary{TKey,TValue}"/> or anything deriving from <see cref="IDictionary{TKey,TValue}"/>. /// Collections: <see cref="IList{T}"/>, <see cref="IEnumerable{T}"/>, <see cref="ICollection{T}"/>, <see cref="IList"/>, <see cref="IEnumerable"/>, <see cref="ICollection"/> or anything deriving from <see cref="ICollection{T}"/> or <see cref="IList"/>. /// Queryables: <see cref="IQueryable"/>, <see cref="IQueryable{T}"/>. /// </summary> /// <param name="type">The type.</param> /// <returns>An object of the given type.</returns> public object GenerateObject(Type type) { return GenerateObject(type, new Dictionary<Type, object>()); } [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Here we just want to return null if anything goes wrong.")] private object GenerateObject(Type type, Dictionary<Type, object> createdObjectReferences) { try { if (SimpleTypeObjectGenerator.CanGenerateObject(type)) { return SimpleObjectGenerator.GenerateObject(type); } if (type.IsArray) { return GenerateArray(type, DefaultCollectionSize, createdObjectReferences); } if (type.IsGenericType) { return GenerateGenericType(type, DefaultCollectionSize, createdObjectReferences); } if (type == typeof(IDictionary)) { return GenerateDictionary(typeof(Hashtable), DefaultCollectionSize, createdObjectReferences); } if (typeof(IDictionary).IsAssignableFrom(type)) { return GenerateDictionary(type, DefaultCollectionSize, createdObjectReferences); } if (type == typeof(IList) || type == typeof(IEnumerable) || type == typeof(ICollection)) { return GenerateCollection(typeof(ArrayList), DefaultCollectionSize, createdObjectReferences); } if (typeof(IList).IsAssignableFrom(type)) { return GenerateCollection(type, DefaultCollectionSize, createdObjectReferences); } if (type == typeof(IQueryable)) { return GenerateQueryable(type, DefaultCollectionSize, createdObjectReferences); } if (type.IsEnum) { return GenerateEnum(type); } if (type.IsPublic || type.IsNestedPublic) { return GenerateComplexObject(type, createdObjectReferences); } } catch { // Returns null if anything fails return null; } return null; } private static object GenerateGenericType(Type type, int collectionSize, Dictionary<Type, object> createdObjectReferences) { Type genericTypeDefinition = type.GetGenericTypeDefinition(); if (genericTypeDefinition == typeof(Nullable<>)) { return GenerateNullable(type, createdObjectReferences); } if (genericTypeDefinition == typeof(KeyValuePair<,>)) { return GenerateKeyValuePair(type, createdObjectReferences); } if (IsTuple(genericTypeDefinition)) { return GenerateTuple(type, createdObjectReferences); } Type[] genericArguments = type.GetGenericArguments(); if (genericArguments.Length == 1) { if (genericTypeDefinition == typeof(IList<>) || genericTypeDefinition == typeof(IEnumerable<>) || genericTypeDefinition == typeof(ICollection<>)) { Type collectionType = typeof(List<>).MakeGenericType(genericArguments); return GenerateCollection(collectionType, collectionSize, createdObjectReferences); } if (genericTypeDefinition == typeof(IQueryable<>)) { return GenerateQueryable(type, collectionSize, createdObjectReferences); } Type closedCollectionType = typeof(ICollection<>).MakeGenericType(genericArguments[0]); if (closedCollectionType.IsAssignableFrom(type)) { return GenerateCollection(type, collectionSize, createdObjectReferences); } } if (genericArguments.Length == 2) { if (genericTypeDefinition == typeof(IDictionary<,>)) { Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(genericArguments); return GenerateDictionary(dictionaryType, collectionSize, createdObjectReferences); } Type closedDictionaryType = typeof(IDictionary<,>).MakeGenericType(genericArguments[0], genericArguments[1]); if (closedDictionaryType.IsAssignableFrom(type)) { return GenerateDictionary(type, collectionSize, createdObjectReferences); } } if (type.IsPublic || type.IsNestedPublic) { return GenerateComplexObject(type, createdObjectReferences); } return null; } private static object GenerateTuple(Type type, Dictionary<Type, object> createdObjectReferences) { Type[] genericArgs = type.GetGenericArguments(); object[] parameterValues = new object[genericArgs.Length]; bool failedToCreateTuple = true; ObjectGenerator objectGenerator = new ObjectGenerator(); for (int i = 0; i < genericArgs.Length; i++) { parameterValues[i] = objectGenerator.GenerateObject(genericArgs[i], createdObjectReferences); failedToCreateTuple &= parameterValues[i] == null; } if (failedToCreateTuple) { return null; } object result = Activator.CreateInstance(type, parameterValues); return result; } private static bool IsTuple(Type genericTypeDefinition) { return genericTypeDefinition == typeof(Tuple<>) || genericTypeDefinition == typeof(Tuple<,>) || genericTypeDefinition == typeof(Tuple<,,>) || genericTypeDefinition == typeof(Tuple<,,,>) || genericTypeDefinition == typeof(Tuple<,,,,>) || genericTypeDefinition == typeof(Tuple<,,,,,>) || genericTypeDefinition == typeof(Tuple<,,,,,,>) || genericTypeDefinition == typeof(Tuple<,,,,,,,>); } private static object GenerateKeyValuePair(Type keyValuePairType, Dictionary<Type, object> createdObjectReferences) { Type[] genericArgs = keyValuePairType.GetGenericArguments(); Type typeK = genericArgs[0]; Type typeV = genericArgs[1]; ObjectGenerator objectGenerator = new ObjectGenerator(); object keyObject = objectGenerator.GenerateObject(typeK, createdObjectReferences); object valueObject = objectGenerator.GenerateObject(typeV, createdObjectReferences); if (keyObject == null && valueObject == null) { // Failed to create key and values return null; } object result = Activator.CreateInstance(keyValuePairType, keyObject, valueObject); return result; } private static object GenerateArray(Type arrayType, int size, Dictionary<Type, object> createdObjectReferences) { Type type = arrayType.GetElementType(); Array result = Array.CreateInstance(type, size); bool areAllElementsNull = true; ObjectGenerator objectGenerator = new ObjectGenerator(); for (int i = 0; i < size; i++) { object element = objectGenerator.GenerateObject(type, createdObjectReferences); result.SetValue(element, i); areAllElementsNull &= element == null; } if (areAllElementsNull) { return null; } return result; } private static object GenerateDictionary(Type dictionaryType, int size, Dictionary<Type, object> createdObjectReferences) { Type typeK = typeof(object); Type typeV = typeof(object); if (dictionaryType.IsGenericType) { Type[] genericArgs = dictionaryType.GetGenericArguments(); typeK = genericArgs[0]; typeV = genericArgs[1]; } object result = Activator.CreateInstance(dictionaryType); MethodInfo addMethod = dictionaryType.GetMethod("Add") ?? dictionaryType.GetMethod("TryAdd"); MethodInfo containsMethod = dictionaryType.GetMethod("Contains") ?? dictionaryType.GetMethod("ContainsKey"); ObjectGenerator objectGenerator = new ObjectGenerator(); for (int i = 0; i < size; i++) { object newKey = objectGenerator.GenerateObject(typeK, createdObjectReferences); if (newKey == null) { // Cannot generate a valid key return null; } bool containsKey = (bool)containsMethod.Invoke(result, new object[] { newKey }); if (!containsKey) { object newValue = objectGenerator.GenerateObject(typeV, createdObjectReferences); addMethod.Invoke(result, new object[] { newKey, newValue }); } } return result; } private static object GenerateEnum(Type enumType) { Array possibleValues = Enum.GetValues(enumType); if (possibleValues.Length > 0) { return possibleValues.GetValue(0); } return null; } private static object GenerateQueryable(Type queryableType, int size, Dictionary<Type, object> createdObjectReferences) { bool isGeneric = queryableType.IsGenericType; object list; if (isGeneric) { Type listType = typeof(List<>).MakeGenericType(queryableType.GetGenericArguments()); list = GenerateCollection(listType, size, createdObjectReferences); } else { list = GenerateArray(typeof(object[]), size, createdObjectReferences); } if (list == null) { return null; } if (isGeneric) { Type argumentType = typeof(IEnumerable<>).MakeGenericType(queryableType.GetGenericArguments()); MethodInfo asQueryableMethod = typeof(Queryable).GetMethod("AsQueryable", new[] { argumentType }); return asQueryableMethod.Invoke(null, new[] { list }); } return Queryable.AsQueryable((IEnumerable)list); } private static object GenerateCollection(Type collectionType, int size, Dictionary<Type, object> createdObjectReferences) { Type type = collectionType.IsGenericType ? collectionType.GetGenericArguments()[0] : typeof(object); object result = Activator.CreateInstance(collectionType); MethodInfo addMethod = collectionType.GetMethod("Add"); bool areAllElementsNull = true; ObjectGenerator objectGenerator = new ObjectGenerator(); for (int i = 0; i < size; i++) { object element = objectGenerator.GenerateObject(type, createdObjectReferences); addMethod.Invoke(result, new object[] { element }); areAllElementsNull &= element == null; } if (areAllElementsNull) { return null; } return result; } private static object GenerateNullable(Type nullableType, Dictionary<Type, object> createdObjectReferences) { Type type = nullableType.GetGenericArguments()[0]; ObjectGenerator objectGenerator = new ObjectGenerator(); return objectGenerator.GenerateObject(type, createdObjectReferences); } private static object GenerateComplexObject(Type type, Dictionary<Type, object> createdObjectReferences) { object result = null; if (createdObjectReferences.TryGetValue(type, out result)) { // The object has been created already, just return it. This will handle the circular reference case. return result; } if (type.IsValueType) { result = Activator.CreateInstance(type); } else { ConstructorInfo defaultCtor = type.GetConstructor(Type.EmptyTypes); if (defaultCtor == null) { // Cannot instantiate the type because it doesn't have a default constructor return null; } result = defaultCtor.Invoke(new object[0]); } createdObjectReferences.Add(type, result); SetPublicProperties(type, result, createdObjectReferences); SetPublicFields(type, result, createdObjectReferences); return result; } private static void SetPublicProperties(Type type, object obj, Dictionary<Type, object> createdObjectReferences) { PropertyInfo[] properties = type.GetProperties(BindingFlags.Public | BindingFlags.Instance); ObjectGenerator objectGenerator = new ObjectGenerator(); foreach (PropertyInfo property in properties) { if (property.CanWrite) { object propertyValue = objectGenerator.GenerateObject(property.PropertyType, createdObjectReferences); property.SetValue(obj, propertyValue, null); } } } private static void SetPublicFields(Type type, object obj, Dictionary<Type, object> createdObjectReferences) { FieldInfo[] fields = type.GetFields(BindingFlags.Public | BindingFlags.Instance); ObjectGenerator objectGenerator = new ObjectGenerator(); foreach (FieldInfo field in fields) { object fieldValue = objectGenerator.GenerateObject(field.FieldType, createdObjectReferences); field.SetValue(obj, fieldValue); } } private class SimpleTypeObjectGenerator { private long _index = 0; private static readonly Dictionary<Type, Func<long, object>> DefaultGenerators = InitializeGenerators(); [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "These are simple type factories and cannot be split up.")] private static Dictionary<Type, Func<long, object>> InitializeGenerators() { return new Dictionary<Type, Func<long, object>> { { typeof(Boolean), index => true }, { typeof(Byte), index => (Byte)64 }, { typeof(Char), index => (Char)65 }, { typeof(DateTime), index => DateTime.Now }, { typeof(DateTimeOffset), index => new DateTimeOffset(DateTime.Now) }, { typeof(DBNull), index => DBNull.Value }, { typeof(Decimal), index => (Decimal)index }, { typeof(Double), index => (Double)(index + 0.1) }, { typeof(Guid), index => Guid.NewGuid() }, { typeof(Int16), index => (Int16)(index % Int16.MaxValue) }, { typeof(Int32), index => (Int32)(index % Int32.MaxValue) }, { typeof(Int64), index => (Int64)index }, { typeof(Object), index => new object() }, { typeof(SByte), index => (SByte)64 }, { typeof(Single), index => (Single)(index + 0.1) }, { typeof(String), index => { return String.Format(CultureInfo.CurrentCulture, "sample string {0}", index); } }, { typeof(TimeSpan), index => { return TimeSpan.FromTicks(1234567); } }, { typeof(UInt16), index => (UInt16)(index % UInt16.MaxValue) }, { typeof(UInt32), index => (UInt32)(index % UInt32.MaxValue) }, { typeof(UInt64), index => (UInt64)index }, { typeof(Uri), index => { return new Uri(String.Format(CultureInfo.CurrentCulture, "http://webapihelppage{0}.com", index)); } }, }; } public static bool CanGenerateObject(Type type) { return DefaultGenerators.ContainsKey(type); } public object GenerateObject(Type type) { return DefaultGenerators[type](++_index); } } } }
{ "content_hash": "187c5ba9fbc54715b2053fb27dcaafee", "timestamp": "", "source": "github", "line_count": 456, "max_line_length": 261, "avg_line_length": 43.74561403508772, "alnum_prop": 0.5404551834770404, "repo_name": "wimplash/GenscapeHackathon-2015", "id": "a7aa532fbd079ba37765d14e0c1988d6a9141b13", "size": "19948", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "java-janitor/JavaJanitor/Areas/HelpPage/SampleGeneration/ObjectGenerator.cs", "mode": "33261", "license": "mit", "language": [ { "name": "ASP", "bytes": "106" }, { "name": "C#", "bytes": "167855" }, { "name": "CSS", "bytes": "100382" }, { "name": "JavaScript", "bytes": "1589510" }, { "name": "PHP", "bytes": "36056" }, { "name": "Perl", "bytes": "1828" }, { "name": "Perl6", "bytes": "1646" } ], "symlink_target": "" }
"""DNS Messages""" import cStringIO import random import struct import sys import time import dns.edns import dns.exception import dns.flags import dns.name import dns.opcode import dns.entropy import dns.rcode import dns.rdata import dns.rdataclass import dns.rdatatype import dns.rrset import dns.renderer import dns.tsig import dns.wiredata class ShortHeader(dns.exception.FormError): """Raised if the DNS packet passed to from_wire() is too short.""" pass class TrailingJunk(dns.exception.FormError): """Raised if the DNS packet passed to from_wire() has extra junk at the end of it.""" pass class UnknownHeaderField(dns.exception.DNSException): """Raised if a header field name is not recognized when converting from text into a message.""" pass class BadEDNS(dns.exception.FormError): """Raised if an OPT record occurs somewhere other than the start of the additional data section.""" pass class BadTSIG(dns.exception.FormError): """Raised if a TSIG record occurs somewhere other than the end of the additional data section.""" pass class UnknownTSIGKey(dns.exception.DNSException): """Raised if we got a TSIG but don't know the key.""" pass class Message(object): """A DNS message. @ivar id: The query id; the default is a randomly chosen id. @type id: int @ivar flags: The DNS flags of the message. @see: RFC 1035 for an explanation of these flags. @type flags: int @ivar question: The question section. @type question: list of dns.rrset.RRset objects @ivar answer: The answer section. @type answer: list of dns.rrset.RRset objects @ivar authority: The authority section. @type authority: list of dns.rrset.RRset objects @ivar additional: The additional data section. @type additional: list of dns.rrset.RRset objects @ivar edns: The EDNS level to use. The default is -1, no Edns. @type edns: int @ivar ednsflags: The EDNS flags @type ednsflags: long @ivar payload: The EDNS payload size. The default is 0. @type payload: int @ivar options: The EDNS options @type options: list of dns.edns.Option objects @ivar request_payload: The associated request's EDNS payload size. @type request_payload: int @ivar keyring: The TSIG keyring to use. The default is None. @type keyring: dict @ivar keyname: The TSIG keyname to use. The default is None. @type keyname: dns.name.Name object @ivar keyalgorithm: The TSIG algorithm to use; defaults to dns.tsig.default_algorithm. Constants for TSIG algorithms are defined in dns.tsig, and the currently implemented algorithms are HMAC_MD5, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, and HMAC_SHA512. @type keyalgorithm: string @ivar request_mac: The TSIG MAC of the request message associated with this message; used when validating TSIG signatures. @see: RFC 2845 for more information on TSIG fields. @type request_mac: string @ivar fudge: TSIG time fudge; default is 300 seconds. @type fudge: int @ivar original_id: TSIG original id; defaults to the message's id @type original_id: int @ivar tsig_error: TSIG error code; default is 0. @type tsig_error: int @ivar other_data: TSIG other data. @type other_data: string @ivar mac: The TSIG MAC for this message. @type mac: string @ivar xfr: Is the message being used to contain the results of a DNS zone transfer? The default is False. @type xfr: bool @ivar origin: The origin of the zone in messages which are used for zone transfers or for DNS dynamic updates. The default is None. @type origin: dns.name.Name object @ivar tsig_ctx: The TSIG signature context associated with this message. The default is None. @type tsig_ctx: hmac.HMAC object @ivar had_tsig: Did the message decoded from wire format have a TSIG signature? @type had_tsig: bool @ivar multi: Is this message part of a multi-message sequence? The default is false. This variable is used when validating TSIG signatures on messages which are part of a zone transfer. @type multi: bool @ivar first: Is this message standalone, or the first of a multi message sequence? This variable is used when validating TSIG signatures on messages which are part of a zone transfer. @type first: bool @ivar index: An index of rrsets in the message. The index key is (section, name, rdclass, rdtype, covers, deleting). Indexing can be disabled by setting the index to None. @type index: dict """ def __init__(self, id=None): if id is None: self.id = dns.entropy.random_16() else: self.id = id self.flags = 0 self.question = [] self.answer = [] self.authority = [] self.additional = [] self.edns = -1 self.ednsflags = 0 self.payload = 0 self.options = [] self.request_payload = 0 self.keyring = None self.keyname = None self.keyalgorithm = dns.tsig.default_algorithm self.request_mac = '' self.other_data = '' self.tsig_error = 0 self.fudge = 300 self.original_id = self.id self.mac = '' self.xfr = False self.origin = None self.tsig_ctx = None self.had_tsig = False self.multi = False self.first = True self.index = {} def __repr__(self): return '<DNS message, ID ' + `self.id` + '>' def __str__(self): return self.to_text() def to_text(self, origin=None, relativize=True, **kw): """Convert the message to text. The I{origin}, I{relativize}, and any other keyword arguments are passed to the rrset to_wire() method. @rtype: string """ s = cStringIO.StringIO() print >> s, 'id %d' % self.id print >> s, 'opcode %s' % \ dns.opcode.to_text(dns.opcode.from_flags(self.flags)) rc = dns.rcode.from_flags(self.flags, self.ednsflags) print >> s, 'rcode %s' % dns.rcode.to_text(rc) print >> s, 'flags %s' % dns.flags.to_text(self.flags) if self.edns >= 0: print >> s, 'edns %s' % self.edns if self.ednsflags != 0: print >> s, 'eflags %s' % \ dns.flags.edns_to_text(self.ednsflags) print >> s, 'payload', self.payload is_update = dns.opcode.is_update(self.flags) if is_update: print >> s, ';ZONE' else: print >> s, ';QUESTION' for rrset in self.question: print >> s, rrset.to_text(origin, relativize, **kw) if is_update: print >> s, ';PREREQ' else: print >> s, ';ANSWER' for rrset in self.answer: print >> s, rrset.to_text(origin, relativize, **kw) if is_update: print >> s, ';UPDATE' else: print >> s, ';AUTHORITY' for rrset in self.authority: print >> s, rrset.to_text(origin, relativize, **kw) print >> s, ';ADDITIONAL' for rrset in self.additional: print >> s, rrset.to_text(origin, relativize, **kw) # # We strip off the final \n so the caller can print the result without # doing weird things to get around eccentricities in Python print # formatting # return s.getvalue()[:-1] def __eq__(self, other): """Two messages are equal if they have the same content in the header, question, answer, and authority sections. @rtype: bool""" if not isinstance(other, Message): return False if self.id != other.id: return False if self.flags != other.flags: return False for n in self.question: if n not in other.question: return False for n in other.question: if n not in self.question: return False for n in self.answer: if n not in other.answer: return False for n in other.answer: if n not in self.answer: return False for n in self.authority: if n not in other.authority: return False for n in other.authority: if n not in self.authority: return False return True def __ne__(self, other): """Are two messages not equal? @rtype: bool""" return not self.__eq__(other) def is_response(self, other): """Is other a response to self? @rtype: bool""" if other.flags & dns.flags.QR == 0 or \ self.id != other.id or \ dns.opcode.from_flags(self.flags) != \ dns.opcode.from_flags(other.flags): return False if dns.rcode.from_flags(other.flags, other.ednsflags) != \ dns.rcode.NOERROR: return True if dns.opcode.is_update(self.flags): return True for n in self.question: if n not in other.question: return False for n in other.question: if n not in self.question: return False return True def section_number(self, section): if section is self.question: return 0 elif section is self.answer: return 1 elif section is self.authority: return 2 elif section is self.additional: return 3 else: raise ValueError('unknown section') def find_rrset(self, section, name, rdclass, rdtype, covers=dns.rdatatype.NONE, deleting=None, create=False, force_unique=False): """Find the RRset with the given attributes in the specified section. @param section: the section of the message to look in, e.g. self.answer. @type section: list of dns.rrset.RRset objects @param name: the name of the RRset @type name: dns.name.Name object @param rdclass: the class of the RRset @type rdclass: int @param rdtype: the type of the RRset @type rdtype: int @param covers: the covers value of the RRset @type covers: int @param deleting: the deleting value of the RRset @type deleting: int @param create: If True, create the RRset if it is not found. The created RRset is appended to I{section}. @type create: bool @param force_unique: If True and create is also True, create a new RRset regardless of whether a matching RRset exists already. @type force_unique: bool @raises KeyError: the RRset was not found and create was False @rtype: dns.rrset.RRset object""" key = (self.section_number(section), name, rdclass, rdtype, covers, deleting) if not force_unique: if not self.index is None: rrset = self.index.get(key) if not rrset is None: return rrset else: for rrset in section: if rrset.match(name, rdclass, rdtype, covers, deleting): return rrset if not create: raise KeyError rrset = dns.rrset.RRset(name, rdclass, rdtype, covers, deleting) section.append(rrset) if not self.index is None: self.index[key] = rrset return rrset def get_rrset(self, section, name, rdclass, rdtype, covers=dns.rdatatype.NONE, deleting=None, create=False, force_unique=False): """Get the RRset with the given attributes in the specified section. If the RRset is not found, None is returned. @param section: the section of the message to look in, e.g. self.answer. @type section: list of dns.rrset.RRset objects @param name: the name of the RRset @type name: dns.name.Name object @param rdclass: the class of the RRset @type rdclass: int @param rdtype: the type of the RRset @type rdtype: int @param covers: the covers value of the RRset @type covers: int @param deleting: the deleting value of the RRset @type deleting: int @param create: If True, create the RRset if it is not found. The created RRset is appended to I{section}. @type create: bool @param force_unique: If True and create is also True, create a new RRset regardless of whether a matching RRset exists already. @type force_unique: bool @rtype: dns.rrset.RRset object or None""" try: rrset = self.find_rrset(section, name, rdclass, rdtype, covers, deleting, create, force_unique) except KeyError: rrset = None return rrset def to_wire(self, origin=None, max_size=0, **kw): """Return a string containing the message in DNS compressed wire format. Additional keyword arguments are passed to the rrset to_wire() method. @param origin: The origin to be appended to any relative names. @type origin: dns.name.Name object @param max_size: The maximum size of the wire format output; default is 0, which means 'the message's request payload, if nonzero, or 65536'. @type max_size: int @raises dns.exception.TooBig: max_size was exceeded @rtype: string """ if max_size == 0: if self.request_payload != 0: max_size = self.request_payload else: max_size = 65535 if max_size < 512: max_size = 512 elif max_size > 65535: max_size = 65535 r = dns.renderer.Renderer(self.id, self.flags, max_size, origin) for rrset in self.question: r.add_question(rrset.name, rrset.rdtype, rrset.rdclass) for rrset in self.answer: r.add_rrset(dns.renderer.ANSWER, rrset, **kw) for rrset in self.authority: r.add_rrset(dns.renderer.AUTHORITY, rrset, **kw) if self.edns >= 0: r.add_edns(self.edns, self.ednsflags, self.payload, self.options) for rrset in self.additional: r.add_rrset(dns.renderer.ADDITIONAL, rrset, **kw) r.write_header() if not self.keyname is None: r.add_tsig(self.keyname, self.keyring[self.keyname], self.fudge, self.original_id, self.tsig_error, self.other_data, self.request_mac, self.keyalgorithm) self.mac = r.mac return r.get_wire() def use_tsig(self, keyring, keyname=None, fudge=300, original_id=None, tsig_error=0, other_data='', algorithm=dns.tsig.default_algorithm): """When sending, a TSIG signature using the specified keyring and keyname should be added. @param keyring: The TSIG keyring to use; defaults to None. @type keyring: dict @param keyname: The name of the TSIG key to use; defaults to None. The key must be defined in the keyring. If a keyring is specified but a keyname is not, then the key used will be the first key in the keyring. Note that the order of keys in a dictionary is not defined, so applications should supply a keyname when a keyring is used, unless they know the keyring contains only one key. @type keyname: dns.name.Name or string @param fudge: TSIG time fudge; default is 300 seconds. @type fudge: int @param original_id: TSIG original id; defaults to the message's id @type original_id: int @param tsig_error: TSIG error code; default is 0. @type tsig_error: int @param other_data: TSIG other data. @type other_data: string @param algorithm: The TSIG algorithm to use; defaults to dns.tsig.default_algorithm """ self.keyring = keyring if keyname is None: self.keyname = self.keyring.keys()[0] else: if isinstance(keyname, (str, unicode)): keyname = dns.name.from_text(keyname) self.keyname = keyname self.keyalgorithm = algorithm self.fudge = fudge if original_id is None: self.original_id = self.id else: self.original_id = original_id self.tsig_error = tsig_error self.other_data = other_data def use_edns(self, edns=0, ednsflags=0, payload=1280, request_payload=None, options=None): """Configure EDNS behavior. @param edns: The EDNS level to use. Specifying None, False, or -1 means 'do not use EDNS', and in this case the other parameters are ignored. Specifying True is equivalent to specifying 0, i.e. 'use EDNS0'. @type edns: int or bool or None @param ednsflags: EDNS flag values. @type ednsflags: int @param payload: The EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. @type payload: int @param request_payload: The EDNS payload size to use when sending this message. If not specified, defaults to the value of payload. @type request_payload: int or None @param options: The EDNS options @type options: None or list of dns.edns.Option objects @see: RFC 2671 """ if edns is None or edns is False: edns = -1 if edns is True: edns = 0 if request_payload is None: request_payload = payload if edns < 0: ednsflags = 0 payload = 0 request_payload = 0 options = [] else: # make sure the EDNS version in ednsflags agrees with edns ednsflags &= 0xFF00FFFFL ednsflags |= (edns << 16) if options is None: options = [] self.edns = edns self.ednsflags = ednsflags self.payload = payload self.options = options self.request_payload = request_payload def want_dnssec(self, wanted=True): """Enable or disable 'DNSSEC desired' flag in requests. @param wanted: Is DNSSEC desired? If True, EDNS is enabled if required, and then the DO bit is set. If False, the DO bit is cleared if EDNS is enabled. @type wanted: bool """ if wanted: if self.edns < 0: self.use_edns() self.ednsflags |= dns.flags.DO elif self.edns >= 0: self.ednsflags &= ~dns.flags.DO def rcode(self): """Return the rcode. @rtype: int """ return dns.rcode.from_flags(self.flags, self.ednsflags) def set_rcode(self, rcode): """Set the rcode. @param rcode: the rcode @type rcode: int """ (value, evalue) = dns.rcode.to_flags(rcode) self.flags &= 0xFFF0 self.flags |= value self.ednsflags &= 0x00FFFFFFL self.ednsflags |= evalue if self.ednsflags != 0 and self.edns < 0: self.edns = 0 def opcode(self): """Return the opcode. @rtype: int """ return dns.opcode.from_flags(self.flags) def set_opcode(self, opcode): """Set the opcode. @param opcode: the opcode @type opcode: int """ self.flags &= 0x87FF self.flags |= dns.opcode.to_flags(opcode) class _WireReader(object): """Wire format reader. @ivar wire: the wire-format message. @type wire: string @ivar message: The message object being built @type message: dns.message.Message object @ivar current: When building a message object from wire format, this variable contains the offset from the beginning of wire of the next octet to be read. @type current: int @ivar updating: Is the message a dynamic update? @type updating: bool @ivar one_rr_per_rrset: Put each RR into its own RRset? @type one_rr_per_rrset: bool @ivar ignore_trailing: Ignore trailing junk at end of request? @type ignore_trailing: bool @ivar zone_rdclass: The class of the zone in messages which are DNS dynamic updates. @type zone_rdclass: int """ def __init__(self, wire, message, question_only=False, one_rr_per_rrset=False, ignore_trailing=False): self.wire = dns.wiredata.maybe_wrap(wire) self.message = message self.current = 0 self.updating = False self.zone_rdclass = dns.rdataclass.IN self.question_only = question_only self.one_rr_per_rrset = one_rr_per_rrset self.ignore_trailing = ignore_trailing def _get_question(self, qcount): """Read the next I{qcount} records from the wire data and add them to the question section. @param qcount: the number of questions in the message @type qcount: int""" if self.updating and qcount > 1: raise dns.exception.FormError for i in xrange(0, qcount): (qname, used) = dns.name.from_wire(self.wire, self.current) if not self.message.origin is None: qname = qname.relativize(self.message.origin) self.current = self.current + used (rdtype, rdclass) = \ struct.unpack('!HH', self.wire[self.current:self.current + 4]) self.current = self.current + 4 self.message.find_rrset(self.message.question, qname, rdclass, rdtype, create=True, force_unique=True) if self.updating: self.zone_rdclass = rdclass def _get_section(self, section, count): """Read the next I{count} records from the wire data and add them to the specified section. @param section: the section of the message to which to add records @type section: list of dns.rrset.RRset objects @param count: the number of records to read @type count: int""" if self.updating or self.one_rr_per_rrset: force_unique = True else: force_unique = False seen_opt = False for i in xrange(0, count): rr_start = self.current (name, used) = dns.name.from_wire(self.wire, self.current) absolute_name = name if not self.message.origin is None: name = name.relativize(self.message.origin) self.current = self.current + used (rdtype, rdclass, ttl, rdlen) = \ struct.unpack('!HHIH', self.wire[self.current:self.current + 10]) self.current = self.current + 10 if rdtype == dns.rdatatype.OPT: if not section is self.message.additional or seen_opt: raise BadEDNS self.message.payload = rdclass self.message.ednsflags = ttl self.message.edns = (ttl & 0xff0000) >> 16 self.message.options = [] current = self.current optslen = rdlen while optslen > 0: (otype, olen) = \ struct.unpack('!HH', self.wire[current:current + 4]) current = current + 4 opt = dns.edns.option_from_wire(otype, self.wire, current, olen) self.message.options.append(opt) current = current + olen optslen = optslen - 4 - olen seen_opt = True elif rdtype == dns.rdatatype.TSIG: if not (section is self.message.additional and i == (count - 1)): raise BadTSIG if self.message.keyring is None: raise UnknownTSIGKey('got signed message without keyring') secret = self.message.keyring.get(absolute_name) if secret is None: raise UnknownTSIGKey("key '%s' unknown" % name) self.message.keyname = absolute_name (self.message.keyalgorithm, self.message.mac) = \ dns.tsig.get_algorithm_and_mac(self.wire, self.current, rdlen) self.message.tsig_ctx = \ dns.tsig.validate(self.wire, absolute_name, secret, int(time.time()), self.message.request_mac, rr_start, self.current, rdlen, self.message.tsig_ctx, self.message.multi, self.message.first) self.message.had_tsig = True else: if ttl < 0: ttl = 0 if self.updating and \ (rdclass == dns.rdataclass.ANY or rdclass == dns.rdataclass.NONE): deleting = rdclass rdclass = self.zone_rdclass else: deleting = None if deleting == dns.rdataclass.ANY or \ (deleting == dns.rdataclass.NONE and \ section is self.message.answer): covers = dns.rdatatype.NONE rd = None else: rd = dns.rdata.from_wire(rdclass, rdtype, self.wire, self.current, rdlen, self.message.origin) covers = rd.covers() if self.message.xfr and rdtype == dns.rdatatype.SOA: force_unique = True rrset = self.message.find_rrset(section, name, rdclass, rdtype, covers, deleting, True, force_unique) if not rd is None: rrset.add(rd, ttl) self.current = self.current + rdlen def read(self): """Read a wire format DNS message and build a dns.message.Message object.""" l = len(self.wire) if l < 12: raise ShortHeader (self.message.id, self.message.flags, qcount, ancount, aucount, adcount) = struct.unpack('!HHHHHH', self.wire[:12]) self.current = 12 if dns.opcode.is_update(self.message.flags): self.updating = True self._get_question(qcount) if self.question_only: return self._get_section(self.message.answer, ancount) self._get_section(self.message.authority, aucount) self._get_section(self.message.additional, adcount) if not self.ignore_trailing and self.current != l: raise TrailingJunk if self.message.multi and self.message.tsig_ctx and \ not self.message.had_tsig: self.message.tsig_ctx.update(self.wire) def from_wire(wire, keyring=None, request_mac='', xfr=False, origin=None, tsig_ctx = None, multi = False, first = True, question_only = False, one_rr_per_rrset = False, ignore_trailing = False): """Convert a DNS wire format message into a message object. @param keyring: The keyring to use if the message is signed. @type keyring: dict @param request_mac: If the message is a response to a TSIG-signed request, I{request_mac} should be set to the MAC of that request. @type request_mac: string @param xfr: Is this message part of a zone transfer? @type xfr: bool @param origin: If the message is part of a zone transfer, I{origin} should be the origin name of the zone. @type origin: dns.name.Name object @param tsig_ctx: The ongoing TSIG context, used when validating zone transfers. @type tsig_ctx: hmac.HMAC object @param multi: Is this message part of a multiple message sequence? @type multi: bool @param first: Is this message standalone, or the first of a multi message sequence? @type first: bool @param question_only: Read only up to the end of the question section? @type question_only: bool @param one_rr_per_rrset: Put each RR into its own RRset @type one_rr_per_rrset: bool @param ignore_trailing: Ignore trailing junk at end of request? @type ignore_trailing: bool @raises ShortHeader: The message is less than 12 octets long. @raises TrailingJunk: There were octets in the message past the end of the proper DNS message. @raises BadEDNS: An OPT record was in the wrong section, or occurred more than once. @raises BadTSIG: A TSIG record was not the last record of the additional data section. @rtype: dns.message.Message object""" m = Message(id=0) m.keyring = keyring m.request_mac = request_mac m.xfr = xfr m.origin = origin m.tsig_ctx = tsig_ctx m.multi = multi m.first = first reader = _WireReader(wire, m, question_only, one_rr_per_rrset, ignore_trailing) reader.read() return m class _TextReader(object): """Text format reader. @ivar tok: the tokenizer @type tok: dns.tokenizer.Tokenizer object @ivar message: The message object being built @type message: dns.message.Message object @ivar updating: Is the message a dynamic update? @type updating: bool @ivar zone_rdclass: The class of the zone in messages which are DNS dynamic updates. @type zone_rdclass: int @ivar last_name: The most recently read name when building a message object from text format. @type last_name: dns.name.Name object """ def __init__(self, text, message): self.message = message self.tok = dns.tokenizer.Tokenizer(text) self.last_name = None self.zone_rdclass = dns.rdataclass.IN self.updating = False def _header_line(self, section): """Process one line from the text format header section.""" token = self.tok.get() what = token.value if what == 'id': self.message.id = self.tok.get_int() elif what == 'flags': while True: token = self.tok.get() if not token.is_identifier(): self.tok.unget(token) break self.message.flags = self.message.flags | \ dns.flags.from_text(token.value) if dns.opcode.is_update(self.message.flags): self.updating = True elif what == 'edns': self.message.edns = self.tok.get_int() self.message.ednsflags = self.message.ednsflags | \ (self.message.edns << 16) elif what == 'eflags': if self.message.edns < 0: self.message.edns = 0 while True: token = self.tok.get() if not token.is_identifier(): self.tok.unget(token) break self.message.ednsflags = self.message.ednsflags | \ dns.flags.edns_from_text(token.value) elif what == 'payload': self.message.payload = self.tok.get_int() if self.message.edns < 0: self.message.edns = 0 elif what == 'opcode': text = self.tok.get_string() self.message.flags = self.message.flags | \ dns.opcode.to_flags(dns.opcode.from_text(text)) elif what == 'rcode': text = self.tok.get_string() self.message.set_rcode(dns.rcode.from_text(text)) else: raise UnknownHeaderField self.tok.get_eol() def _question_line(self, section): """Process one line from the text format question section.""" token = self.tok.get(want_leading = True) if not token.is_whitespace(): self.last_name = dns.name.from_text(token.value, None) name = self.last_name token = self.tok.get() if not token.is_identifier(): raise dns.exception.SyntaxError # Class try: rdclass = dns.rdataclass.from_text(token.value) token = self.tok.get() if not token.is_identifier(): raise dns.exception.SyntaxError except dns.exception.SyntaxError: raise dns.exception.SyntaxError except: rdclass = dns.rdataclass.IN # Type rdtype = dns.rdatatype.from_text(token.value) self.message.find_rrset(self.message.question, name, rdclass, rdtype, create=True, force_unique=True) if self.updating: self.zone_rdclass = rdclass self.tok.get_eol() def _rr_line(self, section): """Process one line from the text format answer, authority, or additional data sections. """ deleting = None # Name token = self.tok.get(want_leading = True) if not token.is_whitespace(): self.last_name = dns.name.from_text(token.value, None) name = self.last_name token = self.tok.get() if not token.is_identifier(): raise dns.exception.SyntaxError # TTL try: ttl = int(token.value, 0) token = self.tok.get() if not token.is_identifier(): raise dns.exception.SyntaxError except dns.exception.SyntaxError: raise dns.exception.SyntaxError except: ttl = 0 # Class try: rdclass = dns.rdataclass.from_text(token.value) token = self.tok.get() if not token.is_identifier(): raise dns.exception.SyntaxError if rdclass == dns.rdataclass.ANY or rdclass == dns.rdataclass.NONE: deleting = rdclass rdclass = self.zone_rdclass except dns.exception.SyntaxError: raise dns.exception.SyntaxError except: rdclass = dns.rdataclass.IN # Type rdtype = dns.rdatatype.from_text(token.value) token = self.tok.get() if not token.is_eol_or_eof(): self.tok.unget(token) rd = dns.rdata.from_text(rdclass, rdtype, self.tok, None) covers = rd.covers() else: rd = None covers = dns.rdatatype.NONE rrset = self.message.find_rrset(section, name, rdclass, rdtype, covers, deleting, True, self.updating) if not rd is None: rrset.add(rd, ttl) def read(self): """Read a text format DNS message and build a dns.message.Message object.""" line_method = self._header_line section = None while 1: token = self.tok.get(True, True) if token.is_eol_or_eof(): break if token.is_comment(): u = token.value.upper() if u == 'HEADER': line_method = self._header_line elif u == 'QUESTION' or u == 'ZONE': line_method = self._question_line section = self.message.question elif u == 'ANSWER' or u == 'PREREQ': line_method = self._rr_line section = self.message.answer elif u == 'AUTHORITY' or u == 'UPDATE': line_method = self._rr_line section = self.message.authority elif u == 'ADDITIONAL': line_method = self._rr_line section = self.message.additional self.tok.get_eol() continue self.tok.unget(token) line_method(section) def from_text(text): """Convert the text format message into a message object. @param text: The text format message. @type text: string @raises UnknownHeaderField: @raises dns.exception.SyntaxError: @rtype: dns.message.Message object""" # 'text' can also be a file, but we don't publish that fact # since it's an implementation detail. The official file # interface is from_file(). m = Message() reader = _TextReader(text, m) reader.read() return m def from_file(f): """Read the next text format message from the specified file. @param f: file or string. If I{f} is a string, it is treated as the name of a file to open. @raises UnknownHeaderField: @raises dns.exception.SyntaxError: @rtype: dns.message.Message object""" if sys.hexversion >= 0x02030000: # allow Unicode filenames; turn on universal newline support str_type = basestring opts = 'rU' else: str_type = str opts = 'r' if isinstance(f, str_type): f = file(f, opts) want_close = True else: want_close = False try: m = from_text(f) finally: if want_close: f.close() return m def make_query(qname, rdtype, rdclass = dns.rdataclass.IN, use_edns=None, want_dnssec=False, ednsflags=0, payload=1280, request_payload=None, options=None): """Make a query message. The query name, type, and class may all be specified either as objects of the appropriate type, or as strings. The query will have a randomly choosen query id, and its DNS flags will be set to dns.flags.RD. @param qname: The query name. @type qname: dns.name.Name object or string @param rdtype: The desired rdata type. @type rdtype: int @param rdclass: The desired rdata class; the default is class IN. @type rdclass: int @param use_edns: The EDNS level to use; the default is None (no EDNS). See the description of dns.message.Message.use_edns() for the possible values for use_edns and their meanings. @type use_edns: int or bool or None @param want_dnssec: Should the query indicate that DNSSEC is desired? @type want_dnssec: bool @param ednsflags: EDNS flag values. @type ednsflags: int @param payload: The EDNS sender's payload field, which is the maximum size of UDP datagram the sender can handle. @type payload: int @param request_payload: The EDNS payload size to use when sending this message. If not specified, defaults to the value of payload. @type request_payload: int or None @param options: The EDNS options @type options: None or list of dns.edns.Option objects @see: RFC 2671 @rtype: dns.message.Message object""" if isinstance(qname, (str, unicode)): qname = dns.name.from_text(qname) if isinstance(rdtype, (str, unicode)): rdtype = dns.rdatatype.from_text(rdtype) if isinstance(rdclass, (str, unicode)): rdclass = dns.rdataclass.from_text(rdclass) m = Message() m.flags |= dns.flags.RD m.find_rrset(m.question, qname, rdclass, rdtype, create=True, force_unique=True) m.use_edns(use_edns, ednsflags, payload, request_payload, options) m.want_dnssec(want_dnssec) return m def make_response(query, recursion_available=False, our_payload=8192, fudge=300): """Make a message which is a response for the specified query. The message returned is really a response skeleton; it has all of the infrastructure required of a response, but none of the content. The response's question section is a shallow copy of the query's question section, so the query's question RRsets should not be changed. @param query: the query to respond to @type query: dns.message.Message object @param recursion_available: should RA be set in the response? @type recursion_available: bool @param our_payload: payload size to advertise in EDNS responses; default is 8192. @type our_payload: int @param fudge: TSIG time fudge; default is 300 seconds. @type fudge: int @rtype: dns.message.Message object""" if query.flags & dns.flags.QR: raise dns.exception.FormError('specified query message is not a query') response = dns.message.Message(query.id) response.flags = dns.flags.QR | (query.flags & dns.flags.RD) if recursion_available: response.flags |= dns.flags.RA response.set_opcode(query.opcode()) response.question = list(query.question) if query.edns >= 0: response.use_edns(0, 0, our_payload, query.payload) if query.had_tsig: response.use_tsig(query.keyring, query.keyname, fudge, None, 0, '', query.keyalgorithm) response.request_mac = query.mac return response
{ "content_hash": "acf94ad9adb290ed55811be9ff5a031a", "timestamp": "", "source": "github", "line_count": 1099, "max_line_length": 94, "avg_line_length": 38.06915377616014, "alnum_prop": 0.5770113294134519, "repo_name": "rsreese/namebench", "id": "e523931481bc600cbceaf1df82f034565274e73a", "size": "42625", "binary": false, "copies": "16", "ref": "refs/heads/master", "path": "nb_third_party/dns/message.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3926" }, { "name": "Objective-C", "bytes": "1819" }, { "name": "Python", "bytes": "210663" } ], "symlink_target": "" }
using OfficeDevPnP.Core.Framework.Provisioning.Model; using System; using System.Collections.Generic; namespace OfficeDevPnP.Core.Framework.Provisioning.Providers.Xml.Resolvers.V201909 { internal class ClientSidePageHeaderFromModelToSchemaTypeResolver : ITypeResolver { public string Name => this.GetType().Name; public bool CustomCollectionResolver => false; public ClientSidePageHeaderFromModelToSchemaTypeResolver() { } public object Resolve(object source, Dictionary<String, IResolver> resolvers = null, Boolean recursive = false) { Object result = null; // Try with the tenant-wide AppCatalog BaseClientSidePage page; if (source is ClientSidePage) { page = source as ClientSidePage; } else { page = source as TranslatedClientSidePage; } //var page = source as Model.ClientSidePage; var header = page?.Header; if (null != header) { var headerTypeName = $"{PnPSerializationScope.Current?.BaseSchemaNamespace}.BaseClientSidePageHeader, {PnPSerializationScope.Current?.BaseSchemaAssemblyName}"; var headerType = Type.GetType(headerTypeName, true); result = Activator.CreateInstance(headerType); PnPObjectsMapper.MapProperties(header, result, resolvers, recursive); } return (result); } } }
{ "content_hash": "e5e6a194983bfa7950774f0ec3424d1b", "timestamp": "", "source": "github", "line_count": 48, "max_line_length": 175, "avg_line_length": 32.625, "alnum_prop": 0.6155810983397191, "repo_name": "OfficeDev/PnP-Sites-Core", "id": "1b4b2b17e730451be3fe5503b949b58723d1f6ff", "size": "1568", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "Core/OfficeDevPnP.Core/Framework/Provisioning/Providers/Xml/Resolvers/V201909/ClientSidePageHeaderFromModelToSchemaTypeResolver.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "16010" }, { "name": "Batchfile", "bytes": "2274" }, { "name": "C#", "bytes": "4678147" }, { "name": "CSS", "bytes": "10384" }, { "name": "HTML", "bytes": "2585433" }, { "name": "JavaScript", "bytes": "4073" }, { "name": "PowerShell", "bytes": "5745" }, { "name": "XSLT", "bytes": "16001" } ], "symlink_target": "" }
#ifndef CLandmark_H #define CLandmark_H #include <mrpt/utils/CSerializable.h> #include <mrpt/math/CMatrix.h> #include <mrpt/system/os.h> #include <mrpt/poses/CPointPDFGaussian.h> #include <mrpt/poses/CPoint3D.h> #include <mrpt/vision/CFeature.h> #include <mrpt/math/lightweight_geom_data.h> namespace mrpt { /** \ingroup mrpt_vision_grp */ namespace slam { using namespace mrpt::poses; using namespace mrpt::vision; using namespace mrpt::math; DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE( CLandmark, mrpt::utils::CSerializable, VISION_IMPEXP ) /** The class for storing "landmarks" (visual or laser-scan-extracted features,...) * * The descriptors for each kind of descriptor are stored in the vector "features", which * will typically consists of only 1 element, or 2 elements for landmarks obtained from stereo images. * * \sa CLandmarksMap * \ingroup mrpt_vision_grp */ class VISION_IMPEXP CLandmark : public mrpt::utils::CSerializable { // This must be added to any CSerializable derived class: DEFINE_SERIALIZABLE( CLandmark ) public: typedef int64_t TLandmarkID; //!< The type for the IDs of landmarks. std::vector<CFeaturePtr> features; //!< The set of features from which the landmark comes. TPoint3D pose_mean; //!< The mean of the landmark 3D position. TPoint3D normal; //!< The "normal" to the landmark, i.e. a unitary 3D vector towards the viewing direction, or a null vector if not applicable float pose_cov_11,pose_cov_22,pose_cov_33,pose_cov_12,pose_cov_13,pose_cov_23; /** An ID for the landmark (see details next...) * This ID was introduced in the version 3 of this class (21/NOV/2006), and its aim is * to provide a way for easily establishing correspondences between landmarks detected * in sequential image frames. Thus, the management of this field should be: * - In 'servers' (classes/modules/... that detect landmarks from images): A different ID must be assigned to every landmark (e.g. a sequential counter), BUT only in the case of being sure of the correspondence of one landmark with another one in the past (e.g. tracking). * - In 'clients': This field can be ignored, but if it is used, the advantage is solving the correspondence between landmarks detected in consequentive instants of time: Two landmarks with the same ID <b>correspond</b> to the same physical feature, BUT it should not be expected the inverse to be always true. * * Note that this field is never fill out automatically, it must be set by the programmer if used. */ TLandmarkID ID; mrpt::system::TTimeStamp timestampLastSeen; //!< The last time that this landmark was observed. uint32_t seenTimesCount; //!< The number of times that this landmark has been seen. /** Returns the pose as an object: */ void getPose( CPointPDFGaussian &p ) const; void getPose( CPoint3D &p, CMatrixDouble &COV ) const { CPointPDFGaussian pdf; getPose(pdf); p = pdf.mean; COV = CMatrixDouble(pdf.cov); } /** Sets the pose from an object: */ void setPose( const CPointPDFGaussian &p ); /** Gets the type of the first feature in its feature vector. The vector must not be empty. */ TFeatureType getType() const { ASSERT_( !features.empty() ); ASSERT_(features[0].present()) return features[0]->type; } /** Creates one feature in the vector "features", calling the appropriate constructor of the smart pointer, so after calling this method "features[0]" is a valid pointer to a CFeature object. */ void createOneFeature() { features.assign(1, CFeaturePtr( new CFeature() ) ); } /** Default constructor */ CLandmark(); /** Virtual destructor */ virtual ~CLandmark(); protected: /** Auxiliary variable */ static TLandmarkID m_counterIDs; }; // End of class definition } // End of namespace } // End of namespace #endif
{ "content_hash": "a8214f5845bc34b104aefbe295630177", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 315, "avg_line_length": 38.640776699029125, "alnum_prop": 0.6984924623115578, "repo_name": "samuelpfchoi/mrpt", "id": "efd9eb7382b13d268a19790b26a9965d7f3357a9", "size": "4630", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "libs/vision/include/mrpt/slam/CLandmark.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of UserBuyEvent * * @author truongld */ namespace Aevitas\LevisBundle\Event; class UserBuyEvent extends UserEvent { //override construction public function __construct(){ } public function launch(){ exit('user buy event here'); //do something here } } ?>
{ "content_hash": "8945dc009ba039f0481c9e45d778ab71", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 52, "avg_line_length": 14.483870967741936, "alnum_prop": 0.6102449888641426, "repo_name": "CaoPhiHung/CRM", "id": "92e093025bd0bc4552891c728eba85d87d1f9e5c", "size": "449", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Aevitas/LevisBundle/Event/UserBuyEvent.php", "mode": "33261", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "15982" }, { "name": "ApacheConf", "bytes": "2773" }, { "name": "CSS", "bytes": "616791" }, { "name": "HTML", "bytes": "6404402" }, { "name": "JavaScript", "bytes": "4126887" }, { "name": "Makefile", "bytes": "3152" }, { "name": "PHP", "bytes": "3718978" }, { "name": "Perl", "bytes": "14937" }, { "name": "Python", "bytes": "44785" }, { "name": "Ruby", "bytes": "861" }, { "name": "Shell", "bytes": "9232" } ], "symlink_target": "" }
Changelog ========= v1.2 ---- - Add Fail2ban : installation and configuration - Change FreeSwitch log management (standard debian directory and cron rotate) v1.1 ---- - Add variables - Change cli symlinks task to file command v1.0 ---- First release
{ "content_hash": "502fe9b382a0f1c3c36859337872ba0d", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 15.75, "alnum_prop": 0.7142857142857143, "repo_name": "davehorton/drachtio-fs-ansible", "id": "78f6b7a0350bcffd5fd7944acb8e2b6ad31a1ca8", "size": "252", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "roles/freeswitch/CHANGELOG.md", "mode": "33188", "license": "mit", "language": [ { "name": "Shell", "bytes": "10389" } ], "symlink_target": "" }
CPPUTEST_HOME = CppUTest # code directories SRC_DIR = ./src TEST_DIR = ./test # file names MAIN = $(SRC_DIR)/main MODULE = $(SRC_DIR)/module UNITTESTS = $(TEST_DIR)/ModuleTest TEST = $(TEST_DIR)/AllTests # general compiler options CFLAGS = -g CFLAGS += -Wall CFLAGS += -Wextra #CFLAGS += -std=c99 #CFLAGS += -pedantic #CFLAGS += -Werror #CFLAGS += -Wshadow #CFLAGS += -Wstrict-overflow # compiler options for CppUTest CPPFLAGS = -I$(CPPUTEST_HOME)/include # Linker options that add CppUTest libraries to the linker flags. LD_LIBRARIES = -L$(CPPUTEST_HOME)/lib LD_LIBRARIES += -lCppUTest # This flag is only needed, if you want to use extensions such as mocking. LD_LIBRARIES += -lCppUTestExt ################# # build targets # ################# # default target all : $(MAIN).out $(TEST).out # dependence on the include files $(SRC_DIR)/%.o : $(SRC_DIR)/%.c $(SRC_DIR)/*.h $(CC) -o $@ $< -c $(CFLAGS) # application $(MAIN).out : $(MAIN).o $(MODULE).o $(CC) -o $@ $^ $(CFLAGS) # unit tests $(TEST_DIR)/%.o : $(TEST_DIR)/%.cc $(MODULE).o $(CXX) -o $@ $< -c $(CPPFLAGS) $(LD_LIBRARIES) # test $(TEST).out : $(TEST).o $(MODULE).o $(UNITTESTS).o $(CXX) -o $@ $^ $(CPPFLAGS) $(LD_LIBRARIES) ############### # run targets # ############### .PHONY: main test # application main : $(MAIN).out @$^ # unit tests test : $(TEST).out @$^ -c ################ # misc targets # ################ .PHONY: clean format help # remove all files generated by make clean : rm -f $(MAIN).out $(TEST).out $(SRC_DIR)/*.o $(TEST_DIR)/*.o # ensure consistent source code formatting format : @astyle --options=.astylerc "./*.c" "./*.h" "./*.cc" # display synopsis help : @echo "make [all] compile everything, i.e application and tests" @echo "make clean remove all files generated by make" @echo "" @echo "make main compile and run application" @echo "make test compile and run tests" @echo "" @echo "make format ensure consistent source code formatting"
{ "content_hash": "0826ef048653532f90770065d5e2f93d", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 74, "avg_line_length": 20.926315789473684, "alnum_prop": 0.6106639839034205, "repo_name": "makomi/tdd_templates", "id": "2ff15974f56feae9dec9bbc08391a00117226d98", "size": "2260", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "C_CppUTest/Makefile", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "439" }, { "name": "C++", "bytes": "714" }, { "name": "Groovy", "bytes": "745" }, { "name": "Java", "bytes": "1183" }, { "name": "Makefile", "bytes": "2136" } ], "symlink_target": "" }