\n
\n Phone Interview \n cameras;\n\n CameraHomeScreen(this.cameras);\n\n @override\n State createState() {\n return _CameraHomeScreenState();\n }\n}\n\nclass _CameraHomeScreenState extends State {\n String imagePath;\n bool _toggleCamera = false;\n String _currentCamera = 'back';\n CameraController controller;\n\n @override\n void initState() {\n try {\n SharedPreferencesHelper prefs = SharedPreferencesHelper();\n prefs.getCameraSelected().then((String answer) {\n if (answer!= null) {\n print('here');\n print(answer);\n if (answer == 'back') {\n onCameraSelected(widget.cameras[0]);\n"}
+{"output_text": "How to get the current date in a specific format in Java?\n\nI have a date in the format of \"yyyy-MM-dd\" and I want to get the current date in that format.\nI have tried the following code:\nSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\nDate date = new Date();\nString currentDate = sdf.format(date);\n\nBut it gives me the current date in the format of", "input_text": "\n\n-keep class * extends java.util.ListResourceBundle {\n protected Object[][] getContents();\n}\n\n-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {\n public static final *** NULL;\n}\n\n-keepnames @com.google.android.gms.common.annotation.KeepName class *\n-keepclassmembernames class * {\n @com.google.android.gms.common.annotation.KeepName *;\n} \n-keepnames class * implements android.os.Parcelable {\n public static final ** CREATOR;\n}\n\nYour suggested Android manifest fixes\n\nYou might not have added the key, I see 'API_KEY' string instead of the key, it should be something like this(obviously the key will be different)\n \n\nYou are missing these in the AndroidManifest.xml,\n \n \n\nAdd this too:\n\n\nNext setup your layout and code like this post, you are not using the fragment properly.\n\n Q:\n\n"}
+{"output_text": ".render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render();\n guiManager.render", "input_text": "glLoadIdentity();\n\n cam.render();\n world.render();\n skybox.render(cam.player.position);\n\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n glOrtho(0, Display.getWidth(), Display.getHeight(), 0, 1, -1);\n glMatrixMode(GL_MODELVIEW);\n glLoadIdentity();\n glEnable(GL_ALPHA_TEST);\n glAlphaFunc(GL_GREATER, 0.5f);\n if(Camera.debug){\n FontManager.getDefaultFont().drawString(0, 0, \"Debug - SaintsCube v-A0.5\");\n FontManager.getDefaultFont().drawString(0, FontManager.getDefaultFont().getLineHeight()+1, \"x: \"+Math.floor(player.position.x));\n FontManager.getDefaultFont().drawString(0, FontManager.getDefaultFont().getLineHeight()*2+2, \"y: \"+Math.floor(player.position.y));\n FontManager.getDefaultFont().drawString(0, FontManager.getDefaultFont().getLineHeight()*3+3, \"z: \"+Math.floor(player.position.z));\n FontManager.getDefaultFont().drawString(0, FontManager.getDefaultFont().getLineHeight()*4+4, \"yaw: \"+Math.floor(player.rotation.x*-1));\n FontManager.getDefaultFont().drawString(0, FontManager.getDefaultFont().getLineHeight()*5+5, \"pitch: \"+Math.floor(player.rotation.y));\n }\n guiManager"}
+{"output_text": " xxxx is the ASCII character for the hex value of the byte).\nThe first loop iterates over the number of lines, and for each line, it iterates over the number of bytes per line, and for each byte, it prints the hex value of the byte, followed by a space, followed by the ASCII character for the hex value of the byte, followed by a space, followed by the ASCII character for the hex value of the byte, and so on.\nThe second loop", "input_text": " limit the size of buffer by explicitly making it keep track of the size information, e.g. by using a reference to a C-style array char (&buffer)[MBR_SIZE] or a fancier std::array reference const std::array &buffer.\nAnd that is a valid option if the only purpose was to print MBR contents.\nBut looking at it's actually implementation, it seems like the intention was to print the hex values in one big column next to a column containing to the ASCII characters (if printable) nicely aligned. This could be generalized for printing arbitrary char arrays by amending some of the assumptions made further down in the implementation.\n\nNext, let's have a look at the function body:\nsize_t byteIndex = 0;\nstring lineSeparator;\nstring columnSeparator;\n\nfor (size_t i = 0; i < NUMBER_OF_LINES; i++) {\n cout << lineSeparator;\n lineSeparator = '\\n';\n columnSeparator = \"\";\n\n for (size_t j = 0; j < BYTES_PER_LINE; j++) {\n string ch = charToHex(buffer[byteIndex++]);\n cout << columnSeparator << ch;\n columnSeparator = \" \";\n }\n\n cout <<'';\n\n for (size_t j = 0; j < BYTES_PER_LINE; j++) {\n char c = buffer[byteIndex - BYTES_PER_LINE + j];\n cout << (isprint((unsigned int) c)? c : '.');\n }\n}\n\nIf I understand correctly, the intention is to print the MBR in a XX XX XX XX xxxx line format (where"}
+{"output_text": " a skillset, you can learn a framework.\nI think the biggest benefit of frameworks is that they make it easier to write code that is DRY. I don't know if you've ever written a bunch of code that is basically the same, but it's a pain in the ass. You have to write the same code over and over again, and it's a pain in the ass.\nI think the biggest benefit of frameworks is that they make it easier to write code that is", "input_text": ";\n\n @Override\n public final int deleteAll(Class clazz) {\n CriteriaDelete criteriaDelete = entityManager.getCriteriaBuilder().createCriteriaDelete(clazz);\n criteriaDelete.from(clazz);\n return entityManager.createQuery(criteriaDelete).executeUpdate();\n }\n\n}\n\nThe method I have posted is a delete method but the annotations affect all persistence methods in the same way.\nI hope this post helps someone else who has struggled with the same issue when loading a service from a jar\n\n Q:\n\nBenefits of PHP frameworks\n\nI have heard a lot about PHP frameworks like ZEND, CodeIgniter,CakePhp etc and i am also well aware of some advantages of using it i.e. increased productivity,reduced errors etc but doesn't php framework make coding a complex process? Doesn't coding without framework provides more flexibility? Some people say you don't need any additional framework, as PHP is itself a framework.\nSo why there is so much usage of PHP framework? Are frameworks really necessary in PHP?\n\nA:\n\nThis is a broad question and I think an important one. I am in the camp of NOT using frameworks unless absolutely necessary. The question is, when is it necessary?\nFirst off, the thing that I think gave me this strange, allergic reaction to frameworks is that inexperienced coders want to use them for EVERYTHING, even tiny sites.... and it's bizarre. Maybe its through some need to make their resumes bigger by saying they've used codeigniter- but in my experience that doesn't make a damn bit of a difference. Hiring managers want SKILLSETS, not somebody that can read API documentation- which anyone can do. If you have"}
+{"output_text": ".\n render() {\n return (\n \n {this._renderProfileIcon()}\n {this._renderBackButtonIcon()}\n \n );\n }\n\nI am getting error in console.\n\nA:\n\nYou can use the ternary operator to check if the isProfileIconVisible is true or false.\nrender() {\n return (\n \n \n \n );\n return profileIcon;\n };\n\n _renderBackButtonIcon () {\n let backButonIcon = (\n \n \n \n );\n return backButonIcon;\n };\n\nand in main render function I am making conditional rendering"}
+{"output_text": "\")\" type=\"text/javascript\">\n \n \n \r\n\r\n\r\n Section 1
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Section 2
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Section 3
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n "}
+{"output_text": "\": 16.30,\n \"endTime\": 17.00,\n \"value1\": \"2016-01-20\",\n \"value2\": \"2016-01-21\",\n \"color\": \"#9DC481\",\n\n }, {\n \"name\": \"105\",\n \"startTime\": 17.00,\n \"endTime\": 18.00,\n \"value1\": \"2016-01-20\",\n \"value", "input_text": "light\",\n \"type\": \"serial\",\n \"dataDateFormat\": \"YYYY-MM-DD\",\n \"dataProvider\": [ {\n \"name\": \"111\",\n \"startTime\": 7.00,\n \"endTime\": 17.0,\n \"value1\": \"2016-05-03\",\n \"value2\": \"2016-05-05\",\n \"color\": \"#FF3F33\",\n\n }, {\n \"name\": \"220\",\n \"startTime\": 18.17,\n \"endTime\": 16.18,\n \"value1\": \"2016-03-15\",\n \"value2\": \"2016-03-20\",\n \"color\": \"#FFB134\",\n\n }, {\n \"name\": \"109\",\n \"startTime\": 17.0,\n \"endTime\": 18.40,\n \"value1\": \"2016-01-20\",\n \"value2\": \"2016-01-22\",\n \"color\": \"#F9FF34\",\n\n }, {\n \"name\": \"108\",\n \"startTime\": 19,\n \"endTime\": 21,\n \"value1\": \"2016-01-20\",\n \"value2\": \"2016-01-21\",\n \"color\": \"#36DB44\",\n\n }, {\n \"name\": \"107\",\n \"startTime\": 14.50,\n \"endTime\": 16.30,\n \"value1\": \"2016-01-20\",\n \"value2\": \"2016-01-22\",\n \"color\": \"#9DC481\",\n\n }, {\n \"name\": \"106\",\n \"startTime"}
+{"output_text": "Stack &val);\n explicit JSON(const JSON &val);\n explicit JSON(const JSON &val, Type type);\n explicit JSON(const JSON &val, Type type, const UnicodeString &key);\n explicit JSON(const JSON &val, Type type, const UnicodeString &key, const UnicodeString &val);\n explicit JSON(const JSON &val, Type type, const UnicodeString &key, const UnicodeString &val", "input_text": " are using one of the \"classic\" pre-C++11 compilers, you will have to adjust this code accordingly):\n//---------------------------------------------------------------------------\n#ifndef JSONH\n#define JSONH\n\n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n#include \n#include \n#include \n\nclass JSON\n{\n public: \n\n // JSON types\n enum Type\n {\n Integer,\n Boolean,\n Float,\n String,\n Object,\n Array,\n Null\n };\n\n using UniquePtr = std::unique_ptr;\n using SharedPtr = std::shared_ptr;\n using Pair = std::pair;\n using objectStack = std::stack;\n using arrayStack = std::stack;\n\n // Static functions\n static UniquePtr JSON::parse(const UnicodeString &str);\n static UniquePtr JSON::parser(TJsonTextReader& json_reader);\n\n JSON();\n explicit JSON(int val);\n explicit JSON(bool val);\n explicit JSON(float val);\n explicit JSON(const UnicodeString &val);\n explicit JSON(objectStack &val);\n explicit JSON(array"}
+{"output_text": " Group\n - Are you sure to assign the group?
\n \n \n \n \n\nIn vendor/magento/module-customer/view/frontend/layout/customer_index_index.xml added some params:\n \n", "input_text": "\" xsi:type=\"string\">status\n - \n
- Confirm
\n - Are you sure to change the status?
\n \n \n \n \n\nAfter update i get the error message:\nException #0 (InvalidArgumentException): Class argument is invalid: Company\\Module\\Ui\\Component\\MassAction\\ChangeStatus\nThe code above was the only i found. Is there another right way to do this? Or is there an error in my code?\nRegards,\nAndreas\n\nA:\n\nYou should change your code using example from any magento 2.3 listing, for example you can use the customer group change action in the customer grid:\nSee source model here:\nvendor/magento/module-customer/Ui/Component/MassAction/Group/Options.php\nIn vendor/magento/module-customer/etc/di.xml added some params:\n \n \n \n - customer/index/massAssignGroup
\n - group
\n - \n
- Assign"}
+{"output_text": ".\nI have a plugin that uses clang bindings. I have a function that calls clang_getDiagnosticClient() and then calls clang_getDiagnosticClient() again. This is a function that is called from a plugin.\nThe problem is that sometimes the second call to clang_getDiagnosticClient() fails with libclang: crash detected during reparsing. This then leads to crashing plugin host.\nI have a small example that reproduces the problem", "input_text": "\nUna de las cosas es que en el JSON que esta dentro de una lista (en donde me funcionaba), ah\u00ed pregunto si en la posici\u00f3n 0 de esa lista existe un atributo username y si coincide lo traiga, pero esta vez el match no se efectua y entonces no se establece conexi\u00f3n y mi intento de consumir datos no funciona.\nCualquier ayuda ser\u00e1 apreciada.\n\nA:\n\nTe sobra un acceso al JSON:\nstring jsonName = (string)itemData[0][\"username\"];\n\nEsa l\u00ednea te est\u00e1 lanzando una Exception que se recoge en el try-catch y tu registro dice Failed Connection. El \u00edndice 0 de itemData es username, y dentro de username no hay nada, pero t\u00fa buscas un elemento con la propiedad username y salta el Exception.\nLo correcto es: \nstring jsonName = (string)itemData[\"username\"];\n\n... y as\u00ed con todas las dem\u00e1s.\n\n Q:\n\nsublime text 3 plugin host crash recovery\n\nI develop a plugin for Sublime Text 3 and my python code uses c type bindings to clang. Sometimes calling libclang would segfault with libclang: crash detected during reparsing (I don't understand the reason yet, but it is irrelevant to this question). This then leads to crashing plugin host.\nSo the question is: is there any way in python to recover from a failure in the underlying c binding? I would gladly just skip this action on this particular file where I experience the crash.\nThanks! \nUPD: There was a short discussion in comments and it makes sense to elaborate further on the lack of a proper small reproducible example"}
+{"output_text": " $submitted_data[ 'user_phone' ],\n 'user_email' => $submitted_data[ 'user_email' ],\n 'user_website' => $submitted_data[ 'user_website' ],\n 'user_notes' => $submitted_data[ 'user_notes' ],\n 'user_date_added' => $submitted_data[ 'user_date_added' ],\n 'user", "input_text": " = '$order_id'\" );\n\n if ( $result!= NULL )\n add_filter( 'ninja_forms_render_default_value', 'custom_plugin_autofill_form', 10, 3 );\n}\n\ndo_action( 'check_for_previous_order' );\n\nadd_action( 'ninja_forms_after_submission', 'custom_plugin_save_db' );\nfunction custom_plugin_save_db( $form_data ) {\n global $wpdb;\n $table_name = $wpdb->prefix. \"my_custom_plugin_table\";\n $submitted_data = [];\n\n foreach ( $form_data[ 'fields' ] as $field ) {\n $key = $field[ 'key' ];\n $value = $field[ 'value' ];\n $submitted_data[ $key ] = $value;\n }\n\n $wpdb->replace( $table_name, array(\n 'order_id' => $submitted_data[ 'order_project_id' ]. '-'. get_current_user_id(),\n 'user_company' => $submitted_data[ 'user_company' ],\n 'user_name' => $submitted_data[ 'user_name' ],\n 'user_address' => $submitted_data[ 'user_address' ],\n 'user_city' => $submitted_data[ 'user_city' ],\n 'user_state' => $submitted_data[ 'user_state' ],\n 'user_zip' => $submitted_data[ 'user_zip' ],\n 'user_phone' =>"}
+{"output_text": "aven\n\nI have a plugin that is used to generate a report. The plugin is used in a multi-module project. The plugin is used in the parent pom.xml. The plugin is used in the child pom.xml.\nThe plugin is used in the parent pom.xml as follows:\n
\n com.mycompany.myplugin \n myplugin \n 1.0-", "input_text": "\n973 7.563686 0.552758\n974 7.564105 0.540144\n975 7.564428 0.541411\n976 7.564351 0.532154\n977 7.564408 0.530999\n978 7.564681 0.532376\n979 7.565192 0.536758\n980 7.565359 0.538629\n981 7.566112 0.555789\n982 7.566678 0.553163\n983 7.566364 0.577953\n984 7.567587 0.634843\n985 7.568583 0.679807\n986 7.569268 0.662653\n987 7.570018 0.630447\n988 7.570375 0.659497\n989 7.570704 0.622190\n990 7.571009 0.485458\n991 7.571886 0.551147\n992 7.573148 0.459912\n993 7.574134 0.463146\n994 7.574478 0.463158\n995 7.574671 0.535014\n996 7.575177 0.467705\n997 7.575374 0.531098\n998 7.575620 0.540611\n999 7.576727 0.465572\n\n[1000 rows x 2 columns]\n\n Q:\n\nAccessing a project resource from a plugin in M"}
+{"output_text": "+ + + +---+ +---+\n| V | q q | g | e e e e | s s s | r r r | p p p |\n+ + +---+---+ + + +---+ + + +---+ +---+ +---+\n| V | q q | g | e e e e", "input_text": " | d | c | n n | C | v | N N N | R R |\n+---+ + + + + +---+---+---+ +---+---+---+---+ + +\n| M M | i i | h | d d d | C C C | u u | R R R |\n+ +---+---+ +---+ + +---+---+---+---+---+---+---+ + +\n| M | S S | i | e | d d | E E | s s s | O O | R R |\n+ +---+ + + +---+---+ +---+ + +---+---+ +---+ +\n| M | q | S | i | e e e | E | s s s | t | r | O | p | R |\n+ + +---+---+ + + +---+ + + +---+ +---+ +---+\n| M | q q | g | e e e e | s s s | r r | p p p |\n+---+ +---+---+---+---+ + +---+ + + + +---+ +---+\n| V | q | U U | f f | e e | o | s s | r r r | p | Q |\n+ +---+ + +---+ +---+---+ +---"}
+{"output_text": " can make the spotlight a tool to help the PCs grow and develop, rather than a tool to make them shine.\n\nA:\n\nI think the best way to do this is to have the spotlight be a tool to help the PCs grow and develop, rather than a tool to make them shine.\n\nThe spotlight is a tool to help the PCs grow and develop, rather than a tool to make them shine.\n\nThe spotlight is a tool to help the PCs grow and develop", "input_text": " attention\u2026\n\nRemember, GM moves aren't always bad! \nYou could separate them so Cleric has some alone time in the spotlight:\n\nYou tumble down the sudden and slippery tunnel slope. You land with a bump\u2026 alone. Some trick of the stalagmites must have channeled you each down a different branch of the downward tunnel. Cleric, you see [stuff], what do you do?\n\nYou can show signs of an approaching threat, but that only Cleric notices (or maybe that only Cleric can notice):\n\nCleric, while the ogre and Fighter are occupied with each other, you notice a dark cloud moving toward you all, coming over the trees. A moment later and you realise it's a dense swarm of flying insects. It'll probably be here within a minute. What do you do?\n\nor\n\nThere's a presence hanging over the angry mob. You can all feel something, but Cleric, you can suddenly see it. It's a shining \u2014 angel, looks like? Huh. What do you do?\n\nYou can reveal an unwelcome truth to the Cleric about something she'd be more readily perceptive about than any other PCs, or perhaps just more perceptive about currently:\n\nCleric, the Mayor's speech is suddenly touching on religious themes, but in a way that gives you a sinking feeling that she's about to renege on the deal and hang you all out to dry. And in front of the King, no less. What do you do?\n\nAny time someone rolls a miss, or the group looks to you to find out what happens, or you're otherwise given a Golden Opportunity, you can pick a move and use it to throw the spotlight on one PC exclusively, to see them shine and learn more about who they are. In this way, you"}
+{"output_text": "fopen(\"DNAS.txt\",\"r\");\n if(arquivo==NULL)\n {\n printf(\"O arquivo nao pode ser lido\\n\");\n system(\"pause\");\n return 0;\n }\n int i=0;\n while(fgets(linhas[i],11,arquivo)!=NULL)\n {\n printf(\"\\n\");\n fgetc(arquivo", "input_text": ":%i%% G:%i%%\\n\\n\",(soma_AT*100)/20,(soma_AT*100)/20,(soma_CG*100)/20,(soma_CG*100)/20);\n habilidades(soma_CG,soma_AT);\n calcular_peso(ler_linha,&qtd_G,&qtd_C);\n return 0;\n}\n\nint main()\n{\n char bases[11],base_2[11];\n FILE *arquivo;\n arquivo = fopen(\"DNAS.txt\",\"r\");\n\n if(arquivo==NULL)\n {\n printf(\"O arquivo nao pode ser lido\\n\");\n system(\"pause\");\n return 0;\n }\n\n while(fgets(bases,11,arquivo)!=NULL)\n {\n printf(\"\\n\");\n fgetc(arquivo);\n printf(\"\\t%s\\n\",bases);\n cria_complementar(bases,base_2);\n system(\"pause\");\n system(\"cls\");\n }\n\n fclose(arquivo);\n\n return 0;\n}\n\nA leitura do arquivo \u00e9 na seguinte formata\u00e7\u00e3o:\nCGATGCATGC\n\nV\u00e1rias linhas usando apenas ATCG e a impress\u00e3o no arquivo \u00e9 a mesma linha seguido de um n\u00famero.\n\nA:\n\nPrimeira coisa que eu reparei\nint top_IDS(int ID_DNA, char *linhas[])\n{\n FILE *arquivo;\n arquivo="}
+{"output_text": ". . . / / \\ \\ \\:::..::.|\n / . . . / / \\ \\ \\:::..::.|\n/ . . . / / \\ \\ \\:::..::.|\n/ . . . / / \\ \\ \\:::..::.|\n/ . . . / ", "input_text": "li> \n List item \n \n \n
\n \n
\n Hidden content (after page loaded). \n \n \n
\n \n \n \n Sorry, your browser doesn't support HTML5 video
, but you can\n download this video from the Internet Archive .\n \n\n
\n Please install the Shockwave plugin to watch this movie.\n \n \n
\n\n _,'/\n _.-''._:\n ,-:`-.-' .:.|\n ;-.'' .::.|\n _..------.._ / (:. .:::.|\n ,'. .... .`/ : :. .::::.|\n ,'.. . . ./ \\ ::..::::::.|\n ,'"}
+{"output_text": " data from the server.\n$.ajax({\n url: 'http://localhost:3000/api/forms/',\n type: 'GET',\n dataType: 'json',\n data: {\n id: id\n },\n success: function(data) {\n var form = JSON.parse(data);\n var template = $('#template').html();\n var partials = $('#partials').html();\n var formData", "input_text": "\n }\n\n Q:\n\nUse mustache for templating smaller parts for use multiple times in a form\n\nOkay. So I hope this is specific enough.\nI'm, kind of new to mustache, but see it has great potential, so why not use it.\nI'm making a quite big form, and want to have the form built with mustache. So i have started to make the form in mustache and, then i realized i want to template the form-elements. One template for how i want every narrow input, wide input, select etc. to look like. because now i'm repeating myself. \nMy template and partials are provided through $.ajax get, where the main form template are defined as a mustache file, with html content, and the partials are defined as a mustache file with every template inside -tags.\nVariables for mustache to use. This object is somewhat subject for change.\nvar jsonForm = {\n oneInputField: {\n value:'put your title here',\n rule_set: {\n required: {\n strName:'required',\n strErrorMsg: 'error message'\n }\n }\n },\n oneSelect: {\n options: [\n {value: '- Pick one -', helper: 'helper', select_options: {disable_search: true}},\n {value: 'option1', selected: true},\n {value: 'option2'},\n {value: 'option3'},\n {value: 'option4'}\n ],\n rule_set: {\n required: {\n strName:'required',\n strErrorMsg: 'error message'\n }\n }\n }\n };\n\nHow i fetch the"}
+{"output_text": "\nA:\n\nI think you're looking for the Task.FromResult method.\n\nCreates a task that represents the completion of an asynchronous operation.\n\nIt's a bit of a mouthful, but it's basically a wrapper around the Task.Factory.StartNew method.\n\nA:\n\nI think you're looking for the Task.FromResult method.\n\nCreates a task that represents the completion of an asynchronous operation.", "input_text": ", there will be no retries.\nI'm looking for a Task compatible equivalent of Lazy(Func, LazyThreadSafetyMode.PublicationOnly), i.e. it should behave as that is specified:-\n\nAlternative to locking In certain situations, you might want to avoid the overhead of the Lazy object's default locking behavior. In rare situations, there might be a potential for deadlocks. In such cases, you can use the Lazy(LazyThreadSafetyMode) or Lazy(Func,\u2002LazyThreadSafetyMode) constructor, and specify LazyThreadSafetyMode.PublicationOnly. This enables the Lazy object to create a copy of the lazily initialized object on each of several threads if the threads call the Value property simultaneously. The Lazy object ensures that all threads use the same instance of the lazily initialized object and discards the instances that are not used. Thus, the cost of reducing the locking overhead is that your program might sometimes create and discard extra copies of an expensive object. In most cases, this is unlikely. The examples for the Lazy(LazyThreadSafetyMode) and Lazy(Func,\u2002LazyThreadSafetyMode) constructors demonstrate this behavior.\nIMPORTANT\nWhen you specify PublicationOnly, exceptions are never cached, even if you specify a factory method.\n\nIs there any FCL, Nito.AsyncEx or similar construct that might fit in nicely here? Failing this, can anyone see an elegant way to gate the \"attempt in progress\" bit (I'm OK with each caller making its own attempt in the same way that a Lazy(..., (LazyThreadSafetyMode.PublicationOnly) does) and yet still have that and the cache management encapsulated neatly?\n"}
+{"output_text": "ailingErrors>\n true \n true \n true \n true \n true \n true \n true \n true \n", "input_text": " => Tasks and Events\n [type] => Activity\n )\n\n )\n\n )\n\n)\n\nAs you can see in the results only the CALLTYPE column filter applied (this is the default filter).\nDoes anyone see anything wrong with the POST data that I am sending?\nI have tried using other reports and other date columns to filter on, but it is always the same, only the default filters apply.\n\nA:\n\nI found the answer. I was not setting the header Content-type to application/json. Once I did that the filters started working.\n\n Q:\n\npmd maven plugin does not respect exclude-cpd.properties\n\nI have maven project with multiple modules, the structure is like this:\n/myProject \n pom.xml\n exclude-cpd.properties\n -- module1\n pom.xml\n exclude-cpd.properties\n -- module2\n pom.xml\n exclude-cpd.properties\n\nin my parent pom.xml i added pmd plugin:\n\n \n \n \n org.apache.maven.plugins \n maven-pmd-plugin \n 3.12.0 \n \n \n pmd_ruleset.xml \n \n 80 \n true \n exclude-cpd.properties \n true\n \n
\n \r\n \r\n
\n\nA:\n\nMaybe try putting some col-md-2 place holder divs on either side?\nThe first row of three buttons, since all three divs are col-md-4 in a 12 column system, the top row of buttons end up centered between columns 2 & 3, between 6 & 7, and between 10 & 11.\nThe ideal place to center the two buttons for the second row would be between columns 4 & 5 and between columns 8 & 9. But if you do two big col-md-3 columns, they end up getting centered between columns 3 & 4 and between columns 9 & 10.\n\n.content-sm {\r\n padding-top: 60px;\r\n padding-bottom: 60px;\r\n}\r\n@media (min-width: 1200px)\r\n.container {\r\n width: 1170px;\r\n}\r\n@media (min-width: 992px)\r\n.container {\r\n width: 970px;\r\n}\r\n@media (min-width: 768px)\r\n.container {\r\n width: 750px;\r\n}\r\n.container {\r\n padding-right: 15px;\r\n padding-left: 15px;\r\n margin-right: auto;\r\n margin-left: auto;\r\n}\r\n* {\r\n border-radius: 0;\r\n}\r\n\r\n\r\n/*Business Posts Section\r\n------------------------------------*/\r\n.business-post-section {\r\n position: relative;\r\n background: #f7f7f7;\r\n}\r\n\r\n\r\n/*Business Posts Links/Buttons\r\n------------------------------------*/\r\n.business-post-link {\r\n padding-top: 25px;"}
+{"output_text": "()\nexport class UserService {\n private _user: any;\n private _tempuser: any;\n\n constructor(private http: Http) { }\n\n setUser(user: any) {\n this._user = user;\n this._tempuser = user;\n }\n\n getUser(): any {\n return this._user;\n }\n\n getTempUser(): any {\n return this._tempuser;\n ", "input_text": ".Sum(time => time.Hours),\n TotalTrav = employeeTimes.Where(time => time.PayCode == \"214\")\n .Sum(time => time.Hours),\n TotalSub = employeeTimes.Where(time => time.PayCode == \"251\")\n .Sum(time => time.Hours),\n FName = employee.FName,\n LName = employee.LName,\n Div = employee.Dept,\n AccID = employee.AccountingID,\n Period = employeeTimes.Key.Period,\n Status = employeeTimes.First().Status,\n };\n\n Q:\n\nData saved in service lost on page refresh or change\n\nI have an Angular 5 application, and I'm attempting to use a Google OAuth login to get a username and then set that username in a service to be used as the logged in user. Before I added the login I set the value manually in the service and it worked with no issue. Now I'm setting the username from the Google login it looks like the value I set is being lost each time the page refreshes (or when a new instance of the service is called).\nThe value returns correctly from the Google login (I checked in the console), so I know everything is ok there. My impression of Angular services was that they were constant across the other modules? Is it the case that each time I call that service it's creating a new empty 'tempuser' variable? If so is there any way around this so I can keep the value across the whole application until the user logs out?\nThis is the service itself:\nimport { Injectable } from '@angular/core';\nimport { Http, Response, Headers } from \"@angular/http\";\n\n@Injectable"}
+{"output_text": " page is parsed. This is the best way to do it.\nNow, if you want to bind to the button click, you can do it like this...\n $(document).ready(function(){\n $('.testMe').click(function(){\n var URL=\"${createLink(controller:'book',action:'checkJquery')}\";\n\n $.ajax({\n url:URL,\n data: {id:'1'},\n success: function(", "input_text": " until the page's body is parsed and in the dom.\nNow lets look at the html.\n
test \n\nThis is defining a button that will call the callAjax() method when it is clicked. So lets follow the logic. You create your function that will be executed later. Your page is rendered and the button exists.\nYou click the button which executes the method. That method then gives the function to the document ready to wait for the page to be parsed. But... we already know it is. Cause you called it based on an interaction with the page. So the document ready is pointless.\nAnother point, that call is going to happen -every- time that button is clicked. Meaning your method will happen multiple times, which means your binding will happen multiple times, and so on and so forth.\nYou should really consider binding in your javascript instead of inline in order to separate your concerns and to minimize/eliminate the redundancy.\nSo first off the html would change to be something like..\n
test \n\nAnd your javascript...\n $(document).ready(function(){\n $('.testMe').click(function(){\n var URL=\"${createLink(controller:'book',action:'checkJquery')}\";\n\n $.ajax({\n url:URL,\n data: {id:'1'},\n success: function(resp){\n console.log(resp);\n $(\"#author\").val(resp.author);\n $(\"#book\").val(resp.bookName);\n }\n });\n });\n });\n\nNow your markup would be only your markup, and your bindings would happen after the"}
+{"output_text": "\n\n public void buildChildMenus() {\n JMenu menu = new JMenu(\"Window\");\n menu.add(cascade);\n menu.add(tile);\n add(menu);\n }\n}\n\n/**\n * A simple MDI application that demonstrates the use of the MDI\n * framework.\n */\n class MDI extends JFrame {\n private MDIDesktopPane desktop;\n private JMenuBar menuBar", "input_text": "sets.right, d.getHeight()\n - scrollInsets.top - scrollInsets.bottom);\n }\n\n if (x <= d.getWidth())\n x = ((int) d.getWidth()) - 20;\n if (y <= d.getHeight())\n y = ((int) d.getHeight()) - 20;\n desktop.setAllSize(x, y);\n scrollPane.invalidate();\n scrollPane.validate();\n }\n }\n}\n\n/**\n * Menu component that handles the functionality expected of a standard\n * \"Windows\" menu for MDI applications.\n */\n class WindowMenu extends JMenu {\n private MDIDesktopPane desktop;\n private JMenuItem cascade = new JMenuItem(\"Cascade\");\n private JMenuItem tile = new JMenuItem(\"Tile\");\n\n public WindowMenu(MDIDesktopPane desktop) {\n this.desktop = desktop;\n setText(\"Window\");\n cascade.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n WindowMenu.this.desktop.cascadeFrames();\n }\n });\n tile.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n WindowMenu.this.desktop.tileFrames();\n }\n });\n addMenuListener(new MenuListener() {\n public void menuCanceled(MenuEvent e) {\n }\n\n public void menuDeselected(MenuEvent e) {\n removeAll();\n }\n\n public void menuSelected(MenuEvent e) {\n buildChildMenus();\n }\n});\n }"}
+{"output_text": "=\"table table-striped\">\n
\n \n Name \n Description \n Price \n Actions \n \n \n
\n \n {{ item.name }} \n <", "input_text": "\nEnable the use of the sensor, if necessary, in the firmware (either by the UI if possible or uploading new firmware) and;\n\nCheck whether the CR-10 controller board uses active LOW to detect a lack of filament (or again, this may be a UI, or firmware, setting)\nYou could test this last point yourself, by applying a LOW level voltage (i.e. grounding) to X+ endstop input on the control board (after checking the UI/firmware for appropriate settings), and see if that halts/pauses the print. If not, try a HIGH level (5\u00a0V). If it is active HIGH then you simply need to use an inverter (i.e. 4069), between the sensor and the X+ endstop connector.\n\nBoard examples\nThere are two principle board options, v1.x and v2.x, the latter has dual Z stepper motor connectors and the former does not.For example:\nVersion 1.x, for CR-10 firmware - Motherboard Controller DIY Creality 3D\u00ae CR-10 / CR-10S 3D Printer CR-10 Upgrade Control Board12V (CR-10S Mainboard)\n\nVersion 2.x (2.1 in this case) with Dual Z stepper connectors, for CR-10S firmware - Luxnwatts CR-10S Mainboard Replacement Controller Board Upgrade V2.1 Motherboard For Creality S4 S5 3D Printer\n\n Q:\n\nError in filter function for VueJs\n\nI want to filter the following in VueJs 2.\nMy Component is the following:\n\n\n Search \n\n 0) {", "input_text": " each read I would append the data to the builder, and if you detect a usable header, slice it out of the buffer and pass it up stream (preferably on a worker thread). Keep doing this and whatever is upstream should be able to react accordingly. Hope that helps.\nSo usually you have a structure like this:\nByteBuffer reUsableBuffer = ByteBuffer.allocateDirect(5120);\nSelector selector = Selector.open();\nServerSocketChannel channel =.. // wherever you get it from \nchannel.register(selector, SelectionKey.OP_ACCEPT);\nExecutor executor = Executors.newThreadPoolExecutor();\nwhile(selector.isOpen()) { \n int numKey = selector.select();\n for (SelectionKey key: selector.selectedKeys()) {\n if (key.isAcceptable()) {\n /// Sort of included for completeness but you get the idea\n ServerSocketChannel server = (ServerSocketChannel)key.channel();\n SocketChannel channel = server.accept();\n channel.register(selector, SelectionKey.OP_READ | Selection.OP_WRITE, new StringBuilder());\n } if (key.isReadable()) {\n // READ the data\n reUsableBuffer.clear();\n // You have to keep track of previous state.\n // NIO makes no guarantees of anything\n StringBuilder builder = key.attachment();\n SocketChannel socketChannel = (SocketChannel)key.channel();\n int readCount = socketChannel.read(reUsableBuffer);\n if (readCount > 0) {\n reUsableBuffer.flip();\n byte[] subStringBytes = new byte[readCount];\n reUsableBuffer.read(subStringBytes);\n // Assuming ASCII (bad"}
+{"output_text": " no window. In that case, you can use the view's window property to get the window's scene.\nlet mySceneDelegate = self.view.window.windowScene.delegate\n\nIf you want to get the scene delegate for a specific window, you can do:\nlet mySceneDelegate = self.view.window.windowScene.delegate\n\nIf you want to get the scene delegate for a specific view controller, you can do:\nlet mySceneDelegate = self", "input_text": " answerable (no pun intended) for the content that you post.\nI'm not going to reverse the community wiki that you put in place even though I think it's not appropriate to be wikied.\nI will say that I felt that you misread Shog9's answer, his statement was not permission to go and put it back, but a request to keep what he (and others) said in mind before you make that decision and take action on that.\n\n Q:\n\nUIApplication.shared.delegate equivalent for SceneDelegate xcode11?\n\nI have defined a let property within my SceneDelegate. I would like some of the ViewControllers to be able to access that within the scene.\nIn UIKit I could access App Delegate properties like this:\nUIApplication.shared.delegate\n\nthen casting and specifying the property name...\nIs there an equivalent to get the a reference to the SceneDelegate the view controller is in from the UIViewController's instance?\n\nA:\n\nAs of iOS 13, UIApplication has the connectedScenes property which is Set. Each of those scenes has a delegate which is a UISceneDelegate. So you could access all of the delegates that way.\nA scene can manage one or more windows (UIWindow) and you can get a window's UIScene from its windowScene property.\nIf you want the scene delegate for a specific view controller then note the following. From a UIViewController you can get its window from its view. From the window you can get its scene and of course from the scene you can get its delegate.\nIn short, from a view controller, you can do:\nlet mySceneDelegate = self.view.window.windowScene.delegate\n\nHowever, there are plenty of times where a view controller has"}
+{"output_text": " The /* function is a normal function, and the /* query operator is a query operator. The /* function is a normal function, and the /* query operator is a query operator. The /* function is a normal function, and the /* query operator is a query operator. The /* function is a normal function, and the /* query operator is a query operator. The /* function is a normal function, and the /* query operator is a query operator. The /* function is", "input_text": " roughly equivalent substitutes used to avoid distracting from the main points of discussion.\nTo see the actual interpretation of a query, use Normal:\nQuery[(1 ;; 5) /* Total, \"a\"] // Normal\n\n(* GeneralUtilities`Slice[1 ;; 5] /* GeneralUtilities`Slice[All, \"a\"] /* Total *)\n\nGeneralUtilities`Slice is a common query helper function that can perform all manner of slicing and mapping functions, applied simultaneously.\nI recommend thinking in such notional terms, with query operators operating upon distinct expression levels with distinct descending and ascending phases. It helps that the documentation is written in such terms, and the optimized execution plans respect those semantics. Make it a habit to read the query:\nQuery[Total, \"a\"]\n\nas if it were written as:\nQuery[ Identity /* Total\n , \"a\" /* Identity ]\n\n... mentally separating out the ascending and descending phases.\nQuery Operators vs. Normal Operators\nThroughout this response, there has been an implicit distinction drawn between query operators and the functions that implement them. This is an important distinction to realize. It is just a coincidence that the Total query operator is implemented by the like-named Total function. This coincidence is not true in general. We already saw exceptions like \"a\" interpreted as Key[\"a\"] and 1;;5 interpreted as #[[1;;5]]&.\nGroupBy is an example of a query operator that behaves subtly differently from its function namesake. GroupBy[\"a\"] is quietly rewritten as GroupBy[Key[\"a\"]]. There are many other operators that have similar small changes in behaviour -- study the documentation for details.\nHere is an interesting case: the /* query operator behaves very differently from the /* function."}
+{"output_text": " work.\nI have tried to create a new connection with virt-manager and it works.\nI have tried to create a new connection with virt-install and it works.\nI have tried to create a new connection with virsh and it works.\nI have tried to create a new connection with virsh and it works.\nI have tried to create a new connection with virsh and it works.\nI have tried to create a new connection with virsh and it works.", "input_text": " url where the form is located (i.e. domainname/OtherPages/GatewayFormTestPage.aspx) instead of just reloading the fancybox window and displaying the success message or an error message if not all fields are filled in.\nI tried setting the type to 'iframe' for the fancybox modal, but all that did was render an empty popup (no content displayed in the fancybox-content block, either--I inspected the element in Chrome's dev tools). \nIs there a way that I can wrap the WFFM form in an iframe so I can avoid going to another page when clicking \"submit?\" I want the user to stay within the popup modal at all times.\nThanks, and I know this is probably a convoluted process, and I wish I could choose a better solution but this is what I must work with. \n\nA:\n\nI think that using iframe is not right approach for your task. It is better to use AJAX requests instead of iframe.\nYou should check \"Is Ajax Mvc Form\" on form item to reload only form without page postback. It will allow you get form update without full reloading page.\nIf you are using WebForms(not MVC) then you can wrap WFFM form into update panel.(not very good for performance and transparency)\nAnd tip about usage WFFM: you should use it only in cases when fields/actions will be managed by marketers. You don't need to use it for all forms on site. Make sure that it is not your case.\n\n Q:\n\nsocket to '/var/run/libvirt/virtxend-sock': File o directory not found\n\nI'm running xen on ubuntu 20.04 and I'm trying to create a new xen connection with virt-manager,but it does not"}
+{"output_text": " 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n$$\n$$ D_{1} = \\left( \n\\begin{array}{rrrr} \n4 & - \\frac{ 1 }{ 2 } & 0 & 0 \\\\ \n2 & 4 & 0 & 0 \\\\ \n2 & 0 & 4 & 0 \\\\ \n1", "input_text": "4 & 2 & 2 & 1 \\\\ \n2 & 4 & 1 & 2 \\\\ \n2 & 1 & 4 & 2 \\\\ \n1 & 2 & 2 & 4 \\\\ \n\\end{array}\n\\right) \n$$\n$$ D_0 = H $$\n$$ E_j^T D_{j-1} E_j = D_j $$\n$$ P_{j-1} E_j = P_j $$\n$$ E_j^{-1} Q_{j-1} = Q_j $$\n$$ P_j Q_j = Q_j P_j = I $$\n$$ P_j^T H P_j = D_j $$\n$$ Q_j^T D_j Q_j = H $$\n$$ H = \\left( \n\\begin{array}{rrrr} \n4 & 2 & 2 & 1 \\\\ \n2 & 4 & 1 & 2 \\\\ \n2 & 1 & 4 & 2 \\\\ \n1 & 2 & 2 & 4 \\\\ \n\\end{array}\n\\right) \n$$\n==============================================\n$$ E_{1} = \\left( \n\\begin{array}{rrrr} \n1 & - \\frac{ 1 }{ 2 } & 0 & 0 \\\\ \n0 & 1 & 0 & 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n$$\n$$ P_{1} = \\left( \n\\begin{array}{rrrr} \n1 & - \\frac{ 1 }{ 2 } & 0 & 0 \\\\ \n0 & 1 & 0 &"}
+{"output_text": " a quote\" you will get the same problem.\nThe problem is that you are using the database as a data store, and you are not using the database as a data store. You are using the database as a data store, and you are using the database as a data store, and you are using the database as a data store, and you are using the database as a data store, and you are using the database as a data store, and you are using the database as a", "input_text": "b1c78116086:FF=0:TM=1318327167:LM=1318327168:S=JmwTN04g_cBBkXlQ; expires=Thu, 10-Oct-2013 09:59:28 GMT; path=/; domain=.google.com\\\";i:1;s:212:\\\"NID=51=kumBg-YqiVjIylrlQZnAp1IHv6-PAK1TIMAXdUBv4d9njuL-S5g35y0ZJYHQQxUJrc3rG8i2vRNHvkb_Ydpag_xqTuIEihrf2G0LM2c6pTZ6imb8lozQWVJOKQoEV4gm; expires=Wed, 11-Apr-2012 09:59:28 GMT; path=/; domain=.google.com; HttpOnly\\\";}s:6:\\\"server\\\";s:3:\\\"gws\\\";s:16:\\\"x-xss-protection\\\";s:13:\\\"1; mode=block\\\";}s:5:\\\"build\\\";s:14:\\\"20090627192103\\\";}','no');\n\nA:\n\nSlightly off-topic but:\nSurely the problem is not that the database doesn't escape quotes. It is perfectly valid to have unescaped content in the database, because otherwise you coupling the use of the data in your DB to a particular presentation layer (HTML)... \nIt is the responsibility of the presentation layer to ensure that all content is displayed safe. If you are re-importing data to the same application and it still does output escaping, then if you change the quote'into"}
+{"output_text": ": absolute;top: 0;left: 0;width: 100%;height: 100%;\">K-On 2 ');\n }\n });\n\n\nA:\n\nI think you are missing the video tag in your", "input_text": "ource%252Cip%252Cipbits%252Cexpire%26signature%3d270F5022125B383BF7365840657C61CB83505AA5.97F4F9604EEDEBE76CC22625C2F8AAE4761D0970%26key%3dlh1&video_id=picasacid&fs=1&hl=en&autoplay=1&ps=picasaweb&playerapiid=uniquePlayerId&t=1&vq=large&auth_timeout=86400000000';\n\n $('#selectEpisode').change(function () {\n location.href = 'http://kissanime.com/Anime/K-On-2-Dub/' + $(this).val();\n });\n\n $('#selectGroup').change(function () {\n location.href = 'http://kissanime.com/Anime/' + $(this).val();\n });\n\n if (isHTML5) {\n $('#divContentVideo').html(' '); \n //$('#divContentVideo').html('\n \n \n
\n \n\n Q:\n\nWhy doesn't this code demonstrate the non-atomicity of reads/writes?\n\nReading this question, I wanted to test if I could demonstrate the non-atomicity of reads and writes on a type for which the atomicity of such operations is not guaranteed.\nprivate static double _d;\n\n[STAThread]\nstatic void Main()\n{\n new Thread(KeepMutating).Start();\n KeepReading();\n}\n\nprivate static void KeepReading()\n{\n while (true)\n "}
+{"output_text": " packets:0 errors:0 dropped:0 overruns:0 frame:0\n TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:1000\n RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)\n\nlo Link encap:Local Loopback\n inet addr:127.0.0.1 Mask:255.0.", "input_text": " commands will immediately brake remote connection with server and make the server not reachable via internet anymore. These instructions assume local connection.\n# brctl addbr br0\n# ip link set br0 up\n# brctl addif br0 eth0\n# brctl show br0
\nbridge name bridge id STP enabled interfaces
\nbr0 8000.080027d966ac no eth0\n\nSo the above commands add 'eth0' to br0 bridge and shows it being there. Next we need to move the IP address from eth0 to br0.\n# ip addr del 172.16.10.71/24 dev eth0\n# ip addr add 172.16.10.71/24 dev br0\n\nYou should now have similar below.\n# ifconfig\nbr0 Link encap:Ethernet HWaddr 08:00:27:d9:66:ac\n inet addr:172.16.10.71 Bcast:172.16.10.255 Mask:255.255.255.0\n UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\n RX packets:77 errors:0 dropped:0 overruns:0 frame:0\n TX packets:8 errors:0 dropped:0 overruns:0 carrier:0\n collisions:0 txqueuelen:0\n RX bytes:6281 (6.2 KB) TX bytes:648 (648.0 B)\n\neth0 Link encap:Ethernet HWaddr 08:00:27:d9:66:ac\n UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1\n RX"}
+{"output_text": " ran into a problem where the plaintext was much longer than the ciphertext. I've narrowed it down to the following code:\n public static byte[] Encrypt(byte[] plaintext, byte[] key, byte[] iv)\n {\n byte[] ciphertext = new byte[plaintext.Length + 16];\n byte[] tag = new byte[16];\n int i;\n int j;\n int k;\n int l;\n", "input_text": " subq $40, %rsp\n .cfi_offset 3, -24\n movq %fs:40, %rax\n movq %rax, -24(%rbp)\n xorl %eax, %eax\n movl -36(%rbp), %ebx\n leaq -36(%rbp), %rax\n movq %rax, %rdi\n call _ZN7myclass3fooEv\n movq %rax, %rcx\n movq -32(%rbp), %rax\n movl %ebx, %edx ; rdx is the third parameter, var. ebx was set before the foo() call\n movq %rcx, %rsi ; rsi is the second parameter, return value of foo()\n movq %rax, %rdi ; rdi is the first parameter, ssl\n call SSL_write@PLT\n movl $0, %eax\n movq -24(%rbp), %rdx\n\nAfter SSL_write, foo() is guaranteed to be executed and var is set to the correct value, that's why the SSL_write was working the second time I suppose.\nMoreover, the docs for SSL_write says\n\nYou should not call SSL_write() with num=0, it will return an error. SSL_write_ex() can be called with num=0, but will not send application data to the peer.\n\n Q:\n\nAES GCM symmetric encryption of data at rest in c#, ciphertext much longer than plaintext\n\nI've written encryption/decryption routines using AES GCM. Code can be found here.\nI recently"}
+{"output_text": " \"
\").insertAfter(\".masked-img\" + newImageLoadedId).css({\r\n \"display\": \"none\"\r\n });\r\n $(\"
\" +\r\n \"
Edit \" +\r\n \"\").insertAfter(\".masked-img\" + newImageLoadedId).css({\r\n \"left\": ImagePosition[newImageLoadedId].x + (ImagePosition[newImageLoadedId].width / 2) + \"px\",\r\n \"top\": ImagePosition[newImageLoadedId].y + (ImagePosition[newImageLoadedId].height / 2) + \"px\"\r\n });;\r\n $(\"
\" +\r\n"}
+{"output_text": "_height=\"match_parent\">\n\n
", "input_text": "id=\"@+id/bt_back\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:layout_alignParentLeft=\"true\"\n android:layout_alignParentStart=\"true\"\n android:layout_marginTop=\"5dp\"\n android:src=\"@drawable/ic_arrow_left\"\n android:text=\"@string/back\"/>\n\n \n\n\n\nDo you know a solution for this?\n\nA:\n\nyou can use PercentRelativeLayout\n 1 Then\n\n If dict.Count > 0 And dict.Exists(Mname) Then\n dict(Mname) = mycell.Row()\n Else\n dict.Add Mname, mycell.Row()\n End If\n\n End If\n Next mycell\n\nDim StartRow As Long\nStartRow = 2\n\nDim Key As Variant\nDim lr As Long, v"}
+{"output_text": " implementation?\nI have tried to debug the code with VS2010 and MinGW-w64, but I have no idea what's going on.\nI have tried to debug the code with VS2010 and MinGW-w64, but I have no idea what's going on.\nI have tried to debug the code with VS2010 and MinGW-w64, but I have no idea what's going on.\nI have tried to debug the code with VS2010 and MinGW", "input_text": " = ((sint32)pAD[1]);\n}\n\nNow I assume you need this for your processing. But having the data in interleaved format is really quite nice. You can generally take the straight interleaved format and pass it right back to the AudioQueue or Remote I/O callback and it will play correctly.\nIn order to get the audio playing using the AudioQueue framework the data should follow this flow:\nAVAssetReader -> NSData Buffer -> AudioQueueBuffer\nThen in the AudioQueue callback where it asks for more data simply pass the AudioQueueBuffer. Something like...\n- (void) audioQueueCallback:(AudioQueueRef)aq buffer:(AudioQueueBufferRef)buffer {\n\n memcpy(buffer->mAudioData, srcData, mBufferByteSize);\n //Setup buffer->mAudioDataSize\n\n //...\n\n AudioQueueEnqueueBuffer(mQueue, buffer, 0 /*CBR*/, 0 /*non compressed*/);\n}\n\n Q:\n\nGLSL Linking fails without useful information\n\nSimilar titled question here: GLSL:shader linking fail (but no log) but in my case, both vertex and fragment shaders are very simple and in/out variables match as listed below.\n[EDIT] Code for loading the shaders are listed further down.\nSince VS2010 does not support range-based for-loop, some part of the code are #ifdef'd.\nBut anyway... I have tried the code with MinGW 32bit environment and it links OK.\nShader linking succeeds and runs fine when built with VS2010, but fails with NetBeans + MinGW-w64 and gives this log message:\nLink info\n---------\nNo shader objects attached.\n\nCould it be something that's related with MinGW-w64 OpenGL"}
+{"output_text": " it is a structure or union, does not have any member (including,\nrecursively, any member or element of all contained aggregates or unions) with a const-\nqualified type.\n\nA:\n\nThe first example is legal because str is a pointer to a string literal.\nThe second example is not legal because str is an array of 20 characters.\n\nA:\n\nThe first example is legal because str is a pointer to a string literal.\nThe second example", "input_text": ", for a given value of i, this includes an equivalence between baseWord[i] (in main()) and str[i] (in getUserWord()). The fact that array syntax is used does not mean that a pointer and array are the same thing. It just means they can be worked on using the same syntax.\nThe important thing to realise, however, is that a pointer can be returned from a function (and the returned value assigned to, or used to initialise, another pointer) but an array cannot. So, in main() this is legal;\n char *p = getUserWord();\n p[0] = 'X'; /* will change str[0] in getUserWord() */\n\nbut this will not be;\n char array[20] = getUserWord();\n\nA:\n\nArrays cannot be assigned in C. This is mandated by the C Standard1. The lvalue in your second example is baseWord and has the type char[21] which is an array.\nIn your first example, when you return str, which has the type static char[20], it is converted to the type char* and can be returned from the function and assigned to pointer baseWord. Since str has static storage duration, the pointer points to a valid object.\nIf you want to return a non-static string, you can allocate it (using the function malloc), pass an existing string to a function or wrap the string with a struct.\n\n1(Quoted from: ISO:IEC 9899:201X 6.3.2.1. Lvalues, arrays, and function designators 1 )\nA modifiable lvalue is an lvalue that\ndoes not have array type, does not have an incomplete type, does not have a const-\nqualified type, and if"}
+{"output_text": "et static\n address 192.168.1.1\n netmask 255.255.255.0\n gateway 192.168.1.1\n dns-nameservers 192.168.1.1\n dns-search mydomain.com\n\nauto eth1\niface eth1 inet static\n address 192.168.1.2\n netmask 255.255.255.0\n gateway 192.168", "input_text": "Wrapper PropertyName=\"FirstName\">\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n\nErrorTextBoxStyle\n\n\n Q:\n\nHow do I connect a LXC container to an IP alias?\n\nI currently have 3 IP addresses going to the same server. The /etc/network/interfaces file on the host is as follows: \nauto eth0\niface eth0 in"}
+{"output_text": ", which is not a good practice.\nclass User {\n constructor(name, id, age) {\n this.name = name;\n this.id = id;\n this.age = age;\n }\n\n addUser(user) {\n this.users.push(user);\n }\n\n getUsersAboveTwenty() {\n return this.users.filter(user => user.age > 20);\n }\n", "input_text": " internally, and potentially has some advantages over the glTexImage2D() approach.\n\n Q:\n\nCreate User Class\n\nCreate a user class with id, name, age. Write a function to get users older than age 20. Group all users with same age and increment users age by 3 \nIs there a cleaner way to write this? Any comments are appreciated.\nconst userList=[];\nconst userAboveTwenty= [];\n\nclass User {\n constructor(name,id,age){\n this.name=name;\n this.id=id;\n this.age=age;\n }\n\n addUser(user){\n userList.push(user);\n }\n\n getUserListAboveTwenty(list){\n userAboveTwenty.push(...list.filter(x=>x.age>20));\n}\n\naddAge(user){\n return user.age = user.age+3;\n}\n}\n\nlet user1 = new User('user1',1,12);\nlet user2 = new User('user2',2,18);\nlet user3 = new User('user3',3,21);\nlet user4 = new User('user4',4,22);\n\nuser1.addUser(user1);\nuser2.addUser(user2);\nuser3.addUser(user3);\nuser4.addUser(user4);\nuser1.addAge(user1);\nuser1.getUserListAboveTwenty(userList);\nuser1.addAge(user1);\n```\n\nA:\n\nYour User class should only be dealing with things about that user, not about how you store it in a list. You are also referring to a variable outside your class"}
+{"output_text": ", bar):\n self._cat = Cat(foo)\n self._zombie = ZombieCat(foo, bar)\n self._schroedinger = SchroedingerCat(foo, bar)\n\n def __getattr__(self, name):\n if name == 'turn_to_zombie':\n return self._zombie.turn_to_zombie(self._cat.bar)\n elif", "input_text": "')\n\nWhen googling I came across the strategy pattern. This also works but feels a bit messier than creating a child class. For example to override an additional method when the cat is a zombie it requires changes in 3 places instead of 1.\nFeel free to suggest other patterns, I'm sure there are things I have not considered yet.\n\nEdit:\nAfter a helpful answer from @martineau I'd like to add that it would be useful if any references to a Cat instance are updated when.turn_to_zombie is called, i.e.\ncats_list1 = [cat1, cat2]\ncats_list2 = [cat1, cat2]\ncats_list1[0].do_things() # -> Do cat things\ncats_list1[0].turn_to_zombie('bar')\ncats_list2[0].do_things() # -> Do zombie cat things\n\nA:\n\nSomething like that, I think:\nclass Cat:\n def __init__(self, foo):\n self.foo = foo\n\n def do_things(self):\n print('Do cat things')\n\n def turn_to_zombie(self, bar):\n self.bar = bar\n self.__class__ = ZombieCat\n\nclass ZombieCat(Cat):\n def __init__(self, foo, bar):\n super().__init__(foo)\n self.bar = bar\n\n def do_things(self):\n print('Do zombie cat things')\n\nclass SchroedingerCat:\n _cat = Cat\n _zombie = ZombieCat\n _schroedinger = None\n\n def __init__(self, foo"}
+{"output_text": "erationLimit to -1 didn't work.\n\nA:\n\nYou can use the Format-List cmdlet to format the output of the Get-ADUser cmdlet.\nGet-ADUser -Filter * -Properties * |\n Select-Object @{n='User';e={$_.Name}},\n @{n='Hash';e={$_.Hash}},\n @{n='Frequency';e={$_.Frequency}},\n @{n='Hash.To", "input_text": ".Stop()\n Write-Verbose \"Function Match-ADHashes completed in $($stopwatch.Elapsed.TotalSeconds) Seconds\"\n }\n\n end {\n $mrMatchedResults\n }\n}\n\nI tried commenting out | % {$htADNTHashes[$_.Hash.toUpper()] += @($_.User)} which seems to be close, but that somehow removed the Frequency column. \nThe results look like this:\nUser Frequency Hash \n---- --------- ---- \n{TestUser2, TestUser3} 20129 H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1\n{TestUser1} 1 H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2\n\nI would like them separated:\nUser Frequency Hash \n---- --------- ---- \n{TestUser2} 20129 H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1\n{TestUser3} 20129 H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1H1\n{TestUser1} 1 H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2H2\n\ni'm sure this is a simple change, but i have very little powershell experience.\nThe suggestion to change $FormatEnum"}
+{"output_text": " list = new ArrayList();\n while (c.moveToNext()) {\n list.add(c.getString(0));\n }\n ArrayAdapter adapter = new ArrayAdapter(this,\n android.R.layout.simple_list_item_1, list);\n setListAdapter(adapter);\n\nI want to display the Column Name with a ListView, but I don't know how to", "input_text": "\n ELSE ''\n END AS AgentEmail,\n CASE WHEN 1 = 1\n THEN ( SELECT TOP 1\n iGroupID\n FROM AssignLeadUser\n WHERE iLeadID = objTemp.iLeadID\n )\n ELSE ''\n END AS GroupID,\n CASE WHEN 1 = 1\n THEN ( SELECT TOP 1\n sName\n FROM [Group]\n WHERE iGroupID = ( SELECT\n iGroupID\n FROM AssignLeadUser\n WHERE\n iLeadID = objTemp.iLeadID\n )\n )\n ELSE ''\n END AS GroupName\n FROM @temp objTemp\n ) AS t1\n ORDER BY AlertDate ASC \n\nit gives me an output of 2013-04-04 00:00:00.000 in the AlertDate column\nI want to get only the date (no time) like this: 2013-04-04\" in the AlterDate column.\nCould anybody please help me to advice some query or update my code? \nThanks in advance\n\nA:\n\nYou can use the date type instead of datetime\n declare @temp Table\n(\niLeadID int,\nTitle varchar(Max),\nAlertDate date\n)\n\n Q:\n\nAndroid Custom ListView with ArrayAdapter possible?\n\nI have a prefilled DB in Assets, that will be copied and opened after App start.\nI have a activity who Displays the Column Name with rawQuery \nCursor c = database.rawQuery(\"SELECT _id, Name from DB\n ORDER BY Name ASC\", null);\n\n ArrayList"}
+{"output_text": " semaphore table.\n * @param semaphore index of semaphore to be printed\n * @param threadIndex index of thread to be printed\n * @param threadName name of thread to be printed\n * @param threadState state of thread to be printed\n * @param threadPriority priority of thread to be printed\n * @param threadStackSize size of stack of thread to be printed\n * @param threadStackSizeStackSize size of stack of thread to be printed", "input_text": "ys a semaphore.\n *\n * A call to this function while threads are waiting on the semaphore should fail.\n * That is the removal process should fail with an appropriate error message. \n * If there are no threads waiting, this function will proceed with the removal\n * after checking whether the current value is the same as the initial value of \n * the semaphore. If the values are different, then a warning message is \n * printed before the semaphore is destroyed.\n * @param semaphore index of semaphore to be manipulated in the table \n * \n */\nvoid destroy_semaphore(int semaphore){\n //if trying to access a semaphore that doesn't show or is inactive handle it\n if(semaphore > semaphoresIndex || semaphores[semaphore].active ==0)\n handle_error(\"Wrong semaphore index in destroy()\");\n //initil and final value check\n if(semaphores[semaphore].value!= semaphores[semaphore].initialValue){\n puts(\"\\nWARNING: Destroying a semaphore with different initial and final values!\\n\");\n }\n //check that there are no threads waiting on this baby\n if(!list_empty(semaphores[semaphore].waitingThreads)){\n printf(\"Semaphore %i was not destroyed since one or more threads are waiting on it..\\n\",semaphore);\n }\n //destroy it by setting it to inactive!\n else{\n semaphores[semaphore].active = 0;\n }\n}\n/**\n * Prints the state of all threads that are maintained by the"}
+{"output_text": " c c c | j j j j |\n+ + + + + + + + + + + + + + + + +\n| m | T T | h h h h | c c c c c | j j j j |\n+ + + + + + + + ", "input_text": "\n\n next = __next__ # for compatibility with Python 2\n\nI also made a nicer output method (render_board) to have a 2D rendering of the board. This is a 16X16 3 trees per row and per column and 1 tree per region puzzle:\n\n+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n| L L L L | G G G | y | z z z z z | K K K |\n+ + + +---+ + + + +---+ + + +---+ + + +\n| L L L | h | G G G | y y | z z z | w | K K K |\n+---+ +---+ +---+ +---+ + + + + + +---+---+---+\n| m | L | h h h | G | y y y | z z z | w w | P | l |\n+ +---+ + + +---+---+---+---+ + +---+---+---+ +---+\n| m m | h h h h | b | k k | z z | j | P P P P |\n+ +---+---+ + + +---+---+---+---+---+---+ + + +---+\n| m | T T | h h h h | c c"}
+{"output_text": " create a new Leg, I create a new instance of the Leg class. This ensures that the Leg class is not shared between the Journey class and the drawing panel.\nI created a method to draw the Legs on the drawing panel. This method is called from the SwingUtilities invokeLater method.\nI created a method to move the Legs on the drawing panel. This method is called from the SwingUtilities invokeLater method.\nI created a method to", "input_text": ",2000,1000,2000,1000,2000,1000};\n\n for (int i=0; i<10; i++){\n label.setText(name[i]); \n label.setLocation((label.getLocationOnScreen().x+50),0);\n Thread.sleep(time[i]); \n\n } \n }catch(Exception ae){\n\n }\n }\n});\n\nt.start();\n}\n\npublic static void main(String[]args){\n new Move(); \n }\n}\n\nA:\n\nRather than trying to move a Swing component, you can draw an image on a JPanel and move the image.\nHere's the GUI I created.\n\nYou must start a Swing application with a call to the SwingUtilities invokeLater method. This method puts the creation and usage of all the Swing components on the Event Dispatch thread (EDT).\nWhenever you try to coordinate 2 or more arrays, you should consider creating a model class. I created the Leg class to hold the name and the delay. That way, I only had to create the one List in the Journey class.\nI created a DrawingPanel from a JPanel. Always create your GUI on a JPanel. Never create your GUI directly on a JFrame.\nRun your animation in a separate Runnable, Thread, or Swing Timer. The GUI runs on its own thread, and your animation code has to run in a different thread, or you block the GUI from updating.\nSince the animation is running in a separate thread, the setting of the Leg in the drawing panel is enclosed in a SwingUtilities invokeLater method. This ensures that the drawing happens on the Event Dispatch thread (EDT).\nWhen I"}
+{"output_text": "'s question is about the 1st meaning.\nThe usage of \"wavefunction\" in QFT\nThe 1st meaning is the one that is usually used in QFT. The reason is that the 1st meaning is the one that is most useful in QFT. The 2nd meaning is not useful in QFT.\nThe 1st meaning is the one that is most useful in QFT because it is the one that is most useful in QFT. The 2nd meaning is not", "input_text": "ativistic limit, This reduces to 1) apart from the normalization factor. However, in general, this might be negative at some point x, even if we have only a particle from the outset, excluding antiparticles.\nHow should I interpret this result? Is it related to the fact that we cannot localize a particle with the length scale smaller than Compton wavelength ~ $1/m$? (Even so, I believe that, to reduce QFT into QM in some suitable limit, there should be something that reduces to the probability distribution over space when we average it over the length $1/m$... )\n\nA:\n\nThe following does not completely answer OP's question, rather, this is going to be a clarification of subtleties and difficulties on the issue. Notice that sometimes I am going to use the same notations as OP used, but not necessarily the exact same meanings and I will make them clear in the context.\nThe usage of \"wavefunction\"\nIt has two possible meanings when people refer to something as wavefunctions :\n(1). The collection of some functions $g(x)$ furnishes a positive-energy, unitary representation of the underlying symmetry group(in our case just the Poincare group). \n(2). In addition to (1) being satisfied, we should be able to interpret $|g(x)|^2$ as the probability distribution of finding the particle in $(\\mathbf{x},\\mathbf{x}+d\\mathbf{x})$. It really has to be of the form $|g(x)|^2$ according to the standard axioms of quantum mechanics, provided you interpret $g(x)$ as an inner product $\\langle x|g\\rangle$ where $\\langle x|$ is an eigen bra of the position operator. I will discuss what position operator means later.\nThe 2nd meaning is of course much stronger and OP"}
+{"output_text": "\necho \"\";\n\n$point1 = array(\"lat\" => $latitude, \"long\" => $longitude); \n$point2 = array(\"lat\" => $row_Merchant['latitude'], \"long\" => $row_Merchant['longitude']); \n$km = distanceCalculation($point1['lat'], $point1['long'], $point2['lat'], $point2['long']); // Calculate distance in kilometres (default)\n"}
+{"output_text": " html page is coming from database.\n\nA:\n\nI have used this library to convert html to pdf.\nhttps://github.com/jasperfx/jasperfx\nI have used this library to convert html to pdf.\nhttps://github.com/jasperfx/jasperfx\nI have used this library to convert html to pdf.\nhttps://github.com/jasperfx/jasperfx\nI have used this library to convert html to", "input_text": "Screen(\n Crud.eDelete, snapshot.data[index])))),\n ]);\n });\n } else if (snapshot.hasError) {\n return Text(\"${snapshot.error}\");\n } else {\n return new Text(\"No data in table\");\n }\n },\n ),\n ),\n bottomNavigationBar: BottomNavigationBar(\n onTap: (int index) {\n if (index == 1) {\n Navigator.of(context).pop();\n }\n },\n items: [\n BottomNavigationBarItem(\n icon: Icon(Icons.info),\n title: Text(\"Items = $this.itemCount\")), // title: Text(\"\")),\n BottomNavigationBarItem(\n icon: Icon(Icons.add),\n title: Text('Create'),\n ),\n ],\n ));\n }\n'''\n\nA:\n\nIn your state class add at top\nint count = 0;\n\nadd the code\n WidgetsBinding.instance\n .addPostFrameCallback((_) {\n setState(){\ncount = snapshot.data.length;\n}\n});\n\nbetween these two lines \nelse if (snapshot.hasData) {\nreturn ListView.builder(\n\nand change the title property to \ntitle: Text(\"Items = $count\")),\n\n Q:\n\nConvert HTML to PDF in ASP.NET MVC\n\nIm working in a project which requires current html page to convert in pdf and that pdf will automatically save on button click on server and its reference will be save in database.I can convert the view if its data comes from data base but the data in"}
+{"output_text": ": 'dataSet3',\r\n data: [{\r\n x: 0,\r\n y: 21\r\n }, {\r\n x: 1,\r\n y: 22\r\n }, {\r\n x: 2,\r\n y: 24\r\n }, {\r\n x: 3,\r\n y: 25\r\n }, {\r\n x: 4,\r\n y: 23\r\n }, {\r\n x: 5,\r\n y: 22\r\n },", "input_text": "\r\n \r\n \r\n
\r\n \r\n \r\n dataSet4 \r\n \r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \n \n ;\n }\n}\n\nA:\n\nIt turns out you need to do two things:\nFirst, pass the props into the component, as described by Joe Savona. I'm using react-relay-router, so for me that was a matter of adding this line\n\n \n props? : }/> // <--- this line\n \n\nSecond, you must inject the variable's values into the getFragment function call, like so:\nfragments: {\n Viewer: (variables) => Relay.QL`\n fragment on Viewer {\n store(id: $id) @include(if: $update) {\n id,\n number\n ${StoreTIcketList.getFragment('Store', {... variables})} // <---- this thing!\n }\n }\n`\n}\n\nNote that if you're using getFragment inside of your root query, variables will be argument number two:\nconst NodeViewerQuery = {\n node: (component, variables) => Relay.QL`query { // <---- extra \"component\" argument\n node(id: $id) {\n ${component.getFragment('node', {...variables})}\n }"}
+{"output_text": " want to allow the user to upload an image and then display it in a form. The problem is that when I hit the back button, the form is displayed again and the image is resubmitted.\nI'm using Django 1.11.\nHere is my code:\nmodels.py\nclass Image(models.Model):\n image = models.ImageField(upload_to='images/')\n title = models.CharField(max_length=100)\n", "input_text": "Mary Landrieu (Louisiana, 4.49m)\nJoe Lieberman (Connecticut, 3.48m)\nBen Nelson (Nebraska, 1.75m)\nMark Pryor (Arkansas, 2.78m)\nKen Salazar (Colorado, 4.66m)\n\nSo the Democratic members represented a total of 20.22 million people, or about 6.8%. The three least populous states represented (the minimum number that would have to defect from the deal for cloture to fail) contain just 4.81 million people, or about 1.6% of the total population.\nThe full gang represented about 17.5% of the American population, and successfully thwarted the leadership of both parties on the issue (but only for that one Congress).\nThis is, however, not actually legislation. But confirming judges is at least a core constitutional power and responsibility of the Senate, and cloture rules have been very important to them in recent memory.\nThe Grim Reaper (~1.37%)\nThe Senate Majority leader sets the schedule of the Senate, and so can unilaterally decide which pieces of legislation get debated and which do not. And Mitch McConnell is presently doing exactly that (not that other Senate or House leaders from both parties hadn't done it before him). Mitch McConnell is currently happy to call himself the Grim Reaper, and that the Senate is a graveyard for the legislation passed by the Democrat House. Mitch McConnell represents Kentucky, population 4.47m, which is less than 1.4% of the current US population.\n\n Q:\n\nDjango CreateView allows resubmission of the data when the form is displayed when hiting the back button\n\nI'm trying to make an app with an upload image. The thing is that I"}
+{"output_text": "\n \n \n \n \n \n \n \n \n \n \n \n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n "}
+{"output_text": " ormFactory;\n }\n\n public function can_apply_extension($name) {\n return $this->ormFactory->create($name);\n }\n}\n\nThis way you can test the class without the static dependency.\n\nA:\n\nI think you can use the Dependency Injection pattern to achieve this.\nYou can create a factory class that will return the ORM instance based on the name of the class.\npublic class ORM", "input_text": "::factory() actually returns an object, I was able to add a method and modify the factory method.\npublic function testing($bool)\n{ \n $this->_testing = $bool;\n}\n\npublic function instead($when_this_passed, ORM $use_this_instead)\n{\n $this->_instead_map[$when_this_passed] = $use_this_instead;\n}\n\npublic function factory($name)\n{\n if($this->_testing && array_key_exists($name, $this->_instead_map))\n {\n return $this->_instead_map[$name];\n } \n else\n {\n parent::factory($name);\n }\n}\n\nA:\n\n(I've not coded in PHP recently, my examples are Java or Java-like pseudocode.)\nIn his Working Effectively with Legacy Code book Michael C. Feathers describes a lot of techniques which help making any code testable. Another good resource is the following article: Killing the Helper class, part two\nThe usual way to breaking static dependencies is the following: Create a non-static interface which has a similar method than the original static class:\npublic interface OrmFactory {\n OrmSomething create($name);\n}\n\nThen create an implementation which calls the static method/class:\npublic class OrmFactoryImpl implements OrmFactory {\n public OrmSomething create($name) {\n return ORM::factory($name);\n }\n}\n\nFinally, use the interface in the can_apply_extension function:\npublic class MyClass {\n\n private OrmFactory ormFactory;\n\n public MyClass(OrmFactory ormFactory) {\n this.ormFactory ="}
+{"output_text": "ext.targetSdkVersion\n versionCode 1\n versionName \"1.0\"\n ndk {\n abiFilters \"armeabi-v7a\", \"x86\"\n }\n }\n splits {\n abi {\n reset()\n enable enableSeparateBuildPerCPUArchitecture\n universalApk false // If true, also generate a universal APK\n include \"armeabi-v7", "input_text": " com.android.build.api.attributes.BuildTypeAttr'stagingrelease' and found incompatible value'release'.\n - Other attributes:\n - Found com.android.build.api.attributes.VariantAttr'release' but wasn't required.\n - Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.\n - Required org.gradle.usage 'java-runtime' and found compatible value 'java-runtime'.\n\nSnippets of android/app/build.gradle \nproject.ext.envConfigFiles = [\n debug: \".env\",\n release: \".env.production\",\n stagingrelease: \".env.staging\",\n]\napply from: project(':react-native-config').projectDir.getPath() + \"/dotenv.gradle\"\n\nproject.ext.react = [\n entryFile: \"index.js\",\n enableHermes: false, // clean and rebuild if changing\n]\n\napply from: \"../../node_modules/react-native/react.gradle\"\n\ndef enableSeparateBuildPerCPUArchitecture = false\n\ndef enableProguardInReleaseBuilds = true\n\ndef enableHermes = project.ext.react.get(\"enableHermes\", false);\n\nandroid {\n compileSdkVersion rootProject.ext.compileSdkVersion\n\n compileOptions {\n sourceCompatibility JavaVersion.VERSION_1_8\n targetCompatibility JavaVersion.VERSION_1_8\n }\n\n defaultConfig {\n applicationId \"com.furry\"\n minSdkVersion rootProject.ext.minSdkVersion\n targetSdkVersion rootProject."}
+{"output_text": "active\", event: \"active\" });\n };\n\n render() {\n const { user, system, event } = this.state;\n const { expandedRows } = this.props;\n\n return (\n \n
\n
\n
\n \n \n
\n \n {new Date(item.appUpdatedAt).toLocaleString()}\n \n \n \n ];\n\n if (this.state.expandedRows.includes(key)) {\n itemRows.push(\n
\n \n \n \n \n
\n
Upcoming Event \n \n
\n \n 34%\n \n
\n
\n \n 45Competitors \n \n \n You can participate in event{\" \"}\n \n \n \n \n \n \n );\n }\n\n return itemRows;\n }\n\n onClickfn = () => {\n this.setState({ user: \"active\", system: \""}
+{"output_text": "\n onPressed: () {\n pressed = true;\n },\n child: Text('Sign in'),\n );\n\nvoid main() {\n testWidgets('my first widget test', (WidgetTester tester) async {\n await tester.pumpWidget(\n MaterialApp(\n home: Scaffold(\n appBar: AppBar(\n title: Text('my first widget test'),\n ),\n", "input_text": "/src/backend/invoker.dart:399:25)\n
\n#45 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)\n#46 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)\n#47 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)\n(elided 28 frames from class _FakeAsync, package dart:async, and package stack_trace)\n\nThis was caught by the test expectation on the following line:\n file:///home/hans/Development/flutter/recipes_app/test/widget_test.dart line 30\n\nThe test description was:\nmy first widget test\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n00:01 +0 -1: my first widget test [E] \n Test failed. See exception logs above.\n The test description was: my first widget test\n\n00:02 +0 -1: Some tests failed.\n\nAny ideas why the test fails?\n\nA:\n\nYour closure is wrong:\n() => () {\n pressed = true;\n },\n\nYou need to write it either like that\n() {\n pressed = true;\n},\n\nOr like that\n() => ( pressed = true )\n\nAnd you need to trigger the tester.tap method.\nThat's my working code:\nvar pressed = false;\nvar widget = GoogleSignInButton("}
+{"output_text": "D\n\nA:\n\nI would use the second method.\nThe first method is a bit messy. You have to create a new array every time you want to add a listener.\nThe second method is cleaner. You can add as many listeners as you want.\nThe second method is also more flexible. You can add as many listeners as you want.\nThe second method is also more efficient. You don't have to create a new array every time you want to add a", "input_text": "public void actionPerformed(ActionEvent e) {\n buttonPressed = 4;\n }\n });\n}\n\nMethod 2:\nView Class ActionListener method:\npublic void addMovementListeners(ActionListener a){\n moveUp.addActionListener(a);\n moveDown.addActionListener(a);\n moveLeft.addActionListener(a);\n moveRight.addActionListener(a);\n}\n\npublic JButton[] getButtons(){\n JButton[] temp = new JButton[4];\n temp[0] = moveUp;\n temp[1] = moveDown;\n temp[2] = moveLeft;\n temp[3] = moveRight;\n\n return temp;\n}\n\nControl Class add ActionListener method:\nJButton[] movementButtons;\n\nprivate void addListeners(){\n movementButtons = viewGUI.getButtons();\n viewGUI.addMovementListeners(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n if(e.getSource() == movementButtons[0]){\n buttonPressed = 1;\n }else if(e.getSource() == movementButtons[1]){\n buttonPressed = 2;\n }else if(e.getSource() == movementButtons[2]){\n buttonPressed = 3;\n }else if(e.getSource() == movementButtons[3]){\n buttonPressed = 4;\n }\n }\n });\n}\n\nWhich method is better? Is there another method that is even better than these two? Let me know! Trying to get this MVC thing down :"}
+{"output_text": " each user.\nI have tried to debug this by adding a debug statement to the loop and it seems to be executing the loop correctly.\nI have also tried to debug by adding a debug statement to the create_users method and it seems to be executing the create_users method correctly.\nI have also tried to debug by adding a debug statement to the create_users method and it seems to be executing the create_users method correctly.\nI have also tried to debug by adding a", "input_text": " the touch-active areas for that page. For handling the touches the following simple solution can be used:\n- (void) tapGesture:(UIGestureRecognizer*)sender\n{\nif (UIGestureRecognizerStateEnded == sender.state) {\n CGPoint touchPoint = [sender locationInView:self.view];\n\n if (nil!= self.touchRects) for (int i=0; i<[self.touchRects count]; i++) {\n if (CGRectContainsPoint([[[self.touchRects objectAtIndex:i] objectForKey:@\"rect\"] CGRectValue], touchPoint)) {\n if ([[self.touchRects objectAtIndex:i] objectForKey:@\"targetUrl\"]) {\n NSString* targetUrl = [[self.touchRects objectAtIndex:i] objectForKey:@\"targetUrl\"];\n DLog(@\"Hit found for target url: %@\", targetUrl);\n NSURL* url = [NSURL URLWithString:targetUrl];\n [[UIApplication sharedApplication] openURL:url];\n } return;\n } \n }\n DLog(@\"No hit found for touch at %@\", NSStringFromCGPoint(touchPoint));\n}\n} \n\n Q:\n\nWhat is the correct way to loop in a Chef (solo) recipe?\n\nCan someone please explain to me how chef works? That is a pretty broad question, so to narrow it down I have this very simple recipe that loops over a list of users and creates each one if they do not already exist. It does not work. \nFrom what I can tell the loop seems to be happening as I would expect. Once the loop has completed my bash commands to create each user are executed, once for"}
+{"output_text": "\nI ended up creating a custom UIImageView that would handle the scaling of the image and the AVPlayer. I did this by creating a custom UIImageView that would handle the scaling of the image and the AVPlayer. I did this by creating a custom UIImageView that would handle the scaling of the image and the AVPlayer. I did this by creating a custom UIImageView that would handle the scaling of the image and the AVPlayer. I did this by creating a custom U", "input_text": " time in the composition without having a small scrubbing glitch. Further I had a problem with pausing the video exactly between two videos in the composition since the API could not provide frame guarantee for pausing.\nThe third with having two AVPlayers and let them take turns worked great in practice. Exspecially on iPad 4 or iPhone 5. Devices with lower amount of RAM was a problem though since having several videos in memory at the same time consumed too much memory. Especially since I had to deal with videos of very high resolution.\nWhat I ended up doing\nWell, left was option number 2. Creating an AVPlayerItem for a video when needed and feeding it to the AVPlayer. The good thing about this solution was the memory consumption. By lazy creating the AVPlayerItems and throwing them away the moment they were not longer needed in could keep memory consumption to a minimum, which was very important in order to support older devices with limited RAM. The problem with this solution was that when going from one video to the next there a blank screen for at quick moment while the next video was loaded into memory. My idea of fixing this was to put an image behind the AVPlayer that would show when the player was buffering. I knew I needed images that we exactly pixel to pixel perfect with the video, so I captured images that were exact copies of the last and first frame of the videos. This solution worked great in practice.\nThe problem with this solution\nI had the issue though that the position of the image inside the UIImageView was not the same as the position of the video inside the AVPlayer if the video/image was not its native size or a module 4 scaling of that. Said other words, I had a problem with how half pixels were handled with a UIImageView and a AVPlayer. It did not seem to be the same way.\nHow I fixed it"}
+{"output_text": " 3 F 20 CA 2.735863179191E-17 5.471726358381E-17 -5.000000000000E-01\n 4 F 20 CA 5.000000000000E-01 5.000000000000E-01 5.000000000000E-01\n 5 F 20 CA 5.000000000000E-01 5.000000000000E-01 5.000000000000E-01\n 6", "input_text": "-03 2.500000000000E-01 -4.927088991116E-01\n 8 F 8 O 4.927088991116E-01 7.291100888437E-03 -2.500000000000E-01\n 9 F 8 O -2.500000000000E-01 4.927088991116E-01 7.291100888437E-03\n 10 F 8 O 7.291100888437E-03 -2.500000000000E-01 4.927088991116E-01\n\n TRANSFORMATION MATRIX PRIMITIVE-CRYSTALLOGRAPHIC CELL\n 1.0000 0.0000 1.0000 -1.0000 1.0000 1.0000 0.0000 -1.0000 1.0000\n\n *******************************************************************************\n CRYSTALLOGRAPHIC CELL (VOLUME= 363.43040599)\n A B C ALPHA BETA GAMMA\n 4.98494429 4.98494429 16.88768068 90.000000 90.000000 120.000000\n\n COORDINATES IN THE CRYSTALLOGRAPHIC CELL\n ATOM X/A Y/B Z/C\n *******************************************************************************\n 1 T 20 CA 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00\n 2 F 20 CA -5.471726358381E-17 -2.735863179191E-17 -5.000000000000E-01\n"}
+{"output_text": "_LANGUAGE_NAME_SPANISH];\nlabel.position = ccp(0, 0);\nlabel.color = ccc3(255, 255, 255);\nlabel.fontSize = 20;\nlabel.fontName = \"Arial\";\nlabel.fontColor = ccc3(255, 255, 255);\nlabel.alignment = ccc(1, 0);\nlabel.visible = YES;\n[self addChild:label];\n", "input_text": "self languageSelectedStringForKey:@\"Date\"];\n cell.labelHomeList.text=[self languageSelectedStringForKey:@\"Time\"];\n}\n\nFinally if you want to change the language to other language.For example in (Settings) table you have two languages.If you want to change it to other languages please follow the below coding\n- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath\n{ \n AppDelegate *app=(AppDelegate *)[[UIApplication sharedApplication]delegate];\n app.selectedrow=indexPath.row;\n if (indexPath.row==0)\n {\n app.currentLanguage=ENGLISH;\n [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@\"en\", nil]forKey:@\"AppleLanguages\"];\n [[NSUserDefaults standardUserDefaults] synchronize];\n NSLog(@\"%d\", [[NSUserDefaults standardUserDefaults] synchronize]);\n }\n else \n {\n app.currentLanguage=CHINESE1;\n [[NSUserDefaults standardUserDefaults] setObject:[NSArray arrayWithObjects:@\"zh-Hant\", nil]forKey:@\"AppleLanguages\"];\n [[NSUserDefaults standardUserDefaults] synchronize];\n }\n}\n\nit works perfectly.\n\nA:\n\nI think that this will solve your problem.\nI had the same problem 1 month ago.\nYou can follow this tutorial.\nExample:\nIn your.strings file you put translation: \"hello\" = \"HOLA MUNDO\";\n#import \"LocalizationSystem.h\"\n\nLocalizationSetLanguage(@\"Spanish\");\nCCLabel* label = [CCLabel labelWithString:AM"}
+{"output_text": "\n\nsimulate this circuit \u2013 Schematic created using CircuitLab\n\nA:\n\nA current source is a voltage source with infinite output impedance.\nA voltage source is a current source with zero output impedance.\n\nA:\n\nA current source is a voltage source with infinite output impedance.\nA voltage source is a current source with zero output impedance.\n\nA current source is a voltage source with infinite output impedance.\nA voltage source is a current source with zero output impedance", "input_text": " there was a note that the section appeared to contradict itself. I didn't want to get confused.)\nI can think of voltage sources - for example a battery which has a constant potential difference across its ends irrespective of the changes in the circuit it is connected to, but I cannot think of a current source. Any example I can think of involves change in the current when the resistances are changed.\n\nA:\n\nA current source is the dual of a voltage source. An ideal voltage source has zero output impedance, so that the voltage doesn't drop under load. It shouldn't be shorted, because in theory there would flow an infinite current.\nAn ideal current source has infinite output impedance. This means that the load's impedance is negligible and won't influence the current flowing. Like voltage sources shouldn't be shorted, current sources shouldn't be left open. An open current source will still try to source the set current, and the theoretical current source will go to infinite voltage. \nedit (following your comment)\nHere you can read impedance as resistance. If the current source would have a limited resistance changes in load would change the current, because the total resistance would change. You don't want that. So if the current source's resistance is infinite the load can be ignored and the resistance always remains the same (infinite). Therefore the current will as well.\nA practical current source may be constructed as follows: \n\nOne diode has the same voltage drop as the base-emitter junction, so the other diode sets the transistor's emitter to about 0.7V. A fixed voltage across a fixed resistor gives a fixed emitter current, which is about the same as the collector current if the transistor's \\$H_{FE}\\$ is high enough. (Strictly speaking this is a current sink rather than a current source, but the principle remains the same.) "}
+{"output_text": "form-control\" onchange=\"random()\">\r\n Sample ID \r\n Facility \r\n User \r\n Affiliation \r\n Status \r\n BTR \r\n Type \">sampleid);?>\r\n \r\n \n\nA:\n\nHere is what you need to do.\n\nUse quotes around the IDs of the datalists\nUse setAttribute of the list attribute of the input\n\nfunction random() {\r\n var a = document.getElementById('search').value,\r\n datalist = \"datalist1\";\r\n if (a === \"sampleid\") {\r\n datalist = \"datalist1\";\r\n } else if (a === \"facility\") {\r\n datalist = \"datalist1\";\r\n } else if (a === \"user\") {\r\n datalist = \"datalist2\";\r\n } else if (a === \"affiliation\") {\r\n datalist = \"datalist3\";\r\n } else if (a === \"status\") {\r\n datalist = \"datalist1\";\r\n } else if (a === \"btr\") {\r\n datalist = \"datalist2\";\r\n } else if (a === \"type\") {\r\n datalist = \"datalist3\";\r\n }\r\n \r\n const inp = document.getElementById('option');\r\n inp.value=\"\";\r\n inp.setAttribute(\"list\", datalist)\r\n\r\n}\n \n\n {% endif %}\n \n{% endfor %}\n\nAnd here are the template tag and filter\nregister = template.Library()\n@register.inclusion_tag('photos/photos_tags.html')\ndef photos_up(request, number=1):\n a = PhotoUpload.objects.filter(user__username=request).exists()\n if a:\n return {'form': PhotoUploadForm(),\n 'photos': PhotoUpload.objects.filter(\n user__username=request\n ).order_by(\n '-pause_upload')[:number]\n }\n else:\n return {'form': PhotoUploadForm(),\n 'photos': PhotoUpload.objects.all()[:number]\n }\n\nregister = template.Library()\n@register.filter(expects_localtime=True)\ndef elapsed(time, seconds):\n return time + timezone.timedelta(seconds=seconds) < timezone.now()\n\nEverything is working as expected unless a user decides to hit the back button from the success page. Then the upload page will go again into the form view instead to go to the counter.\n\nA:\n\nYou can put an attribute in your database as lastuploaded (DateTimeField) and when user uploads a photo check that if lastuploaded is one day before current time.\nEDIT: \nadd a lastuploaded field to your model.\nclass PhotoUpload(models.Model):\n last_uploaded"}
+{"output_text": " threshold) {\n return (lhs & rhs).area() > threshold;\n}\n\nHow to merge overlapping rectangles?\nWe can use the union operator to merge the two rectangles:\ncv::Rect union(const cv::Rect& lhs, const cv::Rect& rhs) {\n return cv::Rect(lhs.x + rhs.x, lhs.y + rhs.y, lhs.width + rhs.width, lhs", "input_text": "\n\nFor high-precision you could use the TickClock with microsecond ticks:\nClock microsecondClock = Clock.tick(Clock.systemUTC(), Duration.ofNanos(1000));\n\nor subclass Clock and implement your own high precision clock, i.e. by using System.currentTimemillis() and System.nanoTime().\n\n Q:\n\nHow to merge bounding boxes with groupRectangle?\n\nI have an image with bounding boxes like so:\n\nI want to merge overlapping bounding boxes. \nI tried: cv::groupRectangles(detected, 1, 0.8)\nMy expectation was that I get a single box for each cluster. \nBut I got this:\n \nAs you can see, the problem is, there is no box for the dartboard in the middle and for the right one.\nHow do I resolve this? I would preferably like to use the OpenCV api rather than coding my own merging algorithm. \nI see that it eliminates regions bounded by exactly one box. I want it to not do that. \nI have tried tweaking the parameters randomly but I've gotten much worse results. I would love some guidance in the right direction. \n\nA:\n\nHow to define overlapping rectangles?\nWe need a way to define when two rectangles overlap. We can use the | intersection operator to fine the intersection of the two rectangles, and check that it's not empty:\nbool overlap(const cv::Rect& lhs, const cv::Rect& rhs) {\n return (lhs & rhs).area() > 0;\n}\n\nIf we want to ignore small intersections, we can use a threshold over the intersection area:\nbool overlap(const cv::Rect& lhs, const cv::Rect& rhs, int"}
+{"output_text": " setState(() {\n _choiceA = _choiceA + 1;\n _choiceB = _choiceB + 1;\n });\n },\n ),\n\nA:\n\nYou can use a ListView.builder to create a list of buttons.\nYou can then use a ListView.builder to create a list of Text widgets.\nYou can then use a ListView.builder to create a list of ToggleButtons.\nYou", "input_text": " 'team A',\n textScaleFactor: 3,\n ),\n ),\n Text(\n 'team B ',\n textScaleFactor: 3,\n ),\n ],\n onPressed: (int index) {\n setState(() {\n for (int buttonIndex = 0;\n buttonIndex < isSelected1.length;\n buttonIndex++) {\n if (buttonIndex == index) {\n isSelected1[buttonIndex] = true;\n } else {\n isSelected1[buttonIndex] = false;\n }\n }\n });\n },\n\nScore buttons\n ToggleButtons(\n children: [\n Text('5 points'),\n Text('6 points'),\n Text('7 points'),\n ],\n onPressed: (int index) {\n setState(() {\n isSelected2[index] =!isSelected2[index];\n switch (index) {\n case 0:\n _choiceA = 5;\n _choiceB = 5;\n break;\n case 1:\n _choiceA = 6;\n _choiceB = 6;\n break;\n case 2:\n _choiceA = 7;\n _choiceB = 7;\n break;\n }\n });\n },\n isSelected: isSelected2,\n ),\n\nWin Button\n MaterialButton(\n shape: CircleBorder(\n side: BorderSide(\n color: Colors.black,\n width: 1.0,\n style: BorderStyle.solid)),\n color: Colors.blue,\n onPressed: () {\n"}
+{"output_text": " at com.test.eb.X.XConnection.dbOpen(XConnection.java:32)\n at com.test.eb.X.XConnection.dbOpen(XConnection.java:32)\n at com.test.eb.X.XConnection.dbOpen(XConnection.java:32)\n at com.test.eb.X.XConnection.dbOpen(XConnection.java:32)\n at com.", "input_text": "proto__: Array[]\nuuid: \"3E37E10B-74D0-4421-92AF-7A366CF3804F\"\n\nThe problem is when I try and use the clip with:\nmixer = new THREE.AnimationMixer(mesh);\nmixer.clipAction(mesh.geometry.animations[0]).play();\n\nI get the error that threejs cannot parse the trackname \".bones.position\" even though that's the name that the parseAnimation function returns? I'm super confused if anyone can point out something stupid I'm doing I would appreciate it.\n\nA:\n\nAfter playing around with the problem some more I found the reason for the error was because AnimationClip expects the bones to be named. So managed to get this error to go away by simply giving each bone a unique name before passing it into THREE.AnimationClip.parseAnimation.\n\n Q:\n\nthe JAR of this class file belongs to container 'Junit 4' which does not allow modifications to source attachements on its entries\n\nI am new to Junit framework. I am trying to invoke private method in another class from Junit test class using reflection API. I am getting below error while running JUnit test:\njava.lang.ExceptionInInitializerError\n at com.test.eb.X.XConnection.dbOpen(XConnection.java:32)\n at com.test.eb.X.admin.XRefTablePersister.getDbConnect(XRefTablePersister.java:33)\n at com.test.eb.persistence.Persister.getSortedList(Persister.java:485)\n at com.test.eb.X.entity.SearchPlan.
(SearchPlan.java:49)\n"}
+{"output_text": ".java:54)\n at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.visitTree(DefaultVisitedTree.java:104)\n at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.accept(DefaultVisitedTree.java:84)\n at org.gradle.api.internal.changedetection.state.TreeStateCache.visitTree(TreeStateCache.", "input_text": " org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)\n at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)\n at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)\nCaused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)\n at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:39)\n at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:25)\n at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:82)\n at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:71)\n at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:34)\n at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:112)\n at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:104)\n at org.gradle.util.CollectionUtils.collect(CollectionUtils"}
+{"output_text": " ) Metabolic Boost (Remove 2 drones from gas) *\n22 2 pairs of Zerglings\n24 Hatchery (3 drones on gas)\n(@100 ) Metabolic Boost (Remove 2 drones from gas) *\n26 2 pairs of Zerglings\n28 Hatchery (3 drones on gas)\n(@100 ) Metabolic Boost (Remove 2 drones from gas) *\n30 2 pairs of Zerglings\n32 Hatchery (3 drones on gas)\n", "input_text": "\nA:\n\nHere's a very detailed build whipped up that gets 5 Mutalisks @ 6:36. It's possible there is a slightly faster build for 5 muta, but this will do. As said by other users, I would not recommend this build as it leaves you open to attack for over 6 minutes. If your opponents scouts you once, you will probably die... Might be viable on certain team maps though.\nEDIT: I removed the previous 4 Muta build I had because, even though it's faster, anything less than 5 Mutas is worthless. 5 Mutas is the magic number needed to one shot your opponent's workers. If you only have 3 or 4 Mutas you will not be able to adequately harass your opponent, so it's better to wait for 5.\n\n10 SpawningPool\n10 Extractor\n9 Overlord\n10 +1 Drone on gas\n10 +1 Drone on gas\n13 +1 Drone on gas\n14 Extractor\n14 Lair\n14 +1 Drone on gas\n14 +1 Drone on gas\n14 +1 Drone on gas\n15 Overlord\n15 Spire\n14 Queen\n16 +1 Drone on minerals\n16 5x Mutalisk\n\nIn general, you should always get metabolic boost(speed zerglings) before going Lair tech. That said, here is a build (popularized by idra) that I would recommend using:\n\n9 Overlord\n14 Extractor (3 Drones asap)\n14 Spawning Pool\n15 Overlord\n16 Queen\n(@100 ) Metabolic Boost (Remove 2 drones from gas) *\n18 2 pairs of Zerglings\n20 Hatchery (3 drones on gas)\n(@100"}
+{"output_text": " : null;\n }\n }\n\n public Document Document {\n get {\n var document = _application.Document;\n return document!= null? new Document(document) : null;\n }\n }\n\n public Documentation Documentation {\n get {\n var documentation = _application.Documentation;\n return documentation!= null? new Documentation(documentation) : null;\n }\n }\n\n public Documentation", "input_text": " path);\n }\n\n public int Import(ImportType type, string path, string defFileName) {\n return _application.Import((short) type, path, defFileName);\n }\n\n public bool LoadDatabase(string path) {\n return _application.LoadDatabase(path);\n }\n\n public bool LoadLayout(string path) {\n return _application.LoadLayout(path);\n }\n\n public int Log(ImportLog action) {\n return _application.Log((short) action);\n }\n\n public void Quit() {\n _application.Quit();\n }\n\n public void RefreshAll() {\n _application.RefreshAll();\n }\n\n public void SaveDatabase() {\n _application.SaveDatabase();\n }\n\n public bool SaveLayout(string path) {\n return _application.SaveLayout(path);\n }\n\n // Properties\n public Document ActiveDocument {\n get {\n var document = _application.ActiveDocument;\n return document!= null? new Document(document) : null;\n }\n }\n\n public Window ActiveWindow {\n get {\n var window = _application.ActiveWindow;\n return window!= null? new Window(window) : null;\n }\n }\n\n public AnalysisDocs AnalysisDocs {\n get {\n var analysisDocs = _application.AnalysisDocs;\n return analysisDocs!= null? new AnalysisDocs(analysisDocs) : null;\n }\n }\n\n public Commentary Commentary {\n get {\n var commentary = _application.Commentary;\n return commentary!= null? new Commentary(commentary)"}
+{"output_text": " condition is between the UPDATE/IF and the SELECT/INSERT.\n\nA:\n\nI think you're looking for the MERGE statement.\n\nA:\n\nI think you're looking for the MERGE statement.\n\nA:\n\nI think you're looking for the MERGE statement.\nMERGE INTO \nUSING AS target\nON . = target.\nWHEN NOT MATCH", "input_text": "P support or not.\n\nWith low overhead, and higher speed, I'd bet for reliable UDP, than the bulky TCP - for developing such applications(gaming).\n\n Q:\n\nAtomic UPSERT in SQL Server 2005\n\nWhat is the correct pattern for doing an atomic \"UPSERT\" (UPDATE where exists, INSERT otherwise) in SQL Server 2005?\nI see a lot of code on SO (e.g. see Check if a row exists, otherwise insert) with the following two-part pattern:\nUPDATE...\nFROM...\nWHERE \n-- race condition risk here\nIF @@ROWCOUNT = 0\n INSERT...\n\nor\nIF (SELECT COUNT(*) FROM... WHERE ) = 0\n -- race condition risk here\n INSERT...\nELSE\n UPDATE...\n\nwhere < condition > will be an evaluation of natural keys. None of the above approaches seem to deal well with concurrency. If I cannot have two rows with the same natural key, it seems like all of the above risk inserting rows with the same natural keys in race condition scenarios.\nI have been using the following approach but I'm surprised not to see it anywhere in people's responses so I'm wondering what is wrong with it:\nINSERT INTO \nSELECT , \nFROM \nWHERE NOT EXISTS\n -- race condition risk here?\n ( SELECT 1 FROM WHERE )\n\nUPDATE...\nWHERE \n\nNote that the race condition mentioned here is a different one from the ones in the earlier code. In the earlier code, the issue was phantom reads (rows being inserted between the UPDATE/IF or between the SELECT/INSERT by another session). In the above code, the race"}
+{"output_text": "true);\n jsp = new JScrollPane(table);\n jsp.setViewportView(table);\n jsp.setPreferredSize(new Dimension(500, 300));\n return jsp;\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (result != null) {\n result.close();\n }\n if (statement != null) {\n ", "input_text": " tabbedPane;\n }\n\nCreate tables method creating a Jtable from sql table.\nprivate JScrollPane createTables(String tablename) {\n Connection con = null;\n Statement statement = null;\n ResultSet result = null;\n String query;\n JScrollPane jsp = null;\n\n try {\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/sakila\", \"root\", \"root\");\n statement = con.createStatement();\n query = \"select * from \" + tablename;\n result = statement.executeQuery(query);\n ResultSetMetaData rsmt = result.getMetaData();\n int columnCount = rsmt.getColumnCount();\n Vector column = new Vector(columnCount);\n for (int i = 1; i <= columnCount; i++) {\n column.add(rsmt.getColumnName(i));\n }\n Vector data = new Vector();\n Vector row = new Vector();\n while (result.next()) {\n row = new Vector(columnCount);\n for (int i = 1; i <= columnCount; i++) {\n row.add(result.getString(i));\n }\n data.add(row);\n }\n defTableModel = new DefaultTableModel(data, column);\n table = new JTable(defTableModel) {\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n ;\n };\n //table.setAutoCreateRowSorter("}
+{"output_text": " [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14];", "input_text": "clflush [R14+512]\nmfence\n\n# start measuring cycles\n\nmov RAX, [RAX]\nmov RAX, [RAX]\n...\nmov RAX, [RAX]\n\nmov RBX, [R14+512]\n\n# stop measuring cycles\n\nThe first 35 loads now have dependencies on each other. The measured time for this experiment is about 600 cycles.\nThe experiments were performed with all but one core disabled, and with the CPU governor set to performance (cpupower frequency-set --governor performance).\nHere are the nanoBench commands I used:\n./nanoBench.sh -unroll 1 -basic -asm_init \"clflush [R14]; clflush [R14+512]; mfence\" -asm \"mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX, [R14]; mov RAX,"}
+{"output_text": " in all, password complexity rules are a bad idea. They are a bad idea because they are not effective, and they are a bad idea because they are not secure.\n\nA:\n\nI think the best way to do this is to use a password manager.\nI use KeePass, and it's a great program. It's free, open source, and cross-platform. It's also very secure. It's a password manager, so it stores your", "input_text": " brain of the human user, so they cannot really guess how the user chooses his passwords. Similarly, \"password complexity rules\" cannot ensure strong passwords; they just try to evict the user from his comfort zone, to avoid some classic weak password generation methods. But in practice, they don't work. Randomness is hard for human brains. Humans cannot make really random choices in the privacy of their minds; instead, they make witty choices. Also, they don't like to be forced to make pseudo-random choices. When password complexity rules are in force, the usual outcome is that users create witty workarounds, resulting in passwords which comply to the rules, but are not random; thus, weak passwords.\nA typical case is when complexity rules mandate that a password shall have at least one digit and at least one punctuation sign: in practice, users react by systematically appending \"1!\" to whatever password they would have liked. So the rules make the password longer but not stronger. In fact, they even make passwords weaker because that kind of systematic suffix will still count as two characters with regards to password length. If your system enforces a minimum password length of eight characters, then people will need to choose passwords of eight characters; but if they append a systematic two-character suffix (and the attackers knows that, because the attacker is a smart guy who knows how typical users think), then they can get away with the password-length rule with only 6 actual random characters. In such a case, the password complexity rules backfire: they induce user behaviours which are detrimental to security, i.e. weaker passwords.\nThe only \"complexity rule\" which is sensible is a minimum length (typically 8 characters) because while a long password is not necessarily strong, a very short password is always weak, because there are just not enough possible 6-character passwords.\n\nAll"}
+{"output_text": " taskQueue) {\n if (task.getPriority() > interruptedQueue.peek().getPriority()) {\n interruptedQueue.add(task);\n }\n }\n for (Task task : interruptedQueue) {\n task.execute();\n }\n }\n });\n }\n\n public void executeAllByPriorityWithInterruptableFirst(){\n executorService.submit(new Runnable() {\n @Override", "input_text": " to think about that.\n\n Q:\n\nA multi-threaded version of TaskScheduler such that it guarantees that higher priority task never starts execution after a lower priority task in java\n\nI need to write a multi threaded version of TaskSchedular \nTaskScheduler {\n TaskScheduler(List tasks)\n .... \n}\n\n interface Task {\n int getPriority()\n void execute()\n }\n\nso that it guarantees the higher priority task never starts execution after lower priority.\nHere is my single threaded version example. I need to create this multi threaded.\npublic class SingleThreadedTaskScheduler {\n\n private ExecutorService executorService = Executors.newFixedThreadPool(1);\n\n private PriorityQueue taskQueue;\n private static final PriorityComparator PRIORITY_COMPARATOR = new PriorityComparator();\n\n public SingleThreadedTaskScheduler(List tasks){\n this.taskQueue = new PriorityQueue(tasks.size(), PRIORITY_COMPARATOR);\n this.taskQueue.addAll(tasks);\n }\n\n public void executeAllByPriority(){\n executorService.submit(new Runnable() {\n @Override\n public void run() {\n for (Task task : taskQueue) {\n task.execute();\n }\n }\n });\n\n }\n\n public void executeAllByPriorityWithUnInterruptableFirst(){\n executorService.submit(new Runnable() {\n @Override\n public void run() {\n PriorityQueue interruptedQueue = new PriorityQueue(taskQueue.size(),PRIORITY_COMPARATOR);\n for (Task task :"}
+{"output_text": "\n \n\n \n \n \n \n \n \n \n\n \n \n \n", "input_text": "\",\"crtloc_lng\":\"72.361145\"},{\"user_id\":\"76\",\"crtloc_lat\":\"34.769604\",\"crtloc_lng\":\"72.361092\"},{\"user_id\":\"87\",\"crtloc_lat\":\"33.697117\",\"crtloc_lng\":\"72.976631\"}]}\n\n Q:\n\nConvert web.config file to.htaccess file\n\nI have a web.config file that I have tried converting to.htaccess and it's not working as intended. I'd love some help figuring out where I went wrong.\nweb.config\n\n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n\n \n \n \n \n \n "}
+{"output_text": " to it, and then using the result to define the second function.\n\nA:\n\nI think the answer to your first question is that you can't. The reason is that the proof of the theorem is not a program. It is a proof that a program exists. The proof is a proof that a program exists, and that program is a proof that the theorem is true. The proof is not a program. It is a proof that a program exists.", "input_text": "P n x)})) : {f : nat -> X & (forall n : nat, P n (f n))}.\n exists (ACC X P f). intros. unfold ACC. remember (f n).\n destruct s. assumption. Qed. \n\nPlease copy & past to the Coq IDE because it renders awfully here. So what a computable realisation of ACC means is that we can look inside the original existential produced by the function on the LHS to construct the RHS term. Normally, this is not allowed, because the existential is a Prop while the RHS is a Type. However, if you relax the statement a bit and define things in terms of the Sig type, as I have done, it works. The Sig type is just the existential type, but in the Type world rather than in the Prop world.\nIt's now easy to answer the second question, namely: How can one convert a proof involving ACC into a working computer program? If the ACC you use is the strict version, with the existential from Prop on the LHS, then you can't convert such a proof into a program, because your ACC will just be a \"black box\". But if you relax this to the Type version of ACC, you automatically get a program: simply apply my Coq program above to any program of the LHS type and it will give you a program of the RHS type. Intuitively, what the program ACC does is \"cracks open\" the existential, \"looks inside\" and uses what it finds to define a function- this is the function $f$ mentioned in the axiom. The theorem ACC_full then augments this function with the proof that the function is correct, i.e. that the proposition $\\varphi$ is respected. It does this by cracking open the first function and applying the hypothesis"}
+{"output_text": "\n format.html\n format.json { render :json => @user }\n end\nend\n\ndef update\n if request.format.json?\n t = @user\n @user = {:id => t.id, :email => t.email}\n end\n respond_to do |format|\n if @user.update_attributes(params[:user])\n format.html { redirect_to @user, notice", "input_text": " (9.971 \u03bcs.. 31.42 \u03bcs)\nvariance introduced by outliers: 27% (moderately inflated)\n\nbenchmarking recursive\ntime 556.6 \u03bcs (548.4 \u03bcs.. 563.8 \u03bcs)\n 0.998 R\u00b2 (0.996 R\u00b2.. 0.999 R\u00b2)\nmean 565.4 \u03bcs (559.7 \u03bcs.. 574.3 \u03bcs)\nstd dev 23.95 \u03bcs (16.41 \u03bcs.. 33.78 \u03bcs)\nvariance introduced by outliers: 35% (moderately inflated)\n\nPerformance gets down to pretty reasonable when you combine everything.\n\n Q:\n\nruby-on-rails params missing or value is empty (when using with angularJS form)\n\nI am a newbie at ruby on rails and I am currently developing a part of portal. I have encountered some errors which I could not find an solution. \nFirst error:\nActionController::ParameterMissing (param is missing or the value is empty: user):\napp/controllers/admin/manage_users_controller.rb:97:in `user_params'\napp/controllers/admin/manage_users_controller.rb:32:in `update'\n\nSecond error: \nArgumentError (When assigning attributes, you must pass a hash as an argument.):\napp/controllers/admin/manage_users_controller.rb:32:in `update'\n\nMy manage_users_controller:\ndef edit\n if request.format.json?\n t = @user\n @user = {:id => t.id, :email => t.email}\n end\n respond_to do |format|"}
+{"output_text": " selects yes, I want to show the form and hide the rest. If the user selects no, I want to hide the form and show the rest.\nI have tried the following code but it doesn't work.\n\";\n\necho \"\";\n\n}\nelse{\n\n$user_session = $_SESSION['user_email'];\n\n$get_user = \"select * from users where user_email='$user_session'\";\n\n$run_user = mysqli_query($con,$get_user);\n\n$row_user = mysqli_fetch_array($run_user);\n\n$user_id = $row_user['user_id'];\n\n$select_favourite = \"select * from favourite where user_id='$user_id' AND tutorial_id='$tut_id'\";\n\n$run_favourite = mysqli_query($con,$select_favourite);\n\n$check_favourite = mysqli_num_rows($run_favourite);\n\nif($check_favourite == 1){\n\necho \"\";\n\necho \"\";\n\n}\nelse{\n\n$insert_favourite = \"insert into favourite (user_id,"}
+{"output_text": " 0.4037051 0.6692548 1.1209414 2.013772 0.8695024\n11 November 0.9646959 0.2824006 0.4179008 0.6692548 1.1809414 2.093772 0.9275024\n12 Dezember 0.9646959 0.2824006", "input_text": " 1.0000000 0.2890063 0.4767076 0.7588017 1.3538568 2.145851 0.9266933\n3 M\u00e4rz 0.9419595 0.3157198 0.4644285 0.6654849 1.2576761 2.008268 0.9214072\n4 April 0.8961804 0.2955346 0.4497871 0.6354015 1.1478274 1.917198 0.9268036\n5 Mai 0.8398460 0.2730415 0.4088478 0.6709692 1.0487195 1.742565 0.8703363\n6 Juni 0.7578937 0.2612720 0.3990733 0.5807657 0.9649852 1.509921 0.8183238\n7 Juli 0.7453580 0.2343150 0.3870521 0.6741874 0.9775892 1.385178 0.7503323\n8 August 0.7272684 0.2216735 0.3717692 0.5756792 0.9959819 1.435887 0.7289555\n9 September 0.8523844 0.2603578 0.3924824 0.6676677 1.0805496 1.875336 0.7956532\n10 Oktober 0.9095675 0.2708419"}
+{"output_text": "2-trendline/master/data/econ.csv\", header = TRUE)\n\n# plot\nggplot(econ, aes(x = Date, y = Price)) +\n geom_line(aes(color = \"blue\"), size = 1.5) +\n geom_line(aes(color = \"red\"), size = 1.5) +\n geom_line(aes(color = \"green\"), size =", "input_text": "Focus={false}\n hasBackdrop={false}\n isOpen={false}\n lazy={true}\n onClose={[Function]}\n transitionDuration={300}\n transitionName=\"pt-popover\"\n usePortal={true}\n />\n \n \n \n \n \n\nA:\n\nFor anyone trying to do something similar\nIn the end I used the props on the blueprint Select component to access the onItemSelect() function. Code below\nconst pb = wrapper.find(\"Select\").first();\n expect(pb.exists()).toBeTruthy();\n const props = pb.props() as any;\n props.onItemSelect(\"User2\");\n\n Q:\n\nHow to show the legend of a trend line?\n\nProblem\nIt seems that I'm having difficulty showing the trend line that generated using stat_smooth(). Before I used argument show.legend = T, I have a graph looks like this:\n\nAfter adding the argument, I got something like this:\n\nBut you see, I want to show the trendline legend separately, like this:\n\nHow do I achieve this? My source codes are here if you need them (I appreciate it if you can help me truncate the codes to make it more concise):\nlibrary(ggplot2)\nlibrary(ggrepel)\nlibrary(ggthemes)\nlibrary(scales)\nlibrary(plotly)\nlibrary(grid)\nlibrary(extrafont)\n\n# read data\necon <- read.csv(\"https://raw.githubusercontent.com/altaf-ali/ggplot"}
+{"output_text": "defn parse-row-and-column [line]\n (map #(Double/parseDouble %) (split line #\"\\s+\"))\n (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double/parseDouble (Double", "input_text": " \"resources/cookie_clicker/B-large-practice.in\" \n \"resources/cookie_clicker/B-large-practice.out\"))\n\nA:\n\nI have to admit, the actual \"solving the problem\" component of this is a little over my head. But, I thought I'd try to answer your questions and give you some style/structure feedback, for what it's worth :)\nYou can simplify your ns declaration like this:\n(ns cookie-clicker\n (:require [clojure.string :refer (split)]\n [clojure.java.io :as io]\n [clojure.test :refer :all]))\n\n(:require foo :refer (bar) does the same thing as :use foo :only (bar), and is generally considered preferable, especially as an alternative to having both :use and :require in your ns declaration)\nI think Double/parseDouble is a good approach to parsing doubles in string form. Integer/parseInt is usually my go-to for doing the same with integers in string form. This is just a hypothesis, but Double/parseDouble might be faster and/or more accurate than read-string because it's optimized for doubles.\nFYI, you can leave out the java.lang. and just call it as Double/parseDouble in your code. In light of that, you might consider getting rid of your parse-double function altogether and just using Double/parseDouble whenever you need it. The only thing is that Java methods aren't first-class in Clojure, so you would need to do things like this if you go that route:\n(defn parse-row [line]\n (map #(Double/parseDouble %) (split line #\"\\s+\")))\n\n("}
+{"output_text": "\n\nI have a userform with a listbox and a button. When the button is clicked, I want to insert the specified number of rows beneath the selected cell.\nI have tried the following code, but it doesn't work.\nPrivate Sub CommandButton1_Click()\n\nDim i As Integer\nDim j As Integer\nDim k As Integer\nDim l As Integer\nDim m As Integer\nDim n As Integer\nDim o As Integer\nDim p As Integer\n", "input_text": ",24); \n cal4.set(Calendar.MONTH, 11); \n cal4.set(Calendar.YEAR,2015);\n cal4.set(Calendar.HOUR_OF_DAY, 23); \n cal4.set(Calendar.MINUTE, 55); \n cal4.set(Calendar.SECOND, 40);\n\nA:\n\nYou can pass that information along with the intent while scheduling the alarm.\nIntent alertIntent = new Intent(this, AlertReceiver.class);\nalertIntent.putExtra(\"Notification Key\", 1);\nAlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\nalarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), PendingIntent.getBroadcast(this, 1, alertIntent, PendingIntent.FLAG_UPDATE_CURRENT));\n\nAnd in your onReceive check the value and show the notification based on that:\nInteger notificationId = intent.getIntExtra(\"Notification Key\", -1);\nif (notificationId == 1)\n{\n // Show indipendente day\n}\nelse\n{\n // do something else\n}\n\nInstead of passing integer value, you can also pass the notification message and show it directly without any if...else condition.\nPassing string data:\nalertIntent.putExtra(\"Notification Key\", \"Independence day\");\n\nGetting string back:\nString message = intent.getStringExtra(\"Notification Key\");\n// Calling the notification\ncreateNotification(context, \"title1\", message, \"event of today\");\n\n Q:\n\nHow do I code my userform to insert the specified number of rows beneath the selected cell?"}
+{"output_text": "=\"DENIED\" operation=\"open\" profile=\"/{,usr/}sbin/dhclient\" name=\"/proc/1733/task/1734/fd/0\" pid=1733 comm=\"dhclient\" requested_mask=\"r\" denied_mask=\"r\" fsuid=0 ouid=0\n[ 48.715836] audit: type=1400 audit(1594897218.322:61): apparmor=\"DENIED\"", "input_text": " pid=669 comm=\"apparmor_parser\"\n[ 31.966592] audit: type=1400 audit(1594897201.570:8): apparmor=\"STATUS\" operation=\"profile_load\" profile=\"unconfined\" name=\"/usr/bin/man\" pid=660 comm=\"apparmor_parser\"\n[ 31.966601] audit: type=1400 audit(1594897201.570:9): apparmor=\"STATUS\" operation=\"profile_load\" profile=\"unconfined\" name=\"man_filter\" pid=660 comm=\"apparmor_parser\"\n[ 31.966607] audit: type=1400 audit(1594897201.570:10): apparmor=\"STATUS\" operation=\"profile_load\" profile=\"unconfined\" name=\"man_groff\" pid=660 comm=\"apparmor_parser\"\n[ 31.975582] audit: type=1400 audit(1594897201.582:11): apparmor=\"STATUS\" operation=\"profile_load\" profile=\"unconfined\" name=\"lsb_release\" pid=664 comm=\"apparmor_parser\"\n[ 48.715193] audit: type=1400 audit(1594897218.322:59): apparmor=\"DENIED\" operation=\"open\" profile=\"/{,usr/}sbin/dhclient\" name=\"/proc/1733/task/1734/comm\" pid=1733 comm=\"dhclient\" requested_mask=\"wr\" denied_mask=\"wr\" fsuid=0 ouid=0\n[ 48.715835] audit: type=1400 audit(1594897218.322:60): apparmor"}
+{"output_text": " 2+3+4+5+6+7+8+9+11+12+13+14+15+16+17+18+19+20+21+22+23+25 \n1*12*26 = 2+3+4+5+6+7+8+9+11+12+13+14+15+16+17+18+19+20+21+22+23+24+25+27 \n", "input_text": "11+12+13+15 \n1*7*16 = 2+3+4+5+6+8+9+10+11+12+13+14+15 \n10*13 = 1+2+3+4+5+6+7+8+9+11+12+14+15+16+17 \n1*8*18 = 2+3+4+5+6+7+9+10+11+12+13+14+15+16+17 \n1*9*18 = 2+3+4+5+6+7+8+10+11+12+13+14+15+16+17+19 \n1*9*20 = 2+3+4+5+6+7+8+10+11+12+13+14+15+16+17+18+19 \n1*10*20 = 2+3+4+5+6+7+8+9+11+12+13+14+15+16+17+18+19+21 \n1*10*22 = 2+3+4+5+6+7+8+9+11+12+13+14+15+16+17+18+19+20+21 \n1*11*22 = 2+3+4+5+6+7+8+9+10+12+13+14+15+16+17+18+19+20+21+23 \n1*11*24 = 2+3+4+5+6+7+8+9+10+12+13+14+15+16+17+18+19+20+21+22+23 \n1*12*24 ="}
+{"output_text": "\\cdot 8^n\n+\\frac {1}{24}\\cdot 16^n\n$$\nsage: f(0)\n-1/4\nsage: f(1)\n11/24\nsage: f(2)\n-1/4\nsage: f(3)\n1/24\n\nA:\n\nI think the following is a good way to do it.\nFirst, we define a function that takes a number and returns", "input_text": "\nf(17) = 12297266440393687040\nf(18) = 196760766551437541376\nf(19) = 3148208293242063421440\nf(20) = 50371620920737339801600\n\nWe need only the first values to build a linear system in the unknowns $a,b,c,d$, and then having them to insert them as \"constants\" $a,b,c,d$ in the formula for $f(n)$ for a general $n$.\nThe equations are...\nsage: var('a,b,c,d');\nsage: eqs = [ a*2^n + b*4^n + c*8^n + d*16^n == f(n) for n in [0,1,2,3] ]\nsage: for eq in eqs: \n....: print(eq) \n....:\na + b + c + d == 0\n2*a + 4*b + 8*c + 16*d == 0\n4*a + 16*b + 64*c + 256*d == 1\n8*a + 64*b + 512*c + 4096*d == 70\nsage: solve(eqs, [a,b,c,d])\n[[a == (-1/4), b == (11/24), c == (-1/4), d == (1/24)]]\n\nNow we can associate the formula for $f(n)$ and test it, i.e.\n$$\nf(n)\n=\n-\\frac 14\\cdot 2^n\n+\\frac {11}{24}\\cdot 4^n\n-\\frac 14"}
+{"output_text": ">\n \n \n type2 \n 19.30 \n event7 \n | \n abi \n \n \n type2 \n 19 \n type1 \n 18.45 \n event1 \n | \n abc \n \n \n type1 \n 9 \n event2 \n | \n abd \n \n \n type2 \n 19.30 \n event3 \n | \n abe \n \n \n type2 \n 19 \n event4 \n | \n abf \n \n \n 30.05.\n \n type1 \n 18.45 \n event5 \n | \n abg \n \n \n type2 \n 9 \n event6 \n | \n abh do\n clearScreen\n setCursorPosition 0 0 -- row col\n let (index, gen') = randomR (0, l) g\n putStrLn $ list!! index\n\n threadDelay $ sec * oneSecond\n return gen'\n\nAs for getting rid of generator passing, there are two options:\n\nTo use RandT monad transformer from Control.Monad.Random\nTo use randomRs function to generate all random numbers outside of outQ\n\nFor such simple case it's better to stick with option 2. Note as we don't need to pass anything from previous iteration call to next one, we can now use library function mapM_:\noutQ list l sec = mapM_ $ \\index -> do\n clearScreen\n setCursorPosition 0 0 -- row col\n putStrLn $ list!! index\n\n threadDelay $ sec * oneSecond\n\nmain :: IO ()\nmain = do\n setTitle \"Quotes\"\n hideCursor -- catch ctrl+c for showCursor\n gen <- newStdGen \n str <- readFile fileName\n let qlist = splitStr '~' str\n let len = length qlist -1\n let rand = randomRs (0, len) gen\n outQ qlist len delay rand\n\nAt this point we can convert our list to an immutable array:\noutQ array sec = mapM_ $ \\index -> do\n clearScreen\n setCursorPosition 0 0 -- row col\n putStrLn $ array! index\n\n threadDelay $ sec * oneSecond\n"}
+{"output_text": "public var volume:Number = 0;\n public var slider:Number = 0;\n public var slider_width:Number = 0;\n public var slider_height:Number = 0;\n public var slider_x:Number = 0;\n public var slider_y:Number = 0;\n public var slider_x_change:Number = 0;\n public var slider_y_change:Number = 0;\n public var slider_", "input_text": " I will be able to implement it into my game. So here is my blank document class and my audio slider class! Thanks for the help!\nWHAT I'VE TRIED\nI attempted to create public variables in the document class for the sprite and the slider, then create a new sprite/slider once the document class runs. I thought that to be on the right track, but then it started looking like I was going to have to do that for almost all the variables in the audio slider class. I also thought...well why can't I just run Volume() in the Document Class? Still confusing me a little why that doesn't work, but it doesn't. \nBlank Document Class\npackage {\n\n import flash.display.MovieClip;\n import flash.display.Sprite;\n\n public class ASDocumentClass extends MovieClip {\n\n public function ASDocumentClass() {\n\n }\n }\n\n}\n\nand here is the audio slider class\npackage {\n\n import flash.display.Sprite;\n import flash.display.Graphics;\n import flash.events.MouseEvent;\n import flash.events.Event;\n import flash.net.URLRequest;\n import flash.media.Sound;\n import flash.media.SoundChannel;\n import flash.media.SoundTransform;\n import flash.geom.Rectangle;\n\n public class Volume extends Sprite {\n\n public var snd:Sound = new Sound();\n public var channel:SoundChannel = new SoundChannel();\n //URLRequest=new URLRequest(\"solitude.wav\");\n //Make sure you pass URLRequest an audio file on your computer.\n public var req:BackgroundMusic = new BackgroundMusic();\n public var boundary:Rectangle;\n "}
+{"output_text": ".0.0.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)\n at org.jboss.invocation@1.0.0.Final//org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374)\n at org.jboss.as.weld.ejb@2.3.2.Final//org", "input_text": "processors.platform.websession.PlatformDotNetSessionLockResult\n at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.constructor(BinaryClassDescriptor.java:981)\n at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryClassDescriptor.(BinaryClassDescriptor.java:267)\n at deployment.StreamsApp.ear//org.apache.ignite.internal.binary.BinaryContext.registerPredefinedType(BinaryContext.java:1063)\n at deployment.StreamsApp.ear.Streams.jar//ru.sbrf.streams.cache.IgniteInitializer.init(IgniteInitializer.java:34)\n at deployment.StreamsApp.ear.Streams.jar//ru.sbrf.streams.Main.startup(Main.java:23)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n at java.base/java.lang.reflect.Method.invoke(Method.java:566)\n at org.jboss.as.ee@18.0.1.Final//org.jboss.as.ee.component.ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptor.java:96)\n at org.jboss.invocation@1"}
+{"output_text": "=\"checkbox\" id=\"getData\" />\r\n Get data\r\n \r\n \r\n \r\n \r\n \r\n Get data for weeks\r\n \r\n
\r\n \r\n
\r\n \r\n Get data for months\r\n ", "input_text": "\r\n stroke: #000;\r\n shape-rendering: crispEdges;\r\n }\r\n \r\n .line {\r\n fill: none;\r\n }\r\n \r\n .grid {\r\n stroke: #eee;\r\n }\r\n \r\n .bar {\r\n fill: #40779C;\r\n }\r\n \r\n .bar:hover {\r\n fill: #AD4444;\r\n }\r\n \r\n .barChart.x.axis path {\r\n stroke: none;\r\n }\r\n \r\n .barChart.text,\r\n .lineChart.text {\r\n fill: #fff;\r\n }\r\n \r\n .pieChart.text {\r\n fill: #666;\r\n }\r\n \r\n .arc path {\r\n stroke: #fff;\r\n }\r\n \r\n #getData {\r\n margin-left: 10px;\r\n }\r\n \r\n #weeks {\r\n margin-left: 10px;\r\n }\r\n \r\n .accordion-title {\r\n margin: 3px 0;\r\n }\r\n \r\n .overlay {\r\n fill: none;\r\n stroke: none;\r\n }\r\n \r\n .dataNode {\r\n fill: #eee;\r\n stroke: #666;\r\n }\r\n \r\n\r\n\r\n\r\n \r\n
\r\n
\r\n
\r\n Data sets\r\n
\r\n
\r\n
\r\n
\r\n \n#include \"person.h\"\n#include \"Date.h\"\n#include \"Time.h\"\nusing namespace std;\n\nclass DentalAppointment\n{\nprivate:\n\npublic:\n\n};\n\nI dont know what to put in the private and public parts. Do I do?\n#include \n#include \"person.h\"\n#include \"Date.h\"\n#include \"Time.h\"\nusing namespace std;\n\nclass DentalAppointment\n{\nprivate:\n Person pFirstName;\n Person pLastName;\n Date appointmentMonth;\n Date appointmentDay;\n Date appointmentYear;\n Time appointmentHour;\n Time appointmentMinutes;\n int duration;\npublic:\n DentalAppointment();\n DentalAppointment(Person,Person,Date,Date,Date,Time,Time);\n DentalAppointment(Person,Person,Date,Date,Date,Time,Time,int);\n void showDentalAppointment();\n};\n\nif so then what do I put in for my cpp file?\nshould it be like this???\n#include \n#include \"person.h\"\n#include \"Time.h\"\n#include \"Date.h\"\n#include"}
+{"output_text": ">\n \n \n\n \n \n \n\n ", "input_text": " to display the confirm pop up and uncheck the checkbox and show/hide the list entry:\nfunction checkboxUpdated(checkbox, count, label, id) {\n if (checkbox.checked) {\n $('#menu_entry_' + id).show();\n } else {\n if (count > 0) {\n if (! confirm('{% trans \"You have '+ count +' saved '+ label +'.\\n\\nAre you sure you want to delete your'+ count +'saved'+ label +'?\" %}')) {\n checkbox.checked = true;\n return;\n }\n }\n $('#menu_entry_' + id).hide();\n }\n}\n\nHere is the new html code that has the call to the bootstrap modal. This does make the bootstrap modal appear:\n{% for id, menu_entry, selected, item_count in menu_entries %}\n\n \n
\n\n
\r\n\n\nshow_aht.php (showing the loop and part I where I want the data to be returned)\nforeach($memo_data as $v){\n foreach($user_data as $m){\n if($v['memo_code'] == $m){\n echo \" User: \".$m. \" Time: \". $v['avg_handle_time']. \" \";\n }\n elseif( $v['memo_code']!= $m){\n echo \"User: \". $m"}
+{"output_text": " say that this is a lie.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I'm not sure I'm up to this.\"\nTrue.\n\"I", "input_text": " idiom meaning \"not injured\". It is not generally used literally.)\n\"The Jundland wastes are not to be traveled lightly.\"\nDemonstrably true.\n\"Tell me young Luke, what brings you out this far?\"\nNo truth value can be assigned.\n\"Obi-Wan Kenobi... Obi-Wan? Now that's a name I haven't heard in a long time... a long time.\" \nTrue: 20 years is generally considered a long time.\n\"Oh, he's not dead, not... not yet.\"\nTrue.\n\"Well of course, of course I know him. He's me! I haven't gone by the name Obi-Wan since oh, before you were born.\"\nPer the OP's stipulations, this is a lie.\n\"Don't seem to remember ever owning a droid. Very interesting...\"\nIf we take this as implying that he doesn't know R2-D2, then this is a lie. If we take this as saying \"Hm, I wonder why R2 is pretending to be my property when he knows very well that he isn't\", well, it's certainly not a lie.\n\"I think we better get indoors. The Sandpeople are easily startled but they will soon be back and in greater numbers.\"\nTrue.\n\"Quickly, son... they're on the move.\"\nAs far as we know, true.\n\"That's what your uncle told you. He didn't hold with your father's ideals.\"\nI think we don't actually know enough about Owen's opinions to evaluate this statement. However, insofar as Obi-Wan is implying that Owen didn't tell Luke about his father because there was a disagreement between the brothers, that's getting into serious \"from a certain point of view\" territory. I'd"}
+{"output_text": "\n ifstream inFile;\n ofstream outFile;\n inFile.open(\"in.txt\");\n outFile.open(\"out.txt\");\n if(!inFile)\n {\n cout<<\"Error opening file\";\n return 1;\n }\n else\n {\n cout<<\"File opened\";\n }\n if(!outFile)\n {\n cout<<\"Error opening file\";\n", "input_text": "/property not firing is as follows. \nIn Ember.js, the (computed) property evaluation is \"magical\", but as we all know - \"magic\" can be expensive. So, the value of a computed property gets cached, so that \"magic\" doesn't have to happen all the time and unless something changes that cached value doesn't get recomputed. Not only that, if the property is not being shown on the screen - why bother recomputing it? See this jsbin to see exactly what I am talking about. Notice how lazyPropDep never gets updated since lazyDep property is never shown on the screen.\nNow, back to your example. canEditQuestion property is not being rendered to the screen when you are editing the question (since it's in the else block). Therefore, the canEditQuestion function which resets isEditing to false never gets called.\nI think what you need is to place the resetting logic into an observer while leaving the other logic in the property as follows:\nresetIsEditing : function() {\n this.set('isEditing', false);\n}.observes('model.id'),\n\ncanEditQuestion : function() {\n return this.get('author.id') === App.currentUser;\n}.property('model'),\n\nThis way EVERY TIME a new model (with a new model id) gets loaded into the controller (even if the previous model was in edit mode) the observer code will trigger resetting isEditing property to false\n\n Q:\n\nthree out of five file streams wont open, i believe its a problem with my ifstreams\n\n#include\n#include\n#include\n#include\nusing namespace std;\nint main()\n{"}
+{"output_text": ");\n }\n }\n\n @Override\n public void write(final JsonWriter out, final T value)\n throws IOException {\n final JsonToken token = value.getClass().getAnnotation(JsonType.class).type;\n switch ( token ) {\n case BEGIN_ARRAY:\n out.beginArray();\n break;\n case BEGIN_OBJECT:\n out.beginObject();\n break;\n ", "input_text": " if ( list == null ) {\n out.nullValue();\n } else {\n switch ( list.size() ) {\n case 0:\n out.beginArray();\n out.endArray();\n break;\n case 1:\n elementTypeAdapter.write(out, list.iterator().next());\n break;\n default:\n out.beginArray();\n for ( final T element : list ) {\n elementTypeAdapter.write(out, element);\n }\n out.endArray();\n break;\n }\n }\n }\n\n @Override\n public List read(final JsonReader in)\n throws IOException {\n final JsonToken token = in.peek();\n switch ( token ) {\n case BEGIN_ARRAY:\n final List list = new ArrayList<>();\n in.beginArray();\n while ( in.peek()!= END_ARRAY ) {\n list.add(elementTypeAdapter.read(in));\n }\n in.endArray();\n return unmodifiableList(list);\n case BEGIN_OBJECT:\n return singletonList(elementTypeAdapter.read(in));\n case NULL:\n return null;\n case END_ARRAY:\n case END_OBJECT:\n case NAME:\n case STRING:\n case NUMBER:\n case BOOLEAN:\n case END_DOCUMENT:\n throw new MalformedJsonException(\"Unexpected token: \" + token);\n default:\n // A guard case: what if Gson would add another token someday?\n throw new AssertionError(\"Must never happen: \" + token"}
+{"output_text": ":id=\"@+id/textView3\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:layout_below=\"@+id/signupusername\"\n android:layout_centerHorizontal=\"true\"\n android:layout_marginTop=\"20dp\"\n android:text=\"Password\" />\n\n \n\n \n\n \n\n \n \n\n \n\n \nDocumentRoot \"${SRVROOT}/htdocs\"\n#ServerName www.example.com:80\n\n\n\n ServerName fielcard.net.br\n DocumentRoot \"D:\\Trabalhos\\host\\htdocs\\fielcard.net.br\"\n ErrorLog \"logs/projeto-error.log\"\n CustomLog \"logs/projeto-access.log\" common\n \n DirectoryIndex index.php index.html index.htm\n AllowOverride All\n Require all granted\n \n \n\nTem mais coisas. Por\u00e9m com linhas comentadas.\nMeu hosts do windows\n127.0.0.1 fielcard.net.br\n\nNovamente: Tem mais coisas. Por\u00e9m com linhas comentadas.\nApache 2.4\nPHP 7.3\nTentativas:\nServerName fielcard.net.br.local\n127.0.0.1 fielcard.net.br.local\n\nReiniciei o Apache.\nReiniciei o Windows.\nMeu Apache tem a pasta htdocs com um arquivo index.php com apenas a palava localhost. E dentro dela para cada site que desenvolvo existe uma"}
+{"output_text": "Layout\nvar simulation = d3.forceSimulation()\n .force(\"link\", d3.forceLink().id(function(d) { return d.id; }).distance(function(d) { return d.distance; }))\n .force(\"charge\", d3.forceManyBody().strength(-1))\n .force(\"center\", d3.forceCenter(w / 2, h / 2));\n\n//https://github.com/", "input_text": " app:dependencies\n\n// windows\ngradlew app:dependencies\n\nThis will print all the configuration and its dependencies. To narrow down, you can focus on only one build by adding for example --configuration debugCompileClasspath or with a flavor named myFlavor --configuration myFlavorDebugCompileClasspath (case sensitive).\nYou should now be able to see which other libraries is using guava and exclude it like :\ncompile() { //works also with project()\n exclude group: \"com.google.guava\", module: \"guava\" \n}\n\n(see more about exclude)\n\n Q:\n\nHow do I change symbol type colors on D3js?\n\nI want to change colors of the symbol types on my D3 code? I am not sure how to make my var color = d3.scale.linear() work. I am trying to randomize D3 symbol types but want to differentiate them by colors.\n\n\n \n\n\n\n\nshow_aht.php:\ninclude 'db_conn_retca2003.php';\ninclude 'db_conn_retca2001.php';\nheader('Content-type: application/json');\n\n /****************************************************\n matching USER array and MEMO array \n for matching username values\n /****************************************************/\n $result = array"}
+{"output_text": " center of the circle, so we can use that to find the center of the spiral.\nShow[\n Graphics[{\n FaceForm[Gray],\n toCirle[#, r] & /@ {a^3, a^4}}\n ],\n ParametricPlot[ReIm[a^3*a^t], {t, -1/3, 1/3}, PlotStyle -> White]\n ]\n\nNow we can use the center of", "input_text": " so we can make a function a^3*a^t and let t run from 0 to 1.\nShow[\n Graphics[{\n FaceForm[Gray],\n toCirle[#, r] & /@ {a^3, a^4}}\n ],\n ParametricPlot[ReIm[a^3*a^t], {t, 0, 1}, PlotStyle -> White]\n ]\n\nThis looks very much like the spirals that were used to divide the circles in the original art. So it seems if we pick out the center any circle next to our base circle, we can create spiral functions that go through the circles. Note that the approach of shifting a spiral to its neighbouring spiral is similar to shifting circles. Here is an example:\nShow[\n gr,\n ParametricPlot[Table[ReIm[b^i a^t], {i, 12}], {t, -10, 10}, \n PlotRange -> {{-10, 10}, {-10, 10}}, PlotStyle -> White],\n ParametricPlot[Table[ReIm[a^j b^t], {j, 5}], {t, -10, 10}, \n PlotRange -> {{-10, 10}, {-10, 10}}, PlotStyle -> White]\n ]\n\nSpiral functions inside circles\nFor our later approach, I want to be able to draw the spiral only inside a circle. As we have seen, going from t=0 to t=1 will connect the centers of the circles. This is not what we want. We want values for t that start and end with the circle. Let's make the plot we did earlier again, but use values for t between -1/3 and 1/3\n\nOK, that looks promising. Remember, we know the"}
+{"output_text": "\n echo \"\".$draft_user_row['id'].\" \";\n}\n\nwhile ($draft_player_row = mysqli_fetch_array($draft_order_stmt)) {\n echo \"\".$draft_player_row['id'].\" \";\n}\n\n?>\n \n \n", "input_text": "\n if (res.ok) {\n caches.open('v1').then(cache => {\n cache.put(requestObj, res);\n });\n }\n return res.clone();\n });\n });\n }\n\n return fetch(requestObj);\n\n } \n\n })\n\n )\n\n});\n\n Q:\n\nTable not outputting all columns\n\nI am having a nightmare with this pretty simple table I have. I am trying to create a draft type board. I have users and players. I want users to be displayed as the and then 14 players under each player. Somewhat like this..\nhttp://lockerroomfantasysports.com/wp-content/uploads/2013/08/FantasySports-Fantasy-Football-Draft-Board.jpg\nHowever, my page is showing up like this...\n\nIt is only creating two columns of players for the users. Rather than one for each. It is also not displaying the db content where it should be. The player that is shown should only be in the first location it is (the left one).\nThis is the code for it.\n$draft_order_stmt = mysqli_query($con,\"SELECT * FROM user_players ORDER BY `id`\");\n$draft_order_stmt2 = mysqli_query($con,\"SELECT username FROM user_players ORDER BY `id`\");\n\n?>\n\n \n RND \n IO (Maybe Weather)\ngetWeather ip = do\n r <- get \"http://api.openweathermap.org/data/2.5/weather?q=\" <> ip\n return $ decode r :: Maybe Weather\n\n-- Weather\ngetWeather :: IpResponse -> IO (Maybe Weather)\ngetWeather ip = do\n r <- get \"http://api.open", "input_text": " it seems having to explicitly pattern match to sequence multiple functions of type IO (Maybe a). \n-- Yahoo API\n\nconstructQuery :: T.Text -> T.Text -> T.Text\nconstructQuery city state = \"select astronomy, item.condition from weather.forecast\" <>\n \" where woeid in (select woeid from geo.places(1)\" <>\n \" where text=\\\"\" <> city <> \",\" <> state <> \"\\\")\"\n\nbuildRequest :: T.Text -> IO ByteString\nbuildRequest yql = do\n let root = \"https://query.yahooapis.com/v1/public/yql\"\n datatable = \"store://datatables.org/alltableswithkeys\"\n opts = defaults & param \"q\".~ [yql]\n & param \"env\".~ [datatable]\n & param \"format\".~ [\"json\"]\n r <- getWith opts root\n return $ r ^. responseBody\n\nrun :: T.Text -> IO (Maybe Weather)\nrun yql = buildRequest yql >>= (\\r -> return $ decode r :: IO (Maybe Weather))\n\n-- IP Lookup\ngetLocation:: IO (Maybe IpResponse)\ngetLocation = do\n r <- get \"http://ipinfo.io/json\"\n let body = r ^. responseBody\n return (decode body :: Maybe IpResponse)\n\n-- Combinator \nrunMyLocation:: IO (Maybe Weather)\nrunMyLocation = do\n r <- getLocation\n case r of\n Just ip -> getWeather ip\n _ -> return Nothing\n where getWeather = (run. (uncurry constructQuery). (city &&"}
+{"output_text": "\n );\n\nThe above code produces the following result.\n\n.container {\r\n width: 100px;\r\n height: 100px;\r\n position: relative;\r\n background: linear-gradient(to top right, transparent calc(50% - 10px), #ff0000 calc(50% - 10px), #ff0000 calc(50% + 10px), transparent calc(50% + 10px));\r\n background-size: 50% 100", "input_text": " values should be changed to red.\nThe thickness of the border will be determined using background-size for the first two gradients and using the gradient's color-stop points for the next two gradients.\n\nFor the first two, the background-size in Y-axis is nothing but the border thickness. Change it to suit the needed thickness. The background-size in X-axis is nothing but 50% minus the height of the pseudo minus half of border thickness\nFor the next two, the color stop points of the gradient should be set such that the color starts (and transparent ends) at 50% - half the border thickness and color ends (transparnet starts) and 50% + half the border thickness (so that it produces a stroke of required thickness).\n\nThe background-position should be set such that the required gap is there between the colored area and the border.\n\nFor the first two, the background-position in X-axis should be left edge (0%) and right edge (100%) respectively. Their position in Y-axis should be above the pseudo-element and so it should be 100% minus pseudo-element's height minus the spacing.\nFor the next two, the background-position involves more complex calculation involving the border spacing, thickness and pseudo-element's height. The logic is present below.\n\nbackground: linear-gradient([color, [color]),\n linear-gradient([color], [color]), \n linear-gradient(to top right, \n transparent calc(50% - [border-thickness/2]), \n [color] calc(50% - [border-thickness/2]), \n [color] calc(50% + [border-thickness/2]),\n transparent calc(50% + [border-thickness/2])"}
+{"output_text": " by the Nazis.\n\nA:\n\nThe Atlantic Charter was a declaration of principles, not a treaty. It was signed by Franklin D. Roosevelt, Winston Churchill, and Joseph Stalin on August 14, 1941.\nThe Charter was a declaration of principles, not a treaty. It was signed by Franklin D. Roosevelt, Winston Churchill, and Joseph Stalin on August 14, 1941.\n\nThe Atlantic Charter was a declaration of principles, not a treaty. It was signed by Franklin D.", "input_text": " sovereign rights and self-government to those peoples who have been forcibly deprived to them by the aggressor nations.\nTo foster the conditions in which the liberated people may exercise these rights, the three governments will jointly assist the people in any European liberated state or former Axis state in Europe where, in their judgment conditions require,\n(a) to establish conditions of internal peace;\n(b) to carry out emergency relief measures for the relief of distressed peoples;\n(c) to form interim governmental authorities broadly representative of all democratic elements in the population and pledged to the earliest possible establishment through free elections of Governments responsive to the will of the people; and\n(d) to facilitate where necessary the holding of such elections.\nThe three Governments will consult the other United Nations and provisional authorities or other Governments in Europe when matters of direct interest to them are under consideration.\nWhen, in the opinion of the three Governments, conditions in any European liberated state or former Axis satellite in Europe make such action necessary, they will immediately consult together on the measure necessary to discharge the joint responsibilities set forth in this declaration.\nBy this declaration we reaffirm our faith in the principles of the Atlantic Charter, our pledge in the Declaration by the United Nations and our determination to build in cooperation with other peace-loving nations world order, under law, dedicated to peace, security, freedom and general well-being of all mankind.\n\nThis isn't a denunciation of fascism. It isn't a call to arms to overthrow dictatorships worldwide. It's defining how the liberated nations and minor Axis powers will be treated after WWII.\nThe goal is \"to solve by democratic means their pressing political and economic problems\". Someplace like Romania, Hungary, or Bulgaria, Axis belligerents who were devastated by the war. Or Norway and the Netherlands who had puppet governments installed"}
+{"output_text": "$sql = \"UPDATE `users` SET `name` = '\".$_POST['name'].\"', `email` = '\".$_POST['email'].\"', `password` = '\".$_POST['password'].\"', `password_confirmation` = '\".$_POST['password_confirmation'].\"' WHERE `id` = '\".$_POST['id'].\"'\";\n\n$result = $conn->query($sql);\n\nif ($result->", "input_text": " The editor writes a letter to the authors stating that the anonymous referee has found a better solution, and ask whether they want to write a joint paper. If they refuse, you can still choose option B. \nThis option is only viable, if the result you improve is a significant part of the paper, and the authors have every right to differ in their judgement from you, so a refusal does not mean that they are mean/not cooperative/envious/whatever. \nAt a later stage in your carreer, i.e. once you have a good position, you should opt for A. This is not only common interest, but also helping yourself. It does not make a difference whether you have 76 or 82 publications, but editors read your reports and notice, and usually editors are influential people.\nAs a sideremark I would recommend you to take a little more care about the \"anonymous referee\" stuff. If the authors read this post, they will know whom to blame.\n\nA:\n\nEthically speaking, both, A and B, are perfectly valid options in my opinion. If the paper itself provides a significant contribution to the state of the art, I would recommend to publish the paper. Although your solution might be superior (which, please correct me if I am wrong, you have not yet proven) the proposed method might cover different aspects or might be of relevance in a different way. Depending on your motivation to publish a paper with your novel method yourself, this would be the logical next step. Why give your ideas to the current authors \"for free\" (meaning without real credit)?\n\n Q:\n\nTable not updating\n\nStruggling to update a row I know I am posts the right value by throwing up a var_dump() agains the $_POST but it must be the method I am using to update the table:\n"}
+{"output_text": " with the same circular dependency problem.\nI've tried providing the DAO as a constructor argument for provideDb(), but that creates a circular dependency.\nI've tried providing the DAO as a constructor argument for provideDb(), but that creates a circular dependency.\nI've tried providing the DAO as a constructor argument for provideDb(), but that creates a circular dependency.\nI've tried providing the DAO as a constructor argument for provideDb(), but that creates a circular dependency.\n", "input_text": "abstract class StationDao {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n abstract fun insert(stations: Station)\n\n @Query(\"SELECT * FROM station_table\")\n abstract fun getAll() : LiveData>\n\n}\n\nDagger Module:\n@Module\nclass DataModule {\n\n @Singleton\n @Provides\n fun provideDb(app: Application): TrainDB {\n var trainDB: TrainDB? = null\n trainDB = Room\n .databaseBuilder(app, TrainDB::class.java, \"train.db\")\n .allowMainThreadQueries()\n .fallbackToDestructiveMigration()\n .addCallback(object : RoomDatabase.Callback() {\n override fun onCreate(db: SupportSQLiteDatabase) {\n super.onCreate(db)\n\n /*\n WHAT GOES HERE?\n */\n\n }\n })\n .build()\n return trainDB\n }\n\n @Singleton\n @Provides\n fun providesStationDao(db: TrainDB) : StationDao = db.stationDao()\n\n}\n\nI'd like to be able to access my DAO in the onCreate() callback. It seems obvious that this should be possible because Google is pushing Room and Dagger together and this is likely a pretty common use case.\nI've tried providing the DAO as a constructor argument for provideDB(), but that creates a circular dependency\nI've tried initializing my RoomDatabase as a companion object. Then instead of using the Room.builder format in my provideDB() method, I can call a getInstance() method that has access to the DAO. But this way I'm met"}
+{"output_text": "0$\nthe new identifier $\\gamma$ is added to the UFD structure\nthe new identifier $\\gamma$ is added to the memory structure $m$\n\nThe algorithm is as follows:\n\nInitialize $m$ to the empty structure\nInitialize $q_0$ to be the initial state\nInitialize $\\gamma=0$\nRead a letter $a$\n\nIf $a\\in L$, then $q_0$ is accepting, so we can", "input_text": " reverse Ackermann (so at most $5$ for any input value making sense in the physical word, see wikipedia on union-find).\nLet $A$ be a DFA recognizing $L$, with states $Q$, transition function $\\delta:Q\\times\\Sigma\\to Q$, and initial state $q_0.$\nLet $k=|Q|$, since $L$ is fixed $k$ is a constant.\nLet $a_0a_2\\dots a_{n-1}\\in\\Sigma^n$ be the word currently under the window.\nThe idea is to maintain a memory structure $m$, giving for each word $u_i=a_i\\dots a_{n-1}$ the state $q_i$ reached by $A$ after reading $u_i$.\nWe will also maintain an index $\\gamma\\in[0,n-1]$, giving the identifier associated with $u_0$. The identifier for $u_j$ is $\\gamma+j \\mod n$.\nThe UFD structure will store identifiers of all words $u_0\\dots u_{n-1}$, and two words $u_i,u_j$ will be in the same partition if and only if $q_i=q_j$. The common state $q$ labels the partition.\nSo in order to know whether the current word is in $L$, it suffices to identify the label $q$ of partition of the identifier $\\gamma$ (corresponding to the word $u_0$), and check whether $q$ is accepting.\nWhen a new letter $a$ is read, we update the memory as follows:\n\nthe identifier $\\gamma$ is deleted from the UFD structure\na new identifier $\\gamma$ is added, and joins the partition labeled $q_"}
+{"output_text": "Questions() {\n val questions = ArrayList()\n val questionsAdapter = QuestionsAdapter(questions)\n val questionsRecyclerView = findViewById(R.id.questions_recycler_view)\n questionsRecyclerView.layoutManager = LinearLayoutManager(this)\n questionsRecyclerView.adapter = questionsAdapter\n questionsRecyclerView.addItemDecoration(DividerItemDecoration(this, DividerItemDec", "input_text": "DROP or DragEvent.ACTION_DRAG_ENDEDI do not know which one, check (Pseudocode below)\nif(imageDragged.id==location.id) then replace the question mark image for imageDragged\nelse animate the image to the place where it comes\n\nI do not know if creating a class that implements onDragListener() or something like that, I'd like to have it generic so I can use it on different games like for instance :\nSKATE(id:1) ARCHERY(id:2) FOOTBALL(id:3)\nAnswers : TABLE(C.A. id:1) BOW(C.A. id:2) GRASS(C.A. id:3) GOAL(C.A. id:3) BALL(C.A. id:3) ARROW(C.A. id:2) AXES(C.A. id:1) WHEELS(C.A. id:1)\nSo if I drag and drop for instance BOW to FOOTBALL then it should display that is bad, otherwise say that it's good.\n\nA:\n\nEXAMPLE 1/3\nJust for reference and summarize everything. Here is one 100 lines code, within single Activity and imports, representing all this behavior even with simple animation. \n\nclass MainActivity : AppCompatActivity() {\n\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n setContentView(R.layout.activity_main)\n bind()\n }\n\n private fun bind() {\n addQuestions()\n addAnswers()\n }\n\n @SuppressLint(\"InflateParams\")\n private fun add"}
+{"output_text": " donations.\n(iii) A communication that provides a method of making a contribution or donation, regardless of the communication. This includes, but is not limited to, providing a separate card, envelope, or reply device that contains an address to which funds may be sent and allows contributors or donors to indicate the dollar amount of their contribution or donation to the candidate, political committee, or other organization.\n(iv) A communication that provides instructions on how or where to send contributions or donations, including providing", "input_text": "solicit, accept, or receive\".\n\nA:\n\nThere is a very detailed definition of \"solicit\" in 11 CFR \u00a7 110.20 - Prohibition on contributions, donations, expenditures, independent expenditures, and disbursements by foreign nationals (52 U.S.C. 30121, 36 U.S.C. 510):\n\n(6) Solicit has the same meaning as in 11 CFR 300.2(m).\n\nwhere 11 CFR 300.2(m) is:\n\nTo solicit. For the purposes of part 300, to solicit means to ask, request, or recommend, explicitly or implicitly, that another person make a contribution, donation, transfer of funds, or otherwise provide anything of value. A solicitation is an oral or written communication that, construed as reasonably understood in the context in which it is made, contains a clear message asking, requesting, or recommending that another person make a contribution, donation, transfer of funds, or otherwise provide anything of value. A solicitation may be made directly or indirectly. The context includes the conduct of persons involved in the communication. A solicitation does not include mere statements of political support or mere guidance as to the applicability of a particular law or regulation.\n(1) The following types of communications constitute solicitations:\n(i) A communication that provides a method of making a contribution or donation, regardless of the communication. This includes, but is not limited to, providing a separate card, envelope, or reply device that contains an address to which funds may be sent and allows contributors or donors to indicate the dollar amount of their contribution or donation to the candidate, political committee, or other organization.\n(ii) A communication that provides instructions on how or where to send contributions or donations, including providing a phone number specifically dedicated to facilitating the making of contributions or"}
+{"output_text": " duration.\nYou can use time.time() to get the current time, and then use time.time() - start to get the time between start and now.\nYou can use time.time() - start to get the time between start and now.\nYou can use time.time() - start to get the time between start and now.\nYou can use time.time() - start to get the time between start and now.\nYou can use time.time() -", "input_text": " maze.draw(goal)\n text = draw_time(start, pause_time)\n pygame.draw.rect(screen, (255, 100, 0), pygame.Rect(x,y,10,10))\n screen.blit(text[0], (700, 15))\n\n # victory screen\n if victory:\n screen.fill((0, 0, 0))\n time_text = font1.render(\"Time Taken: \" + text[1],True,(255,255,255))\n victory_text = font2.render(\"VICTORY!\",True,(255,255,255))\n reset = font3.render(\"(Press Enter to Start New Game)\",True,(255,255,255))\n\n screen.blit(victory_text,(468 - (victory_text.get_width() // 2), 328 - (victory_text.get_height() // 2)))\n screen.blit(time_text, (468 - (time_text.get_width() // 2), (248 - (time_text.get_height() // 2)) + victory_text.get_height()))\n screen.blit(reset, (468 - (reset.get_width() // 2), (248 - (reset.get_height() // 2)) + victory_text.get_height() + time_text.get_height()))\n\n clock.tick(60)\n pygame.display.flip()\n\nA:\n\nYou are dealing with two different kinds of time measurement here, instants and durations. What you get from time.time() is an instant - it describes a specific point in time. When you substract two instants you get a"}
+{"output_text": " $(\"#btnRelatorio\").on(\"click\", function () {\n var dados = $(\"#dados\").val();\n $.ajax({\n url: \"gerarRelatorio.php\",\n data: {\n dados: dados\n },\n type: \"POST\",\n success: function (result) {\n $(\".resposta\").html(result);\n }\n });\n });\n}\n\n", "input_text": "Gr no PHP\nArray\n(\n [17] => Array\n (\n [0] => Array\n (\n [data] => 2019-03-01\n [ofetas] => 22.65\n [decisoes] => 6\n )\n\n [1] => Array\n (\n [data] => 2019-03-03\n [ofetas] => 55.33\n [decisoes] => 3\n )\n\n [2] => Array\n (\n [data] => 2019-03-05\n [ofetas] => 30.45\n [decisoes] => 2\n )\n\n )\n\n [18] => Array\n (\n [0] => Array\n (\n [data] => 2019-03-02\n [ofetas] => 78.39\n [decisoes] => 0\n )\n\n [1] => Array\n (\n [data] => 2019-03-05\n [ofetas] => 30.00\n [decisoes] => 1\n )\n\n )\n\n)\n\nA:\n\nOlha, eu acho que o melhor modo de voc\u00ea reaproveitar as informa\u00e7\u00f5es inseridas no input seria assim:\nphp\n$html.= \"\n \n Gerar Relat\u00f3rio \n \";\necho $html;\n\njavascript\nsuccess: function (result) {\n $(\".resposta\").html(result);\n"}
+{"output_text": " the soil. If you have a lot of weeds, you can use a weed killer. I use a product called \"Weed-B-Gon\" by Weed-B-Gon. It's a liquid concentrate that you apply to the weeds. It's a slow-acting product. It's not a broad-spectrum herbicide. It's a selective herbicide. It's not a systemic herbicide. It's not a contact herb", "input_text": " your spreader, in the amount suggested on the package. Don't throw it on by hand and don't over-apply, either. Rake lightly with a leaf rake and then roll. \nKeep the top continually moist. It might mean you water 2 or 3 times a day. Do not saturate. This takes almost 2 weeks. Allow the soil to dry a bit before your first mowing. Gradually allow the soil to dry out between waterings to train your lawn to have deep roots and becomes drought tolerant. Aim for once per week watering. When you water make sure the amount is enough to wet the soil 4-6\" deep. Don't water again until your footprints in the grass are clear and the blades stay down. Then water deeply. And water during the day so that your grass isn't wet at night. This will prevent disease.\nMowing. Not sure where you live but if your grass is like ours in the Pacific Northwest, never mow below 3\". These grasses have large root systems, genetically. If there isn't enough top growth to feed these roots, your grass will not thrive and the weeds will be back. Always make sure your blades are sharp. If you miss a week of mowing and the grass has gotten long, take it down in stages. Don't cut more than 1/3 of the height in one cutting. And remove the clippings. I haven't got much trust in mulching mowers. If this were a huge pasture I wouldn't remove clippings, but if you've invested all this effort, I'd use the clippings in my compost, to be used after decomposed.s\nYour lawn should look lush and dark green. The 3\" height will shade out weed seeds and help to preserve"}
+{"output_text": "css\" href=\"CSS style sheets/bootstrap-theme.min.css\">\n \n \n \n \n\n\n \n \n \n\n \n\n \n \n observers = new ArrayList<>();\n private XYChart plot;\n\n public WeatherUpdater(XYChart plot) {\n this.plot = plot;\n }\n\n public WeatherUpdater() {\n\n }\n\n public void start(){\n updater = new Thread(this,\"Weather updater\");\n updater.start();\n }\n\n public void interrupt(){\n isRunning = false;\n updater.interrupt();\n }\n\n public XYChart getPlot() {\n return plot;\n }\n\n @Override\n public void run() {\n isRunning = true;\n while(isRunning){\n try{\n PlotDataUpdater dataUpdater = new PlotDataUpdater<>();\n WEATHER_STATION.sendQuery();\n response = WEATHER_STATION.getCurrentResponse();\n updateObservers();\n WeatherConditions weatherConditions = observers.get("}
+{"output_text": " above code to create a function that can be used to create a large collection of images.\nHere is a function that can be used to create a large collection of images.\nClearAll[createImageCollection];\ncreateImageCollection[\n {img1, img2, img3, ...},\n {ncols, nrows},\n {col, row}\n] :=\n Module[{i, j, lcols, lrows},\n lcols =", "input_text": "using halirutan's great answer we can do some mush-ups.\nHere is an example.\nAbsoluteTiming[\n doyleSpiralImages = Flatten@\n Table[(lcols = RandomSample[cols];\n all = \n Table[colorCircleParts[\n createCircleParts[spiral /@ spoints, i, j], lcols], {i, -5, \n 6}, {j, 0, 12}]; \n Image[Graphics[all, \n PlotRange -> {{-20, 20}, {-20, 20}}]]), {20}];\n ]\ndoyleSpiralImagesBW = \n ColorConvert[#, \"Grayscale\"] & /@ doyleSpiralImages;\ndoyleSpiralImagesBWBin = \n Flatten@Table[\n Binarize[#, b] & /@ doyleSpiralImagesBW, {b, {0.15, 0.45}}];\n\n(* {31.5697, Null} *)\n\nAbsoluteTiming[\n nc = 16;\n directBlendingImages = \n Table[ImageAdjust[\n Blend[Colorize[#, \n ColorFunction -> \n RandomChoice[{\"BrightBands\", \"FruitPunchColors\", \n \"AvocadoColors\"}]] & /@ \n RandomChoice[doyleSpiralImagesBWBin, nc], \n RandomReal[1, nc]]], {25}];\n ]\n\n(* {42.7025, Null} *)\n\nMulticolumn[ColorNegate /@ directBlendingImages, 6]\n\nMush-ups with larger collections of images\nIdeally, we can use procedures in the"}
+{"output_text": "/$biggestnum)*100);\nif ($vote_b!=0) $vp_b = intval(($vote_b/$biggestnum)*100);\nif ($vote_c!=0) $vp_c = intval(($vote_c/$biggestnum)*100);\nif ($vote_d!=0) $vp_d = intval(($vote_d/$biggestnum)*100);\nif ($vote_e!=0)", "input_text": "a> \";\nif ($aim) $btns.= \" \";\nif ($icq) $btns.= \" \";\nif ($yahoo) $btns.= \" \";\nif ($homepage) $btns.= \" \";\n\nif ($vote_a > $biggestnum) $biggestnum = $vote_a;\nif ($vote_b > $biggestnum) $biggestnum = $vote_b;\nif ($vote_c > $biggestnum) $biggestnum = $vote_c;\nif ($vote_d > $biggestnum) $biggestnum = $vote_d;\nif ($vote_e > $biggestnum) $biggestnum = $vote_e;\nif (!$biggestnum) $biggestnum = $vote_a;\n$vp_a = 0;\n$vp_b = 0;\n$vp_c = 0;\n$vp_d = 0;\n$vp_e = 0;\nif ($vote_a!=0) $vp_a = intval(($vote_a"}
+{"output_text": "Invocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.5.RELEASE.jar:", "input_text": "$$FastClassBySpringCGLIB$$be505737.invoke() ~[classes/:na]\n at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:366) ~[spring-tx-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[spring-tx-5.2.5.RELEASE.jar:5.2.5.RELEASE]\n at org.springframework.aop.framework.ReflectiveMethod"}
+{"output_text": "0.0, heap=0.0, eden=0.0, free=0.0, maxSize=1.0, maxActive=0, maxIdle=0, maxWait=0, minEvictableIdleTimeMillis=60000, maxIdle=0, minEvictableIdleTimeMillis=60000, numTestsPerEvictionRun=0, testOnBorrow=true, testWhileIdle=true", "input_text": "UseG1GC' to JVM options)\n[11:50:00] ^-- Specify JVM heap max size (add '-Xmx[g|G|m|M|k|K]' to JVM options)\n[11:50:00] ^-- Set max direct memory size if getting 'OOME: Direct buffer memory' (add '-XX:MaxDirectMemorySize=[g|G|m|M|k|K]' to JVM options)\n[11:50:00] ^-- Disable processing of calls to System.gc() (add '-XX:+DisableExplicitGC' to JVM options)\n[11:50:00] Refer to this page for more performance suggestions: https://apacheignite.readme.io/docs/jvm-and-system-tuning\n[11:50:00] \n[11:50:00] To start Console Management & Monitoring run ignitevisorcmd.{sh|bat}\n[11:50:00] Data Regions Configured:\n[11:50:00] ^-- default [initSize=512.0 MiB, maxSize=1.0 GiB, persistence=true]\n[11:50:00] \n[11:50:00] Ignite node started OK (id=7ad24962, instance name=attiryak)\n[11:50:00] >>> Ignite cluster is not active (limited functionality available). Use control.(sh|bat) script or IgniteCluster interface to activate.\n[11:50:00] Topology snapshot [ver=2, locNode=7ad24962, servers=1, clients=1, state=INACTIVE, CPUs=8, offheap="}
+{"output_text": " to the first.\nI'm getting a memory error when I try to use the factory to create the second controller.\nI'm using the factory to create the controller because I want to use the factory to create the instance of the controller that is related to the first.\nI'm using the factory to create the controller because I want to use the factory to create the instance of the controller that is related to the first.\nI'm using the factory to create the controller because I want to", "input_text": " also say that you can break up these configuration files by component. Just like you break up your code, the components that need database information likely do not need image paths. So you can have a file for database info, image path info, etc. Then have your components load the file that they need. \nIn the java-specific case, you can put these files on your classpath and have your components reference them. I like using.properties files because java has a nice class, Properties, for dealing with them.\nSo here's a tiny example for an image provider that gives you a BufferedImage, given the filename.\nimage.properties\n icon.path=/path/to/my/icons\n background.path=/path/to/my/backgrounds\n\nMake sure this file is on your classpath. Then here's my provider class\n public class ImageProvider {\n private static final String PROP_FILE = \"image.properties\"; \n private static final String ICON_PATH = \"icon.path\";\n\n private Properties properties; \n\n public ImageProvider() {\n properties = new Properties();\n properties.load(getClass().getClassLoader().getResourceAsStream(PROP_FILE));\n }\n\n public BufferedImage getIcon(String icon) {\n return ImageIO.read(properties.getProperty(ICON_PATH) + icon);\n }\n}\n\n Q:\n\nphp memory error in depenency injection\n\nI would have used google but I'm going out and hope u guys can help me with a solution or tell me what I'm doing wrong by the time I get back.\nI passed in an instance of my factory to my controller and based on something I want to use the factory to begin another instance of a controller that is related"}
+{"output_text": ".\n\nA:\n\nI'm not sure if this is what you're looking for, but I've been camping for years and have found that the best food for me is a combination of the following:\n\nBreakfast: oatmeal, fruit, and a little bit of sugar.\nLunch: a sandwich with a little bit of cheese, a little bit of mayo, and a little bit of mustard.\nDinner: a big salad with a little bit of", "input_text": "yme, sorrel, etc.). Less bland than typical carb food (rice, couscous) when eaten alone. \n(-) need cooking (watch out for the type: some, usually orange/yellow ones, are quite fast, while others may need an hour)\n(-) the tent will smell\nCaloric value: 180\nWhole wheat pasta\n(+) Do not spoil\n(+) Good caloric value for weight\n(+) Easy to cook (preferably go for thinner & compact varieties, such as thin spaghetinni)\n(-) Needs to be cooked. For winter camping, you can either make it a soup or else you have to waste the water.\nCaloric value: 352\nOatcakes\n(+) long lasting \n(+) high calories to weight ratio \n(+) go well with cheese, spreads, salami etc\nCaloric value: about 430.\nPeanut Butter\n(+) long lasting (not the 100% kind, though)\n(+) highly caloric\n(+) small volume\n(+) comes in many package sizes, usually light but strong plastic jars with screw lid\n(-) Usually requires something to spread it on\n(-) Hardens in cold weather\nCaloric value: 588\nHoney\n(+) does not spoil. (apparently literally never)\n(+) small volume\n(+) comes in many package sizes, including light but strong plastic jars with screw lid\n(+) also serves as sweetener for tea/coffee\n(-) Usually requires something to spread it on\nCaloric value: 304\n\nOther ideas:\n\ntea - not for eating, but a must nevertheless\nPowdered juices\nsmoked cheese\nbutter\ninstant soups & powdered sauces: you can add a bit of flavor a little cost\ndried soiled fish\nrice: Very easy for digestion hence very light food, yet a great source of carbohydrates"}
+{"output_text": "IVE_ATTRIBUTES );\r\n for ( var i_a = 0; i_a < noOfAttributes; ++ i_a ) {\r\n var attrName = gl.getActiveAttrib( progObj, i_a );\r\n progObj.attribIndex[attrName] = i_a;\r\n }\r\n return progObj;\r\n }\r\n return 0;\r\n };\r\n ShaderProgram.Use = function( progObj )", "input_text": " my, this.pos );\r\n var tz = Dot( [-mz[0], -mz[1], -mz[2]], this.pos ); \r\n var m = IdentityMat44();\r\n m[0] = mx[0]; m[1] = my[0]; m[2] = mz[0]; m[3] = 0;\r\n m[4] = mx[1]; m[5] = my[1]; m[6] = mz[1]; m[7] = 0;\r\n m[8] = mx[2]; m[9] = my[2]; m[10] = mz[2]; m[11] = 0;\r\n m[12] = tx; m[13] = ty; m[14] = tz; m[15] = 1; \r\n return m;\r\n } \r\n \r\n var ShaderProgram = {};\r\n ShaderProgram.Create = function( shaderList ) {\r\n var shaderObjs = [];\r\n for ( var i_sh = 0; i_sh < shaderList.length; ++ i_sh ) {\r\n var shderObj = this.CompileShader( shaderList[i_sh].source, shaderList[i_sh].stage );\r\n if ( shderObj == 0 )\r\n return 0;\r\n shaderObjs.push( shderObj );\r\n }\r\n var progObj = this.LinkProgram( shaderObjs )\r\n if ( progObj!= 0 ) {\r\n progObj.attribIndex = {};\r\n var noOfAttributes = gl.getProgramParameter( progObj, gl.ACT"}
+{"output_text": "SRD style of play.\n\nThe d20SRD is a great resource for this.\n\nHero Points are a resource that can be used to make a character more powerful. They are used to make a character more powerful by adding a bonus to a roll, or by adding a bonus to a skill check.\n\nThe d20SRD has a section on Hero Points.\n\nHero Points are a resource that can be used to make a character more powerful. They", "input_text": "Vengeful over hurt pride\u201d, \u201cFamily Man\u201d.\nFor the third aspect, think about what motivates your character, what shaped him to become who he is, and what pushed him to the life of an adventurer. The best aspects are ones that can be used both for or against your character. ex. \u201cMust protect my friends at all costs\u201d, \u201cPeople are not always what they seem\u201d, \u201cI Heart Forbidden Lore\u201d, \u201cThere must be some way I can find a profit from this\u2026\u201d\nEach character will get 3 fate points. When you level up, they will be refreshed. You can get more fate points whenever your character suffers due to one of his aspects (depending on the situation, this could result in failed skill rolls, damage, or just social humiliation). Spending a fate point allows you to either reroll the d20 roll you just made, or add +4 to it, your choice, but you can only spend a fate point when one of your aspects applies to the roll you\u2019re making. For instance, \u201cI Heart Forbidden Lore\u201d could help you if you\u2019re doing research or trying to recall facts about some kind of demonic monster, but it wouldn\u2019t help you on a to-hit roll against a goblin. Regardless of aspects, a fate point can always be spent to stabilize you if you\u2019re dying.\n\nWe prefer them to action point type mechanics because if you're going to track a resource, it should give you a good boost/save your bacon not a small bonus.\n\nA:\n\nHero Points are interesting. However, reading the d20SRD, they are more akin to WFRP's Fortune Points. Quote the OP:\n\nI don't mind what system it's imported from as long as it can support Pathfinder/d20"}
+{"output_text": "01\", \"05/28/2006 12:00\", \n\"05/28/2006 17:01\", \"05/28/2006 22:00\", \"05/29/2006 03:00\", \"05/29/2006 08:00\", \n\"05/29/2006 08:01\", \"05/29/2006 13:00\", \"05/29/2006 18:00\", \"05/29/2006 18:01\", \n\"05", "input_text": "/22/2006 21:00\", \"05/22/2006 21:01\", \n\"05/23/2006 02:00\", \"05/23/2006 07:00\", \"05/23/2006 07:01\", \"05/23/2006 12:00\", \n\"05/23/2006 17:01\", \"05/23/2006 22:00\", \"05/24/2006 03:00\", \"05/24/2006 08:00\", \n\"05/24/2006 08:01\", \"05/24/2006 13:00\", \"05/24/2006 18:00\", \"05/24/2006 18:01\", \n\"05/24/2006 23:00\", \"05/24/2006 23:01\", \"05/25/2006 04:01\", \"05/25/2006 09:00\", \n\"05/25/2006 09:02\", \"05/25/2006 14:01\", \"05/25/2006 19:01\", \"05/26/2006 00:01\", \n\"05/26/2006 05:00\", \"05/26/2006 10:00\", \"05/26/2006 15:00\", \"05/26/2006 20:00\", \n\"05/27/2006 01:00\", \"05/27/2006 01:01\", \"05/27/2006 06:00\", \"05/27/2006 11:00\", \n\"05/27/2006 16:00\", \"05/27/2006 16:01\", \"05/27/2006 21:01\", \"05/28/2006 02:00\", \n\"05/28/2006 02:01\", \"05/28/2006 07:00\", \"05/28/2006 07:"}
+{"output_text": "),@_msparam_2 nvarchar(4000),@_msparam_3 nvarchar(4000),@_msparam_4 nvarchar(4000)',@_msparam_0=N'ICX',@_msparam_1=N'DistCritGroupData',@_msparam_2=N'CIX',@_msparam_3=N'DistCritGroupData',@_msparam_4=N'DistCrit", "input_text": "OperatorType',@_msparam_3=N'CIX',@_msparam_4=N'DistCritGroupData',@_msparam_5=N'dbo'\n\nexec sp_executesql N'SELECT\n(case ic.key_ordinal when 0 then ic.index_column_id else ic.key_ordinal end) AS [ID],\nclmns.name AS [Name]\nFROM\nsys.table_types AS tt\nINNER JOIN sys.schemas AS stt ON stt.schema_id = tt.schema_id\nINNER JOIN sys.indexes AS i ON (i.index_id > @_msparam_0 and i.is_hypothetical = @_msparam_1) AND (i.object_id=tt.type_table_object_id)\nINNER JOIN sys.index_columns AS ic ON (ic.column_id > 0 and (ic.key_ordinal > 0 or ic.partition_ordinal = 0 or ic.is_included_column!= 0)) AND (ic.index_id=CAST(i.index_id AS int) AND ic.object_id=i.object_id)\nINNER JOIN sys.columns AS clmns ON clmns.object_id = ic.object_id and clmns.column_id = ic.column_id\nWHERE\n(i.name=@_msparam_2)and((tt.name=@_msparam_3 and SCHEMA_NAME(tt.schema_id)=@_msparam_4))\nORDER BY\n[ID] ASC',N'@_msparam_0 nvarchar(4000),@_msparam_1 nvarchar(4000"}
+{"output_text": "\n {\n {EdgeForm[Black], FaceForm[LightYellow], \n FaceForm[LightBlue], FaceForm[LightGreen], EdgeForm[Thick], \n toCirle[1, r], toCirle[a^p, r]},\n {\n FaceForm[LightYellow], FaceForm[LightBlue], FaceForm[LightGreen], \n FaceForm[LightYellow], FaceForm[LightBlue], FaceForm", "input_text": "yle[p, q];\n {a, b} = Conjugate /@ {a, b};\n c1 = toCirle[#, r] & /@ NestList[a*# &, 1, p - 1];\n c2 = toCirle[#, r] & /@ NestList[b*# &, 1, q - 1];\n Graphics[{EdgeForm[Black], FaceForm[LightYellow], c2, \n FaceForm[LightBlue], c1, FaceForm[LightGreen], EdgeForm[Thick], \n toCirle[1, r], toCirle[a^p, r]}]\n ]\n\npqPlot[3, 8]\n\nIf you include the inner base circle in your counting, you have 3 circles in the first and 8 circles in the other direction until you reach the outer end circle.\nTaking this into account and including some of the colors in the original painting, we can come up with a very close optical copy of what the artist did. I played around with the plot-range to make it fit.\n{a, b, r} = doyle[3, 8];\n{a, b} = Conjugate /@ {a, b};\nspoints = {a*b^-1, a, b};\ncols = {GrayLevel[0.1], RGBColor[0.078, 0.71, 0.964], \n RGBColor[0.95, 0.36, 0.09], RGBColor[0.77, 0.17, 0.12], \n RGBColor[0.07, 0.6, 0.25], RGBColor[.32,.24,.55]};\nrange = 5.585;\n\nGraphics["}
+{"output_text": "]);\n };\n\n printf(\"Data for first block: %i, %i, %.2f\\n\", packet[0].port, packet[0].operation, packet[0].data);\n\n rc = send(block->outptr[0][0], packet, sizeof(bro_fist_t) * BUFFER_SIZE, 0);\n\n if (rc < 0)\n {\n perror(\"send() failed\");\n return", "input_text": "\n bro_fist_t packet[BUFFER_SIZE];\n\n for (i = 1; i < block->nin; i++) {\n bro_encode_sci_datablock(&packet[i-1], block->inptr[i]);\n };\n\n printf (\"Data for first block: %i, %i, %.2f\\n\", packet[0].port, packet[0].operation, packet[0].data);\n\n rc = send(block->inptr[0][0], packet, sizeof(bro_fist_t) * BUFFER_SIZE, 0);\n\n if (rc < 0)\n {\n perror(\"send() failed\");\n return -1;\n }\n\n printf(\"%d bytes of data were sent\\n\", rc);\n return 0;\n}\n\nint bro_sens_read (scicos_block *block)\n{\n int rc, i;\n bro_fist_t packet[BUFFER_SIZE];\n\n rc = recv(block->inptr[0][0], packet, sizeof(bro_fist_t) * BUFFER_SIZE, 0);\n printf(\"%d bytes of data were received\\n\", rc);\n if (rc < 0)\n {\n perror(\"recv() failed\");\n return -1;\n }\n\n printf(\"Starting to set outputs :3 [%i]\\n\", block->nout);\n\n for (i = 0; i < block->nout; i++) {\n printf(\"Next Step defining outputs :D [%i]\\n\", i);\n bro_decode_sci_datablock(&packet[i], &block->outptr[i][0"}
+{"output_text": " \"I have a problem with a player\" questions (which is a problem-players question).\nI don't think we need this tag.\n\nA:\n\nI agree with the other answers that the players tag is not useful.\nI think that the players tag is useful for questions that are about the players themselves. For example, questions about how to handle a player who is a jerk, or how to handle a player who is a jerk in a particular situation. ", "input_text": " 255);\n builder.Append(c);\n }\n }\n string result = builder.ToString();\n\n Q:\n\nBurninate [players]. The tag, I mean\n\nI've browsed through the players questions and found these ones:\n\nQuestions about issues with problem-players\nQuestions about social aspects of role-playing games or group-dynamics\nQuestion about absent-players\nQuestions about a random TRPG problem, in which players are involved somehow\n\nThere are more descriptive tags for types 1-3 questions, and type 4 is basically the majority of questions on RPG.SE. Do we really need the players tag?\n\nA:\n\nWe don't need it.\nI will agree with what was stated in the answers of the Worth of \"GM\" and \"players\" tags question.\nMy opinion on tags is simple: if I go into the tag query, I should know what I will be looking at. IMO tags are mostly used for filtering and searching. If I have a metagaming problem and I want to check if it was already asked, I will search the metagaming tag. If I feel I have decent lawyering skills, I will put the rules-as-written in my favorites and look for answering these. Point being: the tags I personally consider useful are tags that describe what the question is about.\nThe players tag doesn't. As you said, if I look through this tag, I don't know if I'm looking at \"I am a player\" questions (which doesn't actually need a tag, imo), \"I have a problem with a player\" questions (which can be either my problem with him being as a player or as a person, so either problem-players or something social or group-dynamics as you said) or even simply"}
+{"output_text": "(String message) in\n c:\\Users\\james\\Documents\\Visual Studio\n 2010\\Projects\\ChatClientGTK\\ChatClientGTK\\MainWindow.cs:line\n 123\nat ChatClientGTK.MainWindow.OnMessageReceived(String message) in\n c:\\Users\\james\\Documents\\Visual Studio\n 2010\\Projects\\ChatClientGTK\\ChatClientGTK\\MainWindow.cs:line\n ", "input_text": "(ex.ToString()); \n }\n\nAfter which the function finishes and the thread ends.\nThe code that ends the connection looks like this, and runs on the main thread:\n private void CloseConnection(string Reason)\n {\n // Show the reason why the connection is ending\n UpdateLog(Reason);\n // Enable and disable the appropriate controls on the form\n txtIp.Sensitive = true;\n txtUser.Sensitive = true;\n txtMessage.Sensitive = false;\n btnSend.Sensitive = false;\n btnConnect.Label = \"Connect\";\n\n // Close the objects\n Connected = false;\n swSender.Close();\n srReceiver.Close();\n tcpServer.Close();\n }\n\nAnd the try/catch statements above catch this error:\n\nSystem.IO.IOException: Unable to read data from the transport\n connection: A blocking operation was interrupted by a call to\n WSACancelBlockingCall. ---> System.Net.Sockets.SocketException: A\n blocking operation was interrupted by a call to WSACancelBlockingCall\nat System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,\n Int32 size, SocketFlags socketFlags)\nat System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32\n offset, Int32 size)\n--- End of inner exception stack trace ---\nat System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32\n offset, Int32 size)\nat System.IO.StreamReader.ReadBuffer()\nat System.IO.StreamReader.get_EndOfStream()\nat ChatClientGTK.MainWindow.Receive"}
+{"output_text": " order to stop all foreground threads you need to call SuspendAll method.\nforeach (Thread t in listofthreads) {\n try\n {\n t.Suspend();\n }\n catch { }\n}\n\nforeach (Thread t in listofthreads) {\n try\n {\n t.Resume();\n }\n catch { }\n}\n\nforeach (Thread t in listofthreads) {\n try", "input_text": "}\n catch { }\n }\n\n }\n else {\n if (utilisation.Dispatcher.CheckAccess())\n {\n utilisation.Visibility = Visibility.Hidden;\n }\n else\n {\n\n utilisation.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>\n {\n utilisation.Visibility = Visibility.Hidden;\n }));\n\n }\n Thread windowThread = new Thread(delegate() { verifing(); });\n windowThread.Start();\n listofthreads.Add(windowThread);\n }\n\n }\n\n }\n\ni need to kill properly all of the threads that i have used\n foreach (Thread t in listofthreads) {\n try\n {\n t.Suspend();\n }\n catch { }\n }\n\nBut the program indicates that the use of the method suspend isn't recommended.\n\nWhy?\nIt seems that some threads is still working even after the close of the windows, Why this happens? How can i fix it?\nIs another method of killing a thread exist in wpf?\n\nA:\n\n1) Why?\n\nSuspend method has been marked as Obsolete by Microsoft. Error states itself:\n\nThread.Suspend has been deprecated. Please use other classes in\n System.Threading, such as Monitor, Mutex, Event, and Semaphore, to\n synchronize Threads or protect resources.\n\n2) It seems that some threads is still working even after the close of\n the windows, Why this happens? How can i fix it?\n\nYou have started all threads as foreground thread which won't stop automatically when main thread finishes its execution. In"}
+{"output_text": "public class Adapter extends RecyclerView.Adapter {\n private List mDataset;\n private Context mContext;\n private LayoutInflater mInflater;\n private List mDataset1;\n private List mDataset2;\n private List mDataset3;\n private List mDataset4;\n private List mDat", "input_text": ".layout(ViewGroup.java:6075)\n at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2496)\n at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2212)\n at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1392)\n at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6752)\n at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)\n at android.view.Choreographer.doCallbacks(Choreographer.java:723)\n at android.view.Choreographer.doFrame(Choreographer.java:658)\n at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)\n at android.os.Handler.handleCallback(Handler.java:790)\n at android.os.Handler.dispatchMessage(Handler.java:99)\n at android.os.Looper.loop(Looper.java:164)\n at android.app.ActivityThread.main(ActivityThread.java:6494)\n at java.lang.reflect.Method.invoke(Native Method)\n at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)\n at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)\nDisconnected from the target VM, address: 'localhost:8603', transport:'socket'\n\nThanks\nHere is my Adapter Class :\n "}
+{"output_text": " $\\pm$1%.\n \\end{table}\n \\end{document}\n\nA:\n\nI would use the siunitx package to typeset the numbers.\n\\documentclass{article}\n\\usepackage{booktabs,siunitx}\n\\begin{document}\n\\begin{table}[ht]\n\\centering\n\\begin{tabular}{l*{6}{S[table-format=1.2]} }\n\\toprule", "input_text": "colsep\\relax}C}{\\textbf{Proximate analysis}}\\\\ \n & \\multicolumn{4}{c}{(wt. \\%)}\n & \\multicolumn{4}{c}{(wt. \\%)}\\\\\n \\cmidrule(lr){2-6} \\cmidrule(lr){7-9}\n & \\textbf{C} &\\textbf{ H} & \\textbf{N} & \\textbf{S}& \\textbf{O}$^\\gamma$ & \\textbf{VM} & \\textbf{FC} $^{\\varphi}$ & \\textbf{Ash}\\\\\n \\midrule\n \\textbf{OS} &9.3 &2.3 &0.2 &4.0 & 11.6 &24.0 &3.4 &72.6 \\\\\n \\textbf{GP}&48.8 &6.0 &1.9 &0.2& 35.7 &72.7 &19.9 &7.4 \\\\\n \\textbf{RH}&35.3 &4.7 &0.3 &0.1& 37.8 &64.4 & 12.8 &21.8 \\\\\n \\textbf{EG}& 48.2&5.9 & $<$D.L&$<$D.L&45.7 &88.5 &11.3 &0.24\\\\\n \\bottomrule\n \\end{tabularx}\n \\smallskip\\footnotesize\n VM: volatile matter, FC: Fixed carbon, D.L: detention limit. All values are expressed in dry basis.\\\\ \n $\\varphi$: Determined by difference: $\\text{FC}=100\\%-\\text{VM}\\%-\\text{Ash}\\%$.\\\\\n All reported values are given with an error of"}
+{"output_text": "ard correspondence) to the type of the proof.\n\nLong Answer\n\nWhat does a computable realization of ACC precisely mean and how to convert a proof involving ACC into a working computer program?\n\nThe first part of the question is about the computability of ACC. The second part is about the conversion of a proof involving ACC into a working computer program.\n\nWhat does a computable realization of ACC precisely mean and how to convert a proof involving ACC into a working computer program?", "input_text": "(x, y)$ happens to be of the form $y \\in \\mathbb{N} \\wedge \\phi'(y)$ we are fine. It turns out that this doesn't matter and the proof that Church's rule holds for set theory still holds. Finding a realizer for countable choice is a simple matter of reformatting as usual. See Rathjen's paper for the details.\nEdit: Realizability and similar techniques rely on having complete formal proofs available. This makes it quite hard to give an explicit example of extracting witnesses because formal proofs will usually be pretty long and complicated even for relatively simple statements (independent of whether we assume countable choice or not). In practice we handle formal proofs using proof assistants. I don't know if there are proof assistants that both allow countable choice and witness extraction, but certainly this is something that could be done.\n\nA:\n\nThere are a few issues raised in the question, some about the notions of computability and G\u00f6del number. I am just going to focus my answer on the first part of the question, and I'm going to give a very specific answer. So here is what I will attempt to answer:\n\nWhat does a computable realization of ACC precisely mean and how to convert a proof involving ACC into a working computer program?\n\nShort Answer\nTwo parts:\n\nA computable realisation of ACC would mean that it is possible to \"look inside\" an existential proof and extract the witness, and then use this witness in subsequent constructions e.g. the construction of a function. This would break the paradigm of proof irrelevance.\nIt is only possible to convert a proof involving ACC to a working computer program if ACC has some computable realisation. That is, for such a conversion there must be some concrete (non-black-box) program whose type corresponds (by the Curry-How"}
+{"output_text": " DiscreteDoubleKeyFrame(0, new Duration(TimeSpan.FromSeconds(0.5))));\n blinkAnimation.KeyFrames.Add(new DiscreteDoubleKeyFrame(1, new Duration(TimeSpan.FromSeconds(0.5))));\n blinkAnimation.KeyFrames.Add(new DiscreteDoubleKeyFrame(2, new Duration(TimeSpan.FromSeconds(0.5))));\n blinkAnimation.KeyFrames.Add", "input_text": ";\n\nTravelListDetail:\n \n \n Share Travel \n \n \n\nA:\n\nPass it as a prop to the child screen.\n \n\nThen, in the child, you write:\nprops.navigation.navigate('Welcome')\n\n(with a this. prefix if it is a class component).\n\n Q:\n\nHow to stop Storyboard animation applied to ListBoxItem?\n\nIn my chat application I'm having a listbox of users in which whoever sends a message and if his chat window is not open at user's side then his name starts blinking in listbox to notify user of incoming message.\nI am removing animation if the user selects that sender.But animation stops only for the element to which animation applied last.\nBelow is the code I am using for applying animation to listboxItem,\n private void BlinkSenderUsername(int index, string userRole)\n {\n blinkAnimation = new DoubleAnimationUsingKeyFrames();\n blinkAnimation.KeyFrames.Add(new"}
+{"output_text": " as well?\nimport pygame\nimport random\nimport math\n\npygame.init()\n\nscreen = pygame.display.set_mode((800, 600))\n\nclock = pygame.time.Clock()\n\nclass Tank:\n def __init__(self, x, y, width, height):\n self.x = x\n self.y = y\n self.width = width\n self.height = height\n self", "input_text": " (const (pure ()) <$> hole s) :*: hole t\n eloh (C f' :*: g') = (eloh (const () <$> f'), eloh g')\n\nA trie for a pair is a right trie stuffed inside a left trie, so the hole for a particular pair is found by making a hole for the right element in the particular subtrie for the left element.\nFor trees, we make another wrapper.\nnewtype DExpoTree x = DExpoTree (D (Expo (Either () (Tree, Tree))) x)\n deriving (Show, Eq, Functor)\n\nSo, how do we turn a tree into its trie recognizer? First, we grab its \"everyone but me\" trie, and we fill in all those outputs with False, then we plug in True for the missing entry.\nmatchMe :: EXPO t => t -> Expo t Bool\nmatchMe t = plug ((const False <$> hole t) :*: I True)\n\nHomework hint: D f :*: I is a comonad.\nAbsent friends!\n\n Q:\n\nTrouble Shooting Projectiles Upward in Pygame\n\nI'm in the process of writing a duel-player tank game, similar to one known as \"Tank Trouble\". Of course, I'm only in the baby steps of it right now and I'm a bit stuck on a particular little bug. At the moment, the code below enables me to display my sprite, able to move around in all the directions, and also able to shoot projectiles. The only issue, however, is that it can only shoot projectiles left or right. Does anyone have any suggestions as to how to change this so that the tank can shoot upward"}
+{"output_text": "*)\n\n0.00001 + 2.00005 - 2.00005 == 2.00006\n(* True *)\n\n0.00001 + 2.00005 - 2.00005 - 2.00005 == 2.00006\n(* True *)\n\n0.00001 + 2.00005 - 2.00005 - 2.00005 - 2.00005 == 2.00006\n(* True *)\n\n0.00001 +", "input_text": "t, 0, 5}, PlotRange -> All, \n AxesLabel -> {\"t\", \"x\"}], \n Plot[{Evaluate[y[t] /. sol], Evaluate[-z[t] /. sol]}, {t, 0, 5}, \n PlotRange -> All, AxesLabel -> {\"t\", \"y\"}, \n PlotStyle -> {Automatic, {Gray, Dashed}}], \n Plot[Evaluate[z[t] /. sol], {t, 0, 5}, PlotRange -> All, \n AxesLabel -> {\"t\", \"z\"}]}}]\n\nNumerical issues\nThe OP puts a finger on the problem with the observation in the OP's answer:\n\nif I change the region condition in the definition of xdot from y[t] > -z[t] to y[t]+z[t] > 0 (which seems equivalent to me...)\n\nThe inequalities are mathematically equivalent but not numerically equivalent. This can be demonstrated by the following:\n1. + $MachineEpsilon > 1.\n(* False *)\n\n(1. + $MachineEpsilon) - 1. > 0\n(* True *)\n\nThis is because there is a tolerance in comparing numbers. If they are approximately equal, as defined by Internal`$EqualTolerance, then strict comparison will return False.\nBlock[{Internal`$EqualTolerance = 0.},\n 1. + $MachineEpsilon > 1.\n ]\n(* True *)\n\nThe documentation page for Less points out another problem,\nrounding error:\n0.00001 < 2.00006 - 2.00005\n(* True *)\n\n0.00001 + 2.00005 == 2.00006\n(* True "}
+{"output_text": ".Toolbar>\n\n\n\n\n\n\n \n\n\n org.hibernate.dialect.MySQLDialect \n true \n update \n \n \n \n\n \n \n \n\n \n \n /WEB-INF/views/ \n \n \n .jsp \n \n \n\n \n \n \n \n \n \n\n \n \n \n \n org.arpit.java2blog.model.Country \n \n \n \n \n \n Company Address \n
\n \n \n \n ", "input_text": " editable. If everythig will be ok then i want to download excel file with data from inputs.\nThere is several inputs (depending on how much rows is in pdf with order) and i want to pass it all to my app. But below code dont work. Only result i have is token and value from button.\nprint(request.POST.keys())\nprint(request.POST['Submit'])\nprint(request.body)\n\n
\r\n \r\n Martena Mccray \r\n Post-Sales support \r\n Edinburgh \r\n 46 \r\n 2011/03/09 \r\n $324,050 \r\n ", "input_text": ">\r\n 2010/03/11 \r\n $850,000 \r\n \r\n \r\n Shou Itou \r\n Regional Marketing \r\n Tokyo \r\n 20 \r\n 2011/08/14 \r\n $163,000 \r\n \r\n \r\n Michelle House \r\n Integration Specialist \r\n Sidney \r\n 37 \r\n 2011/06/02 \r\n $95,400 \r\n \r\n \r\n Suki Burks \r\n Developer \r\n London \r\n 53 \r\n 2009/10/22 \r\n $114,500 \r\n \r\n \r\n Prescott Bartlett \r\n Technical Author \r\n London \r\n 27 \r\n 2011/05/07 \r\n $145,000 \r\n \r\n \r\n Gavin Cortez \r\n Team Leader \r\n San Francisco \r\n 22 \r\n 2008/"}
+{"output_text": ">${c3p0.version}\n \n\n \n org.springframework \n spring-core \n ${org.springframework.version} \n \n\n \n org.springframework \n spring-beans \n ${org.springframework.version", "input_text": " at org.springframework.orm.hibernate5.HibernateTransactionManager.doGetTransaction(HibernateTransactionManager.java:376)\n\npom.xml\n\n\n 4.0.0 \n org.pse \n plataforma-ejercicios \n 1.0-SNAPSHOT \n\n \n 1.8 \n 4.3.1.RELEASE \n 1.3.5.RELEASE \n 5.2.0.Final \n 5.1.38 \n 0.9.1.2 \n \n\n \n\n \n c3p0 \n c3p0 \n data tag \n data tag \n data tag \n data tag \n data tag \n \n span \n Bold word \n italic \n emphasis \n mark \n small \n sub \n sup \n Statements... \n NASA \n strikethrough \n deprecated info new info \n not relevant \n link \n Monday at 8:00 AM \n ruby baseannotation \n \n CTRL +ALT +CANC \n \n \n \n This is a short quote
\n This instead is a long quote that is going to use a lot of words and also cite who said that. \u2014Some People \n\n \n data tag \n "}
+{"output_text": "\n\n \n\n \n\n \n\n \n\n "}
+{"output_text": "\": 0,\n \"StartingMoney\": 0,\n \"StartingResources\": 0,\n \"StartingResourcesPerDay\": 0,\n \"StartingResourcesPerDayPerLevel\": 0,\n \"StartingResourcesPerLevel\": 0,\n \"StartingResourcesPerLevelPerLevel\": 0,\n \"StartingResourcesPerLevelPerLevel\": 0,\n \"StartingResourcesPerLevelPerLevel\": 0,\n \"StartingResourcesPerLevelPerLevelPerLevel\": 0", "input_text": " and CIA have all agreed that Russia has been actively working to interfere in US elections. So I don't see how I'm reaching or pushing any kind of agenda here to ask the question I'm asking, which is essentially a less broad form of:\n\n\"Has there been any data to support the possibility of vote\n manipulation since electronic voting has become a thing?\"\n\nAnd I narrowed it down to \"swing states\" (any states that have acted as swing states during that period) to make it even less broad. \nSo I think I asked a very fair and reasonable question in a very fair and reasonable way and I'm having trouble seeing why my question would be seen as pushing some kind of political agenda, which is what close voters seem to have insinuated: \n\nThe primary purpose of this question appears to be to promote or\n discredit a specific political cause, group or politician. It does not\n appear to be a good-faith effort to learn more about governments,\n policies and political processes as defined in the help center.\" \u2013\n user4012, tim, K Dog, hszmv, Texas Red\n\nAnd I'm concerned that perhaps the closing of my question was an effort to \n\n\"promote or discredit a specific political cause, group or politician\"\n\n Q:\n\nHow can I choose what type to deserialize at runtime based on the structure of the json?\n\nI have some data stored as Json. One property in the data is either an integer (legacy data) like so:\n\"Difficulty\": 2,\n\nOr a complete object (new versions):\n\"Difficulty\": {\n \"$id\": \"625\",\n \"CombatModifier\": 2,\n \"Name\": \"Normal\",\n \"StartingFunds"}
+{"output_text": " trying to generate code coverage report.\nI have added sonar-coverage-plugin-2.8.1.jar to my project.\nI have added sonar-runner-2.8.1.jar to my project.\nI have added sonar-scanner-2.8.1.jar to my project.\nI have added sonar-project-properties-2.8.1.jar to my project.\nI have added sonar-", "input_text": "ACTION); \n PendingIntent pendingIntent = PendingIntent.getBroadcast(this.mContext, locationUpdateRC, intent, flags); \n // PENDING INTENT TO BE FIRED WHEN THE LOCATIONMANAGER RECEIVES LOCATION UPDATE.\n // THIS PENDING INTENT IS CAUGHT BY OUR BROADCAST RECEIVER\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,0,minDistance,pendingIntent);\n this._monitoringLocation = true;\n }\n\nAnd then in the same class I put my broadcast receiver\npublic BroadcastReceiver locationReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n // TODO Auto-generated method stub\n Location location = (Location) intent.getExtras().get(LocationManager.KEY_LOCATION_CHANGED);\n if (location!= null) {\n //Do something with it \n }\n }\n };\n\nThe action for my intent filter is just a static reference to a constant set in my activity.\npublic static final String LOCATION_UPDATE_ACTION = \"com.corecoders.sqlmaptrack.LOCATION_UPDATE_RECEIVED\";\n\nThis worked in my case in providing me with accurate locations. You can set the distance to 0 if you want then what you will find is you get location fixes of an accuracy of 5 every second if you have a good fix of 4 satellites or more.\nI hope this helps you\n\n Q:\n\nCode Coverage not populated after sonar analysis\n\nI am using sonarqube5.6.1.\nI have a multi module project for which i am"}
+{"output_text": " of perspectives is done by the author, and the reader is expected to understand the switching.\nIn example (1), the author is writing from the perspective of Sanshiro, and the reader is expected to understand that Sanshiro is the one who is speaking.\nIn example (2), the author is writing from the perspective of Sanshiro, and the reader is expected to understand that Sanshiro is the one who is speaking.\nIn example (3), the author is writing", "input_text": " author has used \"That\" instead of \"It\". \"It\" (as used in sentence 2 of \"Example 29\") would have been more natural if the sentence was written from the author's perspective. \"That\" would fit if sentence was from Sanshiro's perspective, but if it his unspoken observation or the narrative has switched, how are we supposed to tell?, what is the convention? There is a bit more to it than just: background, plain form = time of utterance. \nIn example 29 we are told that sentence two is the \"voice\" of Shingo's: Are these his actual thoughts or observations, or even just what he could observe? I am confused. \n\nMy guess is that:\nPossibly this writing can be likened to the frames in a US-Comic book(?) where:\n- The authors narrative appears in the rectangular boxes?,\n- the ta-form sentences represent the words appearing in speech bubbles?\n- The plain form sentences refer to the images/pictures and the thoughts appearing in the \"thought bubbles\"? \nBut, I don't really know if this works. I have struggled with explanations in the paper (link below) but if somebody could explain in simple terms how to interpret the plain form sentences above I should be grateful. \nPaper: TENSE-ASPECT CONTROVERSY REVISITED: THE -TA AND -RU FORMS IN JAPANESE\nYoko Hasegawa; Link to paper: http://hasegawa.berkeley.edu/Papers/Hasegawa99.pdf\n\nA:\n\nTo my understanding as a native speaker, in all of the three examples, sentence (1) is written from the author's perspective, and sentence (2) is written from the perspective of a character in the story. The switching"}
+{"output_text": "lined);\n\n doc.setCharacterAttributes(selectionStart, selectionEnd, as, false);\n editor.replaceSelection(text);\n }\n\nA:\n\nI think you are looking for something like this:\nStyleContext context = new StyleContext();\nStyle style;\n\nthis.getTextPane().replaceSelection(\"\");\n\nstyle = context.addStyle(\"mystyle\", null);\nstyle.addAttribute(StyleConstants.FontSize, fontSize", "input_text": ". The thing is when I change style for ONE WORD one by one it's fine but next if I select a whole styled phrase and change its font color the whole phrase becomes ONE styled (the first style within the selected text) only :( \nHere is the problem snippet\n private void setFontColorStyle()\n {\n JTextPane editor=this.getTextPane();\n String text=this.getTextPane().getSelectedText();\n\n StyledDocument doc=(StyledDocument) editor.getDocument();\n int selectionEnd=this.getTextPane().getSelectionEnd();\n int selectionStart=this.getTextPane().getSelectionStart();\n\n Element element=doc.getCharacterElement(selectionStart);\n AttributeSet as = element.getAttributes();\n\n String family = StyleConstants.getFontFamily(as);\n int fontSize = StyleConstants.getFontSize(as);\n boolean isBold=StyleConstants.isBold(as);\n boolean isItalic=StyleConstants.isItalic(as);\n boolean isUnderlined=StyleConstants.isUnderline(as);\n\n StyleContext context = new StyleContext();\n Style style;\n\n this.getTextPane().replaceSelection(\"\");\n\n style = context.addStyle(\"mystyle\", null);\n style.addAttribute(StyleConstants.FontSize, fontSize);\n style.addAttribute(StyleConstants.FontFamily, family);\n style.addAttribute(StyleConstants.Foreground, this.fontColor);\n style.addAttribute(StyleConstants.Bold, isBold);\n style.addAttribute(StyleConstants.Italic, isItalic);\n style.addAttribute(StyleConstants.Underline, isUnder"}
+{"output_text": "claro que tem gente que \u00e9 cara de pau e nem se preocupa em retirar o voto\".\nO que acontece \u00e9 que o sistema n\u00e3o sabe se o usu\u00e1rio est\u00e1 votando ou n\u00e3o. O que o sistema sabe \u00e9 que o usu\u00e1rio votou. O que o sistema n\u00e3o sabe \u00e9 se o usu\u00e1rio est\u00e1 votando ou n\u00e3o.\nO que o sistema sabe \u00e9 que o usu\u00e1rio vot", "input_text": "a\u00e7\u00e3o). Essa irregularidade, como foi chamada, poderia ser detectada e coibida de outra forma. A retirada sequencial de votos em postagens de um mesmo membro (que n\u00e3o precisa ser em intervalos curtos de tempo) poderia ser detectada pelo sistema para que aquele usu\u00e1rio fosse devidamente punido.\nO qu\u00e3o f\u00e1cil \u00e9 implementar isso no sistema \u00e9 outra discuss\u00e3o. Talvez tenha realmente sido mais simples e direto implementar a limita\u00e7\u00e3o da remo\u00e7\u00e3o do voto. Mas \u00e9 importante ficar claro pra todo mundo que essa \u00e9 uma escolha de design da equipe do SE, e que isso n\u00e3o necessariamente se traduz em melhor usabilidade para a comunidade.\nA segunda justificativa (que era a que eu supunha existir) \u00e9 essa:\n\nEle tamb\u00e9m cita uma fraude conhecida como tactical downvoting (voto\n negativo estrat\u00e9gico). Por exemplo, voc\u00ea responde uma pergunta e logo\n em seguida outra pessoa responde de forma id\u00eantica. Essa pessoa d\u00e1 um\n downvote na sua resposta, pois ela sabe que as pessoas tendem a votar\n positivamente nas primeiras respostas e votar negativamente se alguma\n resposta j\u00e1 tem voto negativo. Depois de algum tempo ela retira o voto\n e faz de conta que nada aconteceu. Claro que tem gente que \u00e9 cara de\n pau e nem se preocupa em retirar o voto.\n\nO problema est\u00e1 justamente no \""}
+{"output_text": ".Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\n at Redcated.Authentication.Configuration.HttpHeaderInspectingAuthenticatorConfigurationElementCollection.GetInspectors() in D:\\Users\\ebrown\\Documents\\Visual Studio 2010\\Projects", "input_text": " CallSite.Target that the expected type that the dynamic proxy expects is HttpHeaderInspectingAuthenticatorConfigurationElement -- the 'this' I'm passing is a BasicAuthenticationHeaderInspectorConfigurationElement, derived from that base.\nSo what gives? Am I not getting something here? I tried passing (this as dynamic) or ((HttpHeaderInspectingAuthenticatorConfigurationElement)this) -- but both fail with the same problem.\nMicrosoft.CSharp.RuntimeBinder.RuntimeBinderException: The best overloaded method match for 'Redcated.Authentication.BasicAuthenticationInspectingAuthenticatorFactory.Construct(Redcated.Authentication.Configuration.BasicAuthenticationHeaderInspectorConfigurationElement)' has some invalid arguments\n at CallSite.Target(Closure, CallSite, Object, HttpHeaderInspectingAuthenticatorConfigurationElement )\n at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)\n at Redcated.Authentication.Configuration.HttpHeaderInspectingAuthenticatorConfigurationElement.GetInspector() in D:\\Users\\ebrown\\Documents\\Visual Studio 2010\\Projects\\Utility\\source\\Authentication Library\\Configuration\\HttpHeaderInspectingAuthenticatorConfigurationElement.cs:line 79\n at Redcated.Authentication.Configuration.HttpHeaderInspectingAuthenticatorConfigurationElementCollection.b__0(HttpHeaderInspectingAuthenticatorConfigurationElement i) in D:\\Users\\ebrown\\Documents\\Visual Studio 2010\\Projects\\Utility\\source\\Authentication Library\\Configuration\\HttpHeaderInspectingAuthenticatorConfigurationElementCollection.cs:line 78\n at System.Linq"}
+{"output_text": " {\n console.log('Disconnected from native app.');\n port = null;\n chrome.runtime.onMessage.removeListener( onNativeMessage );\n chrome.runtime.onMessage.removeListener( onDisconnected );\n}\n\n// Init the port.\nfunction initPort() {\n port = chrome.runtime.connectNative( \"native-app.js\" );\n port.onMessage.addListener( onNativeMessage );", "input_text": "Disconnect.addListener( onDisconnected );\n}\n\n// Listen for messages that come from the content script.\nchrome.runtime.onMessage.addListener(\n function( messageData, sender, sendResponse ) {\n if( messageData ) {\n sendNativeMessage(messageData);\n sendResponse( { res: 'done!' } );\n }\n } );\n\n// Sending a message to the port.\nfunction sendNativeMessage(messageData) {\n if( port == null )\n initPort();\n console.log( 'Sending message to native app:'+ JSON.stringify( messageData ) );\n port.postMessage( messageData );\n console.log( 'Sent message to native app.' );\n}\n\n// Receiving a message back from the Native Client API.\nfunction onNativeMessage( message ) {\n console.log('recieved message from native app:'+ JSON.stringify( message ) );\n\n alert( \"messaged received from Native: \" + JSON.stringify( message ) );\n //sending a message to Content Script to call a function\n if( message.methodName && message.methodName!= \"\" ) {\n chrome.tabs.query( { active: true, currentWindow: true }, function( tabs ) {\n chrome.tabs.sendMessage( tabs[0].id, message, function( response ) {\n // Call native again to return JavaScript callback function results\n alert (\"calc res received by extension : \" + response);\n sendNativeMessage({ type: \"JSCallbackRes\", callbackRes: response });\n } );\n } );\n }\n}\n\n// Disconnecting the port.\nfunction onDisconnected()"}
+{"output_text": "ViewController: self)\n }\n\nHide\nprivate func hide(contentController content : UIViewController)\n {\n content.view.removeFromSuperview()\n self.containerView.removeSubview(content.view)\n content.removeFromParentViewController()\n }\n\nConstraints\nprivate func addChildViewController(contentController content : UIViewController)\n {\n content.view.translatesAutoresizingMaskIntoConstraints = false\n", "input_text": ":self];\n [parent.view addSubview:view];\n [self didMoveToParentViewController:parent];\n\n NSArray *horizontalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@\"H:|-0-[view]-0-|\"\n options:0\n metrics:nil\n views:NSDictionaryOfVariableBindings(view)];\n [parent.view addConstraints:horizontalConstraints];\n\n NSArray *verticalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@\"V:|-0-[view]-0-|\"\n options:0\n metrics:nil\n views:NSDictionaryOfVariableBindings(view)];\n [parent.view addConstraints:verticalConstraints];\n}\n\nthen inside the parent UIViewController (the one which is already displayed), when I want to display my child popup view controller it calls:\nPopUpNotificationViewController *popup = [[self storyboard] instantiateViewControllerWithIdentifier:@\"NotificationPopup\"];\n[popup addPopupToController:self];\n\nYou can define whatever constraints you want on the child controller's view when adding it to the parent controller's view.\n\nA:\n\nYou can add constraints right after invoke of addSubview:, don't forget to set translatesAutoresizingMaskIntoConstraints to false\nHere is a code snippet of adding and hiding child view controller with constraints (inspired by apple guide)\nDisplay\nprivate func display(contentController content : UIViewController)\n {\n self.addChildViewController(content)\n content.view.translatesAutoresizingMaskIntoConstraints = false\n self.containerView.addSubview(content.view)\n content.didMove(toParent"}
+{"output_text": "TRIES],\n 'data2':[A LOT OF ENTRIES],\n 'data3':[A LOT OF ENTRIES],\n 'data4':[A LOT OF ENTRIES],\n 'data5':[A LOT OF ENTRIES],\n 'data6':[A LOT OF ENTRIES],\n 'data7':[A LOT OF ENTRIES],\n 'data8':[A LOT OF ENTRIES", "input_text": "I have been trying with this code:\n static void Main(string[] args)\n { \n string json = \"\";\n string pathJson = \"foo.json\";\n //Read file\n string temp = \"\";\n using (FileStream fs = new FileStream(pathJson, FileMode.Open))\n { \n using (BufferedStream bf = new BufferedStream(fs))\n {\n byte[] array = new byte[70000];\n while (bf.Read(array, 0, 70000)!= 0)\n {\n\n json = Encoding.UTF8.GetString(array);\n temp = String.Concat(temp, json);\n\n }\n }\n }\n\n XmlDocument doc = new XmlDocument();\n\n doc = JsonConvert.DeserializeXmlNode(temp, \"json\");\n\n using (var stringWriter = new StringWriter())\n using (var xmlTextWriter = XmlWriter.Create(stringWriter))\n {\n doc.WriteTo(xmlTextWriter);\n xmlTextWriter.Flush();\n xmlString = stringWriter.GetStringBuilder().ToString();\n }\n\n File.WriteAllText(\"outputPath\", xmlString);\n\n }\n\nThis code convert from json file to xml file. but when i try to convert a big json file (2GB), i can't. The process cost a lot of time and the string doesn't have capacity to store all the json. How i can store it? Is any way to do this conversion without use the datatype string?\nUPDATE:\nThe json format is:\n[{\n 'key':[some things],\n 'data': [some things],\n 'data1':[A LOT OF EN"}
+{"output_text": "DataSource.setMinEvictableIdleTimeMillis(1800000);\n basicDataSource.setValidationQuery(\"SELECT 1\");\n return basicDataSource;\n }\n}\n\nThen, you can use @Autowired to inject the BasicDataSource into your BattingStats class.\npackage com.example;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Component;\n\nimport", "input_text": " =\"isRightHand\" value = \"true\">\n \n\n\nA:\n\nYou can use @Configuration annotation to construct your beans using Java instead of XML, enabling you to dynamically calculate whatever variables you need to pass into bean constructors.\npackage com.example;\n\nimport java.net.URI;\nimport java.net.URISyntaxException;\n\nimport org.apache.commons.dbcp.BasicDataSource;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\n\nimport com.scorer.game.BattingStats;\n\n@Configuration\npublic abstract class DatabaseConfiguration {\n\n @Bean\n public BasicDataSource createDataSource() throws URISyntaxException {\n URI dbUri = new URI(System.getenv(\"DATABASE_URL\"));\n\n String username = dbUri.getUserInfo().split(\":\")[0];\n String password = dbUri.getUserInfo().split(\":\")[1];\n String dbUrl = \"jdbc:postgresql://\" + dbUri.getHost() + ':' + dbUri.getPort() + dbUri.getPath();\n\n BasicDataSource basicDataSource = new BasicDataSource();\n basicDataSource.setUrl(dbUrl);\n basicDataSource.setUsername(username);\n basicDataSource.setPassword(password);\n basicDataSource.setTestOnBorrow(true);\n basicDataSource.setTestOnReturn(true);\n basicDataSource.setTestWhileIdle(true);\n basicDataSource.setTimeBetweenEvictionRunsMillis(1800000);\n basicDataSource.setNumTestsPerEvictionRun(3);\n basic"}
+{"output_text": "$ with a finite index subgroup $H$ such that $H$ is not virtually cyclic.\nLet $G$ be a non-torsion-free, virtually free group with a finite index subgroup $H$ such that $H$ is not virtually cyclic. Let $K$ be a finite index subgroup of $H$.\nLet $A$ be a finite index subgroup of $G$ containing $K$. Let $B$ be a finite index subgroup of $A$ containing", "input_text": " |\\ R\\rangle$ be a (finitely presented) virtually torsion-free group. Let $H,K packed_d", "input_text": "na_sequence) {\n switch (c) {\n case 'A':\n m_packed_bits.push_back(false);\n m_packed_bits.push_back(false);\n break;\n\n case 'C':\n m_packed_bits.push_back(false);\n m_packed_bits.push_back(true);\n break;\n\n case 'G':\n m_packed_bits.push_back(true);\n m_packed_bits.push_back(false);\n break;\n\n case 'T':\n m_packed_bits.push_back(true);\n m_packed_bits.push_back(true);\n break;\n\n default:\n throw std::invalid_argument(\"Unknown character.\");\n }\n }\n }\n\n std::vector packed_dna_sequence::get_packed_sequence() const\n {\n // Copy. We don't want the client to tamper with the bits.\n return m_packed_bits;\n }\n\n std::string&& packed_dna_sequence::unpack() const\n {\n std::string ret;\n ret.reserve(m_packed_bits.size() / 2);\n\n for (size_t index = 0; index < m_packed_bits.size(); index += 2)\n {\n bool bit1 = m_packed_bits[index + 1];\n bool bit2 = m_packed_bits[index];\n size_t num = (bit2 << 1) | bit1;\n\n switch (num)\n {\n case 0:\n ret += 'A"}
+{"output_text": "=\"@+id/textViewGoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel_GoodsReceived_Separation_On_ContainerLevel", "input_text": "m/typo3/reference-services/8.7/en-us/Authentication/Index.html\n\n Q:\n\nHow to programmatically add constraint layouts to a scrollview?\n\nI have the following in mind:\n\nCreate a new Activity which contains somewhere on the layout a scrollview\nCreate a ConstraintLayout (width is on match-parent) with one edit-field and one textview next to eachother\n\n=> Now I would like to add with something like a button any number of constraint layouts of this kind to the scrollview.\nCan somebody explain how this is done? Is it even possible this way.\n(in AndroidStudio)\nEdit:\nI tried the following:\nprotected void addElementToScrollView() {\n ScrollView sv = getLayoutInflater()\n .inflate(R.layout.activity_goods_received_separation_on_container_level, null)\n .findViewById(R.id.scrollViewChanges);\n ConstraintLayout cl = findViewById(R.id.gc_scrollview_element);\n sv.addView(cl);\n}\n\nThis is inside the activity containing the scrollview:\n\n\n\n S = new HashSet(); \n HashSet Seq = new HashSet(); \n int ans = 0; \n\n // Hash all the array elements \n for (int i = 0; i < n; i++) {\n S.add(arr[i]); \n }\n System.out.println(S);\n // check each possible sequence from the start \n // then update optimal length \n for (int i = 0; i < n; ++i) \n { \n System.out.println(\"ARR \" + i);\n\n // if current element is the starting \n // element of a sequence \n if (!S.contains(arr[i]-1)) \n { \n //System.out.println(\"INSIDE.CONTAINS\");\n // Then check for next elements in the \n // sequence \n int j = arr[i]; \n int t = 0;\n while (S.contains(j)) { \n System.out.println(\"ANS \" + ans); \n t++;\n if (t > ans ) { Seq.add(j);}\n j++; \n // System.out.println(\"T \" + t);\n\n // System.out.println(\"SEQ <<<<<<< \" + Seq );\n }\n // update optimal length if this length \n // is more \n if (ans < j-arr[i]) {\n ans = j-arr[i]; \n } \n } \n } \n System.out.println(Seq);\n System.out.println(ans);\n\n "}
+{"output_text": "The vessel's size\nThe vessel's purpose\nThe vessel's construction\nThe vessel's crew\nThe vessel's command\nThe vessel's use\n\nThe first three are obvious. The fourth is the most important. The fifth is the most important. The sixth is the most important. The seventh is the most important.\n\nA:\n\nThe term \"boat\" is a generic term that can refer to a variety of different types of vessels. The term \"", "input_text": " and ferries, as you noted, are boats. That would fit the above definition (most ferries don't have lifeboats) conveniently, but there has to be more. Some yachts, ferries, tug boats, fishing boats, police boats, etc. do carry small lifeboats or dinghies, but they usually don\u2019t graduate to ship status because of that. (A tragic example being the Estonia [515.16 ft, 15,566 gross register tonnage]), a cruise ferry, which sank in the Baltic Sea. It is one of the worst maritime disasters of the 20th century, costing 852 lives. Anyone looking at it would not instinctively call it a boat. But it was built for coastal waterways, not deep, high seas. The coastal waterways puts it into the category of 'boat'. That it was used in high seas didn't make it high-seas-worthy, as history points out. It was not constructed[1] to be stable on taking on any water.)\nPer Mental Floss\n\nAnother factor the Naval Institute considers is the vessel\u2019s crew, command, and use. If it has a permanent crew with a commanding officer, it\u2019s usually a ship. If it\u2019s only crewed when actually in use and has no official CO, then you\u2019re probably dealing with a boat. Ships are also usually intended and designed for deep-water use and are able to operate independently for long periods of time. Boats, meanwhile, lack the fuel and cargo capacity for extended, unassisted operation.\n\nThe obvious exception to deep-water definition are the commercial fishing boats that go out for months in deep water. However, they don't have a fixed crew.\nMarine Insight lists seven differences, all of which must be taken into account. They are\n\n"}
+{"output_text": "listStr.id}}\"'+\n 'name=\"list_{{listStr.id}}\"'+\n 'ng-model=\"listItemId\" ng-value=\"listStr.id\"'+\n 'ng-checked=\"listFlag\" />' +\n '{{listStr.name}} ' +\n ' ' +\n '',\n controller: function($scope", "input_text": " is a simple example that shows the action. Actually about 50 items and after clicking on \"Without the string\" after clicking on the elements \"String #\" to visually remove the item takes about 1-2 seconds.\nFiddle\nI have the controller code:\ntestApp.controller('TestController', ['$scope', function ($scope) {\n\n $scope.category = [\n {id:1, name: \"Category 1\"},\n ...\n ];\n\n $scope.items = [\n {id: 1, category: {id: 1},name: \"Test 1\"},\n ...\n ];\n\n $scope.list = [\n {id: 1,name: \"String 1\"}\n ...\n ];\n\n angular.forEach($scope.category, function(categoryItem, i) {\n categoryHash[categoryItem.id] = i;\n });\n\n angular.forEach(menuItems, function(item) {\n var catCategory = categoryHash[item.category.id];\n if (!$scope.category[catCategory].items) {\n $scope.category[catCategory].items = [];\n }\n $scope.category[catCategory].items.push(item);\n });\n\n}])\n\nDirective code:\n.directive('listItems', function() {\n return {\n restrict: 'E',\n scope: {\n listArray: '=',\n listItemId: '=',\n listFlag: '='\n },\n template: '' +\n '' +\n ' \r\n \r\n \r\n\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n internalFavorites = [self.defaults objectForKey:k_key_favorites];\n });\n if (!internalFavorites) {\n internalFavorites = [NSArray array];\n }\n }\n \n return internalFavorites;\n }\n\n}\n\n- (void"}
+{"output_text": " and the second time when I reach \"cal2\".\nI want to fire notification only once, when I reach \"cal\" and \"cal2\".\n\nA:\n\nYou can use the same PendingIntent for both alarms.\nAlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\nIntent alertIntent = new Intent(this, AlertReceiver.class);\n\nPendingIntent pendingIntent = PendingIntent", "input_text": " alarmManager(cal and cal2) with different notification?\nI did this until now,\nin MainActivity:\nCalendar cal = Calendar.getInstance();\ncal.set(Calendar.DATE,19); \ncal.set(Calendar.MONTH,11); \ncal.set(Calendar.YEAR,2015);\ncal.set(Calendar.HOUR_OF_DAY, 21); \ncal.set(Calendar.MINUTE, 42); \ncal.set(Calendar.SECOND, 30);\n\nCalendar cal2 = Calendar.getInstance();\ncal2.set(Calendar.DATE,19); \ncal2.set(Calendar.MONTH,11); \ncal2.set(Calendar.YEAR,2015);\ncal2.set(Calendar.HOUR_OF_DAY, 21); \ncal2.set(Calendar.MINUTE, 43); \ncal2.set(Calendar.SECOND, 10);\n\nIntent alertIntent = new Intent(this, AlertReceiver.class);\nAlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\nalarmManager.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), PendingIntent.getBroadcast(this, 1, alertIntent, PendingIntent.FLAG_UPDATE_CURRENT));\nalarmManager.set(AlarmManager.RTC_WAKEUP, cal2.getTimeInMillis(), PendingIntent.getBroadcast(this, 2, alertIntent, PendingIntent.FLAG_UPDATE_CURRENT));\n\nnotice that I made to dates to fire notification and it is working, the notification in onReceive was fired twice, the first time when I reach \"cal\""}
+{"output_text": " the same for the other possible values).\nThe output of the merge is a new DataFrame with the same index as the left DataFrame, and the same columns as the right DataFrame. The index is the Cartesian product of the index of the left DataFrame and the index of the right DataFrame. The columns are the Cartesian product of the columns of the left DataFrame and the columns of the right DataFrame.\nThe output is a new DataFrame with the same index as", "input_text": " 31 72 34 +N2 36 66 17 85\n\nWhich has essentially created a duplicate dataframe for every index of my \"right\" dataframe. \nOn the one hand, I know how to do another workaround to get the dataframe I want with more code and breaking up one of the dataframes a bit more so that the merge is \"prettier\". However, I really want to know WHY this is happening? I want to be able to use the merge functionality in the future, but I don't fully understand what pandas is trying to do to produce this. \nAny help is greatly appreciated.\n\nA:\n\nThe result looks correct. The join criteria is for every row of left with MergeThis equal to +N2 to be joined to each row of right that has that matching condition. There are 7 such rows in each of the data frames, resulting in 49 rows for the cartesian product of row sets in the output. \nNote that the merge type for DataFrame.merge are left, right, inner and outer, which determine the set of keys to use for the join, not a restriction on which rows will match to which other rows. The default of inner just means to use the intersection of values contained in the join column(s) between left and right, which will just be +N2 anyway. If you used right you'd get the same result since the right DataFrame contains only +N2 for this column. Likewise, if you used left or outer they would happen to be the same as each other in this case, because either would cause the possible match set to be based on either -N2 or +N2 and you'd get the 49 rows from all pairwise matches of +N2 plus the other rows for -N2 (but with not additional matches for them, and"}
+{"output_text": "();\n removeComp.setVisible(false);\n }\n\n @Override\n public void mouseExited() {\n removeComp = (JComponent) e.getComponent();\n removeComp.setVisible(true);\n }\n });\n\n x += width;\n }\n}\n\nprivate JList getListModel(String dbName, String sql, int cols) {\n DefaultListModel", "input_text": " addMouseListener(new MouseAdapter() {\n @Override\n public void (MouseEvent e) {\n tblManagement.removeTable();\n }\n });\n\n }\n}\n\nThen in your TableManagement Class\npublic void AddTables() {\n\n String dbShortName = combo.getSelectedItem().toString();\n String dbName = prop.get(dbNamesFile, dbShortName);\n\n int x = 50; int y = 150; int width = 150; int height = 220; //set Size and location \n\n int [] indices = tblList.getSelectedIndices();\n\n panel = new PanelDraggable [indices.length];\n\n for (int i = 0; i < indices.length ; i++) {\n String tblName = tblList.getModel().getElementAt(i).toString();\n\n String sql = \"SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE \"+\n \"`TABLE_SCHEMA`='\"+dbName+\"' AND `TABLE_NAME`='\"+tblName+\"'\";\n\n JList> columnslist = new JList();\n columnslist.setModel(getListModel(dbName, sql, 1));\n JScrollPane sc = new JScrollPane(columnslist);\n\n // There is an extra argument here. Whatever your \n // mainPanel used to be in the static method\n panel[i] = new PanelDraggable(x, y, width, height, tblName, sc, mainPanel);\n panel[i].addMouseListener(new MouseAdapter() {\n @Override\n public void mouseEntered() {\n removeComp = (JComponent) e.getComponent"}
+{"output_text": " 4\n [ 3].note.ABI-tag NOTE 08048168 000168 000020 00 A 0 0 4\n [ 4].interp PROGBITS 08048154 000154 000013 00 A 0 0 1\n [ 5].note.ABI-tag NOTE 08048168 000168 000020 00 A 0 0 4\n [ 6].interp", "input_text": " (base address, size, flags and so on).\nFor example, programs for x86 architecture are based at 0x8048000 by linker. using readelf I can see the program entry point but no specific field in the output tells the base address.\n$ readelf -e test\nELF Header:\n Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 \n Class: ELF32\n Data: 2's complement, little endian\n Version: 1 (current)\n OS/ABI: UNIX - System V\n ABI Version: 0\n Type: EXEC (Executable file)\n Machine: Intel 80386\n Version: 0x1\n Entry point address: 0x8048390\n Start of program headers: 52 (bytes into file)\n Start of section headers: 4436 (bytes into file)\n Flags: 0x0\n Size of this header: 52 (bytes)\n Size of program headers: 32 (bytes)\n Number of program headers: 9\n Size of section headers: 40 (bytes)\n Number of section headers: 30\n\nSection Headers:\n [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n [ 0] NULL 00000000 000000 000000 00 0 0 0\n [ 1].interp PROGBITS 08048154 000154 000013 00 A 0 0 1\n [ 2].note.ABI-tag NOTE 08048168 000168 000020 00 A 0 0"}
+{"output_text": "];\n [alert release];\n return;\n }\n videoRecorder.mediaTypes = [NSArray arrayWithObject:(NSString*)kUTTypeMovie];\n videoRecorder.delegate = self;\n videoRecorder.sourceType = UIImagePickerControllerSourceTypeCamera;\n videoRecorder.showsCameraControls = NO;\n videoRecorder.cameraDevice = UIImagePickerControllerCameraDeviceFront;\n videoRecorder.", "input_text": "\nimport org.springframework.transaction.annotation.Transactional;\n*\n@Transactional\npublic long insert(User user){\n entityManager.persist(user);\n return user.getId();\n }\n\n Q:\n\nhow to capture video in iPhone\n\nI am creating application for video app in iPhone, but I don't know how to capture a video in iPhone; and I want to store them in SQLite database, but I have one problem: can I save direct video in SQLite database? Is is possible, or I have to store path of video? If I have to save path in SQLite database, then how can I do this? Please help in this problem.\n\nA:\n\nOnly iPhone 3GS and above support video recording.so you should first check if recording is supported and then start camera with desired values set for properties,using following code.\nYou will have \"MobileCoreServices/MobileCoreServices.h\" to run this code.\n if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { \n UIImagePickerController *videoRecorder = [[UIImagePickerController alloc]init]; \n NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:videoRecorder.sourceType];\n NSLog(@\"Available types for source as camera = %@\", sourceTypes);\n if (![sourceTypes containsObject:(NSString*)kUTTypeMovie] ) {\n UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil \n message:@\"Device Not Supported for video Recording.\" delegate:self \n cancelButtonTitle:@\"Yes\" \n otherButtonTitles:@\"No\",nil];\n [alert show"}
+{"output_text": " the freaks. But then I realized that the freaks are being made in the same place as the rich people. So I'm not sure how that would work.\n\nA:\n\nI think you're overthinking this.\nThe Freaks are made because they're the only ones who can't be made perfect.\nThe company is the only one that can make perfect people.\nThe Freaks are made because they're the only ones who can't be made perfect.\n", "input_text": "-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0438\u043c\u0435\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 DLL \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u0443\u044e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.\n\n Q:\n\nWhy there are messed up teens in a world where everyone can be designed to be perfect\n\nI have a book where in the future a sterility disease spreads across the world making people unable to have children. Then, a company rises to power and using CRISPR are able to make babies again. Later parents are able to design their children completely; eye color, hair color, body type all that.\nWell also in this world is what are called \"Freaks\" teens who have had the wrong Gene's activated and so they grow up deformed. (My main character is super fat instead of muscular). Because the sterility disease that the world is still recovering from, it is illegal to kill The Freaks. Then someone, for nefarious purposes, starts killing The Freaks.\nThe company also is the only establishment to work for. so they hold like a lottery see who gets the good jobs out of the \"poor\". The winners of the lottery are then stuck in a competition to see who can make it and be employed. Those who lose are kicked out and left to die on the streets.\nMy dilemma\n\nWhy are freaks being made? I had the idea originally that genetics Is a finite science and human error causes mess ups. But a company of this size would only employ the BEST, and would catch on to the ones messing up. I could chalk it up to beginners mistakes but again that seems unlikely...\nI had another idea that maybe the poorer people are having their kids make"}
+{"output_text": " | 0 | 8 | 10 | |\n| 54 | 1 | 46 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 10 | |\n| 55 | 1 | 46 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 10 | |\n| 56 | 1 |", "input_text": "0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 6 | |\n| 45 | 1 | 40 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 6 | |\n| 46 | 1 | 41 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 6 | |\n| 47 | 1 | 42 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 6 | |\n| 48 | 1 | 43 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 7 | 1 uop issued |\n| 49 | 1 | 44 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 7 | |\n| 50 | 1 | 45 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 7 | |\n| 51 | 1 | 46 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 7 | |\n| 52 | 1 | 46 | 0 | 1 | 0 | 0 | 0 | 4 | 0 | 8 | 10 | 3 uops issued |\n| 53 | 1 | 46 | 0 | 1 | 0 | 0 | 0 | 4"}
+{"output_text": " padding: 0px\r\n}\n\r\n
\n\n Q:\n\nHow to get the value of a textbox in a gridview?\n\nI have a gridview with a textbox in each row. I want to get", "input_text": "lng);\r\n var icon = \"\";\r\n switch (data.type) {\r\n case \"UK Independent School\":\r\n icon = \"orange\";\r\n break;\r\n case \"Swiss Boarding School\":\r\n icon = \"green\";\r\n break;\r\n }\r\n icon = \"http://maps.google.com/mapfiles/ms/micons/\" + icon + \".png\";\r\n var marker = new google.maps.Marker({\r\n position: myLatlng,\r\n map: map,\r\n title: data.title,\r\n animation: google.maps.Animation.DROP,\r\n icon: icon\r\n });\r\n (function(marker, data) {\r\n google.maps.event.addListener(marker, \"click\", function(e) {\r\n infoWindow.setContent(\"\" + data.title + \" \" + data.description + \"
\");\r\n infoWindow.open(map, marker);\r\n });\r\n })(marker, data);\r\n latlngbounds.extend(marker.position);\r\n i++;\r\n if (i == markers.length) {\r\n clearInterval(interval);\r\n var bounds = new google.maps.LatLngBounds();\r\n map.setCenter(latlngbounds.getCenter());\r\n map.fitBounds(latlngbounds);\r\n }\r\n }, 80);\r\n}\r\ngoogle.maps.event.addDomListener(window, 'load', initMap);\nhtml,\r\nbody,\r\n#dvMap {\r\n height: 100%;\r\n width: 100%;\r\n margin: 0px;\r\n"}
+{"output_text": " you're trying to do is not possible.\nThe reason is that the camera is not a rigid body, but a deformable body.\nThe camera is a rigid body, but it is not a rigid body in the sense that it is not a body that can be moved around in space.\nThe camera is a rigid body in the sense that it is a body that can be moved around in space, but it is not a rigid body in the sense that it is not a body that", "input_text": "It might be easier to just show you a picture of my problem: http://i.imgur.com/H1l6LEx.png\nWhat I want to do is allow the camera to pivot around any given point. Right now, I have the rotations mapped to my shoulder buttons on a gamepad, and if I press them, it should rotate around the point the camera is currently looking at. Then, I use the left stick to move the camera around. The problem is that after it's been rotated, pressing \"up\" results in it being used relative to the rotation, creating the image above.\nI understand that matrices have to be applied in a certain order, and that I have to offset the thing to be rotated around the world origin and move it back, but it just won't work!\npublic Matrix GetTransformationMatrix()\n {\n Matrix mRotate = Matrix.Identity *\n Matrix.CreateTranslation(-Origin.X, -Origin.Y, 0.00f) * // Move origin to world center\n Matrix.CreateRotationZ(MathHelper.ToRadians(Rotation)) * // Apply rotation\n Matrix.CreateTranslation(+Origin.X, +Origin.Y, 0.00f); // Undo the move operation\n\n Matrix mTranslate = Matrix.Identity *\n Matrix.CreateTranslation(-Position.X, Position.Y, 0.00f); // Apply the actual translation\n\n return mRotate * mTranslate;\n }\n\nSo to recap, it seems I can have it rotate around an arbitrary point and lose the ability to have \"up\" move the camera straight up, or I can rotate it around the world origin and have the camera move properly, but not both.\n\nA:\n\nThough Fault's comment is correct, what"}
+{"output_text": "protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n camera = (Camera) findViewById(R.id.camera);\n preview = (SurfaceView) findViewById(R.id.preview);\n previewHolder = preview.getHolder();\n previewHolder.addCallback(this);\n previewHolder.setType(SurfaceHolder.SURFACE_TYPE", "input_text": " in names:\n setattr(self, name, name)\n\nDemo:\n>>> x = AutoNamespace('a b c')\n>>> x.a\n'a'\n\nIf you want to do what SymPy does with var, you can, but I would strongly recommend against it. That said, here's a function based on the source code of sympy.var:\ndef var(names):\n from inspect import currentframe\n frame = currentframe().f_back\n try:\n names = names.split()\n except AttributeError:\n pass\n for name in names:\n frame.f_globals[name] = name\n\nDemo:\n>>> var('foo bar baz')\n>>> bar\n'bar'\n\nIt'll always create global variables, even if you call it from inside a function or class. inspect is used to get at the caller's globals, whereas globals() would get var's own globals.\n\n Q:\n\nRecord video from an already-running preview\n\nGreetings fellow Androiders. I'm developing an app that uses the camera to display a continuous preview, and when the user would like to, record video from that feed and save it.\nThe first part I have set up, but I am having issues getting the recording to work. I've followed various guides and answers to the problems I'm hitting, but I always seem to run into an \"invalid state\" problem (currently setCamera called in an invalid state(4)).\nThis is my complete code. Thank you for taking a look!\nCamera camera;\nSurfaceView preview;\nSurfaceHolder previewHolder;\nMediaRecorder recorder;\nboolean recording = false;\nboolean cameraConfigured = false;\nprivate Button camera_button;\n\n@Override\n"}
+{"output_text": " the previous approach, but it\u2019s actually a lot better. It\u2019s more concise, and it\u2019s more readable.\n\nA:\n\nI would use a ternary operator:\nprivate int similarityCount(String a, String b) {\n return a == null ? b == null ? 1 : 2 : 3;\n}\n\nA:\n\nI would use a ternary operator:\nprivate int similarityCount(String a, String b) {\n", "input_text": "d handle all the null checks in a guard statement at the beginning.\nThen, once you\u2019ve established that no argument is null, you can handle the actual logic:\nprivate int similarityCount(String a, String b) {\n if (a == null || b == null) {\n return a == b? 1 : a == null? 2 : 3;\n }\n\n return isMatch(a, b)? 4 : 5;\n}\n\nThis is both more concise and more readable than the other options.\nThat said, real functions wouldn\u2019t usually return such numeric codes. Unless your method was simplified to exemplify the problem, I\u2019d strongly urge you to reconsider the logic and instead write something akin to what follows:\nprivate boolean similarityCount(String a, String b) {\n if (a == null || b == null) {\n throw new NullPointerException();\n }\n\n return isMatch(a, b);\n}\n\nOr:\nprivate boolean similarityCount(String a, String b) {\n if (a == null) {\n throw new IllegalArgumentException(\"a\");\n }\n if (b == null) {\n throw new IllegalArgumentException(\"b\");\n }\n\n return isMatch(a, b);\n}\n\nThese approaches would be more conventional. On the flip side, they may trigger an exception. We can avoid this by returning a java.util.Optional in Java 8:\nprivate Optional similarityCount(String a, String b) {\n if (a == null || b == null) {\n return Optional.empty();\n }\n\n return Optional.of(isMatch(a, b));\n}\n\nAt first glance this may seem to be no better than"}
+{"output_text": "ntity>;//Gives a list back at runtime, but I can't loop through them\n var FKEntityListWithCastCopy = new debiteur().GetType().GetProperty(\"schakeling\").GetValue(dbEntry) as List;//Just to test and clearify what the above statement does, vars have the same value!\n\n var FKEntityListWithCastWithCast = typeof(Entity).GetProperty(typeof", "input_text": "will fail because anotherEntity does not implement IEFEntity. \n\nAnd it is in these methods where the magic must happen using c# reflection and I face a problem. I give you the implementation of the unfinished method isInFKEntity with some test code statements including comments:\npublic bool isInFKEntity(EntityKey pk, FKEntityKey fk) where FKEntity : class, IEFEntity\n {\n Entity dbEntry = find(pk);\n if (dbEntry == null) throw new InvalidOperationException(RepoMessages.dbEntryIsNull(new List { pk }));\n\n //----------Not important for question! Just to clearify things----------\\\\\n var v1 = typeof(Entity).GetProperty(\"naam\").GetValue(dbEntry);//Sets v1 to a string value\n var v1Copy = new debiteur().GetType().GetProperty(\"naam\").GetValue(dbEntry);//Just to test and clearify what the above statement does, vars have the same value!\n //----------End----------\\\\\n\n var FKEntityList = typeof(Entity).GetProperty(typeof(FKEntity).Name).GetValue(dbEntry);//Gives a list back at runtime, but I can't loop through them\n var FKEntityListCopy = new debiteur().GetType().GetProperty(\"schakeling\").GetValue(dbEntry);//Just to test and clearify what the above statement does, vars have the same value!\n\n var FKEntityListWithCast = typeof(Entity).GetProperty(typeof(FKEntity).Name).GetValue(dbEntry) as List 1, Equal @@ (Count[Rest@nc, #] & /@ c2)], oc, c1]] &;\n\nand modify reColorF1 and reColorF2:\nClearAll[reColorF1B, reColorF2B];\nreColorF1B = Module[{g = #1, vl = VertexList[#1], cl, ncl},\n ncl = (neighborColorsF[g, #1] &) /@ vl; cl = newClrF /@ ncl; \n MapThread[(PropertyValue[{g, #}, VertexStyle] = #2) &, {vl, cl}]; g] &;\n\nreColorF2B = Module[{g = #1, vl = VertexList[#1], cl, ncl},\n ncl = (neighborColorsF[g, #1] &) /@ vl; cl = newClrF /@ ncl; \n SetProperty[g, VertexStyle -> Thread[vl -> cl]]] &;\n\nUsing the same examples as in the previous post:\nGrid[Most@FixedPointList[reColorF1B, #, 5] & /@ {g1, g2}]\n\nAnother example:\ng3 = SetProperty[g, {VertexStyle -> \n Thread[Range[10] -> {Red, Blue, Green, Orange, Red, Green, Orange, Red, Red, Orange}], \n VertexSize -> Large, ImageSize -> 100}];\nGrid[Most@FixedPointList[#, g3, 9] & /@ {reColorF1, reColorF1B}]\n\nPrevious post: In the following, color"}
+{"output_text": ". The first Gemini mission was canceled because of the lack of a reliable communications satellite. The first Apollo mission was canceled because of the lack of a reliable Earth return vehicle. The first Skylab mission was canceled because of the lack of a reliable Earth return vehicle. The first Shuttle mission was canceled because of the lack of a reliable Earth return vehicle. The first Space Station was canceled because of the lack of a reliable Earth return vehicle. The first Mars mission was", "input_text": " documentation. However, these would be the arguments against it:\n\nThe idea of two spacecraft was already controversial. Now you want three? The original Apollo concept was a \"direct\" mission. The entire mission would launch as one vehicle, shedding pieces as you go, but never putting pieces back together. All of the astronauts and their Earth return vehicle would land together on the moon and take off again.\nApollo ended up using \"lunar orbit rendezvous\" instead. One vehicle would launch toward the moon. However, once in lunar orbit, a minimal lander would separate from the main vehicle, land on the moon, and return back to lunar orbit to dock with the main vehicle.\nAll of the major players at NASA (e.g. Von Braun, Faget, Gilruth) were initially opposed to the idea of LOR. Rendezvous had never been done before. It needed new mathematical models, automated flight computers, miniaturized radar, docking mechanisms, more stations in mission control, crew and mission control training, and so on. It was only when the size and price of a direct mission was determined to be too costly that the LOR approach was taken seriously. And it had to be proven reliable in the Gemini program.\nNow, you want three (or even more) spacecraft? The battle for just two was bad enough, no one wanted to pick that fight again.\nSatellites were unreliable. The technology was new, and their lifespan was short. When a satellite died, there was no way to fix it, so now you must deal without it. The long-term effects of radiation, thermal degradation, and micrometeoroids were not known until the Pegasus satellites were launched on the Saturn I test missions AS-103 through AS-105"}
+{"output_text": " & 0 & 0 \\\\ \n0 & 1 & 0 & 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n, \\; \\; \\; F_{4} = \\left( \n\\begin{array}{rrrr} \n1 & 0 & 0 & 0 \\\\ \n0 & 1 & 0 & 0 \\\\ \n0 & 0 & 1 & 0 \\\\", "input_text": " & 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n$$\n$$ P_{3} = \\left( \n\\begin{array}{rrrr} \n1 & - \\frac{ 1 }{ 2 } & - \\frac{ 1 }{ 2 } & - \\frac{ 1 }{ 4 } \\\\ \n0 & 1 & 0 & 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n, \\; \\; \\; Q_{3} = \\left( \n\\begin{array}{rrrr} \n1 & \\frac{ 1 }{ 2 } & \\frac{ 1 }{ 2 } & \\frac{ 1 }{ 4 } \\\\ \n0 & 1 & 0 & 0 \\\\ \n0 & 0 & 1 & 0 \\\\ \n0 & 0 & 0 & 1 \\\\ \n\\end{array}\n\\right) \n, \\; \\; \\; D_{3} = \\left( \n\\begin{array}{rrrr} \n4 & 0 & 0 & 0 \\\\ \n0 & 3 & 0 & \\frac{ 3 }{ 2 } \\\\ \n0 & 0 & 3 & \\frac{ 3 }{ 2 } \\\\ \n0 & \\frac{ 3 }{ 2 } & \\frac{ 3 }{ 2 } & \\frac{ 15 }{ 4 } \\\\ \n\\end{array}\n\\right) \n$$\n==============================================\n$$ E_{4} = \\left( \n\\begin{array}{rrrr} \n1 & 0"}
+{"output_text": "Managers)\n2) You should not use null layout.\n3) You should not use Absolute layout.\n4) You should not use setBounds(...)\n5) You should not use setSize(...)\n6) You should not use setLocation(...)\n7) You should not use setVisible(...)\n8) You should not use setLayout(...)\n9) You should not use setVisible(true)\n10) You should not use setVisible(", "input_text": ".getInsets();\n frame.setSize(500+insets.left+insets.right,300+insets.top+insets.bottom);\n frame.setLocation(w,l);\n frame.setVisible(true);\n }\n\n public static void main(String[] args) {\n //Schedule a job for the event-dispatching thread:\n //creating and showing this application's GUI.\n javax.swing.SwingUtilities.invokeLater(new Runnable() {\n public void run() {\n createAndShowGUI();\n }\n });\n }\n\n}\n\nDraw line File:\npackage a1;\nimport javax.swing.*;\nimport java.awt.geom.Line2D;\nimport java.awt.Graphics2D;\nimport java.awt.Graphics;\n\npublic class drawingLine extends JPanel{\n\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n Graphics2D g2d = (Graphics2D) g;\n Line2D line = new Line2D.Double(200, 300, 1000, 1000);\n //g2d.setColor(Color.black);\n g2d.draw(line);\n //g.drawLine(200, 300, 1000, 1000);\n //g.setColor(color.BLACK);\n\n }\n\n}\n\nWhy am I not able to see the line?\n\nA:\n\nYour main problem is that you use null/Absolute layout.\nYou should have a read here:\n\nLaying Out Components Within a Container\n\n1) You should use an appropriate LayoutManager (or nest together multiple Layout"}
+{"output_text": " MAXSIZE 20\n\ndlist.c\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include ", "input_text": "outputStream!= null) {\n outputStream.close();\n }\n }\n } catch (IOException e) {\n return false;\n }\n\nThis code works perfectly when dowloding image, but it does not work for.pdf and.docx files, in that case writtenToDisk is true but there is no file on phone.\nUPDATE: \nProblem was that I didn't set access token in header, which is requested by server for files but not for images.\n\nA:\n\nWhy don't you use the native Android download manager instead?\nyou can see here a download manager util which can be used as the below example:\ndownloadManager = new DownloadManager(new DownloadManager.DownloadCompleteListener(){\n @Override\n public void getProgress(double progress, long downloadedBytes, long sizeInBytes){\n\n }\n\n @Override\n public void onDownloadComplete(Uri fileLocalUri, long downloadedFileId){\n\n }\n});\ndownloadManager.download(Uri uri, String fileName, String description);\n\n Q:\n\nMemory Allocation for a Dynamic List of Strings\n\nI'm writing a program in C that's supposed to take several string of text from a file and put them inside a dynamic list.\nFor some reason (probably memory allocation) I get this error every time I try to put more than fifteen strings into the structure:\n*** glibc detected ***./driver: realloc(): invalid next size: 0x000000000241e250 ***\n\nThe code is as follows:\ndlist.h\nstruct dlist\n{\n int size;\n int maxSize;\n char item[1][1024];\n};\n\n#define INITSIZE 6\n#define INCRSIZE 9\n#define"}
+{"output_text": " to use the widest form of the date\n format.\n\nA:\n\nI think you should use ParseExact instead of Parse.\nstring s = \"642014\";\nDateTime? date = DateTime.ParseExact(s, \"MMddyyyy\", CultureInfo.InvariantCulture);\nConsole.WriteLine(date.Value.ToString(\"ddMMyyyy\")); // 04062014\n\nA:\n\nI think you should use ParseExact instead", "input_text": "Culture,\n DateTimeStyles.None, out dt))\n return dt;\n return null;\n}\n\nNow you can use this method as;\nstring s = \"642014\";\nDateTime? date = ParseDate_Mdyyyy(s);\nConsole.WriteLine(date.Value.ToString(\"ddMMyyyy\")); // 04062014\n\nI connected to.NET Framework Team about this problem here their response;\n\nHi Soner,\nThe parsing code is not really looking for any separator. Here is what\n is going on:\nFor the case of using \u201cMMddyyyy\u201d, the parsing starts in the method\n DoStrictParse which will call ParseByFormat. This method will get the\n first part of the format which is \u201cMM\u201d and then calls ParseDigits to\n get the equivalent digits from the string we parse \u201c642014\u201d which will\n give \u201c64\u201d. Note that till that time there is no validation happen if\n the number is out of range for the month in the selected calendar\n (which is Gregorian in our case here). The parsing code will repeat\n the same process for \u201cdd\u201d and will get equivalent part \u201c20\u201d and then\n will repeat it for \u201cyyyy\u201d but this fail because it expect 4 digits and\n we had only two (\u201c14\u201d).\nFor the case of using \u201cMdyyyy\u201d, it fails because almost same reason\n when parsing the part \u201cM\u201d we know that the month can be 2 digits so\n we\u2019ll map it \u201c64\u201d and will do the same with \u201cd\u201d which map it to \u201c20\u201d\n and then year will fail. I believe this is the reason the\n documentation saying always use the widest form.\nThe recommendation here is"}
+{"output_text": ">\r\n \r\n \r\n \r\n Tiger Nixon \r\n System Architect \r\n Edinburgh \r\n 61 \r\n 2011/04/25 \r\n $320,800 \r\n \r\n \r\n Garrett Winters", "input_text": "script>\r\n \n\nA:\n\nAdd page length property like this \"pageLength\": 10\nFor more details you can see the demo please:\nhttps://jsfiddle.net/dipakthoke07/ebRXw/2491/\n\nA:\n\nYou can use Data Tables js for this..\n\n$(document).ready(function() {\r\n $('#example').DataTable( {\r\n \"pagingType\": \"full_numbers\"\r\n } );\r\n} );\n \r\n\r\n \r\n\r\n\r\n \r\n \r\n Name \r\n Position \r\n Office \r\n Age \r\n Start date \r\n Salary \r\n \r\n \r\n \r\n \r\n Name \r\n Position \r\n Office \r\n Age \r\n Start date \r\n Salary \r\n 'localhost',\n 'user' => 'root',\n 'password' => '',\n 'database' => 'db',\n 'port' => 3306,\n 'prefix' => '',\n 'charset' => 'utf8',\n 'collation' => 'utf8_unicode_ci',\n 'engine' => 'innodb',\n );\n\n $_config['table']", "input_text": " is small (few elements have been written) but the indices are large. However in practice I don't expect this to make much difference, ordinarily.\n\n Q:\n\nMariaDB Galera Cluster, Force Sync\n\nI have three servers in a multi-master Galera cluster. I've imported some old databases recently, and noticed that the tables were being created across all three, but the data wasn't being replicated. It turns out I wasn't paying attention, and these old databases were all using MyISAM tables. So I know that in the future, I'll need to convert these to InnoDB before bringing them in to make them work.\nHowever, I'm not having any luck finding an official way to sync up the existing data. Running ALTER TABLE to convert the existing tables to InnoDB doesn't sync up the existing data.\nMy thought was to dump the table (now that it's been converted) with mysqldump, then bring it back in with mysql -u user -p db < db.sql. I don't see any reason why that wouldn't work, but I'm wondering if there's a better way.\n\nA:\n\nI was not able to find an official way to handle this, so I went with the idea of dumping the tables individually and reimporting them. Not wanting to do it by hand, I whipped a PHP script to do it for me. I'm posting it here in case anyone else finds this useful.\n/*\n * InnoDB Convert\n * Converts existing non-InnoDB tables to InnoDB, then re-imports the\n * data so that it's replicated across the cluster.\n */\n\n// Configuration\n $_config['db'] = array(\n 'type' =>'mysql',\n "}
+{"output_text": "-jdbc\n ${mule.version} \n provided \n \n \n com.mulesoft.muleesb.transports \n mule-transport-jms \n ${mule.version} \n provided \n ", "input_text": "\n\n \n \n com.mulesoft.muleesb \n mule-core-ee \n ${mule.version} \n provided \n \n \n \n com.mulesoft.muleesb.modules \n mule-module-spring-config-ee \n ${mule.version} \n provided \n \n \n \n org.mule.transports \n mule-transport-file \n ${mule.version} \n provided \n \n \n org.mule.transports \n mule-transport-http \n ${mule.version} \n provided \n \n \n com.mulesoft.muleesb.transports \n mule-transport-jdbc-ee \n ${mule.version} \n provided \n \n \n com.mulesoft.muleesb.transports \n mule-transport"}
+{"output_text": "\n\nWhat is the memory ordering model of std::mutex?\nWhat is the memory ordering model of std::mutex?\n\nThe short answer is that the std::mutex is not a lock, but a mutex.\nThe std::mutex is a mutex, but it is not a lock.\nThe std::mutex is a lock, but it is not a mutex.\nThe std::mutex is a lock, but it is not a mutex.\nThe std", "input_text": "std::string* s) {\n std::unique_lock lock(_mutex);\n _queue.push_back(s);\n }\n\nprivate:\n\n std::deque _queue;\n std::mutex _mutex;\n\n};\n\nint main(int argc, char** argv)\n{\n\n StringQueue job_queue;\n StringQueue result_queue;\n std::atomic run(true);\n\n std::thread consumer([&job_queue, &result_queue, &run]{\n while (run.load()) {\n std::string* s = job_queue.pop();\n if (s!= nullptr)\n s->append(\"BAR\");\n result_queue.push(s);\n }\n });\n\n std::thread result_thread([&result_queue, &run]{\n while (run.load()) {\n std::string* s = result_queue.pop();\n if (s!= nullptr) {\n std::cout << \"Result: \" << *s << std::endl;\n delete s;\n }\n }\n });\n\n std::string input;\n while (true)\n {\n std::cin >> input;\n if (input == \"STOP\")\n break;\n std::string* s = new std::string(input);\n job_queue.push(s);\n }\n\n run.store(false);\n\n result_thread.join();\n consumer.join();\n}\n\nA:\n\nThere are many answered questions on Stack Overflow about the memory ordering model of C++ std::mutex. E.g:"}
+{"output_text": "(\"r\", function(d) { return d.children ? 5 : 3; }) \n .style(\"fill\", function(d) { return d.children ? \"lightsteelblue\" : \"#fff\"; }); \n node.append(\"text\") \n .attr(\"x\", function(d) { return d.children ? -8 : 8; }) \n .attr(\"dy\", \".35em\") \n .text(function(", "input_text": "ccc; \n\n}\n \n\n\n\n',\n\n imports = {},\n\n// IMPORTANT NOTE:\n// Using a string as the body of a script element might use eval(), which should be avoided at all costs.\n// Better would be to replace the 'content' config setting by a'src' attribute and ahve the content in a seperate file you can link to.\n configAry = [\n { // script-new\n type:'script',\n action: 'new',\n content: 'console.log(\u2018hello world\u2019);',\n next: \"ui-boot\"\n }, \n { // script-upd\n type:'script',\n id: \"ui-boot\",\n action: 'upd',\n innerElem: [\n {\n type: 'attr',\n id: 'data--"}
+{"output_text": "exception.getMessage()));\n }\n}\n\nand the CustomOauthException is\nimport org.springframework.security.oauth2.common.exceptions.OAuth2Exception;\nimport org.springframework.security.oauth2.provider.error.OAuth2Exception;\nimport org.springframework.security.oauth2.provider.error.OAuth2ExceptionTranslator;\n\n/**\n * @author qianggetaba\n * @", "input_text": "\n\nMyWebResponseExceptionTranslator is translate the exception to ourOAuthException and we custom ourOAuthException serializer by jackson, which way is same by default the OAuth2 use.\n@JsonSerialize(using = OAuth2ExceptionJackson1Serializer.class)\npublic class OAuth2Exception extends RuntimeException {\n\nother custom handle class stuff\nimport org.springframework.http.HttpStatus;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.security.core.AuthenticationException;\nimport org.springframework.security.oauth2.common.exceptions.OAuth2Exception;\nimport org.springframework.security.oauth2.provider.error.WebResponseExceptionTranslator;\n\n/**\n * @author qianggetaba\n * @date 2019/6/21\n */\npublic class MyWebResponseExceptionTranslator implements WebResponseExceptionTranslator {\n @Override\n public ResponseEntity translate(Exception exception) throws Exception {\n if (exception instanceof OAuth2Exception) {\n OAuth2Exception oAuth2Exception = (OAuth2Exception) exception;\n return ResponseEntity\n .status(oAuth2Exception.getHttpErrorCode())\n .body(new CustomOauthException(oAuth2Exception.getMessage()));\n }else if(exception instanceof AuthenticationException){\n AuthenticationException authenticationException = (AuthenticationException) exception;\n return ResponseEntity\n .status(HttpStatus.UNAUTHORIZED)\n .body(new CustomOauthException(authenticationException.getMessage()));\n }\n return ResponseEntity\n .status(HttpStatus.OK)\n .body(new CustomOauthException("}
+{"output_text": " avoid the linear search.\nThe first thing to do is to make sure that we don't have to do a linear search at all. We can do this by using a hash table to store the cards. This will allow us to do a constant time lookup, and we can do this by using a hash function that is a good fit for the cards. For example, if we have a card with a value of 1, and a card with a value of 2, then we", "input_text": "))\n {\n continue;\n }\n\n if (b == c1 || b == c2) // Check that there are no conflict with players cards\n {\n continue;\n }\n\n size_t p1stren = GetHandStrength(board, c1, b);\n size_t p2stren = GetHandStrength(board, c2, b);\n\n if (p1stren > p2stren)\n {\n currentEquity += 1.0;\n }\n else if (p1stren < p2stren)\n {\n currentEquity -= 1.0;\n }\n\n usedBoards++;\n }\n\n currentEquity /= usedBoards;\n equity += currentEquity;\n }\n }\n\n return equity;\n}\n\nint main()\n{\n clock_t begin = clock();\n std::vector board = { 0, 1, 2, 21 }; // Some turn random board (4 cards)\n float equity = GetEquity(board);;\n cout << \"equity: \" << equity << endl;\n return 0;\n}\n\nWhen iterating over the hand and board cards I need to check that board doesn't already contains the card, so I need to iterate over the board cards again and again. This is done by the bool Contains(const std::vector& board, int card) also checks like if (b == c1 || b == c2) What can you suggest to optimize this part?\n\nA:\n\nSince you're doing an O(N\u00b3) operation, with a linear search, a big performance boost will happen if we can"}
+{"output_text": "),na.rows)\nna.khanmiss<-na.khanmiss[notna.rows,]\n\n#randomly add 78 rows that do not have missing values\nna.khanmiss<-na.khanmiss[sample(1:length(na.khanmiss),78),]\n\n#split the data.frame into 4 data.frames of size 300\nkhanmiss.list<-split(na.khanmiss,cut(seq", "input_text": "domain\", \"Proteobacteria\", \"Betaproteobacteria\", \n\"class\", \"class\", \"class\", \"194\", \"Phylum\", \"class\", \"Rhodocyclales\", \n\"Rhodocyclales\", \"Rhodocyclales\"),.Dim = c(6L, 2L))\n\nAnd I have to admit, I wouldn't immediately know how to do so. Any pointers are warmly welcomed. I am not a novice to R, so you don't have to go through great lengths in your explanation. \nFor a larger reproducible example consider the dataset 'khanmiss' from the bioconductor library impute (bioconductor library impute). \n source(\"http://bioconductor.org/biocLite.R\")\n biocLite(\"impute\")\n require(impute)\n data(khanmiss)\n\nWhich is basically a dataframe that has NAs introduced in several places. It is not exactly the same hierarchical structure as my file but it will fit the purpose. As this is a very inconvenient dataframe with 2309 observations and only 222 of it's rows contain missing values, I selected the rows with missing values and added 78 rows randomly that did not have missing values in a new data.frame. This data.frame was then split into a list of 4 dataframes of arbirtraty size (adding up to 300).\nisnadf<-as.data.frame(which(is.na(khanmiss),arr.ind=T))\nna.rows<-sort(unique(isnadf$row))\nlength(na.rows) #the dataset has 222 rows which contain NA\nna.khanmiss<-khanmiss[na.rows,]\nnotna.rows<-setdiff(rownames(khanmiss"}
+{"output_text": "\")\n y=y[1].split(\"\\r\\nb'dslp-body'\\r\\n\")\n y=y[0].split(\"'\")\n user.append(y[0])\n print(\"dslp-3.0\")\n print(\"user leave ack\")\n print(y[0])\n print(\"dslp-body\")\n\ndef user_error():\n print(\"dslp-3.0", "input_text": "'dslp-3.0'\\r\\n\")\n y=z[1]\n y=platzhalter.split(\"b'user join'\\r\\nb'\")\n y=y[1].split(\"\\r\\nb'dslp-body'\\r\\n\")\n y=y[0].split(\"'\")\n user.append(y[0])\n print(\"dslp-3.0\")\n print(\"user join ack\")\n print(y[0])\n print(\"dslp-body\")\n else:\n y=platzhalter.split(\"b'user join'\\r\\nb'\")\n y=y[1].split(\"\\r\\nb'dslp-body'\\r\\n\")\n y=y[0].split(\"'\")\n user.append(y[0])\n print(\"dslp-3.0\")\n print(\"user join ack\")\n print(y[0])\n print(\"dslp-body\")\n\ndef user_notify(platzhalter):\n if len(user)==1:\n print(user_error())\n for x in user:\n if x in platzhalter:\n pp=platzhalter.rsplit(\"dslp-body'\\r\\nb'\")\n ppp=pp[1].rsplit(\"'\\r\\n\")\n for i in ppp:\n print(i)\n break\n\n if x not in platzhalter:\n print(user_error())\n\ndef user_leave(platzhalter):\n y=platzhalter.split(\"b'user leave'\\r\\nb'"}
+{"output_text": ", 59822),\n(22, 4, 59820),\n(23, 4, 59819),\n(24, 4, 59818),\n(25, 4, 59817),\n(26, 4, 59816),\n(27, 4, 59815),\n(28, 4, 59814),\n(29, 4, 59813),\n(30, 4, 59812),\n(31, 4", "input_text": "(290, 7525),\n(291, 55750),\n(292, 7526),\n(293, 75722),\n(294, 55751),\n(295, 55714),\n(296, 75717),\n(297, 75721),\n(298, 12344),\n(299, 55752);\n\nDesired output i want:\nCREATE TABLE `stack` (\n `id` int(11) NOT NULL auto_increment,\n `counter` int(5) NOT NULL,\n `number` int(5) default NULL,\n PRIMARY KEY (`id`)\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=300 ;\n\n--\n-- Dumping data for table `stack`\n--\n\nINSERT INTO `stack` (`id`, `counter`, `number`) VALUES\n(1, 1, 75201),\n(2, 1, 55008),\n(3, 1, 55007),\n(4, 1, 75222),\n(5, 2, 0),\n(6, 2, 74992),\n(7, 2, 14553),\n(8, 2, 54582),\n(9, 2, 54581),\n(10, 2, 74991),\n(11, 2, 14554),\n(12, 3, 0),\n(13, 3, 71413),\n(14, 3, 71414),\n(15, 3, 71415),\n(16, 3, 71416),\n(17, 4, 0),\n(18, 4, 59823),\n(19, 4, 59824),\n(20, 4, 59821),\n(21, 4"}
+{"output_text": "Parse(ndError.Attributes[0].Value);\n if (error > max)\n max = error;\n }\n\n site.ID = idSite;\n site.PROD = prod;\n site.ERROR = error;\n site.URL = ndSites.SelectSingleNode(\"URL\").InnerText;\n site.TEST = ndSites.SelectSingleNode(\"TEST\").InnerText;\n site.SITE = nd", "input_text": ":\n XmlDocument xml = new XmlDocument();\n xml.Load(@\"D:\\REM\\config.xml\");\n foreach (XmlElement ndSites in xml.SelectNodes(\"SITES/SITE\"))\n {\n Console.WriteLine(ndSites.GetElementsByTagName(\"ERROR_COUNTER\"));\n }\n\nBut once I have done this, I don't know how to access my children's values, let alone how to make a second loop on my TESTS, and then access each child TEST and retrieve my URLs.\nMy goal is being to retrieve for each website the connection information in LOGINFO, then the URLs in TESTS, TEST and for all the SITES present.\nI've tried a lot of things, but I haven't found anything that matches what I need. \nIf someone could help me.\nEDIT : This is my class for deserialize the code C# \nclass XMLParser\n{\n public XMLParser() { }\n public List readXML(XmlDocument xml)\n {\n List tests = new List();\n Test test;\n\n List sites = new List();\n Site site;\n\n //List;\n foreach (XmlElement ndSites in xml.SelectNodes(\"SITES/SITE\"))\n {\n int idSite = int.Parse(ndSites.Attributes[0].Value);\n site = new Site();\n int prod = int.Parse(ndSites[\"PROD\"].InnerText);\n int error = 0;\n int max = 3;\n\n foreach (XmlElement ndError in ndSites.SelectNodes(\"/ERROR\"))\n {\n error = int."}
+{"output_text": "ie()) {\n return true;\n } else {\n return false;\n }\n}\n\n// *******************************************************\nprivate static void isComputerWin() {\n if (board[0] == 'X' && board[1] == 'X' && board[2] == 'X' && board[3] == 'X' && board[4] == 'X' && board[5] == 'X' && board[", "input_text": "\n int comp = rand.nextInt(8);\n if (board[array]!= 'X' || board[array]!= 'O') {\n board[array] = 'X';\n System.out.println(\"The computer chooses cell \"+board[array]+\".\");\n } else {\n board[array] = board[comp];\n board[comp] = 'X';\n }\n\n}\n\n// *******************************************************\nprivate static void processHumanMove() {\n System.out.println(\"Enter an empty position number (0-8) \");\n int position = keyboard.nextInt();\n if (board[position]!= 'X' || board[position]!= 'O') {\n board[position] = 'O';\n } else {\n System.out.println(\"Error! Must enter an empty position from 0-9.\");\n }\n\n}\n\n// *******************************************************\nprivate static void displayGameBoard() {\n System.out.println(\" \"+board[0]+\" | \"+board[1]+\" | \"+board[2]+\" \\n---+---+---\\n \"+board[3]+\" | \"+board[4]+\" | \"+board[5]+\" \\n---+---+---\\n \"+board[6]+\" | \"+board[7]+\" | \"+board[8]+\" \");\n\n}\n\n// *******************************************************\nprivate static boolean isDone() {\n isComputerWin();\n isHumanWin();\n isTie();\n if (isComputerWin()) {\n return true;\n } else if(isHumanWin()) {\n return true;\n } else if (isT"}
+{"output_text": "2419)\nat java.awt.Component.dispatchEvent(Component.java:4556)\nat java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)\nat java.awt.EventQueue.access$000(EventQueue.java:85)\nat java.awt.EventQueue$1.run(EventQueue.java:638)\nat java.awt.EventQueue$1.run(EventQueue.java:636", "input_text": "Hooks.runHooks(ApplicationShutdownHooks.java:79)\nat java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java:24)\nat java.lang.Shutdown.runHooks(Shutdown.java:79)\nat java.lang.Shutdown.sequence(Shutdown.java:123)\nat java.lang.Shutdown.exit(Shutdown.java:168)\n- locked <0x00000006fe24ca68> (a java.lang.Class for java.lang.Shutdown)\nat java.lang.Runtime.exit(Runtime.java:90)\nat java.lang.System.exit(System.java:904)\nat com.hiddensoftware.hiddengui.HiddenFrame.attemptToExit(HiddenFrame.java:636)\nat com.hiddensoftware.hiddengui.HiddenFrame.exit(HiddenFrame.java:620)\nat com.hiddensoftware.hiddengui.HiddenFrame$14.windowClosing(HiddenFrame.java:2554)\nat java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)\nat java.awt.Window.processWindowEvent(Window.java:1871)\nat javax.swing.JFrame.processWindowEvent(JFrame.java:274)\nat java.awt.Window.processEvent(Window.java:1829)\nat java.awt.Component.dispatchEventImpl(Component.java:4660)\nat java.awt.Container.dispatchEventImpl(Container.java:2097)\nat java.awt.Window.dispatchEventImpl(Window.java:"}
+{"output_text": " campaign ranges all up and down the Sword Coast from Neverwinter to south of Baldur's Gate--it technically starts in Greenest, a town just south of Baldur's Gate, but relocating that town would not be too difficult.\n\nThe Shattered Sea\n\n The Shattered Sea modules (The Shattered Sea, The Shattered Sea: The Serpent's Skull, and The Shattered Sea: The Serpent's Curse) revolve", "input_text": " or something alike.\nI'd like only published modules.\nIf there's a module with a missing, important item, even if it's less powerful than an artifact, it's worth mentioning it too.\n\nA:\n\nThere are several...though they are not 'Artifacts' in the sense of being an Artifact-tier magic item, but they are unique items of significant power and importance that are causing problems and the fact that the 'wrong people' have them is central to the story, and having them be an item that used to be secured and has now been stolen is a pretty easy adjustment to make.\nAs requested in a comment, I'm also including the locations where these campaigns take place.\nNaturally, spoilers abound. Proceed with caution.\nTyranny of Dragons\n\n The Tyranny of Dragons modules (Hoard of the Dragon Queen and Rise of Tiamat) revolve around the use of 'Dragon Masks' that give their wearer influence over chromatic dragons, and someone seeking to unite all 5 of the masks to summon the evil dragon-god Tiamat into the world. The Monastery could have been guarding one of them.\n This campaign ranges all up and down the Sword Coast from Neverwinter to south of Baldur's Gate--it technically starts in Greenest, a town just south of Baldur's Gate, but relocating that town would not be too difficult.\n\nWaterdeep: Dragon Heist\n\n The Stone of Golorr is a magical item central to this adventure that is used to obscure secrets, and also contains knowledge of a vast array of things probably-better-left-unknown. It's also evil and sentient. It was acquired by Open Lord Dagult Neverember for his own purposes--but could easily have been held by the Monastery beforehand\n This"}
+{"output_text": "www.garage48.org/developers-guide-to-garage48-hackatron\"),\n Link(23, 629, 1334010278.0, 1,\n \"The C++11 Standard Library: A Tutorial\",\n \"http://www.stroustrup.com/C++11FAQ.html#toc-11.1\"),\n Link(24, 629, 1334010578.0,", "input_text": "dev.planning/Y9v46wFeejA\"),\n Link(18, 62443, 1333939389.0, 104,\n \"github is making me feel stupid(er)\",\n \"http://www.serpentine.com/blog/2012/04/08/github-is-making-me-feel-stupider/\"),\n Link(19, 6937, 1333949857.0, 39,\n \"BitC Retrospective: The Issues with Type Classes\",\n \"http://www.bitc-lang.org/pipermail/bitc-dev/2012-April/003315.html\"),\n Link(20, 51067, 1333974585.0, 14,\n \"Object Oriented C: Class-like Structures\",\n \"http://cecilsunkure.blogspot.com/2012/04/object-oriented-c-class-like-structures.html\"),\n Link(10, 23944, 1333943632.0, 188,\n \"The LOVE game framework version 0.8.0 has been released - with GLSL shader support!\",\n \"https://love2d.org/forums/viewtopic.php?f=3&t=8750\"),\n Link(22, 39191, 1334005674.0, 11,\n \"An open letter to language designers: Please kill your sacred cows. (megarant)\",\n \"http://joshondesign.com/2012/03/09/open-letter-language-designers\"),\n Link(21, 3777, 1333996565.0, 2,\n \"Developers guide to Garage48 hackatron\",\n \"http://"}
+{"output_text": " ['adminhtml_customer', 'customer_account_edit', 'customer_register_edit', 'customer_account_create', 'customer_account_edit_tab', 'customer_account_edit_tab_custom', 'customer_account_edit_tab_custom_2', 'customer_account_edit_tab_custom_3', 'customer_account_edit_tab_custom_4', 'customer_account_edit_tab_custom_5', '", "input_text": "customerSetupFactory = $customerSetupFactory;\n $this->eavConfig = $eavConfig;\n $this->attributeSetFactory = $attributeSetFactory;\n\n }\n\n public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)\n {\n\n if (version_compare($context->getVersion(), '1.0.1') < 0) {\n $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);\n $customerSetup->addAttribute(\n Customer::ENTITY,\n 'exported_to_erp_at',\n [\n 'type' => 'varchar',\n 'label' => 'Exported to erp at',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 88,\n 'visible' => true,\n 'system' => false,\n 'user_defined' => false,\n ]\n );\n\n $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');\n $attributeSetId = $customerEntity->getDefaultAttributeSetId();\n\n /** @var $attributeSet AttributeSet */\n $attributeSet = $this->attributeSetFactory->create();\n $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);\n\n $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'exported_to_erp_at')\n ->addData([\n 'attribute_set_id' => $attributeSetId,\n 'attribute_group_id' => $attributeGroupId,\n 'used_in_forms' =>"}
+{"output_text": " getClass().getResource(\"/mydir\");\nFile[] files = pathUrl.listFiles();\nfor (File file : files) {\n // do something with file\n}\n\nA:\n\nYou can use the Maven Resource Plugin to iterate over the files in your resource directory.\n\n org.apache.maven.plugins \n maven-resources-plugin \n 2", "input_text": " try to understand Schubert\u2019s work on enumerative geometry, so he started reading it and filling details, but I don\u2019t recall how much the fact it was a Hilbert problem influenced him, if at all. My colleague Bob Rumely was attracted to a Hilbert problem on finding procedures for solving integer equations, and tweaked it brilliantly to arithmetic integers. So another problem - finding technique is to take a well known one, solved or unsolved, and modify it intelligently.\nThe third stage it seems to me, is having such a wide awareness of the state and likely development of a field or area, that one sees likely problems on every hand and invites new talent to work on them. If one succeeds here, one may create a team and an environment of creative research that feeds on itself, and all the players may learn to add to the palette of interesting problems.\nBy the way, I would very much like to read accounts from some of the participants here of how they found a few of their favorite research problems. Going out on a limb here, I suspect a strong element of randomness will be noted.\n\n Q:\n\nMaven: iterate a directory of files inside Maven's resource directory\n\nI have a set of files in my Maven resource folder:\n+ src\n + main\n + resources\n + mydir\n + myfile1.txt\n + myfile2.txt\n\nHow can I iterate mydir? Not only in Eclipse, but when running JUnit tests from the command line, and from a dependent jar.\nFile mydir = new File(\"mydir\");\nfor (File f : dir.listFiles()) {\n dosomething... \n}\n\nThanks for a hint!\n\nA:\n\nNutshell, roughly:\nURL pathUrl ="}
+{"output_text": "\nI made a Dissolving World shader that works with the above tutorial.\n\nDissolving the world\n\nThe Dissolving World shader is a simple shader that takes a texture and a mask texture and applies the mask texture to the texture.\n\nThe Dissolving World shader is a simple shader that takes a texture and a mask texture and applies the mask texture to the texture.\n\nThe Dissolving World shader is a simple shader that takes a texture and a mask texture and applies the", "input_text": " o.Metallic = _Metallic;\n o.Smoothness = _Glossiness;\n o.Alpha = saturate(1-color); // saturate to make sure is between 0 and 1 that is equivalent of clamp(value,0,1)\n o.Normal = UnpackNormal(tex2D(_NormalMap,IN.uv_MainTex));\n }\n ENDCG\n }\n FallBack \"Diffuse\"\n }\n\nthen you should initialize the positions and sizes of objects in shader:\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing UnityEngine;\n\n[ExecuteInEditMode]\npublic class WorldMask : MonoBehaviour\n{\n public Transform[] arrayTransform;\n public Vector4[] arrayPosition;\n public float[] arraySize;\n public Material material;\n\n private void Awake()\n {\n arrayPosition = new Vector4[arrayTransform.Length];\n arraySize = new float[arrayTransform.Length];\n }\n\n private void Update()\n {\n for (int i = 0; i < arrayTransform.Length; i++)\n {\n arrayPosition[i]= arrayTransform[i].position;\n arraySize[i]= arrayTransform[i].localScale.x;\n\n }\n\n material.SetVectorArray(\"_arrayPosition\",arrayPosition);\n material.SetFloatArray(\"_arraySize\",arraySize);\n }\n}\n\nMaking World Position Dissolve Shader\nI found a good tutorial that explained how to Dissolving Objects in the world:\n\nDissolving the world Part 1\nDissolving the world Part 2\n\nDissolving the world Chris"}
+{"output_text": ":0;a:5:{s:4:\\\"data\\\";s:788:\\\"Zabbix is a free and open source monitoring system for IT infrastructure. It is written in C++ and is released under the GNU General Public License. Zabbix is a fork of the Zabbix project, which was originally developed by the Zabbix team at Red Hat. Zabbix is developed by a worldwide community of users and developers. The Zabbix project is a", "input_text": "\";s:0:\\\"\\\";}}}}}i:9;a:6:{s:4:\\\"data\\\";s:47:\\\"\\n \\n \\n \\n \\n \\n \\n \\\";s:7:\\\"attribs\\\";a:0:{}s:8:\\\"xml_base\\\";s:0:\\\"\\\";s:17:\\\"xml_base_explicit\\\";b:0;s:8:\\\"xml_lang\\\";s:0:\\\"\\\";s:5:\\\"child\\\";a:2:{s:0:\\\"\\\";a:3:{s:5:\\\"title\\\";a:1:{i:0;a:5:{s:4:\\\"data\\\";s:42:\\\"????????? telnet - ZABBIX Forums\\\";s:7:\\\"attribs\\\";a:0:{}s:8:\\\"xml_base\\\";s:0:\\\"\\\";s:17:\\\"xml_base_explicit\\\";b:0;s:8:\\\"xml_lang\\\";s:0:\\\"\\\";}}s:4:\\\"link\\\";a:1:{i:0;a:5:{s:4:\\\"data\\\";s:50:\\\"http://www.zabbix.com/forum/showthread.php?t=20387\\\";s:7:\\\"attribs\\\";a:0:{}s:8:\\\"xml_base\\\";s:0:\\\"\\\";s:17:\\\"xml_base_explicit\\\";b:0;s:8:\\\"xml_lang\\\";s:0:\\\"\\\";}}s:11:\\\"description\\\";a:1:{i"}
+{"output_text": ".\n\nA:\n\nI found the answer to my question.\nI used the following command:\nxkbcomp -list\n\nIt returns a list of all available layouts and variants.\nI then used the following command to list all the available toggle options:\nxkbcomp -query\n\nIt returns a list of all available toggle options.\nI then used the following command to list all the available layouts:\nxkbcomp -layout\n\nIt returns a list", "input_text": ". If they get downvoted to -1, they'll get deleted once they're a month old.\n#3 - Questions (open or closed) with no answers and no upvotes\n(This is newly added in Sep 2014... I'm not sure how I missed it when I first posted.)\n\nanswers:0 score:0 locked:0\n\nThere are tons of these and many of them are crappy. If so, give them a downvote so they're at -1 and they'll get taken care of on the next Saturday cleanup. I usually sort the search results by date and look through the oldest ones first. I find it's easier to spot old crappy questions.\nWhen I added this idea on 9 Sep 2014, this search gave ~8800 results, now on 12 Sep it's down to 8400, so yay!\nToday, I thought of a complementary search:\n\nanswers:0 score:1 locked:0\n\nLots of the questions with just 1 vote are also crappy, so if one person votes those down to 0, they'll show up when someone else does the earlier search for votes:0\n\n Q:\n\nList all valid kbd layouts, variants and toggle options (to use with setxkbmap)\n\nIs there a way from command line to retrieve the list of all available\nkeyboard layouts and relative variants?\nI need to list all the valid layout/variants choices to be used then from setxkbmap.\nAlso about the layout toggle options, is there a way to retrieve a list of all available choices (e.g. grp:shift_caps_toggle,...)\nI know that with\nsetxkbmap -query\n\nI retrieve the list of my current ones, but I need the whole list of options"}
+{"output_text": ".\nI have a web service that is running in a separate app pool. The web service is running in a separate app pool from the web site. The web site is running in a separate app pool from the web service. The web service is running in a separate app pool from the web site. The web site is running in a separate app pool from the web service. The web service is running in a separate app pool from the web site. The web site", "input_text": "\n }\n break;\n default:\n return false;\n break;\n }\n },\n addExtensions = function addExtensions( content, extensions ) {\n return extensions.reduce(function( content, extension ) {\n return DOM[extension.method](extension.node, extension.target, content);\n }, content);\n },\n // Returns new document as an [object Document]\n extendContent = function extendContent( content, extensions ) {\n var doc = DOM.createDoc(content),\n toExtend = (extensions)? \n extensions.map(function( extension ) {\n return createExtension(extension, doc);\n }) :\n null;\n var res = null;\n if (toExtend) return addExtensions(doc, toExtend);\n else return doc;\n };\n // Export public interface. Replace this by your require.js code or similar.\n return {\n 'extendContent' : extendContent\n };\n }( imports )),\n\n extendedHTMLDoc = moduleHTMLExtender.extendContent(originalHTML, configAry);\n\nconsole.log(extendedHTMLDoc.documentElement.outerHTML);\n// output = 'myTitle '; \n\n Q:\n\nSystem.UnauthorizedAccessException in mscorwks.dll causing app pool crashes\n\nMy app pools keep randomly crashing in IIS 6.0 MS Debug Diag points to kernel32.dll"}
+{"output_text": " sync: true,\n bufferProcessing: false,\n onwrite: [Function],\n writecb: null,\n writelen: 0,\n bufferedRequest: null,\n lastBufferedRequest: null,\n pendingcb: 0,\n prefinished: false,\n errorEmitted: false,\n bufferedRequestCount: 0,\n corkedRequestsFree: [Object] },\n writable: true,", "input_text": ": [Object],\n length: 0,\n pipes: null,\n pipesCount: 0,\n flowing: true,\n ended: false,\n endEmitted: false,\n reading: true,\n sync: false,\n needReadable: true,\n emittedReadable: false,\n readableListening: false,\n resumeScheduled: false,\n destroyed: false,\n defaultEncoding: 'utf8',\n awaitDrain: 0,\n readingMore: false,\n decoder: null,\n encoding: null },\n readable: true,\n domain: null,\n _events: \n { end: [Array],\n finish: [Function: onSocketFinish],\n _socketEnd: [Function: onSocketEnd],\n drain: [Array],\n timeout: [Function: socketOnTimeout],\n data: [Function: bound socketOnData],\n error: [Function: socketOnError],\n close: [Array],\n resume: [Function: onSocketResume],\n pause: [Function: onSocketPause] },\n _eventsCount: 10,\n _maxListeners: undefined,\n _writableState: \n WritableState {\n objectMode: false,\n highWaterMark: 16384,\n finalCalled: false,\n needDrain: false,\n ending: false,\n ended: false,\n finished: false,\n destroyed: false,\n decodeStrings: false,\n defaultEncoding: 'utf8',\n length: 0,\n writing: false,\n corked: 0,\n"}
+{"output_text": " 'action_device', x.action_device,\n 'action_type', x.action_type,\n 'count', x.value,\n 'value', z.value\n )\n )\n ) as result\n FROM df_table\n\n\"\"\").show(truncate=False)\n+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n|result |\n+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n|[[desktop, offsite", "input_text": "(action_values, y -> y.action_device = x.action_device AND y.action_type = x.action_type)[0].value\n )) as result\n FROM df_table\n\n\"\"\").show(truncate=False)\n+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n|result |\n+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n|[[desktop, offsite_conversion.custom.123, 1, 49.99], [desktop, offsite_conversion.custom.321, 1, 19.99], [iphone, offsite_conversion.custom.321, 2, 99.99], [iphone, offsite_conversion.custom.789, 1,]]|\n+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+\n\nUPDATE: in case of the FULL JOIN, you can try the following SQL:\nspark.sql(\"\"\"\n\n SELECT\n\n concat(\n /* actions left join action_values with potentially multiple matched values */\n flatten(\n transform(actions, x ->\n transform(\n filter(action_values, y -> y.action_device = x.action_device AND y.action_type = x.action_type),\n z -> named_struct(\n 'action_device', x.action_device,\n 'action_type', x.action_type,\n 'count', x.value,\n 'value', z.value\n )\n )\n )\n ),\n /* action_values missing from actions */\n transform(\n filter(action_values, x ->!exists(actions, y -> x.action_device = y.action_device AND x.action_type = y.action_type)),\n z -> named_struct(\n"}
+{"output_text": "File;\nimport java.io.FileInputStream;\nimport java.io.FileOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.util.HashMap;\nimport java.util.Map;\n\nimport org.apache.commons.io.IOUtils;\nimport org.apache.commons.lang.StringUtils;\nimport org.apache.commons.lang.", "input_text": " using (var responseStream = response.GetResponseStream())\n using (var reader = new StreamReader(responseStream))\n {\n while (!reader.EndOfStream)\n {\n directories.Add(line); \n }\n }\n return directories;\n}\n\nYou could write the above using yield if you'd rather.\nGo through your code and keep pulling out all of the methods aiming to get each one to do a single thing.\nFor example, I'd probably pull out another method from the above (ListDirectories) called CreateListDirectoriesRequest and have that create the WebRequest.\nOther thoughts\nFtp or ftp never FTP in names.\nWhat you're doing with your remoteFTPPath parameter is very confusing. I'd have no idea what it was for a lot of your method.\nIt's easier to use using than calling Close/Dispose most of the time.\nYou almost certainly want to log ex.ToString() rather than just the message. You'll want the stack trace when you're tracking down problems.\n\n Q:\n\nhow do i add a drop down list item in a mule connector?\n\nI've made a mule connector, everything works great. I got 4 main properties for an HTTP outbound connection: url, port, path and method.\nI would like the method to be a drop down list with values: GET, POST.\nDo you guys know how to do it? what annotation needs to be used in case that's the way to solve it? Or is it recognized by Mule when adding a Map or Enum property?\nThis is my current simple code\n/**\n * This file was automatically generated by the Mule Development Kit\n */\npackage com.web.testcomponent;\n\nimport java.io."}
+{"output_text": "Size(20f);\n defaultRenderer.setLegendTextColor(Color.BLACK);\n defaultRenderer.setLabelsTextColor(Color.BLACK);\n defaultRenderer.setShowLabels(true);\n defaultRenderer.setShowLegend(true);\n defaultRenderer.setShowGrid(true);\n defaultRenderer.setShowAxes(true);\n defaultRenderer.setShowRanges(true);\n defaultRenderer.set", "input_text": ":paddingTop=\"@dimen/activity_vertical_margin\"\n tools:context=\"ua.com.omelchenko.chartapplication.MainActivity\">\n\n \n \n\n\n\n(of course You don't need nested layouts)\nand MainActivity.java is:\npublic class MainActivity extends AppCompatActivity {\n\n private RelativeLayout mPieChartHolder;\n private GraphicalView mChartView;\n private PieChart mPieChart;\n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n String[] names = new String[] { \"Category 1\", \"Category 2\", \"Category 3\" };\n double[] values = { 20, 30, 50 };\n int[] colors = { Color.RED, Color.GREEN, Color.BLUE };\n\n CategorySeries categorySeries = new CategorySeries(\"Pie Chart\");\n for (int i = 0; i < names.length; i++) {\n categorySeries.add(names[i], values[i]);\n }\n\n DefaultRenderer defaultRenderer = new DefaultRenderer();\n for (int i = 0; i < values.length; i++) {\n SimpleSeriesRenderer seriesRenderer = new SimpleSeriesRenderer();\n seriesRenderer.setColor(colors[i]);\n defaultRenderer.setBackgroundColor(Color.BLACK);\n defaultRenderer.setLabelsTextSize(20f);\n defaultRenderer.setLegendText"}
+{"output_text": "'m not asking for the solution to the problem, I'm just asking for the logic behind the program.\n#include \n#include \n#include \n#include \n\nusing namespace std;\n\nint main()\n{\n int i = 0;\n int n = 0;\n int vote = 0;\n int count = 0;\n int max = 0;\n int min", "input_text": "-- encrypted :: String\n let newUser = user { password = encrypted } -- newUser :: User\n insertUser <- createUser conn -- insertUser :: User -> M ()\n insertUser newUser\n\nencryptPassword :: String -> M String\nencryptPassword pwd = do\n epwd <- liftIO $ do putStrLn \"Dear System Operator,\"\n putStrLn $ \"Plaintext password was \" ++ pwd\n putStr $ \"Please manually calculate encrypted version: \"\n getLine\n if epwd == \"I don't know\" then nothing -- return failure\n else return epwd -- return success\n\ncreateUser :: Connection -> M (User -> M ())\ncreateUser conn = do\n -- some fake storage\n return (\\user -> liftIO $ putStrLn $ \"stored user record \" ++ show user)\n\nmain :: IO ()\nmain = do username <- putStr \"Username: \" >> getLine\n password <- putStr \"Password: \" >> getLine\n\n let user = User username password\n result <- runM (userSignUp Connection user)\n\n case result of\n Nothing -> putStrLn \"Something failed -- with MaybeT, we can't tell what.\"\n Just () -> putStrLn \"Success!\"\n\n Q:\n\nAccepting only numbers in C++ program without the if else statement\n\nI made a simple program where users can vote. Here I've truncated the actual code so other users don't have to waste their time. As you can see the while loop isn't working but the program works with if else statement. I'm also commenting out my own understanding of program\nso you can point out anything I'm doing wrong here. Note that I"}
+{"output_text": "\n\n\n \n \n \n\n \n\n \n \n\n \n\n \n \n \n \n\n \n\n\n\nand the fragment_job_summary is:\n"}
+{"output_text": "ash-land-ldpi.png\" density=\"land-ldpi\"/>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n\n \n \n \n\n \n \n \n \n \n 0 Then\n ws1.Cells(lngRow, \"F\").Value = v\n End If", "input_text": " the code correctly at all but I thought it was something like this. \nThe arrays may not have the same amount of info in them right now because I took info out to make it smaller but my real one has the same number of values.\nDim lngRow As Long\nDim lngRows As Long\nDim arr As Variant, v As Variant\n'\n' This function will search for all Transfers.\n' If the reason for action is ERROR, it will leave it. If it part of the list that needs changed, then it will make it blank or \"\"\n' Otherwise it will leave it as it is.\n'\n'\nActiveSheet.AutoFilterMode = False\n\narr = Array(\"Atlanta\", \"Chicago\", \"Crown Point\", _\n \"Dallas\", \"DC\", \"Equipment Company\", \"Denver\", _\n \"Detroit\", \"Home Office\", \"Houston\", \"Kansas\", _\n \"Las Vegas\", \"Louisville\")\n\narr2 = Array(\"US Distribution\", \"US Products\", \"US Distribution\", \"US Distribution\", \"US Distribution\", \"US Distribution\", \"Equipment\", \"US Distribution\", \"US Products\", \"US Distribution\", \"Corporate\", \"US Distribution\", \"US Products\", \"US Distribution\", \"US Distribution\", \"US Distribution\", \"US Products\", \"US Products\")\n\nlngRows = Range(\"C\" & Rows.Count).End(xlUp).Row\n\nFor lngRow = lngRows To 2 Step -1\n\n For Each v In arr\n If ws1.Cells(lngRow, \"F\").Value = \"\" And _\n InStr(1, LCase(Range(\"J\" & lngRow)), LCase(v)) <> 0 Then\n"}
+{"output_text": " (mask.values)\n0 True\n1 True\n2 True\n3 True\n4 True\n5 False\n6 False\n7 True\n8 True\n9 True\n10 False\nName: Msgtype, dtype: bool\n\n#convert to integers\nmask = mask.astype(int)\nprint (mask)\n0 0\n1 0\n2 0\n3 0\n4 0", "input_text": " it is available\n2 reply 12/4 689 rent please?\n3 reply 12/6 689 $200\n4 accept 12/8 689 please pay through CC\n7 enquire 12/3 690 Looking for car\n8 reply 12/4 690 available\n9 accept 12/5 690 paid\n\nExplanations:\n#mask where is 'accept'\nmask1 = (df.Msgtype == 'accept')\nprint (mask1)\n0 False\n1 False\n2 False\n3 False\n4 True\n5 False\n6 False\n7 False\n8 False\n9 True\n10 False\nName: Msgtype, dtype: bool\n\n#per group shift, replace NaN by False and cumulative sum\nprint (mask1.groupby([df.ConvID]).apply(lambda x: x.shift().fillna(False).cumsum()))\n0 0\n1 0\n2 0\n3 0\n4 0\n5 1\n6 1\n7 0\n8 0\n9 0\n10 1\nName: Msgtype, dtype: int32\n\n#where output of groupby is 0 \nmask = mask1.groupby([df.ConvID]).apply(lambda x: x.shift().fillna(False).cumsum()) == 0\nprint (mask)\n0 True\n1 True\n2 True\n3 True\n4 True\n5 False\n6 False\n7 True\n8 True\n9 True\n10 False\nName: Msgtype, dtype: bool\n\n#boolean indexing and sorting\nprint"}
+{"output_text": "$querySelect = \"SELECT member_id2 \n FROM myteam \n WHERE member_id1 = '$memberHid5'\";\n\n $querySelectResult = @mysqli_query($conn, $querySelect);\n $fetchArr = mysqli_fetch_row($querySelectResult);\n\n $querySelect = \"SELECT member_id2 \n FROM myteam \n WHERE member_id1 = '$memberHid6'\";\n\n", "input_text": ">Unable to execute query.\". \"Error code\". mysqli_errno($conn).\":\". mysqli_error($conn)).\"
\";\n echo \"$memberHid1\".\" \".\" Successfully added
\";\n\n $queryCount = \"SELECT COUNT(*) \n FROM team\";\n $countResult = @mysqli_query($conn,$queryCount);\n $fetchCountArr = mysqli_fetch_row($countResult); \n for($n=0;$n<$fetchCountArr[0];$n++)\n {\n $pst = $n+1;\n $query4 = \"SELECT member_id2\n FROM myteam \n WHERE friend_id1 = '$pst'\";\n\n $countResult2 = @mysqli_query($conn,$query4);\n $countArr = mysqli_fetch_row($countResult2);\n $a=0;\n while($countArr)\n {\n $a++;\n $countArr = mysqli_fetch_row($countResult2); //echo \"$a
\";\n }\n\n $query4 = \"UPDATE team \n SET num_of_members= '$a' \n WHERE member_id = '$pst' \";\n\n $countResult2 = @mysqli_query($conn,$query4);\n\n }\n\n $querySelect = \"SELECT member_id2 \n FROM myteam \n WHERE member_id1 = '$memberHid4'\";\n\n $querySelectResult = @mysqli_query($conn, $querySelect);\n $fetchArr = mysqli_fetch_row($querySelectResult);\n\n "}
+{"output_text": " the results together.\nI'm not sure if there's a better way to do this.\n\nA:\n\nYou can use dplyr::summarise_each to do this.\nlibrary(dplyr)\n\nexample_df %>%\n group_by(location) %>%\n summarise_each(funs(sum))\n\n# # A tibble: 8 x 4\n# # Groups: location [2]\n# ", "input_text": " conditional.\nAnyone, please post any questions in the comments if you are still confused.\n\n Q:\n\nBetter way to summarize multiple groups in same dataframe\n\nI'm not sure a better way to phrase this for the title, which is probably impeding me being able to search for the answer.\nI have a dataframe that looks like this:\nexample_df <- data.frame(\n ID = c('A', 'A', 'A', 'B', 'B', 'C', 'C', 'C'),\n location = c('park 1', 'park 1', 'park 2', 'park 3', 'park 1', 'park 4', 'park 1', 'park 5'),\n sample_2000 = c(1, 5, 0, 2, 3, 1, 0, 8), \n sample_2001 = c(2, 1, 1, 3, 5, 6, 4, 2), \n sample_2003 = c(1, 2, 5, 8, 11, 1, 0, 7)\n )\n\n ID location sample_2000 sample_2001 sample_2003\n1 A park 1 1 2 1\n2 A park 1 5 1 2\n3 A park 2 0 1 5\n4 B park 3 2 3 8\n5 B park 1 3 5 11\n6 C park 4 1 6 1\n7 C park 1 0 4 0\n8 C park 5 8 2 7\n\nI want to sum all the values for each year by location and end up with the results in the same dataframe. I'm currently using group_by() and summarize on each year individually and then joining"}
+{"output_text": " - a;\n }\n iters++;\n }\n return x;\n}\n\nStep 3:\n/**\n * Evaluate the function at the given arguments.\n * @param min the minimum value\n * @param max the maximum value\n * @param x the value to evaluate\n * @param var the variance\n * @return the value of the function at the given arguments\n */\nprivate static double eval(double min, double max, double x", "input_text": " too low (we need 4.0), meaning that a displacement of 2.5 is too much (higher displacements give lower variances).\nThe variance expression is a 4th order polynomial in x that I'd rather not want to solve analytically. However, for a target x in the admissible range this expression is monotonically decreasing, so we can construct a function that crosses zero for our target variance and solve this by simple bisection. This is\nStep 2:\n/**\n * Find the displacement {@code x} for the given {@code stddev} by simple\n * bisection.\n * @param min support lower bound\n * @param max support upper bound\n * @param stddev the standard deviation we want\n * @return the length {@code x} of {@code d - c = b - a} that yields a\n * standard deviation roughly equal to {@code stddev}\n */\nstatic double bisect(double min, double max, double stddev) {\n final double eps = 1e-4;\n final double var = pow(stddev, 2);\n int iters = 0;\n double a = eps;\n double b = (max - min) / 2 - eps;\n double x = eps;\n double dx = b - a;\n\n while (abs(dx) > eps && iters < 150 && eval(min, max, x, var)!= 0.0) {\n x = ((a + b) / 2);\n if ((eval(min, max, a, var) * eval(min, max, x, var)) < 0.0) {\n b = x;\n dx = b - a;\n } else {\n a = x;\n dx = b"}
+{"output_text": " of information associated with it. The first test is to see if the animal already has a WHno. If it does, then the second test is to see if the animal has a different WHno. If it does, then the third test is to see if the animal has a different WHno and a different location. If it does, then the fourth test is to see if the animal has a different WHno and a different location and a different species. If it", "input_text": " of the bride (comp. John iii. 29; Matt. xxv. 1-13). The bride had to remain in the \u1e25uppah for seven days, as long as the wedding festivities lasted (Judges xiv. 15); hence the name of these festivities, \"the seven days of her\" or \"of the \u1e25uppah\" (Pesi\u1e33. 149b)...\n[Deu 22:17 KJV] 17 And, lo, he hath given occasions of speech [against her], saying, I found not thy daughter a maid; and yet these [are the tokens of] my daughter's virginity. And they shall spread the cloth before the elders of the city.\n\nThis appears to be behind Paul's comment:\n\n[2Co 11:2 KJV] 2 For I am jealous over you with godly jealousy: for I have espoused you to one husband, that I may present [you as] a chaste virgin to Christ.\n\nIf so then Paul is acting as a groomsman. Christ is the groom and the Corinthians are the bride.\nSo this suggests to me that Paul and the Twelve were, as in the parable of the Ten Virgins ancillary. The virgins in the parable are charged with bearing torches so the bride doesn't get attacked (human or animal), trip or get lost en route.\n\n Q:\n\nBuilding a DCount/SQL statement in VBA via concetenation if test is true\n\nI have a data entry form (Access 2007) which is designed to find out if the captured animal already has an existing WHno. Unfortunately, the data is messy and these is not a single unique identifier so several tests must be performed to narrow the search. \nThe animal could have 1 to 10 different pieces"}
+{"output_text": "__(foo)\n self.bar = bar\n\n def __eq__(self, other):\n return self.foo == other.foo and self.bar == other.bar\n\nclass MyDerived_2(MyBase):\n def __init__(self, foo: int, bar: int):\n super().__init__(foo)\n self.bar = bar\n\n def __eq__(self, other):\n return self.foo == other.", "input_text": " {\n url: \"/crm-de\",\n templateUrl: \"templates/de/crm.html\"\n })\n\nItaly:\n$stateProvider\n .state(\"it-web\", {\n url: \"/web-developer-it\",\n templateUrl: \"templates/it/web-developer.html\",\n })\n .state(\"it-crm\", {\n url: \"/crm-it\",\n templateUrl: \"templates/it/crm.html\"\n })\n\nUnited States:\n$stateProvider\n .state(\"us-web\", {\n url: \"/web-developer-us\",\n templateUrl: \"templates/de/web-developer.html\",\n })\n .state(\"us-crm\", {\n url: \"/crm-us\",\n templateUrl: \"templates/de/crm.html\"\n })\n\nAlthough this works, I'm not happy. How can it be achieved that the templates are being loaded into the same url?\n\n Q:\n\nGet the type of the super class in Python 3\n\nI have a base class with two classes that are derived from it. I want the methods of the base classes to behave differently depending on whether the arguments are of the same type as the derived class, or only instances of the base class but a different type. This is the current implementation:\nclass MyBase:\n def __init__(self, foo: int):\n self.foo = foo \n\n def __eq__(self, other):\n return self.foo == other.foo \n\nclass MyDerived_1(MyBase):\n def __init__(self, foo: int, bar: int):\n super().__init"}
+{"output_text": "//Initialising data in array \nuser_down[0] = 1;\nuser_down[1] = 3;\n\nuser_down[2] = 2;\nuser_down[3] = 7;\n\nuser_down[4] = 5;\nuser_down[5] = 8;\n}\n\n//user_stops array declaration\npublic static int user_stops[] = new int [6];{\n\n//Initial", "input_text": "merges the two separate arrays into one (user_up + user_down = stoppages) \n int stoppages[] = new int[user_stops.user_up.length+user_stops.user_down.length];\n System.arraycopy(user_stops.user_up, 0, stoppages,0, user_stops.user_up.length);\n System.arraycopy(user_stops.user_down, 0, stoppages, user_stops.user_up.length, user_stops.user_down.length);\n\n int c = 0;\n\n do {\n System.out.println(\"The lift has come to stop at floor \" + stoppages[c]);\n System.out.println(\"The lift has started moving again.\"); \n c++;\n } while (c < stoppages.length);\n\n do {\n System.out.println(\"This lift has stopped moving forever.\");\n } while (c!=stoppages.length);\n }\n }\n\nThe above method calls this method:\nimport java.util.*;\npublic class user_stops {\n//user_up array declaration \npublic static int user_up[] = new int [6];{\n\n//Initialising data in array \nuser_up[0] = 1;\nuser_up[1] = 3;\n\nuser_up[2] = 2;\nuser_up[3] = 7;\n\nuser_up[4] = 5;\nuser_up[5] = 8;\n}\n\n//user_down array declaration \npublic static int user_down[] = new int [6];{\n\n"}
+{"output_text": " else.\nSo, I want to get the output like this:\nPara1 \n\nPara2 \n\nPara3 \n\nPara4 \n\n\n\n \n Para1 \n Para2 \n Para3 \n Para4 \n\n Para5 \n Para6 \n Para7 \n\n Para8 \n Para9 \n\n Para10 \n\n \n\n\n\nSo, While reading each , i want to check its attribute value pStyle Value.For example, in the above file,the first contains that attribute value as \"Heading1\". So, For the first , i don't care about anything"}
+{"output_text": " instance of your Activity.\nYou need to pass in an instance of your Activity, not the Fragment.\nSo, change your code to:\nnew CustomAdapter(this, prgmNameList, prgmImages));\n\nand change your constructor to:\npublic CustomAdapter(Context context, List prgmNameList, List prgmImages) {\n this.context = context;\n this.prgmNameList = prgmNameList", "input_text": "list5, null);}\n holder.tv=(TextView) rowView.findViewById(R.id.textView1);\n holder.img=(ImageView) rowView.findViewById(R.id.imageView1);\n\n holder.tv.setText(result[position]);\n holder.img.setImageResource(imageId[position]);\n\n rowView.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View v) {\n // custom dialog\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.customdialog);\n dialog.setTitle(result[position]);\n\n // set the custom dialog components - text, image and button\n TextView text = (TextView) dialog.findViewById(R.id.text);\n ImageView image = (ImageView) dialog.findViewById(R.id.image);\n image.setImageResource(imageId[position]);\n\n Button dialogButton = (Button) dialog.findViewById(R.id.dialogButtonOK);\n // if button is clicked, close the custom dialog\n dialogButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }\n });\n\n return rowView;\n }\n\n}\n\nim getting incompatible error in this :\n context=mainActivity;\nwhat can i do in this case?\n\nA:\n\nYour problem is when you instantiate your CustomAdapter -\nnew CustomAdapter(this, prgmNameList, prgmImages));\n\nthis is referencing the Fragment instance, and that is what you are passing in, which is obviously not and"}
+{"output_text": " void onDraw(Canvas canvas) {\n super.onDraw(canvas);\n\n // draw smoke\n canvas.drawColor(Color.BLACK);\n canvas.drawBitmap(bitmap, 0, 0, null);\n\n // draw smoke\n canvas.drawColor(Color.BLACK);\n canvas.drawBitmap(bitmap, 0, 0, null);\n\n // draw smoke\n canvas.drawColor(Color.BLACK);", "input_text": "new Runnable() {\n\n @Override\n public void run() {\n myView = new MyView(SketchActivity.this, layout.getWidth(), layout.getHeight());\n\n layout2.addView(myView);\n layout2.bringToFront();\n\n }\n }, 50);\n\nThe View where i create the (mutable?) bitmap:\npublic MyView(Context c, int width, int height) {\n super(c);\n\n WindowManager wm = (WindowManager) c.getSystemService(Context.WINDOW_SERVICE);\n Display display = wm.getDefaultDisplay();\n int w = display.getWidth(); // deprecated\n int h = display.getHeight();\n setFocusable(true);\n setBackgroundResource(R.drawable.download);\n\n // setting paint\n mPaint = new Paint();\n mPaint.setAlpha(0);\n mPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n mPaint.setAntiAlias(true);\n\n // getting image from resources\n Resources r = this.getContext().getResources();\n\n Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.smoke);\n\n // converting image bitmap into mutable bitmap\n\n bitmap = bm.createBitmap(w, h, Config.ARGB_8888);\n mCanvas = new Canvas();\n mCanvas.setBitmap(bitmap); // drawXY will result on that Bitmap\n mCanvas.drawBitmap(bm, 0, 0, null);\n\n }\n\nMy onDraw function:\n @Override\n protected"}
+{"output_text": "\" id=\"scelta5\">ADD TO 5\r\nADD TO 6 \r\nADD TO 7 \r\nADD TO 8 \r\nADD", "input_text": "').on(\"click\", function() {\r\n var conta = 1;\r\n var fiamma;\r\n while (conta < 7) {\r\n fiamma = $('#scelta'+conta);\r\n $.each($(fiamma).data(), function(i){ \r\n $(fiamma).removeAttr(\"data-\" + i);\r\n });\r\n //console.log(conta); \r\n conta++;\r\n }\r\n showData();\r\n });\r\n \r\n function showData(){\r\n var result = ' ';\r\n $('.sceltaButt').each(function(){\r\n /*$.each($(this)[0].attributes, function(){\r\n result +='' + this.name + ':' + this.value;\r\n });*/\r\n $.each($(this).data(), function(name){\r\n result +='' + name + ':' + this;\r\n });\r\n result += ' ';\r\n });\r\n $('#result').html(result);\r\n }\r\n \r\n showData();\r\n \r\n});\n\r\nADD TO 1 \r\nADD TO 2 \r\nADD TO 3 \r\nADD TO 4 \r\n\n \n \n\n\n\nindex-submit.php\n\n\n\n \n\n\n \r\n \r\n \r\n \r\n \n \n
\n \n \n\n\n \n