query_id
stringlengths
4
64
query_authorID
stringlengths
6
40
query_text
stringlengths
66
72.1k
candidate_id
stringlengths
5
64
candidate_authorID
stringlengths
6
40
candidate_text
stringlengths
9
101k
890c6e1ca99c2d0ce5b68a7bf6c56ff65a3a1bba8dbe2e3fd247d56a2632d5c7
['286f63d324244972a244fcc35e5dd1a6']
OpenVPN is the service that is allowing you to connect from outside to your local network, basically a VPN server. By connecting to it, it creates a tunnel and your traffic is routed through it, and have access to your local network through the internet. The internal services, as in this case a HTTP Server, that you have on your network are not forwarded by OpenVPN through the public IP, these resources can be accessed only if you have an active VPN connection and only on the internal IP. In addition to that, if you are behind a router, you have to configure port forwarding! on your router in order to be able to access the OpenVPN server from the internet, usually the Internet Providers are not closing the VPN ports, if you have issues, you can contact them and ask. If your Internet Provider is assigning you a dynamic IP Address!, you have to configure a dynamic DNS in order to be able to access your Public IP Address when it changes.
299ef3318fc669ab121c6a9a9ce696e3a637b1251a4a7556a41a62367a055ac6
['286f63d324244972a244fcc35e5dd1a6']
I could write an answer to your question but why rewriting when the exact problem you describe and its solution have been beautifully explained in this webpage https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html In there you will find the following colour scales: Viridis Magma Plasma Inferno Cividis
16f23fec9d72ca4bd2b1b134dc925d9f9f319b536005ddb3d4e4e0acd26ba0e9
['287463ec4a8c414a80b1bfd8acf3ee13']
Sometimes you want to use line breaks and not paragraphs. In that case, you can do: function convertNewLines(_text) { let lines = _text.split('\n'); let elements = []; for (let i=0; i<lines.length; i++) { elements.push(lines[i]); if (i < lines.length-1) { elements.push(<br key={i}/>); } } return elements; } This avoids the use of dangerously setting inner HTML. (FWIW I figured this out by using the Babel REPL.)
2b94ff66ae227418e4b02e6640ef5a5151898b3f4f5effb1a6fd395c049d7f73
['287463ec4a8c414a80b1bfd8acf3ee13']
To answer <PERSON> question: you can use bind() to pass arguments, like so: drawDiagramOnSlide.bind( null, slideName, slideEl.querySelector('.diagram') )); Assuming drawDiagramOnSlide looks like this: function drawDiagramOnSlide(_slideName, _diagramEl, _event) {...} The bind call will create a function that calls drawDiagramOnSlide with the correct slide name and element (in my case, a div with class diagram inside the slide ).
142b13bed863b52cf2ea29dc24de5e7da0c2a8a6f68b4f9746e173ba5cd670f2
['2883f62ba5814168b1ae63cdc8567e8a']
I want to create a P3P agent to add some functionality to the existing agents but I don't know how to start. I know how to plug the policy to my website but what I really want is to develop simple browser that gets the page and compare the policy to the local preferences. So, is there any library out there or web services to make me able to retrieve the policy and parse it and hence compare it to the user preferences? Thanks fans
cfce5dbd2350d3df48b3f263612990cbe6982cc5aba3661b08f2add833c8ea6f
['2883f62ba5814168b1ae63cdc8567e8a']
Go to terminal and use sudo prime-select nvidia. There are three of them: sudo prime-select intel (to use the intel card) sudo prime-select nvidia (to use the nvidia card) sudo prime-select query (to see which one is selected) After typeing i terminal choosen statment intel or nvidia logout and log in or restart your laptop. Works on dell inspiron 7559 with intel and nvidia gtx960m
fb1d2a4ae3589a8ae12a65835fe8ddd810c2a9180a026182444f785671697fe9
['2887305b38214b178c99a7a82ccc1950']
its not a typo, please see LinkedBlockingQueue Implementation. There are no unnecessary signaling, instead its a good design where consumer thread only signals the producer thread only when the queue is full, else unblocking of threads is clearly taken care by producer thread. Also AtomicInteger takes care memory ordering especially happens before relationship so no visibility problem there. See LinkedBlockingQueue impl u will understand what i am talking
3deb98069bbfb8888c15251c4b9e017a853e844d1c50c093da239708a5643128
['2887305b38214b178c99a7a82ccc1950']
When attempting to union multiple polygons with Shapely 1.5.6 in Python 2.7.9, using GEOS 3.4.2, I get the following error in the underlying C++ code: Assertion failed: (!"should never be reached"), function itemsTree, file AbstractSTRtree.cpp, line 371 The polygons are in a Python list and then I call shapely.ops.unary_union(polygon_list). The polygon list has 1998 items, all of which are proper polygons. I have tried running the unary_union operation in a separate python session with a couple manually created polygons and it works. Could the number of polygons be a problem, or the import order in the file (I have seen a mention of shapely needing to be imported before Basemap, but I am not using that package)?
83c855b7bc7aaa3c43f0fa3e5a21bf29da646da45a349fddcca13974de039496
['28880fdc95f6465d9dfdbe858d5b158a']
Agenda view will help meet your conditions. To do so go to Google Calendar, in My Calendar there will be a cut down on your calendar click on it, then Calendar settings. There you will see "Customize the color, size, and other options" in "embed this calendar". There you would find the agenda view. Besides that Google Calendars offers api's that can offer great customization. https://developers.google.com/google-apps/calendar/
85f31dcf8b1a836050ebecce2cf25b89145fc1045e4008541c4721d628102f4f
['28880fdc95f6465d9dfdbe858d5b158a']
Another comment, coming from a former advertising guy: The price GoDaddy displays for you, for me, and for <PERSON> will probably vary substantially. Much of what you see online, actually, varies significantly based on various data points the websites you visit collect: Your location, previous browsing history, the type of computer you use and a boatload of other information. This is part of the reason Facebook is so useful to advertisers (and dangerous for you) - see [here](https://en.wikipedia.org/wiki/Facebook%E2%80%93Cambridge_Analytica_data_scandal).
f46a696c70637a9b0f92467a8c79cd510426d34c62571a6b3ff5ee6793b14483
['2897825eb60045cfade466bcdc13393d']
@ <PERSON>, English is not a language based on need or logical construct. It is an amalgam of languages, and often contains multiple words from various donor languages to serve the same purpose. There are some contextual influences that favor one word over the other in certain instances, but fewer cut and dried rules
096336e50d602b0027ba2fe3bf1d9adf91fab8064a9d57da3d3805d1d88a4d98
['2897825eb60045cfade466bcdc13393d']
Probably a little too much as @krissi answer works very good, but just in case you have to do it more than once, you can use a script like this: #!/bin/bash # MySQL databases migration script # <PERSON> (jorge {dot} barnaby {at} gmail) ################################################################################ # Configuration variables ORIG_USER="origin-username" ORIG_PASS="origin-password" ORIG_HOST="origin-server" DEST_USER="destination-username" DEST_PASS="destination-password" DEST_HOST="destination-server" # Do not backup the following databases IGNORED_DBS="information_schema" ################################################################################ # Start of the program # Command that runs on the origin server to extract the databases MYSQL_ORIG="mysqldump -u $ORIG_USER -h $ORIG_HOST -p$ORIG_PASS --add-drop-database --databases" # Command that runs on the destination server to popuplate the databases MYSQL_DEST="mysql -u $DEST_USER -h $DEST_HOST -p$DEST_PASS" # Get all database list first DBS="$(mysql -u $ORIG_USER -h $ORIG_HOST -p$ORIG_PASS -Bse 'show databases')" echo echo ----------------------------------------------------------- echo `date +"%F %T %Z"` : Starting MySQL Migration script echo ----------------------------------------------------------- echo echo -- MySQL Origin Server: $ORIG_HOST echo -- MySQL Destination Server: $DEST_HOST for db in $DBS do skipdb=-1 if [ "$IGNORED_DBS" != "" ]; then for i in $IGNORED_DBS do [ "$db" == "$i" ] && skipdb=1 || : done fi if [ "$skipdb" == "-1" ]; then echo echo -- `date +"%F %T %Z"` : Migrating database $db # Command to be executed piping mysqldump on the origin and mysql on the remote $MYSQL_ORIG $db | $MYSQL_DEST echo -- `date +"%F %T %Z"` : Done fi done echo echo ----------------------------------------------------------- echo `date +"%F %T %Z"` : All Done echo ----------------------------------------------------------- exit 0
07d7c2f17940c265f9f816e6640ad83d335cc14d6045fec355c0f63500d5c541
['28ac46d9e83149cf9e81010446822120']
Have you tried shutdown using shutdown /s or r or h via CMD prompt or Powershell. If it's your home network the reason why you have to use your IP address might because you don't have a Active Directory resource to manage the computer name. Also you can try using Team Viewer, its a great and free RDP program.
666b3be08fe5c77fd79d71b185adcb068c8bd7252a2d3bc1f3167b9faa9b4f27
['28ac46d9e83149cf9e81010446822120']
<PERSON>, I actually use the built in Windows Task Scheduler to set up these types of operations. I find it alot easier than using CMD and it has all the options, features, triggers, etc that you may be looking for. I use it to draft tasks and eventually push them onto our network. Not to mention it can be accessed under normal and admin user rights by default. Hope this points you in the right direction. <PERSON>.
474d748f84e15fb1a34967e7a552fdb9c21563524c2721cc83538d7061d00f85
['28b6bb83ebb341379f2f822516e8aa95']
I have a question about TFS reporting. Here is the situation. I want to include a field called "release notes" in some reports. This field is an HTML filed and can not be set to reportable as far as I know. I could copy the info from the HTML field to a string field. Strings are reportable. However they are only 256 chars. So, given these conditions how would I get the data in the "relase notes" HTML field to finally be reportable. I've been looking everywhere and can't find any good solutions. Thanks for your kind attention.
ce174ae7c4d3a4144f8f73b62adccd36a2cbb9b9c92595503c30462d799eb5c9
['28b6bb83ebb341379f2f822516e8aa95']
I know that php is a server-side language. However I am confused on how to hook up a html button event to a page that uses php. I understand this will probably involve Javascript, some css and html and maybe Ajax. I've been looking at some examples but they don't explain the important pieces I am looking for. In summary I want to see the code for the click event and how php gets notified there was a click. I apologize if this is a strange question. I'm used to old application programming and I'm trying to understand some of these newer practices.
06ba9fe9ae4c7703c82d747375582f57ad58a2bcc90777197733061961116075
['28dc734742e24b56b9a908f67b8cbc17']
I am trying to replace all values of array except one key value. I am using preg_replace and have this code: $posts = json_decode($post_list, true); foreach($posts as &$elm){ $elm = array_map(function($i) use($s){ return preg_replace("/(" . preg_quote($s) . ")/is", "<span style='background: #92CF18;'>$1</span>", $i); }, $elm); } My posts var looks like this: <PERSON> I want to don't change value of "slug" key how can I do it?
bc84af5fdc47dd9fc976f89f8848806cf96f8cacba7b49348f18f3a1eb9a5e5d
['28dc734742e24b56b9a908f67b8cbc17']
Hello everyone I'm looking for method to change my default java for macbook air. I'm new user in mac and I dont know how and where to do it. I've installed Java 7 from Oracle website but when I want to run eclipse it shows alert that I need java 7 version.
fd7495b8382228557f89a3d655fc7d69394a8af3d007c10e59ea0b374df15c94
['28e3711d6199425a8edb3bf9471d3243']
I have this error: undefined method `[]' for nil:NilClass Extracted source (around line #16): 13: <% end %> 14: 15: <% create_url = {:url=>{:action=>"create"}} if @post.new_record? %> 16: <% form_for @post, create_url do |t| %> 17: <%= t.label :title, 'Virsraksts:' %><br /> 18: <%= t.text_field :title %><br /> 19: <%= t.label :content, 'Teksts:' %><br /> I am new at Ruby on Rails, so, please, help me. This error happens when I push the edit button for post.
31cba15e93b13d897f544eed1da53359788b298f387295bc6ce4cbe3b955fd38
['28e3711d6199425a8edb3bf9471d3243']
I am using Devise for users, but in view page when I trying to show the user name and surname I see only 0. View: <% if user_signed_in?%> <div id="admin_bar"> <ul> <li><PERSON>, <%= current_user.name %> <%= current_user.surname %> <PERSON>> </ul> </div> <% end %> User migration: class CreateUsers < ActiveRecord<IP_ADDRESS>Migration def change create_table :users do |t| t.integer :name, :null => false t.integer :surname, :null => false t.timestamps end end def self.down drop_table :users end end Devise migration which added Devise to my User: class AddDeviseToUsers < ActiveRecord<IP_ADDRESS>Migration def self.up change_table(:users) do |t| ## Database authenticatable t.string :email, :null => false, :default => "" t.string :encrypted_password, :null => false, :default => "" ## Recoverable t.string :reset_password_token t.datetime :reset_password_sent_at ## Rememberable t.datetime :remember_created_at ## Trackable t.integer :sign_in_count, :default => 0 t.datetime :current_sign_in_at t.datetime :last_sign_in_at t.string :current_sign_in_ip t.string :last_sign_in_ip ## Confirmable # t.string :confirmation_token # t.datetime :confirmed_at # t.datetime :confirmation_sent_at # t.string :unconfirmed_email # Only if using reconfirmable ## Lockable # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts # t.string :unlock_token # Only if unlock strategy is :email or :both # t.datetime :locked_at ## Token authenticatable # t.string :authentication_token # Uncomment below if timestamps were not included in your original model. # t.timestamps end add_index :users, :email, :unique => true add_index :users, :reset_password_token, :unique => true # add_index :users, :confirmation_token, :unique => true # add_index :users, :unlock_token, :unique => true # add_index :users, :authentication_token, :unique => true end def self.down # By default, we don't want to make any assumption about how to roll back a migration when your # model already existed. Please edit below which fields you would like to remove in this migration. end end and my user model: class User < ActiveRecord<IP_ADDRESS>Base # Include default devise modules. Others available are: # :token_authenticatable, :confirmable, # :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable # Setup accessible (or protected) attributes for your model attr_accessible :email, :password, :password_confirmation, :remember_me, :name, :surname # attr_accessible :title, :body end What I am missing here?
766df2fb6f3e7f894c3eab4d73cf679463de25142380db1036c62607f022a37b
['28e3eac2245f41078d2c8b2a068639f9']
I found out the reason in this while googling. I noticed that module com_virtuemart was not showing up in the module list under module manager. The login form and registration forms were showing up from Joomla module. I re-installed the com_virtuemart module and unpublished the login form in Joomla. That cleared my issue. Link :http://forum.joomla.org/viewtopic.php?p=2516776
0006e5bf5c8ea496579f60a0549c8a43948c6a51db08ce8ce0453843606ccfd8
['28e3eac2245f41078d2c8b2a068639f9']
Changing the collation for all tables in a MySQL database can be time consuming depending on how many tables you have. That's why we recommend using the following PHP script for changing the collation for all tables at a time: <?php $execute_sql = false; $host = 'host name'; $username = 'user_name'; $password = 'password'; $dbname = 'databse_name'; $db = new mysqli($host, $username, $password, $dbname); //$connect = mysql_connect('localhost','root','Admin@123'); //$select_db = mysql_select_db('friends') or die('database not selected'.mysql_error()); $collation = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci'; $collationPK = 'CHARACTER SET utf8 COLLATE utf8_bin'; $result = $db->query("SET foreign_key_checks = 0"); echo '<div>'; if($execute_sql) $db->query("ALTER DATABASE $dbname $collation"); $result = $db->query("SHOW TABLES"); $count = 0; while($row = $result->fetch_assoc()) { $table = $row['Tables_in_'.$dbname]; if($execute_sql) $db->query("ALTER TABLE $table DEFAULT $collation"); $result1 = $db->query("SHOW FULL COLUMNS FROM $table"); $alter = ''; while($row1 = $result1->fetch_assoc()) { if (preg_match('~char|text|enum|set~', $row1["Type"])) { // support a different collation for primary keys if ($row1["Key"] == "PRI" || $row1["Key"] == "MUL") { $newCollation = $collationPK; } else { $newCollation = $collation; } // check if we actually need to change the collation $alter .= (strlen($alter)?", \n":" ") . "MODIFY `$row1[Field]` $row1[Type] $newCollation" . ($row1["Null"] ? "" : " NOT NULL") . ($row1["Default"] && $row1["Default"] != "NULL" ? " DEFAULT '$row1[Default]'" : ""); } } if(strlen($alter)){ $sql = "ALTER TABLE $table".$alter.";"; echo "<div>$sql\n\n</div>"; $db->query($sql); } $count++; } echo '</div>'; ?>
4c3df303e79582e7ca488bfd1d91f8fc08d23ddc09301fa4b6b4cc9cfcaa66f9
['2918649193c34140ab09431006c3987b']
I suggest using a for loop for k too like i var h7length=document.getElementsByTagName("h7").length; for(k=0;k<h7length;k++){ for(i=0;i<5;i++){ if(i==0){ document.getElementsByTagName("h2")[k].style.left="42px"; document.getElementsByTagName("h7")[k].style.left="42px"; } else { document.getElementsByTagName("h2")[k].style.left=i*154+"px"; document.getElementsByTagName("h7")[k].style.left=i*154+"px"; } } }
b21599c9cb23e4567dda07fb4f4f82ae029b8b27be8eac5bfa1e97f18a2894e5
['2918649193c34140ab09431006c3987b']
not able to get this, can someone help for this LINQ query? select col1, (select col2 from tbl2 where tbl2.ID=tbl1.tbl2ID) as [col2] from tbl1 scenario is like this I want all records from <PERSON> table, <PERSON> has sectorID column, I also want SectorName. Also it has CountryID and CityID and I need CountryName and CityName too.
af2470ce807ba213bd815fdd4fd61a683491d1324aee97a42539a4a01c2a81d3
['2927e449cd4244f288b48b94cc562996']
IE9 and 10 don't like third party cookies. SoundCloud's HTML5 widget uses those. More from SoundCloud: http://help.soundcloud.com/customer/portal/articles/1331463-why-is-my-widget-not-showing-up-in-internet-explorer- More from Microsoft: http://answers.microsoft.com/en-us/ie/forum/ie10-windows_8/soundcloud-html5-widget-wont-display-in-ie-9-or-10/79aaab55-44d8-414f-9d06-939bbdf25676
c1e39b7ad1426b1238dfa8ff83b67256de746d7e9db5b74f0beda0b3476adf8a
['2927e449cd4244f288b48b94cc562996']
My website is responsive. The blog section uses a subdomain pointing to Tumblr, but the cross-domain version of Respond.js isn't working. I'm doing this: <script src="http://www.stevechab.com/scripts/respond.min.js"></script> <link href="http://www.stevechab.com/scripts/respond-proxy.html" id="respond-proxy" rel="respond-proxy"> <link href="http://www.stevechab.com/scripts/respond.proxy.gif" id="respond-redirect" rel="respond-redirect"> <script src="http://www.stevechab.com/scripts/respond.proxy.js"></script> I assume the problem is that respond.proxy.gif and respond.proxy.js aren't on blog.stevechab.com ... but doesn't that defeat the purpose of having a cross-domain version of Respond.js? Is my assumption right, or am I missing something? Is there a work around for this? Note: I tried http://www.tumblr.com/themes/upload_static_file ... no dice.
d5625021d354dd2d3fc222070da0b196e8c43a3718c284c23cb93c292730d8bf
['2931d617c9d045728383f75336a32b2d']
I'm new to Radar in general, and I'm studying RADAR using online resources. I came across the following slide which shows the process flow of the Radar signal processing. The thing I don't get in the figure is the signal processing block and the general purpose Computer block. The following is my basic understanding of the process flow which is very different than the flow in the picture: Pulse compression -> matched filter -> Threshold -> Range Detection -> Clutter rejection (Doppler processing) -> Doppler Detection. The reasoning is that we need to find the target's range gate before we can process the target's Doppler information, and to detect the target's range, we need to set some threshold to separate our target from other clutters and noise. After we locked the target into certain range gate, we can process the target's Doppler information from the I-Q data obtained after processing the received echo. Any clutters in the same range gate can be rejected by using a set of Doppler filter banks as the target and clutters have their respective Doppler characteristics/frequencies. Could someone explain to me where was my misunderstanding? I just got started, so there must be many things I got misunderstood. So thank you for your time, patience, and help. regards, <PERSON>
24488630496c1318ebcf7683c41e5be1ad45b54ab0c8afaf777190f0779c3d57
['2931d617c9d045728383f75336a32b2d']
Concordo que o argumento "Dificuldade de representar símbolos de certas linguagens" é fraco, mas não entendo como vc pode achar perguntas duplicadas um mal argumento já que a comunidade SE se preocupa tanto com isso e a barreira de conhecimento é um grande problema já que a resposta pra sua dúvida ainda pode estar em uma língua em que vc não tem acesso (não só em inglês, mas japonês por exemplo).
fe1c2c0cc06a5b4390ceb6a602b5433c7435ff6dd82ba7d66e21ef123a15309b
['2939add7ba554eb9918801325c0921d6']
Hey guys so I was assigned to debug and fix a given code. This assignment is supposed to work as such after we fix it: Demonstrate the class in a program that creates a Car object, and then calls the accelerate function five times. After each call to the accelerate function, get the current speed of the car and display it. Then, call the brake function six times. After each call to the brake function, get the current speed of the car and display it Here is what I have - The problem is once it runs I get an error saying "Accelerate" and "Brake are not declared in scope this scope" which is weird since they are functions supposedly put in the right spots. Let me know if I missed anything thanks!!! #include <math.h> #include <iostream> #include <iomanip> #include <cstring> #include <cstdlib> using namespace std; class Car { private: int YearModel; int Speed; string Make; public: Car(int, string, int); string getMake(); int getModel(); int getSpeed(); int Accelerate(int aSpd); int Brake(int bSpd); void displayMenu(); }; Car::Car(int <PERSON>, string <PERSON><IP_ADDRESS>Car(int YearofModel, string Makeby, int Spd) { YearModel = YearofModel; Make = Makeby; Speed = Spd; } string Car<IP_ADDRESS>getMake() { return Make; } //To get the year of the car. int Car<IP_ADDRESS>getModel() { return YearModel; } //To holds the car actual speed. int Car<IP_ADDRESS>getSpeed() { return Speed; } //To increase speed by 5. int Car<IP_ADDRESS>Accelerate(int aSpd) { aSpd = Speed; Speed = Speed + 5; return aSpd; } //To drop the speed of the car by 5. int Car<IP_ADDRESS>Brake(int bSpd) { bSpd = Speed; Speed = Speed - 5; return bSpd; } void displayMenu() { cout << "\n Menu\n"; cout << "----------------------------\n"; cout << "A)Accelerate the Car\n"; cout << "B)Push the Brake on the Car\n"; cout << "C)Exit the program\n\n"; cout << "Enter your choice: "; } int main() { int Speed = 0; //Start Cars speed at zero. char choice; //Menu selection int year; string carModel; cout << "Enter car year: "; cin >> year; cout << "Enter the car model(without spaces): "; cin >> carModel; Car first(year, carModel, Speed); //Display the menu and get a valid selection do { displayMenu(); cin >> choice; while (toupper(choice) < 'A' || toupper(choice) > 'C') { cout << "Please make a choice of A or B or C:"; cin >> choice; } //Process the user's menu selection switch (choice) { case 'a': case 'A': cout << "You are accelerating the car. "; cout << Accelerate(first) << endl; break; case 'b': case 'B': cout << "You have choosen to push the brake."; cout << Brake(first) << endl; break; } }while (toupper(choice) != 'C'); return 0; system("pause"); }
ba0e9a5f8f3c889fb100253b3d7c76e5edca42814d28bc8b6161bc2cfb3e2df4
['2939add7ba554eb9918801325c0921d6']
Letting you know, the code works, I have a different problem that I think is unique but not sure. This is a simple addition or subtraction math problem program. My problem here is that I have an if statement saying if my variable is 1 then print "+" otherwise print "-". So when variable op is 1 or not 1 it will give me my operator sign. However, I placed string T for where I wanted the operator to print and it so happens to print my operator and I have no idea why. Is that ok? Please let me know thanks! hopefully its something easy. I just started out in C++, but i love it so much more than python already :)!!! #include <iostream> #include <stdlib.h> #include <iomanip> #include <string> #include <time.h> int main() { // establishing variables using namespace std; srand(time(0)); int op= rand()%2; int x= rand() % 300; int y= rand() % 300; int I; int sum; string T; cout << "Solve this problem. \n" << endl; cout << setw(3) << x << endl; if(op ==1) { sum = x + y; cout<< "+"; } else { cout << "-"; sum = x - y; } cout<< T << endl; cout << setw(3) << y << "\n" << endl; cin >> I; ; if (I == sum) cout<< "That is correct!"; else cout<< "That is wrong :( \n The correct answer is " << sum << endl; system("pause"); return 0; }
7d5a136f1f15cd94bd87ed7dd14c14304aa551edb72cf2e0b5916e3f1b38fcde
['293ec1bc11834f59962be9cb6746ecbb']
I find myself working with a time series of length n composed of sparse frequency data. I would like to extend this to a time series of length m > n that has the same sparse frequencies at the same amplitude. This seems quite possible by a basis conversion between the two frequency spaces, but I have been unable to determine how. Is there such a method? Thank you for your time.
ab2c64f7d673e3cde351edd2bf88a64ad7211a4e733b69a9ae6815ab48147a71
['293ec1bc11834f59962be9cb6746ecbb']
Since this morning (and maybe the update 7.0.b of hyperref) my docs can't be compiled... I tried with APMEP's files and same problem... If I uncheck hyperref & hypersetup lines, it's ok... In the hyperref's website, I saw taht the current version was 7.0.c but even if I install it manually, I've got problem with my personal class... Btw, with my personal class, I've lot of packages, which are currently loading hyperref package... so I'm in trouble for my personal docs... Undefined control sequence. \hypersetup. Missing number, treated as zero. \hypersetup
c8cf82b1658ef1b0baf5bf2e2171fd3079ce25bd6b7ac75c1b938b806eb26cc8
['295c33c7b48f49fdb4701db46dc5c89e']
is there a way to set a css class on a child component inside a Blazor component? What i have right now is: @using Microsoft.AspNetCore.Components; @inherits ComponentBase <div class="button-group-wrapper"> @SecondaryButton <div class="floating-sticky-wrapper"> @PrimaryButton </div> </div> @code { [Parameter] public RenderFragment PrimaryButton { get; set; } [Parameter] public RenderFragment SecondaryButton { get; set; } } I then "inject" the RenderFragments via: <FloatingStickyButton> <SecondaryButton> <button type="button" class="button ...">Secondary</button> </SecondaryButton> <PrimaryButton> <button type="submit" class="button button--primary ...">Primary</button> </PrimaryButton> </FloatingStickyButton> What do i want? I want to set the css class called "floating-sticky-button" on the primary button. But i would like to set this css class inside the component so that the programmer does not need to care about setting the class outside on the button element. Something like this (Mind the @PrimaryButton here): @using Microsoft.AspNetCore.Components; @inherits ComponentBase <div class="button-group-wrapper"> @SecondaryButton <div class="floating-sticky-wrapper"> @PrimaryButton({class: 'floating-sticky-button'}) </div> </div> @code { [Parameter] public RenderFragment PrimaryButton { get; set; } [Parameter] public RenderFragment SecondaryButton { get; set; } } Unfortunately that doesn't work. Is there any way to do this?
ed550e4b9d470dc9a869297e4d1eab6c29e8b8d3ab9215843766511b2392987c
['295c33c7b48f49fdb4701db46dc5c89e']
i am trying to declare https redirect inside the traefik.yml file. For now i tried to add those rules inside the traefik service in docker-compose.yml. That worked like a charm. Although i'd prefer to configure this global and middleware redirect inside the traefik.yml file and then just reference it in the traefik service on docker-compose.yml. What i had before version: '3' networks: web: external: true services: traefik: image: traefik:v2.1 ports: - 80:80 - 443:443 volumes: - /var/run/docker.sock:/var/run/docker.sock - ./.traefik/traefik.yml:/traefik.yml - ./.traefik/acme.json:/acme.json networks: - web labels: - "traefik.enable=true" - "traefik.http.routers.traefik.rule=Host(`$HOSTNAME`)" - "traefik.http.routers.traefik.service=api@internal" - "traefik.http.routers.traefik.tls.certresolver=le" - "traefik.http.routers.traefik.entrypoints=https" # Global redirect to https - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)" - "traefik.http.routers.http-catchall.entrypoints=http" - "traefik.http.routers.http-catchall.middlewares=redirect-to-https" # Middleware redirect - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https" That worked easily and redirected all other domains from http to https. What i want now I want to declare those redirects inside the traefik.yml. So far i have done this. api: {} entryPoints: http: address: ":80" https: address: ":443" log: level: DEBUG providers: docker: endpoint: "unix:///var/run/docker.sock" exposedByDefault: false network: web http: # Global redirect to https routers: http-catchall: rule: hostregexp(`{host:.+}`)" entrypoints: http middlewares: - redirect-to-https # Middleware redirect middlewares: redirect-to-https: redirectScheme: scheme: https certificatesResolvers: le: acme: email: <EMAIL_ADDRESS> storage: acme.json # Activate for Development: Certificate will not be valid. It's only for testing if it can be obtained. #caServer: https://acme-staging-v02.api.letsencrypt.org/directory httpChallenge: entryPoint: http As you can see i declared the http settings. My question is now how can i reference those settings into my traefik service? I tried it with - "traefik.http.middlewares=redirect-to-https" - "traefik.http.middlewares.redirect-to-https" - "traefik.http.middlewares.traefik=redirect-to-https@file" None of them work. Some show the middleware in the dashboard but it is not linked to any settings. Did anyone find a solution to this? I can't get out anything from the docs about this. I think it must be linked somehow to the @file. Thank you
a41f09b668bf93fb3d0b06903407c6083dc57fcc4c6e903c2c6b8478d4bb5a32
['295ddd5a0c204010a3cbb992ef99b646']
I have a simple web server application in a docker container that I have pinned to a vm instance in GCP Compute Engine. I am wondering how to set up automated load testing (Locust load testing via GKE) on the web server application running on my VM instance? I saw a tutorial here: https://cloud.google.com/solutions/distributed-load-testing-using-gke. But this involves using App Engine. I am not able to find a GCP tutorial to auto load test vm instances in Compute Engine. Any links or ideas?
49d26408d82cf9a0a3849d25f60df67201f90772bfd45e9cc061d4a17e5aac40
['295ddd5a0c204010a3cbb992ef99b646']
I am working on a simple C program where there are two source files: server.c and client.c I connected everything properly with sockets, and I use the poll() function to poll the keyboard for data (as well as a shell connected to a pipe). I am able to detect when the client uses the ^D and ^C command to know to kill the child process, and exit both client and server terminals. However, is there a way to detect if the client hangs up (i.e. I explicitly click x on the client terminal tab)? Because right now, the server tab doesn't detect this, and doesn't close. I want to avoid using a timeout
ca445d5915158d8a526b140e0f48190256b2816d8355986132f23727be3aed61
['295ea9c06b48459c933b58f2bbb95733']
I came across this website trying to learn how to solve a three-way duel puzzle.. While I did find a similar version of this question had been asked, trying to rework it was not at all successful so I am hoping somebody can talk me through this version (very explicitly!) It is as follows: <PERSON>, <PERSON> and <PERSON> have an argument and decide to fight a three-way duel to settle the matter. The rules of the competition are as follows: They will take turns to fire. As <PERSON> hits his target only 50% of the time, he will have the first shot. Being more reliable with a 75% strike rate <PERSON> will go second, and as the best shot, scoring 90% of the time <PERSON> will go third. The survivors will continue to take their shots in this order until only one of them is left. Assume that any hit results in death. Assuming that each of them applies the strategy that will give them the best chance of winning, the probability (correct to three decimal places) that <PERSON> is the ultimate winner =0.AAA, and the probability that <PERSON> wins = 0.CCC I need to find the value of AAA, and CCC and apply them to the 2nd part of the puzzle. Any and all help is greatly appreciated!
1a2c1a12952a1a735a4131a56b5eccde818dae513f2d45d57106d14b12ea05da
['295ea9c06b48459c933b58f2bbb95733']
OK.. it is clear to me that this problem is way above my ability level! Thank you for trying to explain it though!! I actually need to answer to the probability of A winning, and the probability of C - would it be too much to ask for you to let me know the probability of C also because I've tried for hours to rework the problem but can't get anywhere..
75af64e9aed088699d8dbe4946eeff529e837bd802a81f35a8aae4501674838e
['2967640395834127b16915f7974b30b2']
Can you elaborate on what you're trying to achieve? In order to run the nginx image as a container on a "remote device" it will need docker engine installed on it. If you want to remotely trigger a deployment on any machine you can use Jenkins. So essentially on every remote device you will need docker & jenkins. You can create a jenkins job to start your nginx container based on any of the trigger mechanisms available on jenkins.
d5ed1ee11f0c546f330293ce9e4fa77559ff11cdf4b6dcf7d75944d24d6df5af
['2967640395834127b16915f7974b30b2']
It's possible that you are missing out filling the mandatory fields. Make note of all mandatory fields while you resolve an incident through WebUI and add these fields to the body of your PUT request. You should share the request's responses as well. That could help discover what the problem might be.
b82b3fc49e587a2631323c96764301573d28358be8e933be1f55ffdccf2a39f1
['296d21b8cd2a44149eb28c9ec41d065d']
I was having problems with this too. I have this workaround: What i did was to create a class with an static bool and static method: class MessagingWidget { static bool _isConfigured = false; static void configuringFirebase(User currentUser, BuildContext context){ final FirebaseMessaging _firebaseMessaging = FirebaseMessaging(); if (!_isConfigured) { _firebaseMessaging.configure( onMessage: (Map<String, dynamic> message) async { print("onMessage: $message"); final notification = message['notification']; }, onLaunch: (Map<String, dynamic> message) async { print("onLaunch: $message"); final notification = message['data']; if(notification['title']!=null){ if(notification['title']=="Testo"){ goToAppointmentsScreen(currentUser,context); } } }, onResume: (Map<String, dynamic> message) async { print("onResume: $message"); final notification = message['data']; if(notification['title']!=null){ if(notification['title']=="Testo"){ goToAppointmentsScreen(currentUser,context); } } }, ); _isConfigured = true; } } } void goToAppointmentsScreen(User currentUser1, BuildContext context1) async { final bool backFromAppointmentsScreen=await Navigator.push( context1, MaterialPageRoute(builder: (context) => Appointment( currentUser1), ), ); } Then I called this method in my init from the routing widget: @override void initState(){ super.initState(); refreshServices(); getDirectionBasedOnLocation(); MessagingWidget.configuringFirebase(currentUser, context); } I hope this helps you
8c2a3c155c52da0f91d803d7dcdd2f31ccc21c6ccc68c4bfc53e1558b61a6eca
['296d21b8cd2a44149eb28c9ec41d065d']
According to what you said, this would be an example of what you are looking for: Option Explicit Dim wsh : Set wsh = CreateObject("Wscript.Shell") 'Message boxes that don't wait for a return to continue. No return values. Dim fso Dim file Dim content Set fso = CreateObject("Scripting.FileSystemObject") Set file = fso.OpenTextFile ("c:\List.txt", 1) content = file.ReadAll file.Close MsgInformation content, "title" 'Functions for simple no wait message boxes without return values. Function MsgInformation(m, t) wsh.Run "mshta.exe vbscript:Execute(MsgBox("""&m&""",vbInformation,"""&t&""")(window.close))" End Function I hope this helps
03e68a799b450c15ead0a68272dbb030c559988022eace020acf9a96617c4aa6
['2975b76dae844102822eaa90e3227035']
I've found the name of methods and delegate have changed This is my code if it useful for someone import UIKit import FacebookCore import FacebookLogin class LoginViewController: UIViewController, LoginButtonDelegate { override func viewDidLoad() { super.viewDidLoad() let loginButton = LoginButton(readPermissions: [ .publicProfile ]) loginButton.center = view.center loginButton.delegate = self view.addSubview(loginButton) } // MARK: - LoginButtonDelegate func loginButtonDidCompleteLogin(_ loginButton: LoginButton, result: LoginResult) { } func loginButtonDidLogOut(_ loginButton: LoginButton) { } }
667dac36ef62086510efe4f88e7a57e6d94e38a21cd7888b49bd9ce2322a9fda
['2975b76dae844102822eaa90e3227035']
As <PERSON> said, you have to follow the instructions to get the pods right from the GitHub repository. I added these lines to my Podfile pod 'FirebaseCore', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master' pod 'FirebaseStorage', :git => 'https://github.com/firebase/firebase-ios-sdk.git', :branch => 'master' Then on the AppDelegate import FirebaseCore func applicationDidFinishLaunching(_ aNotification: Notification) { FirebaseApp.configure() } Hope this helps!
4ee6faf4eef2cc9b3a29e11d19e53beb137233606bf86d2deca1e9850fe64ece
['297e91f29dd0405a907a899dfa20c649']
I'm trying to delete a file using System.IO.DeleteFile and it's inexplicably throwing an UnauthorizedAccessException. I realize this has been asked many times. I've look through all the questions I can find and none of the answers seem to apply. I happen to be using FAKE but the issue seems more generic. Here's my entire build.fsx: // include Fake lib #r @"packages/FAKE/tools/FakeLib.dll" open Fake open System.IO Target "Default" (fun _ -> DeleteFile "./Newtonsoft.Json.dll" |> ignore ) RunTargetOrDefault "Default" And I get this exception running Fsi.exe build.fsx: System.UnauthorizedAccessException: Access to the path './Newtonsoft.Json.dll' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileInfo.Delete() at FSI_0001.clo@6.Invoke(Unit _arg1) in c:\Apache24\htdocs\IS4C\pos\is4c-nf\scale-drivers\drivers\NewMagellan\build2.fsx:line 7 at Fake.TargetHelper.runSingleTarget(TargetTemplate`1 target) in C:\code\fake\src\app\FakeLib\TargetHelper.fs:line 483 If I run del Newtonsoft.Json.dll from the same command prompt, the file deletes just fine. It doesn't appear to be a permissions issue. The file is not read-only or hidden. And unless my actual build file is somehow opening an extra handle to the file I don't see how it would be open in another process. Those appear to be the three standard answers to this issue. Are there any additional answers?
1d75b0b5d795b08f1a79c19600f4f289ab6baf4d6509a94a9a8499674f596beb
['297e91f29dd0405a907a899dfa20c649']
I'm using NVP but I don't think the question is specific to any particular API and I'm not finding a definitive answer in the documentation or via search. Does the initial payment on a billing agreement count toward the billing frequency or not? Example: If I created a billing agreement with period=monthly, frequency=3, and initial payment=$25, is one billing cycle going to collect $100 (initial payment plus three additional payments) or $75 (initial payment is the first of three payments)?
d219791d6fa3367a8bb02fa5183711ee283f29ab9ca0a8ec9c401c0903d7380b
['298102cbdfbf4813a3bd074ff1e9bc61']
As mentioned above, you need root access where pip stores the packages. Python 3.x: sudo pip3 install tweepy Python 2.x: sudo pip install tweepy You may also use Git to clone the repository from Github and install it manually: git clone https://github.com/tweepy/tweepy.git cd tweepy python setup.py install Alternatively you can use virtualenv "What if you can't install packages into the global site-packages directory? For instance, on a shared host. In all these cases, virtualenv can help you. It creates an environment that has its own installation directories, that doesn't share libraries with other virtualenv environments (and optionally doesn't access the globally installed libraries either)." Basically it's allow you to create an isolated environment for each of your project and it's help on permission issue you have. For more information: Installing Python on Mac OS X: virtualenv
43e83d4638e7cb65cab375e37b5971fbfb384adcd6c2de2479f82585d19ceac1
['298102cbdfbf4813a3bd074ff1e9bc61']
Errors: print statement missing a close parenthesis return outside of function Code: print("Kiran's Quiz: A quiz made by Kiran!\n") def answers(): points = 0 x = input("Question 1: How far away is the Earth from the Sun? Give your answer in 'n million miles'.") y = input("Question 2: What colour is white? Give your answer in 'x colour(s)'.") z = input("Question 3: What temperature is boiling water? Give your answer in 'n degrees centigrade'.") while (x != "93 million miles") or (y != "every colour") or (z != "100 degrees centigrade"): print ("You got it wrong. -1 point for you!.") points -= 1 print("You have" + str(points) + ("points.")) points += 1 print("Hooray, you got it correct! +1 to you!") return (x, y, z) answers()
8b0f2b2f8ffe9e3d3bfb293c761315ab735ee8e9998bb278cf6f0ea5c6015e91
['29930a64d3694e07b3a4ee7abd968944']
You've answered your own question. In the first code block you're most likely running your python in C:\Python27. In the second code block you're actually running the python with celery in it. You should read up on managing and activating conda environments. http://conda.pydata.org/docs/using/envs.html
e26fc190999ac04b0edff9eb8ee9f4cc23b7abf6af5a6005b80d11b614b27333
['29930a64d3694e07b3a4ee7abd968944']
Both pip and conda install the package (pretty much) with the same end result. There may be minor differences, e.g. zipped egg or not, it depends a bit on how the conda package was created. The conda package is always a compiled binary distribution though, not a source distribution. I don't think conda will install it in different places, it may well overwrite your pip package. But it's kind of risky because conda keeps nicely track of what's installed and figures out all dependencies betweeen all conda packages in the environment. You really want to limit yourself to conda packages and only install pip packages if you really have to. It's quite easy to create conda packages though from pip packages. Not sure about "interchangeably", you can use them alongside each other. But pip and conda are not so aware of each other so you might run into trouble with say updating packages to new versions. In summary: if you're using conda packages, best to stick with that. You get the best out of the conda ecosystem with it's package version and environment management.
897925d3411d44622343512f98a0d4ac0f7f20396a67dc95eff0e2798534128d
['2994bd61103c43008b31023881b487c3']
In your PHP code make a property with unique index so the resulting XML will look like: <ns1:someelement> <ns1:name>name1</ns1:name> <ns1:value>value1</ns1:value> <ns1:index>0</ns1:value> </ns1:someelement> <ns1:someelement> <ns1:name>name1</ns1:name> <ns1:value>value1</ns1:value> <ns1:index>1</ns1:value> </ns1:someelement> Then PHP SoapClient will not make href references to the same copies of data and web service successfully ignored these unique fields in my case. No, I do not pass the same fields of someelement as reference in PHP code. They are cloned, however PHP SoapClient is smart enough to zip their multiple occurencies as references, unfortunately.
d90e56db5c1b459b3685338597fd0ca530c2194d4e9bbc88abfd401f8c58157b
['2994bd61103c43008b31023881b487c3']
I was able to make number of rows according to initial number of related table rows, however it does not updates dynamically (probably need to insert Javascript into admin form and query number of rows via AJAX, that would be too big to post here). class ProfileAdminForm(forms.ModelForm): class Meta: model = Profile fields = '__all__' widgets = { # Will dynamically change number of rows in select multiple, however only after server reload. 'spec_profiles': forms.SelectMultiple(attrs={'size': SpecProfile.objects.count()}) } class ProfileAdmin(admin.ModelAdmin): form = ProfileAdminForm
659ab938588d0ecec4d3ec10a2e3e62f6064b19489b59d1362ae7fb3bb983197
['299ffcee0c1d4468a46d78c265564ae3']
While learning about homotopy in my Algebraic Topology course I (as someone who is at least aware of higher category theory) noticed that it's possible to define a notion of "homotopy between homotopies": Let $f,g:X\rightarrow Y$ be continuous maps between topological spaces and $H,K:f\simeq g$ two homotopies from $f$ to $g$ i.e. $H$ and $K$ are continuous maps $X\times I\rightarrow Y$ such that $H(x,0) = > K(x,0)= f(x)$ and $H(x,1) = K(x,1) = g(x)$ for all $x\in X$. Let $\psi: X\times I\times I\rightarrow Y$ be a continuous map such that for all $x\in X$ and $t\in I$, $\psi(x,t,0) = H(x,t)$ and $\psi(x,t,1) = K(x,t)$. Then $\psi$ can be considered as a homotopy $H\simeq K$ between two homotopies. Assuming that this is well-behaved with respect to compositions and "morphisms of lower degree" (e.g. interchange law of natural transformations etc), it makes sense to consider the $(\infty, 1)$-category $\text{Top}$ whose objects are topological spaces, 1-morphisms are continuous maps, 2-morphisms are homotopies between continuous maps, 3-morphisms are these homotopies between homotopies I have just defined, and so on... I asked my lecturer whether adding in these extra "higher homotopies" is useful for doing topology and whether it gives any extra interesting information. He said it is and does, but explaining why is a bit complicated! So, can anyone attempt to explain why we ought to care about these things reasonably simply?
f285386598f598de1067702bc7e2602dab1ae9ef0a3751916566ed8c8ad78757
['299ffcee0c1d4468a46d78c265564ae3']
As the other answer remarked, modding out by an irreducible (aka "prime-like") element doesn't give a field in general. The obvious counterexamples are polynomial rings; either a polynomial ring over another non-field in a single indeterminate, like $\mathbb{Z}[x]$; or a polynomial ring in two variables over a field like $K[x,y]$ when $K$ is a field. Here, if you mod out by one of the indeterminates - say $y$, which is an irreducible element - then you still have a polynomial ring $K[x]$ which is definitely not a field! There are also other examples of weird rings with this property too that are not polynomial rings. However, there is a subclass of rings which does have the property that taking the quotient by an irreducible element gives a field. These are principal ideal domains, which are rings where every ideal is generated by a single element. If an ideal is generated by an irreducible element then this ideal is maximal and the corresponding quotient is a field. The examples above for polynomials fail because neither $\mathbb{Z}[x]$ nor $K[x,y]$ is a principal ideal domain; for example, in the first case given a prime number $p$ and an irreducible polynomial $f\in \mathbb{Z}[x]$ that remains irreducible modulo $p$ one can show that the ideal $(p,f)$ is not principal - it's not generated by a single element of $\mathbb{Z}[x]$. So modding out by one of the elements generating this ideal still leaves some nontrivial ideal structure - and fields have no nontrivial ideals. In the case where your ring is $K[x,y]$, the ideal $(x,y)$ is also not principal, so modding out by one of these indeterminates doesn't "kill off" the other one, even though both are irreducible. However, if you are in a principal ideal domain - for example, $K[x]$ for a field $K$, and you mod out by the principal ideal generated by an irreducible polynomial $f\in K[x]$ - which satisfies your definition of "prime-like" - then you get a field, which is a field extension of $K$ obtained by adjoining to $K$ a root of this polynomial.
1cd6fe9a27d8974b569ecf4ecc52132b09fac05345207800837463d74b2e00d8
['29a0e0a104064862b6f084d6ccdd4c41']
I'm working in Java. I have the requirement that I must essentially compare two database queries. To do this, I take each row of the result set and assign it to a HashTable with the field name as the 'key' and the data in the field as the 'value'. I then group the entire result set of HashTables into a single Vector just as a container. So essentially to compare two queries I'm really iterating through two Vectors of HashTables. I've come to find that this approach works really well for me but requires a lot of memory. Because of other design requirements, I have to do this comparison via a Vector-HashTable-like structure, and not some DB side procedure. Does anyone have any suggestions for optimization? The optimal solution would be one that is somewhat similar to what I am doing now as most of the code is already designed around it. Thanks
0073fe78b12ac1aa90b2d0c374678610e682209bd1a54b37f6be09b06403508b
['29a0e0a104064862b6f084d6ccdd4c41']
if i understood your question correctly, what you are looking for is to have a good performance radius database system. but on the face of it, what you have thought of doesn't sound a good idea. for the following reasons: over all maintenance becomes a huge issue for you. later on if you have to change the database to add or delete a field you have to do it on all the databases which is cumbersome taking reports on overall users and their status, consumption, service information will be difficult. design the database well and you can use multiple modules to connect to it. you can write a python / perl programs for accounting module and sql module for authentication. freeradius 3.0.x is shipped with rlm_rest module, where you can call a rest api for these purposes also. this gives you extreme power to manipulate with your data and would be even able to use BigData technologies also, which can easily handle the huge database overheads.
ac202f935e0e5faf8eb77f608e78a86343c1d3236af2215698bac3599adc9858
['29afbb5dca57433ca4a76cf01a58c30e']
Yeah Thanks for the asnswer. I am interested in second one. I am really novice in circuit design and I'm sorry. I have a Lock-in as sinusoidal Voltage source, DC Current source and Multimeter. Can you please help me how to make it functional. How can I design the circuit? What concept it uses? Any other instument is required for it?
6846d12348fe6a5691fe9d07efc7bce2d5e1f21e3ef4dd00b722983cafb03074
['29afbb5dca57433ca4a76cf01a58c30e']
Using panel data, the fixed effect regression specification is given by $y_{it} = a_i + \beta' x_{it} + \epsilon_{it}$ where $a_i$ are the fixed effects. The fixed effects estimator $\beta_{FE}$ eliminates the fixed effects by time-demeaning, i.e. $\bar{y_i} = \hat{\beta'}_{FE} \bar{x_i} $ where $\bar{y_i} = \sum_{t=1}^T y_{it}/T$ and similarly for $\bar{x_i}$. The fixed effects can then be recovered by $\hat{\alpha_i} = \bar{y_i} - \hat{\beta'}_{FE} \bar{x_i}$. My question: How do I get the standard errors for the fixed effects $\hat{\alpha_i}$ without using the least squares dummy variable (LSDV) estimator?
6e7904a50f92f054b0fb122cbf9a5af3e5662cd8ca25813ce0312c7e331a6cc2
['29b0e31d114845b6a25ee126ef8d07a9']
I write the code that I've seen in a tutorial video. In that tutorial the delayed post execute after pass the specified time and didn't care about the pass posts. But in my code the post execute right after the first runnable and can't break that my code : public class MainActivity extends AppCompatActivity { private static final String TAG = "MainActivity"; TextView txtOutput; private HandlerThread handlerThread = new HandlerThread("HandlerThread"); private Handler threadHandler ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); txtOutput = findViewById(R.id.txtOutput); handlerThread.start(); threadHandler = new Handler(handlerThread.getLooper()); } public void doWork(View view) { threadHandler.postDelayed(new ExampleRunnable1(),1000); threadHandler.post(new ExampleRunnable2()); } public void removeMessages(View view) { } @Override protected void onDestroy() { super.onDestroy(); handlerThread.quit(); } static class ExampleRunnable1 implements Runnable { @Override public void run() { for (int i = 0; i < 5; i++) { Log.d(TAG, "Runnable1 : " + i); SystemClock.sleep(500); } } } static class ExampleRunnable2 implements Runnable { @Override public void run() { for (int i = 0; i < 5; i++) { Log.d(TAG, "Runnable2 : " + i); SystemClock.sleep(500); } } } } the code give me this : D/MainActivity: Runnable2 : 0 D/MainActivity: Runnable2 : 1 D/MainActivity: Runnable2 : 2 D/MainActivity: Runnable2 : 3 D/MainActivity: Runnable2 : 4 D/MainActivity: Runnable1 : 0 D/MainActivity: Runnable1 : 1 D/MainActivity: Runnable1 : 2 D/MainActivity: Runnable1 : 3 D/MainActivity: Runnable1 : 4 But i expect that the Runnable1 execute just after Runnable2 : 1 (because of 1000 mSecond wait) but as you can see Runnable1 waits until Runnable2 reach to the end
775b7dfecdf16c6b612cc1f9976f26b3c10a18e7a95f0ae79db207bd2362546d
['29b0e31d114845b6a25ee126ef8d07a9']
I've seen a tutorial video that the guy create custom layout for toolbar and set manu to that toolbar ant that worked fine I did the same thing but menu didn't appear in my custom toolbar !! This is my code. Do you know where is the problem ? This is toolbar layout <?xml version="1.0" encoding="utf-8"?> <androidx.appcompat.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/toolbar" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:background="@color/colorPrimary" android:minWidth="?attr/actionBarSize" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" android:layout_height="wrap_content"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/txtCounter" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="0 Item Selected" android:textSize="18sp" android:textColor="@android:color/white" android:textStyle="bold" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> </androidx.appcompat.widget.Toolbar> This is main activity layout <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <include android:id="@+id/include" layout="@layout/toolbar_layout" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> And this is my main activity that handles the toolbar and menu public class MainActivity extends AppCompatActivity { Toolbar toolbar ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main,menu); return super.onCreateOptionsMenu(menu); } }
052d8b23e012dc70611cd704213dcf4fef23a37682bd3d6e2068d6bf4b145d50
['29b6518073d74750a7c74d43d237dc39']
I'm developing a simple database related application. The GUI consists of datagrid view and a "save" button. The datagridview uses a dataset as its source. The dataset is in turn populated by fetching data from a SQL Server Compact Edition database file. The problem is when i make changes to content of database using the datagridview and then proceed to change it. SqlCeDataAdapter da = new SqlCeDataAdapter(); da.UpdateCommand = Con.CreateCommand(); // Con is SqlCeCommand object da.UpdateCommand.CommandText = "update TempTable set " + "S.No = @S.No , Name = @Name"; this.AddParams(da.UpdateCommand, "S.No", "Name"); da.Update(ds); // ds is the dataset used as source by the datagridview and AddParams Method ... private void AddParams(SqlCeCommand cmd, params string[] cols) { foreach (string col in cols) { cmd.Parameters.Add("@" + col, SqlDbType.Char, 0, col); } } Problem is i'm getting an ArguementException with description as "char" in the following line cmd.Parameters.Add("@" + col, SqlDbType.Char, 0, col); i believe is due to the fact that one of the parameter is a varchar while the other is an integer. So how i get this done ? p.s. i'm a beginner in Dot Net & Programming.
e919c36badc53fdebfb6a0388d1624f69089130c7d40a8c3966cb89b4d2324b9
['29b6518073d74750a7c74d43d237dc39']
You have 40 weights. It is known that the difference of weight in every 2 weights is no bigger than 45 kg. Also, it is known that you can divide every single group of 10 weights into 2 groups (5 weights in each) and the sum of weights in these 2 groups won't differ by more than 11 kg. You have to prove that it will always be possible to find such two weights so the weight difference between them wouldn't be bigger than 1 kg. What I got is that our all weights must be between (and including) $n$ kg and $n+45$ kg. But I'm not sure should I use the fact, that you can divide every single group of 10 weights into 2 groups (5 weights in each) and the sum of weights in these 2 groups won't differ by more than 11 kg. Any hint would be very appreciated.
acf6a7f498b395711e9a0a065bca05a81458fed79441c4f379c6cb39300e8f33
['29bc0921374e49d09df25ce2529ca3d7']
I connect to my server fine. But then when I exit I cannot immediately connect back in. And I receive this error: ssh_exchange_identification: Connection closed by remote host Only after about an hour+ I am able to reconnect. Any idea why this is happening and how I can fix it? This does not happen on any other of my servers that I exit from and then reconnect to.. Here is the snippet of my terminal window that shows my connection and then after exiting the error message.. devenv@DevEnv0:~$ ssh root@104.---.1-4.91 Last failed login: Thu Apr 27 05:55:02 UTC 2017 from 180.---.1--.83 on ssh:notty There were 134 failed login attempts since the last successful login. Last login: Wed Apr 26 14:37:<PHONE_NUMBER> from ppp-46--------156.wildpark.net [root@secure ~]# exit logout Connection to 104.---.1-4.91 closed. devenv@DevEnv0:~$ ssh root@104.---.1-4.91 ssh_exchange_identification: Connection closed by remote host devenv@DevEnv0:~$ ssh root@104.---.1-4.91 ssh_exchange_identification: Connection closed by remote host devenv@DevEnv0:~$
185db9600fc04570afe59948f084be20c4c6f583a130033b54977af967ad66dd
['29bc0921374e49d09df25ce2529ca3d7']
I have an INSERT here with PDO. It doesn't seem to work... $sql = "INSERT INTO client_cards SET cc_num = ?, cc_cvv = ?, cc_month = ?, cc_year = ?, cfname = ?, clname = ?, caddress = ?, ccity = ?, cstate = ?, ccountry = '212', czip = ?, `default` = ? , client_id = ?"; $query = $db->prepare($sql); $array = array($enc_cc_num, $enc_cc_ccv, $exp_month, $exp_year, $fname, $lname, $address, $city, $state, $zip, $set_default, $client_id); $query->execute(array($array)); Does PDO only work with INSERT INTO table (key, key, key) VALUES($value, $value, $value), but not with INSERT INTO table SET key = $value??
fb1f82e57fa7c21df56a8b664ee5c9a4095d43ae805674c6cbb6f1ec6d0eed04
['29d65868d4ec44488a46b1e646b20e0f']
Something like this: Sub match() Dim lrA, lrB, i, j As Long lrA = Cells(Rows.Count, 1).End(xlUp).Row lrB = Cells(Rows.Count, 2).End(xlUp).Row For i = 2 To lrB If IsEmpty(Cells(i, 1)) Then For j = 2 To lrA If Cells(i, 2).Value = Cells(j, 2) Then Cells(i, 1).Value = Cells(j, 1).Value Next j End If Next i End Sub
7eb0cf8b64fbd710ff72a108f9655898a1544bbd12b1a17b7cec7de67d34ae36
['29d65868d4ec44488a46b1e646b20e0f']
I have a table ranging from B5 to R20, every row has a header and not every cell in range (except headers) has values. Table looks like this: <PERSON> empty empty 2 5 300... <PERSON> empty 23 45 130... <PERSON> 100 123 150 170... ... Names are headers and instead of zeros there are empty cells. I need to copy these values in a new column (column AJ) and I need to copy the appropriate header next to every value (header value goes in column AI). After the copy those two columns should be sorted descending by AJ column. I have this so far: Sub Sorter() Dim g As Integer Dim sourceCol As Integer Dim rowCount As Integer Dim currentRow As Integer Dim currentRowValue As String Dim sourceCol1 As Integer Dim rng1 As Range Dim t As Integer sourceCol = 35 sourceCol1 = sourceCol + 1 rowCount = 300 t = 5 For g = 1 To 16 Set rng1 = Range(Rows(t).Cells(3), Rows(t).Cells(18)) If rng1.Cells(g) > 0 Then For currentRow = 1 To rowCount currentRowValue = Cells(currentRow, sourceCol).Value If IsEmpty(currentRowValue) Or currentRowValue = "" Then Cells(t, 2).Select Selection.Copy Cells(currentRow, sourceCol).PasteSpecial xlPasteValues Cells(t, g).Select Selection.Copy Cells(currentRow, sourceCol1).PasteSpecial xlPasteValues End If Next currentRow End If t = t + 1 Next g ' This part sorts the two columns Columns("AI:AJ").Select ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range( _ "AJ1:AJ300"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("Sheet1").Sort .SetRange Range("AI1:AJ300") .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With Kraj: End Sub So, the sorting part is working, but the copying part is giving me problems. I'm stuck so can you please help? The result should be: AI AJ John 300 Todd 170 Todd 150 Steve 130 ... etc
d6885f94c99eefa891f9e9d5e334f3d856d66ac23ed351c92fc3f33d8835b830
['29e3f2fdee4642249fbe1bc7c445ad8c']
I'm very new to javascript and I'm working with the jeopardy api to to get jeopardy questions right now this is what i have var request = new XMLHttpRequest(); request.open('GET', 'http://jservice.io/api/categories?count=6', true) var arr = [] var clues = [] request.onload = function() { var data = JSON.parse(this.response) data.forEach(cat => { console.log(cat) arr.push(cat.id) }) for (var i = 0; i < 6; i++) { var base = "http://jservice.io/api/category?id=" var clueRequest = base.concat(arr[i]) console.log(clues.push(clueRequest)) } } request.send() The thing is that I want to now go into my clues list and do requests for those jsons because they hold the questions. How do I do this?
1b746502f4c193f0ef191fe934f3665bc90e6962b2bae941c4d2de8d5ff855fe
['29e3f2fdee4642249fbe1bc7c445ad8c']
Im attempting to access an array from my state in the App Component but I do not know why it doesn't work import React from "react"; import "./App.css"; //import Category from "./components/Category"; class App extends React.Component { constructor() { super(); this.state = { categories: [], }; } componentDidMount() { //const addon = Math.floor(Math.random() * 1000); fetch("http://jservice.io/api/categories?count=5") .then((response) => response.json()) .then((data) => { var arr = []; for (var x in data) { console.log(arr.push(data[x])); console.log(data[x]); } this.setState({ categories: arr, }); }); } render() { return <div>{this.state.categories[0].title}</div>; } } export default App; for context this is the JSON i am getting from the API [{"id":11531,"title":"mixed bag","clues_count":5},{"id":11532,"title":"let's \"ch\"at","clues_count":5},{"id":5412,"title":"prehistoric times","clues_count":10},{"id":11496,"title":"acting families","clues_count":5},{"id":11498,"title":"world city walk","clues_count":5}] it seems like each object should have a title but js states otherwise
96cdc07e91042c38ebf20bca606347e0517cc94d46ab4b3809a5965cacd631e3
['29eb75d828ac4263a4741f1421200952']
So a while back I rigged a model using rigify in blender 2.8, and deleted the face bones, as it was way too complex for what I wanted to do with the character. Flashback to now, and I've spent hours making animations for the model, but would now like to add facial animations to go along with the body one's I made. Is there anything I can do to add a face rig, because it doesen't seem like I can modify the rig in edit mode, the new bones I make do nothing? I'm ok with rigging a new character but I would like to be able to save the animations I made with this rig? Thanks so much I would apricate any advice.
f7be753f8df5fbaea90649cd330d31b4d9721bfc37773ce9d547129cce3ff552
['29eb75d828ac4263a4741f1421200952']
Answer might depend if you want to invest a lump sum right now, or smaller amounts over a longer time. For a similar situation I decided to invest the child benefits (Kinderzulage) in a mutual fund over ~18-20 years. Lack of competition, I opted for PostFinance Selfservice Funds (even though TER is higher than I like it to be).
bf8b96874fa2ee92870a4b634df691fe22c7d637e826e7f6b956a88642d7edf2
['29ee2246356e4bc79dbcf75574489699']
From your question, you are running python2.7 and Cygwin. Python should be installed for windows, which from your question it seems it is. If "which python" prints out /usr/bin/python , then from the bash prompt you are running the cygwin version. Set the Python Environmental variables appropriately , for instance in my case: PY_HOME=C:\opt\Python27 PYTHONPATH=C:\opt\Python27;c:\opt\Python27\Lib In that case run cygwin setup and uninstall everything python. After that run "which pydoc", if it shows /usr/bin/pydoc Replace /usr/bin/pydoc with #! /bin/bash /cygdrive/c/WINDOWS/system32/cmd /c %PYTHONHOME%\Scripts\\pydoc.bat Then add this to $PY_HOME/Scripts/pydoc.bat rem wrapper for pydoc on Win32 @python c:\opt\Python27\Lib\pydoc.py %* Now when you type in the cygwin bash prompt you should see: $ pydoc pydoc - the Python documentation tool pydoc.py <name> ... Show text documentation on something. <name> may be the name of a Python keyword, topic, function, module, or package, or a dotted reference to a class or function within a module or module in a package. ...
6869c415f08a280359b684fe06e9957a90d5038442dcc705c500ffcc2abbbfc3
['29ee2246356e4bc79dbcf75574489699']
Tried to install xclip running as administrator, but Got this: $ apt-cyg install xclip Installing xclip xclip-0.12-2.tar.xz: OK Unpacking... Package xclip requires the following packages, installing: bash coreutils cygwin gzip libX11_6 libXmu6 tar Package bash is already installed, skipping Package coreutils is already installed, skipping Package cygwin is already installed, skipping Package gzip is already installed, skipping Package libX11_6 is already installed, skipping Package libXmu6 is already installed, skipping Package tar is already installed, skipping Package xclip installed Tommy@Tommy-PC ~ $ xclip C:/opt/cygwin64/bin/xclip.exe: error while loading shared libraries: cygXmu-6.dll: cannot open shared object file: No such file or directory So I removed all the X11 libraries and tried reinstalling. but that gave an even less helpful error: Tommy@Tommy-PC ~ $ apt-cyg remove libXmu6 libX11_6 libX11_6 libXt6 Removing libXmu6 Package libXmu6 removed Removing libX11_6 Package libX11_6 removed Package libX11_6 is not installed, skipping Removing libXt6 Package libXt6 removed Tommy@Tommy-PC ~ $ apt-cyg install libXmu6 libX11_6 libX11_6 libXt6 Installing libXmu6 libXmu6-1.1.2-1.tar.xz: OK Unpacking... Package libXmu6 requires the following packages, installing: cygwin libX11_6 libXext6 libXt6 Package cygwin is already installed, skipping Installing libX11_6 --2018-05-22 09:45:18-- http://cygwin.mirror.constant.com//x86_64/release/libX11/libX11_6/libX11_6-1.6.5-1.tar.xz Resolving cygwin.mirror.constant.com... <IP_ADDRESS> Connecting to cygwin.mirror.constant.com|<IP_ADDRESS>|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 750980 (733K) [application/octet-stream] Saving to: `libX11_6-1.6.5-1.tar.xz' libX11_6-1.6.5-1.ta 100%[===================>] 733.38K 1.11MB/s in 0.6s 2018-05-22 09:45:19 (1.11 MB/s) - `libX11_6-1.6.5-1.tar.xz' saved [750980/750980] libX11_6-1.6.5-1.tar.xz: OK Unpacking... Package libX11_6 requires the following packages, installing: cygwin libxcb1 Package cygwin is already installed, skipping Package libxcb1 is already installed, skipping Package libXext6 is already installed, skipping Installing libXt6 libXt6-1.1.5-1.tar.xz: OK Unpacking... Package libXt6 requires the following packages, installing: cygwin libICE6 libSM6 libX11_6 Package cygwin is already installed, skipping Package libICE6 is already installed, skipping Package libSM6 is already installed, skipping Package libX11_6 is already installed, skipping Package libXmu6 installed Package libX11_6 is already installed, skipping Package libX11_6 is already installed, skipping Package libXt6 is already installed, skipping Tommy@Tommy-PC ~ $ xclip C:/opt/cygwin64/bin/xclip.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory Maybe I can try compiling from source or use the Cygwin installer?
5ae9d4b09081384fb450cb544627bb65d026f7325fa2a7c8c37710bd1120803d
['29f501e004514b8d8bec7a6d12b1a322']
zevarito is on the right track. A bit more seems to solve the long-irritating problem: Close the project. Xcode -> Window -> Projects For the project in question (and all others is probably a good housecleaning idea), click Derived Data -> Delete. Close Xcode. Close Simulator. Restart Xcode and resume what you were doing.
043e332c41e4452ef69adf2be03c451808c541fbb36f4eaf18a27c5e243e4fa6
['29f501e004514b8d8bec7a6d12b1a322']
Short version: iOS's UIImageJPEGRepresentation() crashes on large images. I'm trying to use & modify libjpeg to respect the max_memory_to_use field, which it's ignoring. Long version: I'm writing an iOS app which crashes when converting a large image to JPEG after prolonged usage reduces available memory (a trickling leak involving quirks of @autoreleasepool{}, but we're addressing that separately). For images captured by the device camera (normal use, actual size) UIImageJPEGRepresentation() can require up to 200MB (!), crashing if not available. This is a problem with UIImageJPEGRepresentation() which a web search shows goes back for years and seems unsolved; filing a tech support request with Apple elicits "file a bug report" which doesn't solve my immediate customer needs. To resolve this, I'm bypassing UIImageJPEGRepresentation() by using libjpeg (http://www.ijg.org) and digging into its operation, which shows exactly the same problem (presumably Apple uses it in iOS). libjpeg does provide a means to specify maximum memory usage via the parameter max_memory_to_use a la: struct jpeg_compress_struct cinco; cinfo.mem->max_memory_to_use = 10*1024*1024; which would be used by the libjpeg function jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated) (in jmemnobs.c) but, in the standard implementation, is completely ignored (comment even says Here we always say, "we got all you want bud!"). Blender has altered the function (http://download.blender.org/source/chest/blender_2.03_tree/jpeg/jmemmac.c) to respect the parameter, but seems I'm missing something to make it work in my app or it's just being ignored anyway elsewhere. So: how does one modify jmemnobs.c in libjpeg to actually & seriously respect memory limitations, rather than jokingly ignore them?
9a00bc2904ed56d2ed4dbb19cd0453ef0f5330f3bf3df7d668a28e79ea50b53e
['29f58936472c453ab5049158f68b2abe']
I have an AsyncTask to fetch JSON data from a DB on my server. It works well normally but is failing sometimes with the below error. It seems like this happens when I keep the app idle but open for some time and then make a request. doInBackground Method try { URL url = new URL(url_get_initial_posts); HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("POST"); httpURLConnection.setDoOutput(true); OutputStream outputStream = httpURLConnection.getOutputStream(); BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(outputStream,"UTF-8")); String data_string_language = URLEncoder.encode("selected_language","UTF-8")+"="+URLEncoder.encode(arg_language,"UTF-8") +"&"+URLEncoder.encode("app_time","UTF-8")+"="+URLEncoder.encode(String.valueOf(arg_app_time),"UTF-8"); bufferedWriter.write(data_string_language); bufferedWriter.flush(); bufferedWriter.close(); outputStream.close(); InputStream inputStream = httpURLConnection.getInputStream(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); StringBuilder stringBuilder = new StringBuilder(); while ((JSON_INITIAL_POST = bufferedReader.readLine()) != null) { stringBuilder.append(JSON_INITIAL_POST + "\n"); } bufferedReader.close(); inputStream.close(); httpURLConnection.disconnect(); return stringBuilder.toString().trim(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } This line in the error W/System.err: at com.indiparent.android.indiparent.PostTab$BackgroundJSONPosts.doInBackground(PostTab.java:343) links to InputStream inputStream = httpURLConnection.getInputStream(); Error W/System.err: java.net.SocketException: Connection reset W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:209) W/System.err: at java.net.SocketInputStream.read(SocketInputStream.java:139) W/System.err: at com.android.okhttp.okio.Okio$2.read(Okio.java:136) W/System.err: at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211) W/System.err: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:306) W/System.err: at com.android.okhttp.okio.RealBufferedSource.indexOf(RealBufferedSource.java:300) W/System.err: at com.android.okhttp.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:196) W/System.err: at com.android.okhttp.internal.http.Http1xStream.readResponse(Http1xStream.java:186) W/System.err: at com.android.okhttp.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:127) W/System.err: at com.android.okhttp.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:737) W/System.err: at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:609) W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:471) W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:407) W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:244) W/System.err: at com.indiparent.android.indiparent.PostTab$BackgroundJSONPosts.doInBackground(PostTab.java:343) W/System.err: at com.indiparent.android.indiparent.PostTab$BackgroundJSONPosts.doInBackground(PostTab.java:308) W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:333) W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266) W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) W/System.err: at java.lang.Thread.run(Thread.java:764) Extra Info - This is not the only Asynctask in the application. There are more in other activities and fragments. For example - if AsynckTask of Activity 2 throws this error then if I come back to Activity 1 then its AsyncTask also does not work. Am I supposed to do something here or on the server side? Appreciate any help here.
46e918aac713855268ff0ec5d0cc362aa80ec27c843cc734bc3fb967eba60033
['29f58936472c453ab5049158f68b2abe']
I have a MapsActivity with HeatMap on it. Like Google Maps there is an option to filter data by various categories (like Satellite, Terrain etc in case of Google Maps). I have a button which brings a modal bottom sheet. This bottom sheet contains a recycler view with a list of categories. When I click on a category and run a method to make an ArrayList of new filtered data the size turns out to be 0. Method in MapsActivity class public void changeHeatMap(int category, int remove){ int count = 0; if (remove==0) { ArrayList<LatLng> catHeatMap = new ArrayList<>(3); while (count < il_cat_data.size()) { if (il_cat_data.get(count) == category) { catHeatMap.add(list.get(count)); } count++; } mProvider.setData(catHeatMap); }else{ mProvider.setData(list); } } OnClick method in the RecyclerView Adapter class public void onClick(View view) { int position = getAdapterPosition(); MapsActivity mapsActivity = new MapsActivity(); if (position==MapsActivity.isClicked){ MapsActivity.isClicked = -1; mapsActivity.changeHeatMap(position,1); }else{ MapsActivity.isClicked = position; mapsActivity.changeHeatMap(position,0); } } It throws this error java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.maps.android.heatmaps.HeatmapTileProvider.setData(java.util.Collection)' on a null object reference While loop is not executed at all in changeHeatMap method and if I put a breakpoint and check size of il_cat_data then it comes out to be 0. I have checked that data is added in il_cat_data when the app is started. The 'list' is an arraylist which contains complete data and is used to set up the first heatmap. What can be wrong here? Is data not accessible because of the modal bottom sheet.
fa7c245c79061dfff5945af4a13e478f172f740c89a5c93be1ae8f4becebb7c2
['2a07b9a91cf14006ae5120bc10062d42']
Eager Loading Relationships(THIS WILL WORK JUST UNDERSTAND THIS) DataTables support searching and sorting of eager loaded relationships when using Eloquent. this example will show you how to setup a eager loading search using Eloquent Engine. To enable search, we need to eager load the relationship we intend to use using Laravel's User<IP_ADDRESS>with('posts') api. use DataTables; Route<IP_ADDRESS>get('user-data', function() { $model = App\User<IP_ADDRESS>with('posts'); return DataTables<IP_ADDRESS>eloquent($model) ->addColumn('posts', function (User $user) { return $user->posts->map(function($post) { return str_limit($post->title, 30, '...'); })->implode('<br>'); }) ->toJson(); }); To trigger search on posts relationship, we need to specify the relation.column_name as the name attribute in our javascript appropriately. <script> $(document).ready(function() { $('#users-table').DataTable({ processing: true, serverSide: true, ajax: '{{ url("collection/basic-object-data") }}', columns: [ {data: 'id', name: 'id'}, {data: 'name', name: 'name'}, {data: 'email', name: 'email'}, {data: 'posts', name: 'posts.title'}, {data: 'created_at', name: 'created_at'}, {data: 'updated_at', name: 'updated_at'} ] }); }); </script> Looking at {data: 'posts', name: 'posts.title'},: data: posts represents the data key (data.posts) that we are going to display on our table. name: posts.title represents the User model relationship (posts) and the column we are going to perform our search (title).
7ce4ca974ffc4c74f6d78f763552655609b282e0abd25f8a3a4b63ed2d55f2e9
['2a07b9a91cf14006ae5120bc10062d42']
THIS IS HAPPENING BECAUSE in Kernal.php (location -> /app/Http ) there are two arrays $middleware and $routeMiddleware. Do not create alias(naming) inside $middleware array. it has to be created in $routeMiddleware array. for example protected $routeMiddleware = [ 'auth' => \Illuminate\Auth\Middleware\Authenticate<IP_ADDRESS>class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth<IP_ADDRESS>class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings<IP_ADDRESS>class, 'can' => \Illuminate\Auth\Middleware\Authorize<IP_ADDRESS>class, 'guest' => \App\Http\Middleware\RedirectIfAuthenticated<IP_ADDRESS>class, 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests<IP_ADDRESS>class, 'checkLogin' => \App\Http\Middleware\CheckLogin<IP_ADDRESS>class, //here you have to add your middleware naming not in the $middleware array ];
cebe968e8c200a98e7049e83c1d3eea75210613f0c23c70ff75f904aaf474735
['2a1b66ebe0484681a43aa94824c8d8f2']
The problem was that I was trying access Blockpic.width in your Blockfield constructor before Blockpic had been assigned. The solution was to load the Image within the constructor of the class. Working code: public class Blockfield { private int Blockcount; private PImage Blockpic; private Block block[]; //Constructor public Blockfield (int Blockcount) { this.Blockcount = Blockcount; Blockpic = loadImage("block2.png"); //new array block = new Block [Blockcount]; for ( int i=0; i < Blockcount; i++) { block[i] = new Block( width+Blockpic.width, random (height)); } } //Draw method for this class public void draw () { for (int i =frameCount/100; i >0; i--) { image ( Blockpic, block[i].x, block[i].y); //moves blocks right to left block[i].x -=7 ; //spawns block when they leave the screen if (block[i].x < 0) { block[i] = new Block( width+Blockpic.width, random (height)); } } } } class Block { float x, y; Block ( float x, float y) { this.x= x; this.y= y; } } Thanks to everyone for the help!!!
3e9394a611dc5c178544aa04dc56b1155bf55a5e906c6f6e5bbedbaef7fb8896
['2a1b66ebe0484681a43aa94824c8d8f2']
I introduced a new Boolean called finished, which was set to false by default and to true during collision. if (block[i].x < 130) { if(block[i].y > cY && block[i].y < (cY+cW) && !finished){ //println(collide_count + " with"); collide_count = 80; finished = true; currentCount = frameCount/20; } In the collison i set currentCount= Framecount and let the score be printed when finished == true. public void draw () { Scorevar = frameCount/20; textFont(font); fill (0); //textAlign(CENTER); textMode(MODEL); if ( finished == true) { text("Score = "+ currentCount, x, y); } else { text("Score = "+ Scorevar, x, y); } } Thanks alot again!
1d0fbf953ba5224b9d52d3c81015fcca28b744080cfb366195f31244ffe5eadc
['2a2559cd497943b58a49f6683c82c37a']
I'm developing a solution with C# and .NET Framework 4.7. The solution has a ASP.NET Web MVC application and a Windows Service. Both connect to the same database and now I'm using their configuration files to store. Is there any other way to store the connection string that both application can use it? I don't want to have duplicated the same information in two configuration files. There are also another settings that I would like to share.
f70bc029d97a20424b7e4d2b8e2a0d5341d0b47f56ca0482bbd9959566dc29eb
['2a2559cd497943b58a49f6683c82c37a']
This is how I make it work: using HTMLSelectElement. getNotification(evt: string, rowIndex: number) { let id: string = "ProductId-" + rowIndex; let select: HTMLSelectElement = <HTMLSelectElement>document.getElementById(id); this.removeOptions(select); if ((evt != null) && (evt != "")) { let productsByLaw: IProduct[]; productsByLaw = this.products.filter(x => x.lawId == +evt); for (let product of productsByLaw) { select.options[select.options.length] = new Option(product.name, product.productId.toString()); } } }
8a499f8f6fdf25b900cfb690814d4bdd5728090a6e75baf88f02830748d10b66
['2a27fb97af334200b2629b0ce74b4816']
So, I figured it out. Getting the URL variable into the Serializer To do this, you need to overwrite the get_serializer_context() method for your ModelViewSet, and send in the variable from your kwargs class BrandedViewSet(viewsets.ModelViewSet): def get_serializer_context(self): context = super().get_serializer_context() context['brand_slug'] = self.kwargs.get('brand_slug') return context Then, you can just extend all of your ModelViewSets with that class: class StateViewSet(BrandedViewSet): queryset = State.objects.all() serializer_class = StateSerializer What's nice is that even though you've injected the Serializer with this variable, it's ALSO accessible from the HyperlinkedRelatedField class, via self.context, and that's how the next part is possible. Building a Custom Hypermedia link with extra URL variables The docs were correct in overwriting get_url(): class BrandedHyperlinkMixin(object): def get_url(self, obj, view_name, request, format): """ Extract brand from url """ if hasattr(obj, 'pk') and obj.pk is None: return None lookup_value = getattr(obj, self.lookup_field) kwargs = {self.lookup_url_kwarg: lookup_value} kwargs['brand_slug'] = self.context['brand_slug'] return reverse( view_name, kwargs=kwargs, request=request, format=format) Except, you'll notice I'm grabbing the variable from the context I set in part 1. I was unable to get the context from the object as the docs suggested, and this method turned out to be simpler. The reason it's a mixin is because we need to extend TWO classes for this to work on all the url hyperlinks and not just the related field hyperlinks. class BrandedHyperlinkedIdentityField(BrandedHyperlinkMixin, serializers.HyperlinkedIdentityField): pass class BrandedHyperlinkedRelatedField(BrandedHyperlinkMixin, serializers.HyperlinkedRelatedField): pass class BrandedSerializer(serializers.HyperlinkedModelSerializer): serializer_related_field = BrandedHyperlinkedRelatedField serializer_url_field = BrandedHyperlinkedIdentityField Now we can safely extend our serializer and the hyperlinks show the brand variable! class StateSerializer(BrandedSerializer): class Meta: model = State fields = ('url', 'slug', 'name', 'abbrev', )
d39aa61a957fc7fe8fd074a781f5d975ef4e3e2a60da1f2e0600789d933d94a4
['2a27fb97af334200b2629b0ce74b4816']
I use a variable in the base of my API url, identical to the setup found in the docs for Django REST Framework: /api/<brand>/states/<state_pk>/ Everything after the base brand slug is a standard API format, and so I use ModelViewSets to generate all my list and detail views for my objects. Everything in the API is filtered by the brand, so this setup makes sense. simplified project/urls.py urlpatterns = patterns( '', url(r'^v2/(?P<brand_slug>\w+)/', include(router.urls, namespace='v2')), ) simplified api/urls.py router = routers.DefaultRouter() router.register(r'states', StateViewSet) router.register(r'cities', CityViewSet) I also need hypermedia links for all models, and this is where I've run into problems. The REST framework doesn't know how to grab this brand variable and use it to generate correct links. Attempting to solve this problem by following the docs leaves me with 2 setbacks: While the docs explain how to overwrite the HyperlinkRelatedField class, they never say where to put THAT class so that it works with my Serializers. There's no mention on how to actually get the brand variable from the URL into the HyperlinkRelatedField class. What are the missing elements here?
6000a55c94fdb84baa4c1dfd88b163f4b61a7254ed597a001a93f6530499c1af
['2a4933de39d74b4b82154aa98f78f2bd']
the way java8 is installed. Agree that if you have java8 already installed, then you already have the answer. However, since recent changes in the oracle policy, java8 is harder to install. It does not work even if you do everything correctly (atleast did not work for me). This method worked for me, so just wanted to share.
a598f95f4fb42641f1c05d9dd690164f85bbe3afe43a6f3ec4a0d9984a0d8d6a
['2a4933de39d74b4b82154aa98f78f2bd']
I recently started to write a C++ program to GET and POST data from/to tdameritrade through their api. I am new to cURL. tdameritrade has put up some guides for their apis. They do provide with simple commands that can be run from a terminal or through python. e.g. curl -X GET --header "Authorization: Bearer accesscode" "https://api.tdameritrade.com/v1/marketdata/GOOGL/pricehistory?apikey=userkey&periodType=day&period=2&frequencyType=minute&frequency=5". And this command would return me the price history of the stock (GOOGL) in this case. I am trying to implement the same command using libcurl library in ubuntu. Here is a snapshot of my code: #include "curl/curl.h" int main(){ const std<IP_ADDRESS>string myheader("Authorization: Bearer accesscode"); const std<IP_ADDRESS>string url("https://api.tdameritrade.com/v1/marketdata/GOOGL/pricehistory?apikey=userkey&periodType=day&period=2&frequencyType=minute&frequency=5"); CURL* curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); . . . curl_easy_perform(curl); curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode); curl_easy_cleanup(curl); } But I do not know how to implement the --header part into the curl options. Please advice. Thanks!!!
aeb68c4d0e9b73f7834206ec0717dadc15282829b14ec683523c667c78b7f44a
['2a5127f09d4848eaaa15f61eb3f9ed8b']
split your harddrive(using Hirens BootDisk setup - to resize the partition) and leave an unallocated space enough for windows 8.1 or whatever suits you Then Create a Bootable FlashDrive with Windows 8.1 using Rufus preferebly or something that can create a bootable flash drive Its worth a try worked for me
980b383d352d46cd98a75e056d3a218f01bc204dc800257f89294fe407f7ce8d
['2a5127f09d4848eaaa15f61eb3f9ed8b']
You might be interested in: liballoc It's a simple, easy-to-implement malloc/free/calloc/realloc replacement which works. If you know beforehand or can figure out the available memory regions on your device, you can also use their libbmmm to manage these large memory blocks and provide a backing-store for liballoc. They are BSD licensed and free.
757d04c673c81079e42f15156aacaa5fb7ab6a9869b607349006aee94580079c
['2a518c400a664883becdbac56849582e']
Certainly, a good literature review paper (also frequently referred to as a survey paper) would be an attractive asset in anyone's academic portfolio. However, it is easier said then done. Some people on this site even replied to one of my related questions that such papers is more of a prerogative of senior, very experienced scholars. Perhaps, there is some truth to it; likely, a lot of truth. However, I do think that those opinions should not prevent people from attempting to write a good survey paper (or do anything, for that matter). The reason for that, in my opinion, is twofold: 1) Self-assessment. Some people are better at carrying out specific research, while others are better at synthesizing information, in general, and results of research studies, in particular. We often do not know our strengths (and weaknesses), unless we try both types of research. 2) Self-improvement. In my opinion, it is very important to set the bar high, so that, even if we do not achieve a desired level of success for particular goal today, we will learn much more, thus, increasing our chances for succeeding in that goal and in general tomorrow. Plus, even, if we will not be have our survey papers published in a respectable outlet any time soon (while that IMHO should be one of the goals), we will obtain a much better understanding of the whole field of study (or subject domain) as well as gain an excellent practice in academic writing, which is very valuable on its own ("practice makes perfect"). Now, I will cover briefly some specific aspects that are related to your question. Firstly, we need to understand that there are no ready-to-use, step-by-step recipes for success, in general, and for writing good survey papers, in particular. Sure, there are some guidelines and templates (which are indeed helpful), however, the quality of a survey paper is IMHO dependent on a variety of factors beyond those aids, such as a potential author's knowledge and understanding of a field of study, research stream of subject domain, their abilities for writing clearly and concisely as well as constructing a mental picture of a large body of research and synthesizing from it, often creating rather complex conceptual frameworks. There exist papers that demonstrate how to do that; in particular, for example, for the information systems discipline, see papers by Webster & Watson (2002) as well as by Levy & Ellis (2006). However, again, it is one thing to see how something should be done and another to do that yourself. Another issue that we need to be aware of is that approaches for writing survey papers are quite different across disciplines and/or fields of study. Secondly, we need to understand that writing a survey paper is not the same as performing a systematic review or a meta-analysis (by the way, they are often confused as similar things, which they are not, despite some overlap). We need to understand that meta-analysis is a statistical toolset, whereas systematic review is a type of study, which might or might not use the former. Thirdly, depending on the discipline or field of study (as well as on the author and journal/editor), a survey paper might be closer in its form to a narrative review, rather than a systematic one. While systematic reviews are often regarded as more rigorous approach to covering a topic, they are not without their shortcomings. In fact, good narrative reviews might be as valuable, if not more, to science and research community, as their systematic counterparts. See this paper for some details. References <PERSON>, Y., & <PERSON>, T. J. (2006). A systems approach to conduct an effective literature review in support of information systems research. Informing Science, 9, 181-212. Retrieved from http://www.inform.nu/Articles/Vol9/V9p181-212Levy99.pdf Webster, J., & <PERSON>, R. T. (2002). Analyzing the past to prepare for the future: Writing a literature review. MIS Quarterly, 26(2), 13-23. Retrieved from https://web.njit.edu/~egan/Writing_A_Literature_Review.pdf
05470de7837454c534cc3eba3d63c69a1f8488a20f58bbaa08a4583b46e31ff2
['2a518c400a664883becdbac56849582e']
@LightnessRacesinOrbit: I rejected your suggested edit. Firstly, because "every other ... word" is too far from reality. Secondly, because "too much" is a relative term and your personal opinion, which, along with other 7-10 people on this site, is not representative enough across the potential audience. Thirdly, because I did not like your wording of stated changes, in particular, the word "obnoxious" - next time try to be more respectful to your opponents and their work.
58f0253ff34868dea2e5a28bfeaa8775d5fc4712b7697438cdf1ab4e8d6da4ce
['2a52f53f33c0494085b82f6b5a3d8346']
I am working on a PlayFramework application written in Scala. Problem is that in a rest controller I need a list of elements (books) and for each element list of its subelements (chapters). Book repository: def findAll(): Future[Seq[Book]] Chapter repository: def findByBookId(bookId: UUID): Future[Seq[Chapter]] I wanted to do something like val books = bookRepository.findAll val result = for { bookList <- books book <- bookList chapters <- chapterRepository.findByBookdId(book.id) } yield (book, chapters) I want to have a tuple of book and its chapters so I can latter map it to a json. What I am doing wrong, because I get error: [error] required: scala.collection.GenTraversableOnce[?] Or what would be a better approach how to iterate over future of collection and for each element load another future of collection?
437ffde5c4a7332bf00e24e4f525859b65aff3fcfdf8d583898f43adbdbc562c
['2a52f53f33c0494085b82f6b5a3d8346']
I have playframework application written in scala. Problem is when I want to add new module for Silhouette. My module class is very similar to one from Silhouette example. I can run application trough sbt with simple run command but when I build jar using sbt-assembly and try run it I get: No valid constructors at play.api.inject.Modules$.$anonfun$constructModule$6(Module.scala:155) at scala.Option.getOrElse(Option.scala:138) at play.api.inject.Modules$.constructModule(Module.scala:155) at play.api.inject.Modules$.$anonfun$locate$4(Module.scala:127) at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:237) at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:321) at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:977) at scala.collection.TraversableLike.map(TraversableLike.scala:237) at scala.collection.TraversableLike.map$(TraversableLike.scala:230) at scala.collection.AbstractSet.scala$collection$SetLike$$super$map(Set.scala:51) at scala.collection.SetLike.map(SetLike.scala:104) at scala.collection.SetLike.map$(SetLike.scala:104) at scala.collection.AbstractSet.map(Set.scala:51) at play.api.inject.Modules$.locate(Module.scala:125) at play.api.inject.guice.GuiceableModule$.loadModules(GuiceInjectorBuilder.scala:276) at play.api.inject.guice.GuiceApplicationBuilder$.$anonfun$$lessinit$greater$default$9$1(GuiceApplicationBuilder.scala:30) at play.api.inject.guice.GuiceApplicationBuilder.applicationModule(GuiceApplicationBuilder.scala:102) at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:185) at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:137) at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21) at play.core.server.ProdServerStart$.start(ProdServerStart.scala:51) at play.core.server.ProdServerStart$.main(ProdServerStart.scala:25) at play.core.server.ProdServerStart.main(ProdServerStart.scala)
87385ebd3b89fa12d2299f3bfcc0f8b0b9240a5ba2fa24b5f13dce578f4d02f2
['2a5e3b89b7594e61b1469193359ef829']
I have following data in excel: Category ID a 100-1234 a 100-12345 b 100-123456 b 110-1234 b 110-12345 c 1120-92029 c 12303-223 c <PHONE_NUMBER> c <PHONE_NUMBER> I would like to write a formula to calculate the number of distinct/different IDs of all categories except Category = "c" (without breakdown by category, just a total number of distinct IDs).
40955fbefd34e896e8c852e14a5071f685a80d18475463b6ba209a5da40ef019
['2a5e3b89b7594e61b1469193359ef829']
I’d like to count using R, how many days of given list: 2020-10-01 2020-10-03 2020-10-07 2020-10-08 2020-10-09 2020-10-10 2020-10-14 2020-10-17 2020-10-21 2020-10-22 2020-10-27 2020-10-29 2020-10-30 Were in given period from start to end: id start end 1 2020-10-05 2020-10-30 2 2020-10-06 2020-10-29 3 2020-10-10 2020-10-12 And the result should be for example: id number of days 1 5 2 18 3 12
d9aecfc0ec85ad56ffb01db14af345de2ad36d70fc29dcd14bb20fd44b03b565
['2a5ef5aed4974c35834fe0050078abb0']
I am a rookie when it comes to servers, but I have nonetheless been the one asked to get Shiny up and running for web applications in the open-source statistics and computing environment R at my office. Shiny requires a Linux server ("You can also deploy Shiny applications over the web...You’ll need a Linux server and our Shiny Server software..."), but we have a 64-bit Windows 2008 R2 Enterprise server. From the reading I've done so far, it seems like we could use free options such as VMWare Server or Microsoft Virtual Server to run Linux and then run Shiny on Linux. Would that approach make sense? If so, I am also wondering if we could use Ubuntu Server as our Linux Server OS in this case and, if the answer is yes, whether you have found 12.04.3 or 13.04 to be the more stable Ubuntu version of the two. Any help would be greatly appreciated! Thanks!
1c22cdaac48257d6478c7b854da903420140ce48207e4133616881ecc9edd991
['2a5ef5aed4974c35834fe0050078abb0']
Thanks for the links <PERSON>. That one is for Windows Phone and only shows reputation. The only bit I'm really interested in is notifications. It would be quite useful to see the notifications on the start screen to stay up to the minute. Is there a way to programmatically get a user's stack exchange notifications? If so I might try making a tile myself.
9dc370041e6bc029ee5edaeb387de9a8c8d415df44fefe7f8966c8bc171e1b3e
['2a82e528698341208374197a5fbe38bb']
I have a dataframe with a column, E, that includes at most the values [200 300 400 600 1000] However as I am reading several sets of data like this from a source, not all my dataframes have these 5 values, i.e. some rows will be missing from one dataframe (e.g. has [200 300 400 1000], while another may have a different set of entries (e.g. [200 300 600]). I appreciate that these appear as np.arrays or Series here, but in my application I am dealing with a dataframe containing other columns, which I haven't shown here. I've shown them like this here for simplification. What I want to do is add fixed values in a second column corresponding to these values if they appear, i.e. if the dataframe contains 200, add in a new column 100. Then, if 300 is in the column, add 100. There are fixed values I need to add that map to the values in the above, so if my dataframe looks like E 200 300 400 600 1000 then it should become E D 200 100 300 100 400 200 600 400 1000 400 but if it's e.g. E 200 300 600 it should become E D 200 100 300 100 600 400 In effect, the values in E are mapped to fixed values in D, i.e. [100 100 200 400 400] (they are in fact the differences between the value in E and the next value in E, assuming all values are in E and none are missing). Any help or guidance is much appreciated!
ddc73ea34f69d7cd8c07977a1b8e1646b78d17378d336eede0a76392a9ae59c6
['2a82e528698341208374197a5fbe38bb']
I have a dataframe with a variable (E), where the value in the dataframe is the left edge of the bin, and a set of occupancies for each bin (n) (and the uncertainty squared (v)). At the moment, these are binned from 200 to 2000 in steps of 100 (usually), then binned 2000 to +inf. However these bins are very fine for the plotting I need to perform, and I need to rebin these into 200, 300, 400, 600, 1000, +inf. Key Point: Because I am reading several sets of data like this from a source, not all my dataframes have entries e.g. for bin 600-700, i.e. some rows will be missing from one dataframe, while another may have entries for them. I need to rebin and sum n and v based on the new bins, while accounting for the fact that my dataframes aren't "regular". Here's an example dataframe: E n v 0 200.0 26.0 1.3 1 300.0 56.0 2.2 2 400.0 62.0 2.5 3 500.0 55.0 2.2 4 600.0 24.0 1.7 5 800.0 12.0 1.3 6 900.0 8.0 0.9 7 1000.0 4.0 0.6 8 1100.0 1.0 0.2 And here is my desired output: E n v 0 200.0 26.0 1.3 1 300.0 56.0 2.2 2 400.0 117.0 4.7 3 600.0 44.0 3.9 4 1000.0 5.0 0.8 Any help or guidance is much appreciated.
85fcd515dbcb23def7df4e50993e6820ee01ab8a0f71f2c200b2f4a5a97c2ecb
['2a92cf8e0fa943a38a5b9c681b26ac30']
Any time I ever have issues with IE 7,8 or 9, the first thing I check is the charset and ensure it's forced to utf-8. It's very picky about this. Another thing to keep an eye is content-type header. Ensure it is correct and matches up with the response your sending back. It also tends to be picky about this. So, for example, if you're making an ajax request and expecting a json response, you should set your content-type to 'application/json; charset=utf-8;'. If you're making an ajax request and expecting html as your response, your content-type should be set to 'text/html; charset=utf-8;'. Hope this helps someone, as it has me.
0efbaf20f664cea6c0d3f20dca229abf283b7486900009c0ab865569c3c7da00
['2a92cf8e0fa943a38a5b9c681b26ac30']
Ok... something else that I probably should have mentioned is that I am an experienced programmer trying to get my bearings with iOS, and I've found in most conversations --even if this is not best for SO purposes-- that the worst solutions come from "I've solved the problem badly, you help me implement it;" what I don't want to do is solve 80% of the problem (say) the way it would be done in web development, with JavaScript/libraries and CSS, and try to pound the square JavaScript/CSS approach into iOS's rounded corners.
d0286e7c0017f40a189c6def193f0c2e765391de74ae16ba4693bb6857c04c98
['2aa4157202c048b8af6358b9582d9d9a']
Is there a canonical way to emit multiple keys from a single item in the input sequence so that they form a continuous sequence and I don't need to use a reduce(...) just to flatten the sequence? e.g. if I wanted to expand each digit in a series of numbers into individual numbers in a sequence [1,12,123,1234,12345] => [1,1,2,1,2,3,1,2,3,4,1,2,3,4,5] then I'd write some python that looked a bit like this: somedata = [1,12,123,1234,12345] listified = map(lambda x:[int(c) for c in str(x)], somedata) flattened = reduce(lambda x,y: x+y,listified,[]) but would prefer not to have to call the flattened = reduce(...) if there was a neater (or maybe more efficient) way to express this.
e7bd3576c14b9dc24ff70229fa524d74eba528bcb118136795ea25af07d8fadd
['2aa4157202c048b8af6358b9582d9d9a']
Actual question(s): What happens "in Windows" when a program crashes from an uncaught exception? Is there a dll function, which I can hook, to log some basic information about a crash? Context: I am planning to write a program which will collect some very basic information about any applications which crash on my local pc. I was hoping that I could execute a simple method to log some information about a crash in a similar manner to the way Visual Studio produces a dialog offering to let you debug a program when it crashes.
6a9c90d5dee26c02a78277ed310accab0c93b2e27e50d37109892aee00c131b5
['2acfb24804d04683b66a015d53f76ebf']
I am new to kivy, I want to create my basic UI for android application, and I tried to code down below, I first create my boxlayout to separate my UI into three parts: title part, main part, and icon part, actually my question is about how to size and position my icon image button <MyLabel@Label>: color: .8, .9, 0, 1 font_size: 32 text_size: self.width, None size_hint_y: None height: self.texture_size[1] <MyBoxLayout>: orientation: 'vertical' BoxLayout: size_hint: 1, .1 Label: text: "Face-Reg" font_size: 50 color: .8, .9, 0, 1 text_size: self.size ScrollView: size_hint: 1, .8 MyLabel: text: str ('Hello This is My New Project ' * 100) BoxLayout: size_hint: 1, .1 Button: size_hint_x: 0.25 Image: source: 'icon/server.png' size:self.texture_size Button: size_hint_x: 0.25 Image: source: 'icon/add.png' size:self.texture_size Button: size_hint_x: 0.25 Image: source: 'icon/recog.png' size:self.texture_size Button: size_hint_x: 0.25 Image: source: 'icon/renew.png' size:self.texture_size The output screen snapshot is: 1 Four Icon are overlapped together, also the size is not match to the button size how can I fix that? Thanks
deee366dc00b9bdd8627b437c26d1d4eb8a45a94bfd688494cc51f5202f02873
['2acfb24804d04683b66a015d53f76ebf']
I am now about Python and AWS, I am currently doing one of my project, that require me to develop the android app using kivy and some functions are conducted using python. However, it is quite computationally intensive, so I'm thinking about to access the AWS cloud system at first, and all my computation works will be done on AWS, and once the computation finishes, it tell the result to the android app. Can someone tell me about how to run my python code on AWS server, actually, my project is about face-recognition, and if user clicks one single button, it will connect to the cloud server, while he/she clicks the other button, it will upload the test image to the cloud server, and the computation algorithms are all on AWS.
63ead52f0d5d7ca2248ce23a8e227e75a0f514ecd055ce9741e3b9f62c2df394
['2aef253eb8fb4e95bf31df3210f86c9a']
I was looking to do file upload and add some parameters to a multipart/form-data request in VB.NET and not through a regular forms post. Thanks to @JoshCodes answer I got the direction I was looking for. I am posting my solution to help others find a way to perform a post with both file and parameters the html equivalent of what I try to achieve is : html <form action="your-api-endpoint" enctype="multipart/form-data" method="post"> <input type="hidden" name="action" value="api-method-name"/> <input type="hidden" name="apiKey" value="gs1xxxxxxxxxxxxxex"/> <input type="hidden" name="access" value="protected"/> <input type="hidden" name="name" value="test"/> <input type="hidden" name="title" value="test"/> <input type="hidden" name="signature" value="cf1d4xxxxxxxxcd5"/> <input type="file" name="file"/> <input type="submit" name="_upload" value="Upload"/> </form> Due to the fact that I have to provide the apiKey and the signature (which is a calculated checksum of the request parameters and api key concatenated string), I needed to do it server side. The other reason I needed to do it server side is the fact that the post of the file can be performed at any time by pointing to a file already on the server (providing the path), so there would be no manually selected file during form post thus form data file would not contain the file stream.Otherwise I could have calculated the checksum via an ajax callback and submitted the file through the html post using JQuery. I am using .net version 4.0 and cannot upgrade to 4.5 in the actual solution. So I had to install the Microsoft.Net.Http using nuget cmd PM> install-package Microsoft.Net.Http Private Function UploadFile(req As ApiRequest, filePath As String, fileName As String) As String Dim result = String.empty Try ''//Get file stream Dim paramFileStream As Stream = File.OpenRead(filePath) Dim fileStreamContent As HttpContent = New StreamContent(paramFileStream) Using client = New HttpClient() Using formData = New MultipartFormDataContent() ''// This adds parameter name ("action") ''// parameter value (req.Action) to form data formData.Add(New StringContent(req.Action), "action") formData.Add(New StringContent(req.ApiKey), "apiKey") For Each param In req.Parameters formData.Add(New StringContent(param.Value), param.Key) Next formData.Add(New StringContent(req.getRequestSignature.Qualifier), "signature") ''//This adds the file stream and file info to form data formData.Add(fileStreamContent, "file", fileName) ''//We are now sending the request Dim response = client.PostAsync(GetAPIEndpoint(), formData).Result ''//We are here reading the response Dim readR = New StreamReader(response.Content.ReadAsStreamAsync().Result, Encoding.UTF8) Dim respContent = readR.ReadToEnd() If Not response.IsSuccessStatusCode Then result = "Request Failed : Code = " & response.StatusCode & "Reason = " & response.ReasonPhrase & "Message = " & respContent End If result.Value = respContent End Using End Using Catch ex As Exception result = "An error occurred : " & ex.Message End Try Return result End Function
7aaf33fb7ca1e4496ea5aeb37c7b223e0c6e30b402e93948dd288b93d8c59a30
['2aef253eb8fb4e95bf31df3210f86c9a']
We are running into issues with our Blob triggered function. The function is written in javascript. We had a hard time putting an automated deployment process for it in place. Here are the steps we followed. Create the function app within an existing resource group, using the ARM template and a parameter file New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateFile $templateFilePath -TemplateParameterFile $armParametersFilePath; Deploy the function code through the Kudu api Invoke-RestMethod -Uri "$apiUrl" -Method Put -InFile "$functionCodeArchivePath" -Credential $credentials -DisableKeepAlive -UserAgent "powershell/1.0" -TimeoutSec 600 Run the npm install command through the kudu api Invoke-RestMethod -Uri "$apiCommandUrl" -Method Post -Body $json -DisableKeepAlive -ContentType "application/json" -Credential $credentials -UserAgent "powershell/1.0" -TimeoutSec 1200 In the last step - the command to get the dependencies (npm install) on Kudu times out this seems to be a known issue. To overcome this, we went for using WebPack to package all the dependencies in one JavaScript file, following this approach. Now the deployment is faster, the function does not seem to be executing correctly though. When we drop a file into our blob storage account the function is triggered from , the function does not seem to log the execution trace always. There are runs which have the full logs, and there are runs that only have Function started in them without having any custom log statements. Here are the logs, straight from Kudu (D:\home\LogFiles\Application\Functions\Function\functionname>) 2017-03-03T11:24:33.835 Function started (Id=77b5b022-eee0-45e0-8e14-15e89de59835) 2017-03-03T11:24:35.167 JavaScript blob trigger function started with blob: 2017-03-03T11:24:35.167 Name: _1486988111937 Blob Size: 8926 Bytes 2017-03-03T11:24:35.167 Extracting file 2017-03-03T11:24:35.167 JavaScript blob trigger function processed blob Name: _1486988111937 Blob Size: 8926 Bytes 2017-03-03T11:24:35.183 Function completed (Success, Id=77b5b022-eee0-45e0-8e14-15e89de59835) 2017-03-03T11:24:35.292 { Error: [** SENSITIVE ERROR MESSAGE, INTERNAL TO FUNCTION, REMOVED **] } 2017-03-03T11:28:34.929 Function started (Id=8bd96186-50bc-43b0-916c-fefe4bd0cf51) 2017-03-03T11:38:18.302 Function started (Id=7967cc93-73cf-4acf-8428-20b0c70bbac9) 2017-03-03T11:39:32.235 Function started (Id=a0abb823-9497-429d-b477-4f7a9421132e) 2017-03-03T11:49:25.164 Function started (Id=ab16b1d9-114c-4718-aab2-ffc426cfbc98) 2017-03-03T11:53:51.172 Function started (Id=87ed29bc-122f-46d2-a658-d933330580c9) 2017-03-03T11:56:06.512 Function started (Id=23f8ee3f-cda0-45a3-8dd0-4babe9e45e4e) 2017-03-03T12:02:58.886 Function started (Id=c7ef7ad5-62b8-4b43-a043-bc394d9b02f5) PS: Our function code is getting the blob, a zipped file, unzipping it and making API calls for each of the files inside the zipped folder. The error marked with [** SENSITIVE ERROR MESSAGE, INTERNAL TO FUNCTION, REMOVED **] in the log is related to connectivity to our API.
edc6ad6063cf8ebe8105fe2b9333d1b8b4685521869d6690e0c2a16a4cf782ea
['2aef53d15b2a4e75abe6dff623dc7050']
Flickering behavior is correct. It is like throwing ball at the wall and when it bounces away, you punch it back to the wall. It is because you are setting forces instead of positions. First, you must decide, wheter you want to control the position, or force (speed = derivative of position). If you want to set forces, then: you can not simply add force when button is down. It may grow to infinity. when object reaches the border, set force to zero! don't add force in another direction!
f7bb2cf96feef28ff928dff8652034acdc05c99df84ef8b0515ade4537b4ed1f
['2aef53d15b2a4e75abe6dff623dc7050']
I can think of two things that might be the problem there. The enviroment may not be getting setup properly. I would try to run it from sh (or bash), and perhaps check to make sure things like your $PATH are configured how you expect. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" \ "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>client_checkout</string> <key>ProgramArguments</key> <array> <string>/bin/sh</string> <!-- New bit here --> <string>/Users/chris/svn/qa/watir/tests/client.sh</string> </array> <key>StartCalendarInterval</key> <dict> <key>Minute</key> <integer>52</integer> </dict> </dict> </plist> If you want to check on the environment you can change your script to be something like this: env > /Users/chris/Desktop/launchdenv.txt The other thing that might be causing issues would be running firefox w/o a gui environment. You might have better luck moving your launchd script to ~/Library/LaunchAgents/.
45170b141406bb143f804e7c616685c4e566e92495d4cc4787d98527c96a9d78
['2b085b08af49488e8d681e76f0988dc9']
Usually when I have something the likes of below on an HTML page it works just fine. The local script block is only executed after the external script block is finished loading. <div id="curve_chart" style="width: 900px; height: 500px"></div> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Year', 'Sales', 'Expenses'], ['2004', 1000, 400], ['2005', 1170, 460], ['2006', 660, 1120], ['2007', 1030, 540] ]); var options = { title: 'Company Performance', curveType: 'function', legend: { position: 'bottom' } }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart')); chart.draw(data, options); } </script> However if I take the code above and append it to a DIV container like this: $("#some_element").append($.parseHTML([code from above here], document, true)); It gives me the message "Uncaught ReferenceError: google is not defined". I think the problem is that when appending this piece of code like this, either the order of the script tags isn't respected, or it just loads all script tags in parallel?! Now I know there are workarounds to this (primarily using $.getScript and a callback), but I'd like to know why it is like this exyactly, and if there is a way to get it to work like expected.
1a21366e40614839ec18af1c52dd443afeb656bc7a585f98f89c80b2b9814a01
['2b085b08af49488e8d681e76f0988dc9']
I'm currently migrating my Java 8 code to Java 11 and stumbled across a problem. I'm looking for jar files in a directory and add them to the classpath in order to use them as JDBC drivers. After doing so I can easily use DriverManager.getConnection(jdbcString); to get a connection to any database I loaded a driver beforehand. I used to load drivers using this bit of code which no longer works since the SystemClassLoader is no longer a URLClassLoader. Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[] { URL.class }); method.setAccessible(true); method.invoke(ClassLoader.getSystemClassLoader(), new Object[] { jdbcDriver.toURI().toURL() }); So after looking around for alternatives I found this answer on SO: https://stackoverflow.com/a/14479658/10511969 Unfortunately for this approach I'd need the drivers class name, i.e. "org.postgresql.Driver" which I don't know. Is there just no way to do this anymore, or am I missing something?
c01f324abd164561ab38c31621501581a5b79a2aeb931acc28fba8aed402466e
['2b0e7ce362224f5c90d5c82a70a27411']
I want to add a Blank UWP app as a reference of another Blank UWP app. For example: I want UWP app "A" to be the reference of UWP app "B" but it returns these error codes when I build B: Payload contains two or more files with the same destination path 'App.xbf'. Source files: …\…\B\bin\…\…\App.xbf …\…\A\bin\…\…\App.xbf
790488825c7b211e5d974b865898585a70b4165ca37c05bd448788608bfa460a
['2b0e7ce362224f5c90d5c82a70a27411']
I want to use 2 C# apps to communicate to each other by memory. For the host side I used: int* ptr = &level; And for the client side I want to use: ReadProcessMemory((int)_handle, <returned result of int* ptr>, _buffer, 2, ref bytesRead); But the ReadProcessMemory doesn't work. For example: level set to 3 but ReadProcessMemory returns 0. What the hell out of this? (NOTE: "level" field is not cleared from memory) I tried int* ptr lots of times because lots of websites tell me to do that but that doesn't work so well with ReadProcessMemory. I set level = 3 but the result of ReadProcessMemory of level = 0
892564abafbd5239baa1fb98da54225a2a4301ba3a177ad50f21010bbba722cb
['2b1388bd18d64233a5f3cf89563dbd65']
Lets say that I have 2 groups of distinct points. I'm trying to find all the possible different ways to travel between these points. In one group we have P1,P2 and in the other group P3,P4. Any point can be a starting point and can only end in the opposing group. I want to find a way to formalize how to find all combinations of these points. Each group can have an N distinct number of points, but I chose for each group to have 2 points. These are all the possible set of points from these two groups: Set 1: P1->P2->P3->P4 Set 2: P1->P2->P4->P3 Set 3: P2->P1->P3->P4 Set 4: P2->P1->P4->P3 Set 5: P3->P4->P2->P1 Set 6: P3->P4->P1->P2 Set 7: P4->P3->P2->P1 Set 8: P4->P3->P1->P2 The "->" denotes a path traveled. Therefore I have 8 distinct paths traveled. How do I formalize this though? I've tried thinking of exponents, and factorials... I'm a bit stuck right now.
6146df8ea0af8b12979a3269578734ff843d47b1ee80f5b276ea5e6ad0dee3d1
['2b1388bd18d64233a5f3cf89563dbd65']
I have a server on GoDaddy and I have sshed to it to create a remote repository. On my local machine, I have cloned this repository and I have tried to commit a new file and push it to the remote repo. After typing git status on my remote repo I get this: # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # deleted: tester.c # How can I commit the file without deleting it? Why is it trying to delete my committed file?
948c6e62a7cc18d6c7a848574d51fb7eb6b6e0ea54683dbb81eddd1bb9280fa0
['2b21af5d5a0348d8b7b9067b9ab791dd']
I have plotted a grouped bar plot using the below code: col1 = { 'abc': '#323233', 'xyz': '#C92735', } fig = px.bar(df, x="id", y="Total", color="sys_type", barmode="group", color_discrete_map=col1) fig.layout = go.Layout( title=go.layout.Title(text="Total value for each id", x=0.5), xaxis_title="Id", yaxis_title="Total Value" ) fig.show() The y axis on graph is represented in terms of thousands, such as 35k, 45k but when I hover over the graph, the same value is represented in decimal form (41.07k). How can I change this hover value to 41070 instead of 41.07k?
b281968c2c19b9e8ff089d6ad8869278b231e90724dbe8f0c7a9697e9c4860fa
['2b21af5d5a0348d8b7b9067b9ab791dd']
My original dataframe looks similar to the one below: | Sales_entity | country | id | |--------------|---------|----| | sales B | US | 1 | | sales C | US | 1 | | sales C | US | 15 | | sales B | US | 20 | | sales D | US | 21 | | sales C | US | 2 | | sales D | US | 2 | | sales D | US | 12 | | sales D | US | 50 | | sales A | US | 25 | | sales A | Canada | 3 | | sales A | Canada | 3 | | sales A | Canada | 9 | | sales A | Canada | 11 | | sales C | Canada | 4 | | sales C | Canada | 4 | | sales B | Canada | 5 | | sales D | Canada | 5 | | sales B | Canada | 6 | | sales B | Canada | 6 | | sales B | Canada | 8 | | sales C | Canada | 7 | | sales A | Canada | 14 | Here's the input dataframe: df= pd.DataFrame({'id' : [1]*2+[15]+[20]+[21] +[2]*2+[12]+[50]+[25] + [3]*2+[9]+[11] + [4]*2 +[5]*2+[6]*2+[8]*1+[7]+[14], 'Sales Entity' : ['sales B','sales C','sales C','sales B','sales D','sales C','sales D','sales D','sales D', 'sales A','sales A','sales A','sales A','sales A','sales C','sales C','sales B','sales D', 'sales B','sales B','sales B','sales C','sales A'], 'country' : ['US']*10 + ['Canada']*13}) I want to group by country and sales_entity and distinct count the id's. To achieve this, I have used the following code: df1= df.groupby(['country','Sales Entity'])['id'].nunique().reset_index(name='count') My output from this code looks as the following: | country | sales_entity | id | |---------|--------------|----| | Canada | sales A | 4 | | Canada | sales B | 3 | | Canada | sales C | 2 | | Canada | sales D | 1 | | US | sales A | 1 | | US | sales B | 2 | | US | sales C | 3 | | US | sales D | 4 | From this output,I want to generate a funnel graph separately for Canada and US such that the funnel displays the value of each sales entity as well as percentage growth/decline. For example, if we look at Canada, the funnel should start with 'sales A' with a value 4 and percentage total as 100%. As we move down the funnel to 'sales B', it should display the value 3 and the percentage change and so on. Similarly, for US, the funnel should start with 'sales D' followed by 'sales C', 'sales B' and 'sales A' displaying their values and percentage change. How can I create a funnel chart using plotly in Python in this case without manually entering the values from my table?
67aba9083f32198b33b9f0b82629fe0b89137f1f4a6403c06d4c2dd58ee6bb98
['2b2ea8e954544973a36eef3fa594c654']
When speaking of events the observer pattern comes to mind. You can think of your game to be internally presented by several state machines (you can look this up at Wikipedia, too, I can't add 2nd link myself due to being new to SO). Each transition from one stage to another is an event that can be communicated to registered oberservers of that event. At example: USE KEY ON LOCK: triggers removal of key and opening of door; implictly "cascading" to next event without additonal user interaction (opening of door): triggers room having additional exit etc.
26522542106bdb5dcbf9fafa717e9fb833cae1124378dff102411c45b8dc375e
['2b2ea8e954544973a36eef3fa594c654']
After spending some more hours on the problem I have found a way to avoid Tomcat's error message. It seems my Eclipse configuration was faulty, because it was configured to add some of Tomcat's own jars into the folder "I:\Apache Software Foundation\Tomcat 5.5\webapps\MyApp\WEB-INF\lib". After I changed Eclipse's setting to not include them but to use those libraries as referenced ones, they weren't included in the WAR file anymore and Tomcat started without error. To be more precise, the following three jars being duplicated in the lib of my webapp had to be removed to avoid the message: "naming-factory.jar", "naming-factory-dbcp.jar" and "naming-resources.jar". Interestingly, although Tomcat was starting fine now, the result remained the same: If started from within Eclipse, my webapp would succeed with the JNDI lookup for the datasource, but when I started Tomcat without using Eclipse, the webapp still would fail when trying to access the database with the error message below: Cannot create JDBC driver of class '' for connect URL 'null' It took me some more time to get this working, too. I had to give up on the preferred method of defining an app-specific datasource, but defined a global one instead. I still don't know WHY Tomcat refuses to understand my app-specific settings, but at least one can circumvent the problem. Following are the steps that solved all my problems and allowed me the JNDI lookup: Modifying the server.xml file in %CATALINA_HOME%/conf/server.xml inside the tag "GlobalNamingResources": Here I added the complete "Resource" tag section that was already in my context.xml (see above). Modifying the context.xml file in %CATALINA_HOME%/conf/context.xml inside the "Context" tag: Here I added the line: <ResourceLink global="jdbc/postgres" name="jdbc/postgres" type="javax.sql.DataSource"/> I left the webapp-specific web.xml and context.xml unchanged (as seen above). Everything is working now. I post the solution to my problem I found myself in the hope others with a similar problem may benefit.
cc87e6344fa9d197d26177892034333dab5c6ab791d0f0fb6bd2b2168088eaec
['2b3c8a90b9594b9bad3024f877df61b9']
I have faced an issue with qml which is that when I use anchors to layout items their coordinates are not being set and are equal to zero. Please see code snippets below. Is this behavior regular for QML anchors or it's just me doing something wrong? How this can be circumvented? Rectangle { id: background objectName: "background" anchors.fill: parent color: "#06A0D4" } Rectangle { id: ground objectName: "ground" anchors.left: background.left anchors.right: background.right anchors.bottom: background.bottom color: "#D47006" opacity: 0.4 height: 50; } Thanks.
a58889e9a12a05529ce1fe02af94881f1a73310a65825b96bef713c4580a127c
['2b3c8a90b9594b9bad3024f877df61b9']
I have a code as below and I don't understand why exactly compiler can't infer the constructor to be used when instance of D class is created. I have deleted both copy and move constructor so the only alternative would be to use A(Base&) Is there are a way to tell compiler to use A(Base&) constructor, besides casting *this to Base&. class Base {}; class A { private: Base& m_b; public: A(Base& b) :m_b(b) {} A(const A&) = delete; A(A&&) = delete; }; class D : public Base, public A { public: D():A(*this){} }; int main() { D(); } The error I'm getting is as follows: main.cpp: In constructor '<IP_ADDRESS>D()': main.cpp:17:16: error: call of overloaded 'A(D&)' is ambiguous D():A(*this){} ^ main.cpp:10:5: note: candidate: <IP_ADDRESS>A(const A&) <deleted> A(const A&) = delete; ^ main.cpp:9:5: note: candidate: <IP_ADDRESS>A(Base&) A(Base& b) :m_b(b) {}
9529a5dc6c9f67fd17b5a143e721c1c3cb6fba6dd354c9b637a26fa3098b0f47
['2b4f069bb7bb4b51801b2fa371813363']
As <PERSON> said your fields doesn't contain name attributes, it should be like this: <form action="do_register.php" method="POST"> Username: <input type="text" name="username" id="username"/><br /> Password: <input type="password" name="password" id="password"/><br /> Email: <input type="text" name="email" id="email"/> <br /> Serial: <input type="text" name="serial" id="serial"/><br /> <input type="submit" name="submit"> </form>
7f40b1de4cbe963cd0bb4acec0aa85272f97a9de9994226d9e750fe7ec12688f
['2b4f069bb7bb4b51801b2fa371813363']
I want my form to update values in my MySQL database, how would I go on doing that with multiple values ? I think I understand how it works with single values, but not with multiple. Any help is appreciated, this is how far I got: $queue = "UPDATE <PERSON> SET (barn, <PERSON>, voksenhelg, <PERSON>, klippekortmega, <PERSON>) VALUES ($barn, $voksenuke, $voksenhelg, $klippekort, $klippekortmega, $parkering)";
88d994c83319ae9ff92274f291170378644279f14a61db632e9e25b9752d4976
['2b57031689114ac197b98bea9fb22889']
May be you can use std<IP_ADDRESS>thread... #include <iostream> #include <thread> #include <string> void runcmd(std<IP_ADDRESS>string param) { // something like system(param.c_str()); } int main() { std<IP_ADDRESS>thread* threadarray[10]; for (int i=0; i<10; ++i) threadarray[i] = new std<IP_ADDRESS>thread(runcmd,"./a"); for (int i=0; i<10; ++i) { threadarray[i]->join; delete threadarray[i]; } return 0; } I think you can specify core id with sched_setaffinity. look: http://www.thinkingparallel.com/2006/08/18/more-information-on-pthread_setaffinity_np-and-sched_setaffinity/
ace4209edb252a4099d259497aa56f3abc4d606c961fbd9895e860e196291944
['2b57031689114ac197b98bea9fb22889']
SelectorFactory.h : #ifndef __SELECTOR_FACTORY__H__ #define __SELECTOR_FACTORY__H__ #include <string> #include <map> class SelectorFactory { public: static void registerCreator(std<IP_ADDRESS>string& name,int value); static int createSelector(std<IP_ADDRESS>string selectorName); private: // !!!!!!!!! NOT PUBLIC!!! >:( static std<IP_ADDRESS>map<std<IP_ADDRESS>string,int> _creator; }; #endif // __SELECTOR_FACTORY__H__ SelectorFactory.cpp : #include "SelectorFactory.h" #include <iostream> std<IP_ADDRESS>map<std<IP_ADDRESS>string,int> SelectorFactory<IP_ADDRESS>_creator; void SelectorFactory<IP_ADDRESS>registerCreator(std<IP_ADDRESS>string& name,int value) { if(_creator.end() != _creator.find(name)) { std<IP_ADDRESS>cout << "Selector already registered \n"; } else { std<IP_ADDRESS>cout << "Entering " <<name<<" in register: \n"; _creator[name]=value; } } int SelectorFactory<IP_ADDRESS>createSelector(std<IP_ADDRESS>string selectorName) { std<IP_ADDRESS>map< std<IP_ADDRESS>string , int >::iterator mapIter=_creator.find(selectorName); if(mapIter==_creator.end()) { std<IP_ADDRESS><IP_ADDRESS>iterator mapIter=_creator.find(selectorName); if(mapIter==_creator.end()) { std::cout<<selectorName<<" Not found in the Map \n" ; return 0; } else { int selector= mapIter->second; return selector; } }
460e0976b136c9c2c84d5bb3c03d0c21010d161c41bf944117c455f23dfbb5c7
['2b5cd09aa92c4faa9a14f4a2e0e82380']
my code is here and my trying to signup user and if its already exits then dont insert data Call to undefined function mysqli() in C:\wamp\www\admin\admin\sign.php on line 10 Please help <?php session_start(); require 'db.php'; $x=$_POST['username']; $y=$_POST['password']; $z=$_POST['name']; $sql = mysqli("SELECT username FROM User WHERE username='$x'"); $result=mysqli_query($sql); if (mysqli_num_rows($query) != 0) { $sql ="INSERT INTO user(id, name, username, password) VALUES ('','$z','$x','$y')"; $_SESSION['username'] = $x; if ($conn->query($sql) === TRUE) { echo "New record created successfully" . $_SESSION['username']; header('location:admin2.php'); } else { echo "Error: " . $sql . "<br>" . $conn->error; } } else { echo "Username already exists"; } $conn->close(); ?>
54900e7b43f148486b18ff3fb07f49def1ca8f080b789a8fdf544289aef09713
['2b5cd09aa92c4faa9a14f4a2e0e82380']
i have two coulms in table one is name and lastname, and i have one input for search if i search full name with name and lastname then result is not available here is database structure and input code is <form class="form-inline" action="searchfrnd.php" method="GET"> <input style="margin-top:20px;" type="search" class="form-control" name="frnd_search" placeholder="Search your Friends"> </form> and php code is $frnd_name=$_GET['frnd_search']; $sql="select name,lastname,username,email from user where name='$frnd_name' or lastname='$frnd_name' or username='$frnd_name' "; $result = $conn->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { echo "".$row['name']." ".$row['lastname']."<br>"; }}
32c543c6fa17305c67b2c0603a3dcb4ef074ecf032a60e1886b5ac5bab640d03
['2b63cdc8d83c416fb5b4a0e6ca722dac']
I would use the DDMS shipped with ADT (also listed as Debug monitor) and choose the device and app, then click that camera icon. It creates very good looking screenshots. I also got some rendering errors with the emulator... It's best with actual devices. You can also try if other images/emulators perform better.
b15fb1d14dffe60e205e430f2ae9c261853cda1aa1544020b7c878bad29abc5b
['2b63cdc8d83c416fb5b4a0e6ca722dac']
My guess is that you have your android:name attribute hardcoded. Change it to a string resource. Example: android:name = "MyAppName" to android:name = "@string/app_name" with strings.xml <?xml version="1.0" encoding="utf-8"?> <resources> <string name="app_name">MyAppName</string> </resources> I guessed this (you didn't give us enough information to do more) because the resource ids in Android are ints, generated by aapt. More about the Manifest and String Resources. I don't know why that should be an issue to the Playstore though...
9b1e642242a8b85cfcb2059cc4b7a07742f3402edd4bd98c885496eb7f94dedb
['2b83568c5f4b41c685aea3843b3674fd']
The closest I can think of about this is using the class [MediaDownloader](https://developers.google.com/api-client-library/dotnet/guide/media_download#sample-code), I do not know what kind of downloads, but apart from that there is nothing in official libraries. Perhaps [this blog](https://forums.asp.net/t/1218116.aspx?Resume+Download+for+Huge+Files) may offer some interesting reading in that regard, but it is not related to any GCP specifics.
1a84ea4e4906e906a20ec47d50a18e172d1d8151f54bf817798617e26bf9d4f4
['2b83568c5f4b41c685aea3843b3674fd']
Check a few things: Did you enable Datastore API? If not, enable it here. Does your new project have an active application? You can activate your application by going to app Engine in your console and click on 'Create Application'. did you set your new project as active project? Use gcloud congif set project [PROJECT_ID] to set it right, then you can verify it using this: gcloud info | grep Project. Also, I believe this tutorial explains what you are looking for
3474223f4e13f2183e7901f6754e0f41656823332b041f395efc2066424be41d
['2b974224add44b4ebae6aaf1acf390a8']
This is quite a complicated command you have here! Let's break it down section by section. export This means that we are setting a variable to be used in other programs. PS1= The name of the variable is PS1. \e This is an escaped character. In bash (and most programming languages), Everything with a backslash before it is an escaped character. It is used for when you need to include a control character like a space, or the control key itself in a string. When it's escaped, bash treats it like it's part of the string, and not another control character. [ This is the start of an array. It's very similar to an array in a C program. ; This is an end character, it can mean several different things. Here, it's being used to define part of the array. There is some other stuff here, but it's mostly just data in the array. : This is a NOT operand. It is used to determine the inverse of something. ${debian_chroot:+($debian_chroot)} This is a variable. In bash, variables start with a $. It is using the variable debian_chroot and adding it to itself if it's not null. This command is just defining a variable, in this case an array containing information probably about a chroot with a debian install in it.
c3f4353a11ae200f4ecf7d208a0b3a014f33a3da0aea904c3ad23ae36d41d232
['2b974224add44b4ebae6aaf1acf390a8']
I have dictionaries nested in a list. The dictionaries are set up as follows: {'ID': 123, 'Balance': 45, 'Comments': None} I have multiple of these dictionaries in a list, so the list looks like this: [{'ID': 123, 'Balance': 45, 'Comments': None}, {'ID': 456, 'Balance': 78, 'Comments': None}] What I'm trying to do, is check to see if there is already a dictionary with the ID from the input in the list, and if there is, add the Balance from the input. Is there any readable pythonic way to do this?
109477097b1d6c1305b96a65ea6ae0fed37868e836a23084c3a2382f5d1baba8
['2b97a9812d084b02b4f2657f0a5c4411']
From Wikipedia: https://en.wikipedia.org/wiki/RAID RAID 0 consists of striping, without mirroring or parity. The capacity of a RAID 0 volume is the sum of the capacities of the disks in the set, the same as with a spanned volume. There is no added redundancy for handling disk failures, just as with a spanned volume. Thus, failure of one disk causes the loss of the entire RAID 0 volume, with reduced possibilities of data recovery when compared to a broken spanned volume. Striping distributes the contents of files roughly equally among all disks in the set, which makes concurrent read or write operations on the multiple disks almost inevitable and results in performance improvements. The concurrent operations make the throughput of most read and write operations equal to the throughput of one disk multiplied by the number of disks. Increased throughput is the big benefit of RAID 0 versus spanned volume. So, here's the short version... The RAID 0 that you just broke was your Windows install spread across both drives. In some corners, that's know as "deathwish raid", in that if anything happens to either drive, the entire raid is gone. The only benefit to this is(was) for drive seek times, which isn't so much a problem with an SSD. It's beyond me why any manufacturer would do this as it's very much do-at-your-own-risk. You didn't wipe that other drive yet, did you? If you're lucky, put everything back, and hope the raid is hardware and can rebuild itself.
2622fef6604d5ba4bacea44bb8e628f9ebf9cff120ead528a17a1b66c983c3e9
['2b97a9812d084b02b4f2657f0a5c4411']
This answer depends on Windows 10 being it's "factory fresh" self, and first login being done. I wouldn't recommend doing this on a machine that's already been in use for any significant amount of time and hasn't just been wiped. In the case of a new/freshly wiped machine, it would be a good idea to have something like Clonezilla/[some other cloning software] make a copy of the drive and keep that on a USB stick. Most cloning utilities can be made to ignore free space, so something like a 32gb USB stick should cover full uncompressed Windows install. That way, if something goes wrong, you already have a good copy of Windows with all the drivers preinstalled and the account already created. If you do this before installing anything, you'll have a stable, virus-free, guaranteed working copy of your machine ready to go if something goes wrong(HDD/SSD failure, ransomware/virus, [screwing up your partition when playing with disk utilities like DiskPart], ...). You end up copying the stick back onto the new(in case of a failure) drive, then expand the free space/make a new partition from the rest, depending on preference. Side note: If you have 2 512MB-1GB USB sticks sitting in a drawer, you could put Clonezilla on one, GParted on the other. Stick all 3 sticks in a baggie and that baggie now contains all of the tools you need to restore your system from nothing. (Some learning may be required, but Clonezilla/GParted aren't that hard to learn and are financially and legally free.) Add a USB stick with the pictures/movies/documents you can't afford to lose on it, and throw that in the baggie, then throw the baggie into one of those small fireproof safes and have another family member/friend/other person you trust take the safe home, and you also have a backup that's offsite(in case of Act of God). Hmmm....I need to go follow my own advice now...
942691335a2ada9db3c0444b8ddf1fe38fa6d37c8111bf409460245bd6d37f28
['2bae342c72cd4ac397b9d1648a974241']
$_SESSION['user'] must be set to your user's name/id so that when you try to read it the next time, you'd be able to identify that user. For example: login: $_SESSION['user'] = some_user_id; user area: $user = $_SESSION['user']; // extract the user from database, based on the $user variable // do something
861dbefb5631df5be10f75656ce67da1d572321f43b85160c4f0aec90ba5e033
['2bae342c72cd4ac397b9d1648a974241']
I have previously had apache2 installed, I upgraded to php5.5 and this broke my install so i tried to fix a few files. But that didnt work, I autoremoved apache but I still get this error when I try to install: /etc/init.d/apache2: 64: .: Can't open /etc/apache2/envvars /etc/init.d/apache2: 76: .: Can't open /etc/apache2/envvars ERROR: APACHE_PID_FILE needs to be defined in /etc/apache2/envvars invoke-rc.d: initscript apache2, action "restart" failed.
65b5fb20a443cfee01f7cd604bef464fd277817ba40ffda3f5dd35ecc2112ee7
['2baf9b7bb6f94065967f1a40803e4b36']
yeeeee ncdu is alright... but doesn't script in too well... It's fine for me, being on my end, but I am trying to break it down dummy style for a customer that literally doesn't want to do anything. lol so my goal is to get the breakdown to look pretty and send it to the customer in a pretty pink bow
df165d16165e67f8b7af9e35a11fd2a3823fe2b06b2787a6d6d7ce2bd96b6522
['2baf9b7bb6f94065967f1a40803e4b36']
I need to generate random undirected graphs with the following characteristics: 24 nodes mean degree ranging between 1 and 23 mean edge weight ranging between 1 and 5 (weights must be integers) I have tried using the python module networkx's expected_degree_graph, but I am not getting anything near the desired result. I tried the example at the bottom of that doc page... >>> z=[10 for i in range(100)] >>> G=nx.expected_degree_graph(z) ...but I just get mostly disconnected graphs: >>> G.degree() DegreeView({0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0, 16: 0, 17: 0, 18: 0, 19: 0, 20: 0, 21: 0, 22: 0, 23: 0, 24: 0, 25: 0, 26: 0, 27: 0, 28: 0, 29: 0, 30: 0, 31: 0, 32: 0, 33: 0, 34: 0, 35: 0, 36: 0, 37: 0, 38: 0, 39: 0, 40: 0, 41: 0, 42: 0, 43: 0, 44: 0, 45: 0, 46: 0, 47: 0, 48: 0, 49: 0, 50: 0, 51: 0, 52: 0, 53: 0, 54: 0, 55: 0, 56: 0, 57: 0, 58: 0, 59: 0, 60: 0, 61: 0, 62: 0, 63: 0, 64: 0, 65: 0, 66: 0, 67: 0, 68: 0, 69: 0, 70: 0, 71: 0, 72: 0, 73: 0, 74: 0, 75: 0, 76: 0, 77: 0, 78: 0, 79: 0, 80: 0, 81: 0, 82: 0, 83: 0, 84: 0, 85: 0, 86: 0, 87: 0, 88: 0, 89: 0, 90: 0, 91: 0, 92: 0, 93: 0, 94: 0, 95: 0, 96: 0, 97: 0, 98: 0, 99: 0, 100: 2}) I prefer solutions using python, but I'll take anything.
45a09b1ea272b2d1debd0527194fcdcb9ef2200436f377d76b3241ea28a94217
['2bbbee2639b6436b8115b1a751d3e3de']
The 'why' is that in Microsoft Windows 2003 they extended their directory implementation to include forcing workstations to reset their passwords every 30 days or so. I know it well, it broke a lot of SAMBA installs I was maintaining at the time. Normally this password reset is all automatic, but I've seen many, many cases when this design just doesnt work. When I turn off a notebook for a while, then try and login with a non-cached account, I immediately receive that error message no matter which post-2000 Microsoft OS I use. So the easiest way to keep a network working transparently in this fail-mode designed situation is to modify or turn off that policy setting on the Domain level: Group Policies/Windows Settings/Security Settings/Local Policies/Security Options, then look for: Domain member: Maximum machine account password age Domain member: Disable machine account password changes I hope this helps.
0c4040deb88b2241b0bbdb60e0bb9bb5862a5856e496b33256491971ac0f660c
['2bbbee2639b6436b8115b1a751d3e3de']
I was using "/usr/bin/konsole". The $TERM variable was set to "Linux" for this. htop did not work in this case. When htop was invoked from "/usr/bin/gnome-terminal", it worked fine, the $TERM variable was set to "xterm" in this case. So when I changed the $TERM to "xterm" from "Linux" for "konsole", it worked. Running: Linux {hostName} 2.6.32-754.6.3.el6.x86_64 #1 SMP Tue Oct 9 17:27:49 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux When htop failed, $XTERM was set to "Linux", the last lines in my strace were as following (in case it is useful): stat("/dev/vc/0", 0x7ffffaff2710) = -1 ENOENT (No such file or directory) stat("/dev/tty0", {st_mode=S_IFCHR|0620, st_rdev=makedev(4, 0), ...}) = 0 getpid() = 88481 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig -icanon -echo ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/61", 4095) = 11 open("/dev/pts/61", O_WRONLY) = 3 ioctl(3, TIOCGWINSZ, {ws_row=55, ws_col=228, ws_xpixel=0, ws_ypixel=0}) = 0 socket(PF_LOCAL, SOCK_STREAM, 0) = 4 connect(4, {sa_family=AF_LOCAL, sun_path="/dev/gpmctl"}, 13
5ac4d4cc04aaaca972b7852bf4f503e70071defdef95e40fa56fb7581642ffa9
['2bc71135fbd74d149fa5417671df3b18']
Let $X_1,...,X_n$ be a sample from a distribution having as a p.d.f: $f(x) = \frac1{\theta} e^{-x/\theta}, x,\theta > 0$ and $0$ elsewhere. The maximum likelihood estimator of $\theta$ is $\bar{X}=\sum_{i=1}^n X_i /n$. Why isn't the maximum likelihood estimator of $\theta^2$ just $\bar{X} ^2$? Why does it have to be the variance? The distribution is exponential with parameter $\theta$ so the variance is $\theta^2$ I understand that. But why doesn't it make sense to take $\bar{X} ^2$ as the m.l.e of $\theta^2$?
3b92618117666a781cef2e22ae106c31883523a9c5b781106fb7963a8b307a7c
['2bc71135fbd74d149fa5417671df3b18']
Let's suppose that we have two normal distributions, and a sample is taken from each (of sizes $n_X$ and $n_Y$ respectively). $X \rightarrow N(\mu_X, \sigma_X ^2), Y \rightarrow N(\mu_Y, \sigma_Y ^2)$. We want to test: $H_0$: "$\sigma_X ^2= \sigma_Y ^2$" against $H_1$: "$\sigma_X ^2 \neq \sigma_Y ^2$". Depending on whether $S_X ^2 > S_Y ^2$ or otherwise, we take the decision variable as (supposing the former case): $$F = \frac{S_X ^2}{S_Y ^2} \rightarrow \operatorname{Fischer}(\nu_1 = n_X -1, \nu_2 = n_Y - 1)$$ Everything is fine until here (though I'm not quite sure if this is the correct formula). Anyhow, how would I find the critical region? Supposing that the risk is $\alpha$.
71fbc5d3ffc250d1d27c59533e09996df3fe62d77efe8f0419f15293494b40d4
['2bd20c6abe6e4625a55442fa129173dc']
I am trying to install pygobject for python 2.7 in pycharm for the purpose of using gstreamer. However I am having problems installing it. While in the virtual environment, if I use pip install pygobject Then the build fails and gives me this error gi/gimodule.c:25:10: fatal error: 'glib-object.h' file not found #include <glib-object.h> ^~~~~~~~~~~~~~~ 1 error generated. error: command 'cc' failed with exit status 1 full error log here I know for a fact that glib exists on my system from searching for it with find /usr -name glib-object.h but for some reason the install can't find it. Do I have to link it in somehow/how do I go about doing this? Also I know I can more successfully use this library with python3 but that caused some weird system errors that can apparently be resolved by using 2.7 so I am just exploring that at the moment.
0e6fe970acbe2e23243ded512c737a88cedf76ec1112b11cd210e442e42cced6
['2bd20c6abe6e4625a55442fa129173dc']
I am trying to add curl into my project on codeblocks (windows 10). I have linked the .a files from libcurl in my linker settings, and I added the include file in my search directories. However, when I try to run the sample code #include <stdio.h> #include <iostream> #include <json.hpp> #include <curl/curl.h> using namespace std; int main() { CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* example.com is redirected, so we tell libcurl to follow redirection */ curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); /* Perform the request, res will get the return code */ res = curl_easy_perform(curl); /* Check for errors */ if(res != CURLE_OK) fprintf(stderr, "curl_easy_perform() failed: %s\n", curl_easy_strerror(res)); /* always cleanup */ curl_easy_cleanup(curl); } return 0; } But Im still getting a bunch of errors (dont mind my user name) ||=== Build: Debug in LeagueAssistant (compiler: GNU GCC Compiler) ===| obj\Debug\main.o||In function `main':| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|13|undefined reference to `_imp__curl_easy_init'| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|15|undefined reference to `_imp__curl_easy_setopt'| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|17|undefined reference to `_imp__curl_easy_setopt'| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|20|undefined reference to `_imp__curl_easy_perform'| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|23|undefined reference to `_imp__curl_easy_strerror'| C:\Users\THE YUNG T-SCAGS\Desktop\programming projects\LeagueAssistant\main.cpp|27|undefined reference to `_imp__curl_easy_cleanup'| ||error: ld returned 1 exit status| ||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===| Anyone have any idea what could be going wrong?
f22a1a375212e4d48826638ccf48c860e2cb54ce206715326b15044933317625
['2bdb0df2614848f8b8d113fc1fe77ea3']
I want to boot a cd from my mac on startup. I believe this is done by holding down "c" with the CD in the drive. However, my trackpad is broken. The mouse button is permanently pushed down. This ejects the CD on startup. I tried plugging in an external mouse, but that didn't help.
38b958d52dca96a4c6e2c0461e54b8c11818dfc999d964b0f7dbf32f77540cfe
['2bdb0df2614848f8b8d113fc1fe77ea3']
I am using IEEE bare_conf latex template and I want to write particular variable names or values such as the word "eqnarray" in figure below in the middle of a paragraph. Are there standardized fonts, commands for this? I see that the IEEEtran_HOWTO guide itself is using different font for these kind of stuff but I can't figure out what produces that.
3f2c8cbd2635cd89af90a57ed925921349bd1244093d3ac8517aafd4a71beca6
['2bdde3e1e310469c91032874b2853343']
I had similar problem, I solved creating a function that returns an SSL context using a keystore coming from and input stream. protected SSLContext getSslCtx(InputStream is, String password) { try { // Load keystore KeyStore keystore = KeyStore.getInstance("JKS"); keystore.load(is, password.toCharArray()); // Load trust manager TrustManagerFactory trustMgrFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); trustMgrFactory.init(keystore); // Load key manager KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); keyMgrFactory.init(keystore, password.toCharArray()); // Create SSL context SSLContext ctx = SSLContext.getInstance("TLSv1.2"); ctx.init(keyMgrFactory.getKeyManagers(), trustMgrFactory.getTrustManagers(), null); return ctx; } catch (Exception e) { e.printStackTrace(); } return null; } Hope this helps.
9fcce23d4fd7f5ed766bcfa5e9a544e67f42a45a04d3eaa9cf69b8095a3d75a9
['2bdde3e1e310469c91032874b2853343']
I'm trying to use Freemarker GAE on Android without success (same code runs on a PC). I found this 4 years old thread: use-freemarker-library-in-android As described on the thread the problem relies on the fact that Android misses java.beans implementation. Did somebody manage to run it on Android? How? What is the purpose of the GAE version of the library, it's this the branch meant to run on Android? Thanks
e5de0bbd441b3b841a7d096411f6159c4a09403cb811cc5ad4bbd20b04fa37c5
['2be094479f54414bb10c448ef39aad30']
I know this question has been asked before but I really couldn't find anything that would suit my needs..So I want develop a 2d game that is something like Draw Something. the game is not really heavy on graphics or anything like that so what is the best Development enviroment for my game thanks
1b511eda82ec7162b22f8415d71ebe474df7fefe89960eaf93bb2ac1eb552a59
['2be094479f54414bb10c448ef39aad30']
I am developing a game for the iOS devices where the application will fetch data from a database (messages). I want the application to update to just to notify the user when there is a new message (and only when the user is in the application or when it is running). What is the best approach to this problem? I was thinking of checking with the server for new messages every 2 minutes, however I don't know how efficient that is. Please let me know if there is a better approach to this or the one I am thinking of is just fine thanks
c66a89909660f2deaec444190676defcec3966ceacc3302291ebacb3ab289a34
['2bea7ac360b548b583951c1f55ca5f48']
it could be a token provision issue: dappTokenSale contract address doesn't have any DAPP token being provisioned yet, which results to this following line of code failed in DappTokenSale.sol file require(tokenContract.balanceOf(this) >= _numberOfTokens); you can go to truffle console to check if this is the case: type truffle console in the terminal type this in the truffle console, DappToken.deployed().then(function(instance) { return instance.balanceOf(tokenSaleAddress) }) where tokenSaleAddress is displayed when you run truffle migrate --reset To provision Dapp token, type this in truffle console:DappToken.deployed().then(function(instance) { instance.transfer(tokenSaleAddress, 750000, { from:admin }) }), where admin is the 1st account in Ganche, assuming you are going to provision 750000 out of 1000000 to the tokenSaleAddress
5fa9871379cf27767144e1dd03beb2af289e3ca68bcedf506fdf5df5aec25716
['2bea7ac360b548b583951c1f55ca5f48']
Your experiment should look something like this: The effect of temperature on photosynthetic rate of Elodea (pondweed). I assume you used Elodea canadensis for your test. Maybe the plant is already a bit "exhausted" - try to take a different branch. Or maybe it needs more time to get used to the new temperature.
79ebbb25c8504cb987ad94c5a0beed8b673eef5efba5286086b600db6bb72257
['2bf265f9bd4a43ea9097c384a40169c5']
I am trying access a variable defined in a C++ header file in Objective-C.Its always returning 0. I do not have any ways to alter the CPP header since its a third party library. I would like to know how I can access the methods and variables in the header file. Any sample or reference will be helpful.
4d97ffb3971730529467ed2898c5326553b5aae46477132740bf3efa76f0b13f
['2bf265f9bd4a43ea9097c384a40169c5']
I would like to set the content offset in the scrollview so that it doesn't scroll beyond the last button in the scrollview. Now its scroll even beyond that and thats not a good UI. I would like to know how we can limit the content offset based on the elements in the screen.
d394044a06ea814d9aa4420d3b1b844d9438ea5eb2e657ea3e562282f77e6d35
['2c074f38cb9b46c68d3476adef8fdbf6']
I know "omnibus" to be a term describing multiple novels put into a single book, but I've never really heard or read the term anywhere else. Because of this, I'm curious: how widely used is the term "omnibus?" Context: I am writing a piece where I am considering the use of the word, but am unsure of whether I should use it because it may be archaic, obsolete, or just not widely used.
1c5d520170205171bdcd5e72f7891c0a6576d74849dd2f0f7e882ee5480dc1b8
['2c074f38cb9b46c68d3476adef8fdbf6']
Thanks for the reply <PERSON>. I've found over the months that it's pretty sporadic, but tends to happen with plugins that use EDD's Software Licensing, which I believe use WP's normal techniques for updates. It's happened everywhere I've used WP-CLI (local dev, a few different servers).
8e41168289eb5f86190012b50a7b629937726bf1cc70fd01afd389238fd7e942
['2c0ca0578c874494be48569a8dbe4563']
Before asking this question, I assure you I spent 2 days researching this topic on the Internet. As I failed to find a concrete answer, I am taking this question here. I am new to data science, and I am working on my first class imbalance project. I am trying to build models that do well at predicting which customers are likely to not show up for their scheduled appointment. In my dataset, "1s" are people who did not show up, and "0s" are people who showed up. My y_test contains 1831 instances of "0" and 455 instances of "1". My class of interest is 19.9% of total y_test count. I scaled my data and using scaled dataset to evaluate performance of KNN. I learned that KNeighborsClassifier has argument "weights". Its default value will not help me with my heavy class imbalance. By using 'distance' option, it only slightly improves confusion matrix and F1 score, but becomes heavily overfit. I notice that there is another option called [callable]. I read about it on scikit-learn.org and did additional research, but struggle to understand how I can use it to inform my KNN of class imbalance and class imbalance ratio (for example, like I was able to do for Logistic Regression). Given my beginner's ML knowledge, "weights" argument seems to be the only argument to give me a chance to inform KNN of the class imbalance I am dealing with. Do you know how I can effectively use this argument to make KNN more knowledgeable of class imbalance? Documentation is not very descriptive on it, and Internet library is not rich on adjusting KNN for class imbalance. Therefore, I am reaching out here to see if someone has experience adjusting KNN for class imbalance, and how to do that effectively. Thank you for helping me learn!
c7f0b0e42b77e4cf37817a1ad0ef8bc1e230c9dd2c5b3ebbd603795b4d37f28e
['2c0ca0578c874494be48569a8dbe4563']
As an aspiring data scientist, I am currently learning to work with time series and just finished learning window functions. It is clear to me that rolling window functions help compute a moving metric, such as average or sum, of time series data. However, I am struggling to understand the computational logic behind rolling window functions that use 'D' as part of the input. Below is the example: I have the following dataset: import pandas as pd df = pd.read_csv('https://raw.githubusercontent.com/Arsik36/StO/master/yahoo.csv', parse_dates = ['date'], index_col = 'date') df.head() From the output in your environment, you will see dataset contains date column as the index and then corresponding values. The logic is perfectly clear to me when I set window = 5, such as below: df['window_5'] = df.rolling(window = 5).mean() df The new column creates several NaN rows at first, and then computes the mean of the last 5 dates, crystal clear. However, when I specify the window argument to be '5D' - 5 calendar days - the new column does not produce NaN values at the beginning. df['window_5D'] = df['price'].rolling(window = '5D').mean() df Through my own analysis, I realize that the value in the first row of 'window_5D' column is the mean of first column in 'price', the value in the second row of 'window_5D' column is the mean of first 2 rows of 'price' column, and so on. What I don't understand is why are computations done this way, if I specify the window of size '5D'? The dataset I included includes Yahoo stock prices. On weekends, price remains the same. So, in my mind, '5D' should create the same first several NaN values as if I specify window = 5, but unlike window = 5, window = 5D would also assume that on weekends price stayed the same as on Friday, and would take that into account when computing mean. window = '5D' concept is what I am confused about, and I thank you in advance in helping me understand the logic behind this computation given my confusions with the scenario above.
fa29194f4e541d6887ba50129db389e9d71120af37b456909c53a9909fb10eb0
['2c0db01450204ea68690bf3f9c9c62dc']
I had some logic in the mounted() method before I started using <keep-alive>. For instance: document.title = this.title. Now the title changes upon the first load only. I could listen for route changes, but it won't work when you land on the page. What is the proper way to detect loading of another component in <keep-alive>?
0ae46163579e8b1cdcf17f88f1df49b1f725fd9e2a8ddb06ef8babd963ae88ca
['2c0db01450204ea68690bf3f9c9c62dc']
It's working properly on local server, but when I upload it to the shared host, instead of displaying relative date it shows raw string. code: Yii<IP_ADDRESS>$app->formatter->asRelativeTime($timestamp, 'now'); local host: in 6 days shared host: in {delta, plural, =1{a day} other{# days}} Locale is set and timestamp is being passed. Intl extension is enabled. Other formatter functions (i.e. asDate) are working properly.
d956f996de6a7d120c121600685003924a1b42bb6d251ba7167066ed41435df5
['2c2a27bf70e0415c9f3185a7dfb14be2']
My requirement might be very basic, but i'm new to DNN technology. google search doesn't help me. I have millions of users in sql server with all details like password firstname, lastname, .... I just want to move these users to DNN database. What is the best way for that ? It can be any stored procedure calling or I can write console application for that. I created console application, but it is saying nullreference error, as it is a console application and unable to read site configuration, is there a way to manually set the configurations? I am using latest version of DNN software and .NET 4.0. c#
a462938931a768efe114fee492e9908c47a6166d832563b6d83fd13311af6d7d
['2c2a27bf70e0415c9f3185a7dfb14be2']
I am following this article. http://www.codeproject.com/Articles/23768/Load-and-Display-Page-Contents-Asynchronously-with I have a usercontrol with some javascript codes. Lets say there is a method called alertMe(msg) in javascript. And i am calling this from c#. It is not calling. i am using this.page.clientscript.registerscriptblock function. Even the javascript is not rendered in the page. I did check it by pressing F12 in chrome browser and went to console and typed the method name, it said undefined. Will javascript not rendered in page when we use renderControl method While asynchronosly loading user controls, what is the way to call javascript methods from c#.
79490c8889f78c6fffd1d34aa96e0a2cd2486361f95167bc26161e083c957e1b
['2c6697e5f5da4aadb212c8b7d50ab008']
I'm new to Sqlite3. I'm using the C++ interface, specifically the amalgamation. The database is being created in a tmp folder with rw permissions, specifically 0x644. When I go to write the table, I get the error SQLITE_IOERR_LOCK (3850). I'm running on QNX os. What can I do to resolve this? Thanks! bool myApp<IP_ADDRESS>Start() { bool retVal = false; int rc, ret; char sql [] = "CREATE TABLE IF NOT EXISTS ZPL_CMDS(" \ "id INT PRIMARY KEY NOT NULL," \ "myCount INT NOT NULL );" ; char *zErrMsg = 0; // initialize engine if (SQLITE_OK != (ret = sqlite3_initialize())) { printf("Failed to initialize library: %d\n", ret); } else { printf("SQLITE3 library Initialized!\n"); } rc = sqlite3_open("/tmp/zplCmd.db", &db); if(!sqlite3_extended_result_codes(db, 1)) { printf("SQLITE3: extended result codes turned ONs\n"); } else { printf("SQLITE3: extended result codes turned OFF\n"); } if( rc ){ printf("Can't open database: %s\n", sqlite3_errmsg(db)); return(0); }else{ printf("Opened database successfully: %s\n", sqlite3_errmsg(db)); } /* write tables */ rc = sqlite3_exec(db, sql, NULL, 0, NULL); // <-- my code fails here if( rc != SQLITE_OK ){ printf("SQL error: %s, %d\n", sqlite3_errmsg(db), rc); sqlite3_free(zErrMsg); } else { printf("Table created successfully\n"); } return retVal; }
4b2ad123a07c9484dd86c6e113043d0bb8c860fa689d30057ad6d1ccdbba119d
['2c6697e5f5da4aadb212c8b7d50ab008']
I'm on ubuntu 16.04. I'm running git version 2.26.2 and curl version 7.47.0. I keep getting the error the the cert file is gone, but I go to that directory and the file is there. Also I've tried updating my certificates, but it won't download anything new. I'm trying to pull the latest hyperledger Fabric code using the command: curl -sSL https://raw.githubusercontent.com/hyperledger/fabric/master/scripts/bootstrap.sh | bash -s Thank you.
81458569768c4af52552ffb1bb1d4959d1aad58709e799b49a4ef258e7bf08e8
['2c75c3c5d9914f588e8359c4e7ac5442']
Neither answer directly addresses the question posed: What is wrong with the reasoning proposed? Here it is: In order to apply the "ratio" formula (nr. of favorable possibilities divided by total nr. of possibilities), those possibilities need to be equally likely, but this is not the case. Each of the 2C(2n-k, n) possibilities has a probability of (1/2)^(2n-k+1) to occur (n draws from one pocket, n-k from the other, one last from the first), which depends on k. user76844 alludes to this in a comment to his answer: "Also, you are assuming that each possibility has the same probability (implicit in your use of strictly counting methods), whereas it is more likely that k will be near n than near 0..you didn't correct for the probability of a given k...its not a simple counting exercise."
9b992b776035cc51cce6cc7be0ef8360d5be9b84d775ce5d93c56c236c7d23b1
['2c75c3c5d9914f588e8359c4e7ac5442']
<PERSON> a better question is: how much calories can I get from using the land required to grow the grain and to raise the cow that eats the grain. Because, if you are not going to feed it to the cow, why are you growing forage in the first place?
5905be2293352141d41158cd9d1645064be69be7de64f552c6e66055d43df661
['2c798c077d3142efbed27a80811f98b3']
Most of these overlays/walkthroughs can be accomplished by adding a subview to the main window of your app. There are some edge cases to take into account, but for the most part, you need to simply grab a reference to the key window with UIWindow* keyWindow; keyWindow = [UIApplication sharedApplication].keyWindow; You then would add your overlay view as a subview with: [keyWindow addSubview:anOverlayView]; Handling taps to dismiss the overlay can be done with a tap gesture recognizer.
48972ae55278c4e03a3a1631b2d83fde0af58e5516c22e8072b93b77eb88fce4
['2c798c077d3142efbed27a80811f98b3']
A UITabBarController inherits from UIViewController so by that, as your code shows, it is possible to push one onto a navigation stack, however Apple does not typically recommend it. From the Apple iOS Human Interface Guidelines: In general, use a tab bar to organize information at the application level. A tab bar is well-suited for use in the main app view because it’s a good way to flatten your information hierarchy and provide access to several peer information categories or modes at one time. Of course, there are always exceptions to the rule, so I would recommend that you use your best judgement and decide what is best for the user.
de09c93815bfc538992e99fb89d7ea82d4d2bba82782386485cd02b0ecd598cb
['2c8799c24cd04d968c0875d11875491a']
<PERSON>, thanks again for your help. So, per the above, how much hill-climbing ability "loss" might I feel on the Treadway? Meaning going from a 28/28 low gear to 38/32, will I struggle a great deal more? This is considering I don't get in better cycling shape, which I plan to do! I might add that because I have such short legs on the Marin, I have been keeping the seat down a bit too low and I know that adversely affects hill-climbing so with the Treadway I will practice with a higher seat.
f6a1da9b5319535976e2a3a397ef8edb7fda5d29abeadc069225b90eaf3f6b96
['2c8799c24cd04d968c0875d11875491a']
I sometimes encounter this message when I input some commands in the terminal. Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated. please move it to /home/ethiojob/.config/fontconfig/fonts.conf manually What's the message about, and how do I fix it so that it doesn't appear again? I'm not sure if I should simply cut out the 14th line and paste it in the second file, or cut-paste the whole file together.
c6d1480126ed2409add6dba6476d3c009f3435df0fdea8ad7da1e8e4ecc9f421
['2c8a406997434ec09cc3ec0129b4e0ed']
I'm trying to plot a graph that has two-line labels on its xticks. I cannot reduce the font anymore because it becomes unreadable (the plot is part of a 2x2 multiplot). The problem is that the separation between the two lines in a label is too big, so that they become too close to the labels of the next columns. I would like to reduce the interline spacing so that the lines of a label become closer between them, but further to the lines of the other labels. I've thought about placing the labels manually (using a function to compute the position of each line), but before doing it I would like to know if someone has a simpler solution. Thanks a lot! I'm using "gnuplot 4.6 patchlevel 4" on Ubuntu 14. The folowing is a MWE: # Requires gnuplot >= 4.6 set terminal pdf color solid font "Helvetica, 10" enhanced size 4, 3.72 set output 'mwe.pdf' set border 3 lc rgb "#000000" set bmargin 9 set ylabel offset -1 TicksFont = ", 10" Title2Font = ", 14" set yrange[0:180 < * ] set format y "%.0f%%" set xtics out scale 0, 0 nomirror rotate by 90 right offset 0,0 font TicksFont set ytics out nomirror font TicksFont unset key set datafile separator ";" set style fill transparent solid 1.0 border -1 set style data boxes set boxwidth 1.0 #Bottom-left plot set title "C) Third (sub)plot" font Title2Font plot '-' using ($0):2:(0xFF8080):xtic(1) notitle lc rgb variable # Label; Value 01. Aaaaa:\nAaaaaaaaa(AA); 100 02. Bbbbb:\nBbbbbbbbbbbb(BB); 20 03. Ccccc: Ccccccc(Ccc),\nCccccccc(CCC); 30 04. Dddd: DDDD,\nDDDDDDDDDDDD(DD); 40 ;NaN 01. Aaaaa:\nAaaaaaaaa(AA); 100 02. Bbbbb:\nBbbbbbbbbbbb(BB); 20 03. A single-liner; 30 04. Dddd: DDDD,\nDDDDDDDDDDDD(DD); 40 ;NaN 01. Aaaaa:\nAaaaaaaaa(AA); 100 02. Bbbbb:\nBbbbbbbbbbbb(BB); 20 03. A single-liner; 30 04. Dddd: DDDD,\nDDDDDDDDDDDD(DD); 40 05. Eeee: EEEE,\nEEEEEEEEEEEE(EE); 50 end;
11cbabbe022f256e485f00993062a3d6227fbc91c2a66c6a30c319486eaf4893
['2c8a406997434ec09cc3ec0129b4e0ed']
I'm evaluating to port a device driver I wrote several years ago from 32 to 64 bits. The physical device is a 32-bit PCI card. That is, the device is 32 bits but I need to access it from Win7x64. The device presents some registers to the Windows world and then performs heavy bus master data transferring into a chunk of driver-allocated memory. I've read in the Microsoft documentation that you can signal whether the driver supports 64-bit DMA or not. If it doesn't, then the DMA is double buffered. However, I'm not sure if this is the case. My driver would/could be a full 64-bit one, so it could support 64-bit addresses in the processor address space, but the actual physical device WON'T support it. In fact, the device BARs must be mapped under 4 GB and the device must get a PC RAM address to perform bus master below 4 GB. Does this mean that my driver will go through double buffering always? This is a very performance-sensitive process and the double buffering could prevent the whole system from working. Of course, designing a new 64-bit PCI (or PCI-E) board is out of question. Anybody could give me some resources for this process (apart from MS pages)? Thanks a lot!
f7f7c2147c516bb49475896f9e0bfddfdef49b519843b96f3c83fb6358f9c0ef
['2c8c928b7e7748d9b91bc7d4bce0fad4']
I got an error when I downloaded the fabric samples. The command I used to download the latest fabric samples. The error is pathspec 'v2.0.0' did not match any file(s) known to git I am not familar with git and I've searched on the internet but didn't get the idea. Hope you guys give me a help. Thanks!!!
23e8705c248e3c0ee601430ddfe9bb705f2a2d7f6b8f6b97566dc0ff5d6c677b
['2c8c928b7e7748d9b91bc7d4bce0fad4']
Hi~ I am playing with the first-network sample. But when I try to run the command ./byfn.sh up -l node, I always get the error returned from logs as below. Instantiating chaincode on peer0.org2... + peer chaincode instantiate -o orderer.example.com:7050 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n mycc -l node -v 1.0 -c '{"Args":["init","a","100","b","200"]}' -P 'AND ('\''Org1MSP.peer'\'','\''Org2MSP.peer'\'')' + res=1 + set +x 2020-03-24 08:23:43.975 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc 2020-03-24 08:23:43.975 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc Error: could not assemble transaction, err proposal response was not successful, error code 500, msg timeout expired while starting chaincode mycc:1.0 for transaction !!!!!!!!!!!!!!! Chaincode instantiation on peer0.org2 on channel 'mychannel' failed !!!!!!!!!!!!!!!! ========= ERROR !!! FAILED to execute End-2-End Scenario =========== ERROR !!!! Test failed The logs about peer0.org2.example.com docker container: 2020-03-24 08:23:19.735 UTC [nodeCmd] serve -> INFO 001 Starting peer: Version: 1.4.4 Commit SHA: 7917a40 Go version: go1.12.12 OS/Arch: linux/amd64 Chaincode: Base Image Version: 0.4.18 Base Docker Namespace: hyperledger Base Docker Label: org.hyperledger.fabric Docker Namespace: hyperledger 2020-03-24 08:23:19.740 UTC [ledgermgmt] initialize -> INFO 002 Initializing ledger mgmt 2020-03-24 08:23:19.740 UTC [kvledger] NewProvider -> INFO 003 Initializing ledger provider 2020-03-24 08:23:19.891 UTC [kvledger] NewProvider -> INFO 004 ledger provider Initialized 2020-03-24 08:23:20.130 UTC [ledgermgmt] initialize -> INFO 005 ledger mgmt initialized 2020-03-24 08:23:20.130 UTC [peer] func1 -> INFO 006 Auto-detected peer address: 172.19.0.6:9051 2020-03-24 08:23:20.130 UTC [peer] func1 -> INFO 007 Returning peer0.org2.example.com:9051 2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 008 Auto-detected peer address: 172.19.0.6:9051 2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 009 Returning peer0.org2.example.com:9051 2020-03-24 08:23:20.135 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled 2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer0.org2.example.com 2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer0.org2.example.com:9052 2020-03-24 08:23:20.145 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled 2020-03-24 08:23:20.153 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer0.org2.example.com:9051 and bootstrap set [peer1.org2.example.com:10051] 2020-03-24 08:23:20.163 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer0.org2.example.com:9051, InternalEndpoint: peer0.org2.example.com:9051, PKI-ID: c4e87a76098ec5decb4b47d1904021bdcea0fbd290f68af4ade352b0b22b0151, Metadata: 2020-03-24 08:23:20.163 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer0.org2.example.com:9051 started 2020-03-24 08:23:20.164 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-03-24 08:23:20.165 UTC [cscc] Init -> INFO 015 Init CSCC 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-03-24 08:23:20.165 UTC [qscc] Init -> INFO 017 Init QSCC 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2020-03-24 08:23:20.165 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes 2020-03-24 08:23:20.168 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 2020-03-24 08:23:20.168 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated 2020-03-24 08:23:20.168 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060 2020-03-24 08:23:20.169 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains] 2020-03-24 08:23:20.169 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights 2020-03-24 08:23:20.170 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting 2020-03-24 08:23:20.170 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded 2020-03-24 08:23:21.673 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.673Z grpc.peer_address=<IP_ADDRESS>:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=101.985µs 2020-03-24 08:23:21.682 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:31.68Z grpc.peer_address=<IP_ADDRESS>:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.417798ms 2020-03-24 08:23:21.714 UTC [comm.grpc.server] 1 -> INFO 026 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.714Z grpc.peer_address=<IP_ADDRESS>:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=85.978µs 2020-03-24 08:23:22.955 UTC [comm.grpc.server] 1 -> INFO 027 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.peer_address=<IP_ADDRESS>:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error=EOF grpc.code=Unknown grpc.call_duration=1.240576335s 2020-03-24 08:23:30.812 UTC [endorser] callChaincode -> INFO 028 [][28c2fa0d] Entry chaincode: name:"cscc" 2020-03-24 08:23:30.814 UTC [ledgermgmt] CreateLedger -> INFO 029 Creating ledger [mychannel] with genesis block 2020-03-24 08:23:30.829 UTC [fsblkstorage] newBlockfileMgr -> INFO 02a Getting block information from block storage 2020-03-24 08:23:30.849 UTC [kvledger] CommitWithPvtData -> INFO 02b [mychannel] Committed block [0] with 1 transaction(s) in 13ms (state_validation=1ms block_and_pvtdata_commit=7ms state_commit=1ms) commitHash=[] 2020-03-24 08:23:30.851 UTC [ledgermgmt] CreateLedger -> INFO 02c Created ledger [mychannel] with genesis block 2020-03-24 08:23:30.855 UTC [gossip.gossip] JoinChan -> INFO 02d Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:30.855 UTC [gossip.gossip] learnAnchorPeers -> INFO 02e No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:30.856 UTC [gossip.gossip] learnAnchorPeers -> INFO 02f No configured anchor peers of Org1MSP for channel mychannel to learn about 2020-03-24 08:23:30.880 UTC [gossip.state] NewGossipStateProvider -> INFO 030 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1 2020-03-24 08:23:30.883 UTC [sccapi] deploySysCC -> INFO 031 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-03-24 08:23:30.883 UTC [cscc] Init -> INFO 032 Init CSCC 2020-03-24 08:23:30.884 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-03-24 08:23:30.884 UTC [qscc] Init -> INFO 034 Init QSCC 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 035 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 036 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2020-03-24 08:23:30.885 UTC [endorser] callChaincode -> INFO 037 [][28c2fa0d] Exit chaincode: name:"cscc" (73ms) 2020-03-24 08:23:30.886 UTC [comm.grpc.server] 1 -> INFO 038 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53176 grpc.code=OK grpc.call_duration=84.780123ms 2020-03-24 08:23:35.856 UTC [gossip.channel] reportMembershipChanges -> INFO 039 Membership view has changed. peers went online: [[peer1.org2.example.com:10051]] , current view: [[peer1.org2.example.com:10051]] 2020-03-24 08:23:40.217 UTC [gossip.privdata] StoreBlock -> INFO 03a [mychannel] Received block [1] from buffer 2020-03-24 08:23:40.226 UTC [gossip.gossip] JoinChan -> INFO 03b Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03c Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03d No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:40.237 UTC [gossip.service] updateEndpoints -> WARN 03e Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.245 UTC [committer.txvalidator] Validate -> INFO 03f [mychannel] Validated block [1] in 27ms 2020-03-24 08:23:40.285 UTC [kvledger] CommitWithPvtData -> INFO 040 [mychannel] Committed block [1] with 1 transaction(s) in 38ms (state_validation=1ms block_and_pvtdata_commit=29ms state_commit=5ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254] 2020-03-24 08:23:40.563 UTC [gossip.privdata] StoreBlock -> INFO 041 [mychannel] Received block [2] from buffer 2020-03-24 08:23:40.571 UTC [gossip.gossip] JoinChan -> INFO 042 Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 043 Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 044 Learning about the configured anchor peers of Org2MSP for channel mychannel : [{peer0.org2.example.com 9051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 045 Anchor peer with same endpoint, skipping connecting to myself 2020-03-24 08:23:40.571 UTC [gossip.service] updateEndpoints -> WARN 046 Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.574 UTC [committer.txvalidator] Validate -> INFO 047 [mychannel] Validated block [2] in 11ms 2020-03-24 08:23:40.600 UTC [kvledger] CommitWithPvtData -> INFO 048 [mychannel] Committed block [2] with 1 transaction(s) in 25ms (state_validation=0ms block_and_pvtdata_commit=18ms state_commit=2ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e] 2020-03-24 08:23:40.608 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.607Z grpc.peer_address=<IP_ADDRESS>:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=106.3µs 2020-03-24 08:23:40.622 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.621Z grpc.peer_address=<IP_ADDRESS>:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=94.852µs 2020-03-24 08:23:40.628 UTC [comm.grpc.server] 1 -> INFO 04b unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.628Z grpc.peer_address=<IP_ADDRESS>:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=61.276µs 2020-03-24 08:23:40.631 UTC [comm.grpc.server] 1 -> INFO 04c streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.609Z grpc.peer_address=<IP_ADDRESS>:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=21.432415ms 2020-03-24 08:23:40.632 UTC [comm.grpc.server] 1 -> INFO 04d streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.624Z grpc.peer_address=<IP_ADDRESS>:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=8.246259ms 2020-03-24 08:23:40.635 UTC [comm.grpc.server] 1 -> INFO 04e streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.629Z grpc.peer_address=<IP_ADDRESS>:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=5.756194ms 2020-03-24 08:23:40.641 UTC [comm.grpc.server] 1 -> INFO 04f unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.641Z grpc.peer_address=<IP_ADDRESS>:45798 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=69.002µs 2020-03-24 08:23:40.647 UTC [comm.grpc.server] 1 -> INFO 050 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.647Z grpc.peer_address=<IP_ADDRESS>:48050 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=65.359µs 2020-03-24 08:23:40.658 UTC [comm.grpc.server] 1 -> INFO 051 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.658Z grpc.peer_address=<IP_ADDRESS><IP_ADDRESS>:9051 2020-03-24 08:23:20.130 UTC [peer] func1 -> INFO 007 Returning peer0.org2.example.com:9051 2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 008 Auto-detected peer address: <IP_ADDRESS>:9051 2020-03-24 08:23:20.131 UTC [peer] func1 -> INFO 009 Returning peer0.org2.example.com:9051 2020-03-24 08:23:20.135 UTC [nodeCmd] serve -> INFO 00a Starting peer with TLS enabled 2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00b Entering computeChaincodeEndpoint with peerHostname: peer0.org2.example.com 2020-03-24 08:23:20.141 UTC [nodeCmd] computeChaincodeEndpoint -> INFO 00c Exit with ccEndpoint: peer0.org2.example.com:9052 2020-03-24 08:23:20.145 UTC [sccapi] registerSysCC -> INFO 00d system chaincode lscc(github.com/hyperledger/fabric/core/scc/lscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00e system chaincode cscc(github.com/hyperledger/fabric/core/scc/cscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 00f system chaincode qscc(github.com/hyperledger/fabric/core/scc/qscc) registered 2020-03-24 08:23:20.146 UTC [sccapi] registerSysCC -> INFO 010 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle,true) disabled 2020-03-24 08:23:20.153 UTC [gossip.service] func1 -> INFO 011 Initialize gossip with endpoint peer0.org2.example.com:9051 and bootstrap set [peer1.org2.example.com:10051] 2020-03-24 08:23:20.163 UTC [gossip.gossip] NewGossipService -> INFO 012 Creating gossip service with self membership of Endpoint: peer0.org2.example.com:9051, InternalEndpoint: peer0.org2.example.com:9051, PKI-ID: c4e87a76098ec5decb4b47d1904021bdcea0fbd290f68af4ade352b0b22b0151, Metadata: 2020-03-24 08:23:20.163 UTC [gossip.gossip] start -> INFO 013 Gossip instance peer0.org2.example.com:9051 started 2020-03-24 08:23:20.164 UTC [sccapi] deploySysCC -> INFO 014 system chaincode lscc/(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-03-24 08:23:20.165 UTC [cscc] Init -> INFO 015 Init CSCC 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 016 system chaincode cscc/(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-03-24 08:23:20.165 UTC [qscc] Init -> INFO 017 Init QSCC 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 018 system chaincode qscc/(github.com/hyperledger/fabric/core/scc/qscc) deployed 2020-03-24 08:23:20.165 UTC [sccapi] deploySysCC -> INFO 019 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2020-03-24 08:23:20.165 UTC [nodeCmd] serve -> INFO 01a Deployed system chaincodes 2020-03-24 08:23:20.168 UTC [discovery] NewService -> INFO 01b Created with config TLS: true, authCacheMaxSize: 1000, authCachePurgeRatio: 0.750000 2020-03-24 08:23:20.168 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated 2020-03-24 08:23:20.168 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = <IP_ADDRESS>:6060 2020-03-24 08:23:20.169 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains] 2020-03-24 08:23:20.169 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights 2020-03-24 08:23:20.170 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting 2020-03-24 08:23:20.170 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded 2020-03-24 08:23:21.673 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.673Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=101.985µs 2020-03-24 08:23:21.682 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:31.68Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.417798ms 2020-03-24 08:23:21.714 UTC [comm.grpc.server] 1 -> INFO 026 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.714Z grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=85.978µs 2020-03-24 08:23:22.955 UTC [comm.grpc.server] 1 -> INFO 027 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error=EOF grpc.code=Unknown grpc.call_duration=1.240576335s 2020-03-24 08:23:30.812 UTC [endorser] callChaincode -> INFO 028 [][28c2fa0d] Entry chaincode: name:"cscc" 2020-03-24 08:23:30.814 UTC [ledgermgmt] CreateLedger -> INFO 029 Creating ledger [mychannel] with genesis block 2020-03-24 08:23:30.829 UTC [fsblkstorage] newBlockfileMgr -> INFO 02a Getting block information from block storage 2020-03-24 08:23:30.849 UTC [kvledger] CommitWithPvtData -> INFO 02b [mychannel] Committed block [0] with 1 transaction(s) in 13ms (state_validation=1ms block_and_pvtdata_commit=7ms state_commit=1ms) commitHash=[] 2020-03-24 08:23:30.851 UTC [ledgermgmt] CreateLedger -> INFO 02c Created ledger [mychannel] with genesis block 2020-03-24 08:23:30.855 UTC [gossip.gossip] JoinChan -> INFO 02d Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:30.855 UTC [gossip.gossip] learnAnchorPeers -> INFO 02e No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:30.856 UTC [gossip.gossip] learnAnchorPeers -> INFO 02f No configured anchor peers of Org1MSP for channel mychannel to learn about 2020-03-24 08:23:30.880 UTC [gossip.state] NewGossipStateProvider -> INFO 030 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1 2020-03-24 08:23:30.883 UTC [sccapi] deploySysCC -> INFO 031 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-03-24 08:23:30.883 UTC [cscc] Init -> INFO 032 Init CSCC 2020-03-24 08:23:30.884 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-03-24 08:23:30.884 UTC [qscc] Init -> INFO 034 Init QSCC 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 035 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 036 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2020-03-24 08:23:30.885 UTC [endorser] callChaincode -> INFO 037 [][28c2fa0d] Exit chaincode: name:"cscc" (73ms) 2020-03-24 08:23:30.886 UTC [comm.grpc.server] 1 -> INFO 038 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=<IP_ADDRESS>:53176 grpc.code=OK grpc.call_duration=84.780123ms 2020-03-24 08:23:35.856 UTC [gossip.channel] reportMembershipChanges -> INFO 039 Membership view has changed. peers went online: [[peer1.org2.example.com:10051]] , current view: [[peer1.org2.example.com:10051]] 2020-03-24 08:23:40.217 UTC [gossip.privdata] StoreBlock -> INFO 03a [mychannel] Received block [1] from buffer 2020-03-24 08:23:40.226 UTC [gossip.gossip] JoinChan -> INFO 03b Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03c Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03d No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:40.237 UTC [gossip.service] updateEndpoints -> WARN 03e Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.245 UTC [committer.txvalidator] Validate -> INFO 03f [mychannel] Validated block [1] in 27ms 2020-03-24 08:23:40.285 UTC [kvledger] CommitWithPvtData -> INFO 040 [mychannel] Committed block [1] with 1 transaction(s) in 38ms (state_validation=1ms block_and_pvtdata_commit=29ms state_commit=5ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254] 2020-03-24 08:23:40.563 UTC [gossip.privdata] StoreBlock -> INFO 041 [mychannel] Received block [2] from buffer 2020-03-24 08:23:40.571 UTC [gossip.gossip] JoinChan -> INFO 042 Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 043 Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 044 Learning about the configured anchor peers of Org2MSP for channel mychannel : [{peer0.org2.example.com 9051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 045 Anchor peer with same endpoint, skipping connecting to myself 2020-03-24 08:23:40.571 UTC [gossip.service] updateEndpoints -> WARN 046 Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.574 UTC [committer.txvalidator] Validate -> INFO 047 [mychannel] Validated block [2] in 11ms 2020-03-24 08:23:40.600 UTC [kvledger] CommitWithPvtData -> INFO 048 [mychannel] Committed block [2] with 1 transaction(s) in 25ms (state_validation=0ms block_and_pvtdata_commit=18ms state_commit=2ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e] 2020-03-24 08:23:40.608 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.607Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=106.3µs 2020-03-24 08:23:40.622 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.621Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=94.852µs 2020-03-24 08:23:40.628 UTC [comm.grpc.server] 1 -> INFO 04b unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.628Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=61.276µs 2020-03-24 08:23:40.631 UTC [comm.grpc.server] 1 -> INFO 04c streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.609Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=21.432415ms 2020-03-24 08:23:40.632 UTC [comm.grpc.server] 1 -> INFO 04d streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.624Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=8.246259ms 2020-03-24 08:23:40.635 UTC [comm.grpc.server] 1 -> INFO 04e streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.629Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=5.756194ms 2020-03-24 08:23:40.641 UTC [comm.grpc.server] 1 -> INFO 04f unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.641Z grpc.peer_address=172.19.0.3:45798 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=69.002µs 2020-03-24 08:23:40.647 UTC [comm.grpc.server] 1 -> INFO 050 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.647Z grpc.peer_address=172.19.0.2:48050 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=65.359µs 2020-03-24 08:23:40.658 UTC [comm.grpc.server] 1 -> INFO 051 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.658Z grpc.peer_address=172.19.0.5:53144 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=115.148µs 2020-03-24 08:23:43.862 UTC [endorser] callChaincode -> INFO 052 [][a8e37e08] Entry chaincode: name:"lscc" 2020-03-24 08:23:43.863 UTC [lscc] executeInstall -> INFO 053 Installed Chaincode [mycc] Version [1.0] to peer 2020-03-24 08:23:43.863 UTC [endorser] callChaincode -> INFO 054 [][a8e37e08] Exit chaincode: name:"lscc" (1ms) 2020-03-24 08:23:43.863 UTC [comm.grpc.server] 1 -> INFO 055 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=<IP_ADDRESS>:53232 grpc.code=OK grpc.call_duration=1.77226ms 2020-03-24 08:23:43.977 UTC [endorser] callChaincode -> INFO 056 [mychannel][1440b726] Entry chaincode: name:"lscc" 2020-03-24 08:23:45.856 UTC [gossip.channel] reportMembershipChanges -> INFO 057 Membership view has changed. peers went online: [[peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]] , current view: [[peer1.org2.example.com:10051] [peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]] 2020-03-24 08:36:47.118 UTC [endorser] callChaincode -> INFO 058 [mychannel][1440b726] Exit chaincode: name:"lscc" (783125ms) 2020-03-24 08:36:47.129 UTC [endorser] SimulateProposal -> ERRO 059 [mychannel][1440b726] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode mycc:1.0 for transaction github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:75 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).LaunchInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:130 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:222 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:183 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1 /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31 github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor /opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1337 2020-03-24 08:36:47.176 UTC [comm.grpc.server] 1 -> INFO 05a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=<IP_ADDRESS><PHONE_NUMBER> 2020-03-24 08:23:20.168 UTC [nodeCmd] registerDiscoveryService -> INFO 01c Discovery service activated 2020-03-24 08:23:20.168 UTC [nodeCmd] serve -> INFO 01d Starting peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] serve -> INFO 01e Started peer with ID=[name:"peer0.org2.example.com" ], network ID=[dev], address=[peer0.org2.example.com:9051] 2020-03-24 08:23:20.169 UTC [nodeCmd] func7 -> INFO 01f Starting profiling server with listenAddress = 0.0.0.0:6060 2020-03-24 08:23:20.169 UTC [kvledger] LoadPreResetHeight -> INFO 020 Loading prereset height from path [/var/hyperledger/production/ledgersData/chains] 2020-03-24 08:23:20.169 UTC [fsblkstorage] LoadPreResetHeight -> INFO 021 Loading Pre-reset heights 2020-03-24 08:23:20.170 UTC [fsblkstorage] preRestHtFiles -> INFO 022 Dir [/var/hyperledger/production/ledgersData/chains/chains] missing... exiting 2020-03-24 08:23:20.170 UTC [fsblkstorage] LoadPreResetHeight -> INFO 023 Pre-reset heights loaded 2020-03-24 08:23:21.673 UTC [comm.grpc.server] 1 -> INFO 024 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.673Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=101.985µs 2020-03-24 08:23:21.682 UTC [comm.grpc.server] 1 -> INFO 025 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:31.68Z grpc.peer_address=172.19.0.2:47980 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=2.417798ms 2020-03-24 08:23:21.714 UTC [comm.grpc.server] 1 -> INFO 026 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:23.714Z grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=85.978µs 2020-03-24 08:23:22.955 UTC [comm.grpc.server] 1 -> INFO 027 streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.peer_address=172.19.0.2:47982 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error=EOF grpc.code=Unknown grpc.call_duration=1.240576335s 2020-03-24 08:23:30.812 UTC [endorser] callChaincode -> INFO 028 [][28c2fa0d] Entry chaincode: name:"cscc" 2020-03-24 08:23:30.814 UTC [ledgermgmt] CreateLedger -> INFO 029 Creating ledger [mychannel] with genesis block 2020-03-24 08:23:30.829 UTC [fsblkstorage] newBlockfileMgr -> INFO 02a Getting block information from block storage 2020-03-24 08:23:30.849 UTC [kvledger] CommitWithPvtData -> INFO 02b [mychannel] Committed block [0] with 1 transaction(s) in 13ms (state_validation=1ms block_and_pvtdata_commit=7ms state_commit=1ms) commitHash=[] 2020-03-24 08:23:30.851 UTC [ledgermgmt] CreateLedger -> INFO 02c Created ledger [mychannel] with genesis block 2020-03-24 08:23:30.855 UTC [gossip.gossip] JoinChan -> INFO 02d Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:30.855 UTC [gossip.gossip] learnAnchorPeers -> INFO 02e No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:30.856 UTC [gossip.gossip] learnAnchorPeers -> INFO 02f No configured anchor peers of Org1MSP for channel mychannel to learn about 2020-03-24 08:23:30.880 UTC [gossip.state] NewGossipStateProvider -> INFO 030 Updating metadata information for channel mychannel, current ledger sequence is at = 0, next expected block is = 1 2020-03-24 08:23:30.883 UTC [sccapi] deploySysCC -> INFO 031 system chaincode lscc/mychannel(github.com/hyperledger/fabric/core/scc/lscc) deployed 2020-03-24 08:23:30.883 UTC [cscc] Init -> INFO 032 Init CSCC 2020-03-24 08:23:30.884 UTC [sccapi] deploySysCC -> INFO 033 system chaincode cscc/mychannel(github.com/hyperledger/fabric/core/scc/cscc) deployed 2020-03-24 08:23:30.884 UTC [qscc] Init -> INFO 034 Init QSCC 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 035 system chaincode qscc/mychannel(github.com/hyperledger/fabric/core/scc/qscc) deployed 2020-03-24 08:23:30.885 UTC [sccapi] deploySysCC -> INFO 036 system chaincode (+lifecycle,github.com/hyperledger/fabric/core/chaincode/lifecycle) disabled 2020-03-24 08:23:30.885 UTC [endorser] callChaincode -> INFO 037 [][28c2fa0d] Exit chaincode: name:"cscc" (73ms) 2020-03-24 08:23:30.886 UTC [comm.grpc.server] 1 -> INFO 038 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53176 grpc.code=OK grpc.call_duration=84.780123ms 2020-03-24 08:23:35.856 UTC [gossip.channel] reportMembershipChanges -> INFO 039 Membership view has changed. peers went online: [[peer1.org2.example.com:10051]] , current view: [[peer1.org2.example.com:10051]] 2020-03-24 08:23:40.217 UTC [gossip.privdata] StoreBlock -> INFO 03a [mychannel] Received block [1] from buffer 2020-03-24 08:23:40.226 UTC [gossip.gossip] JoinChan -> INFO 03b Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03c Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.226 UTC [gossip.gossip] learnAnchorPeers -> INFO 03d No configured anchor peers of Org2MSP for channel mychannel to learn about 2020-03-24 08:23:40.237 UTC [gossip.service] updateEndpoints -> WARN 03e Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.245 UTC [committer.txvalidator] Validate -> INFO 03f [mychannel] Validated block [1] in 27ms 2020-03-24 08:23:40.285 UTC [kvledger] CommitWithPvtData -> INFO 040 [mychannel] Committed block [1] with 1 transaction(s) in 38ms (state_validation=1ms block_and_pvtdata_commit=29ms state_commit=5ms) commitHash=[47dc540c94ceb704a23875c11273e16bb0b8a87aed84de911f2133568115f254] 2020-03-24 08:23:40.563 UTC [gossip.privdata] StoreBlock -> INFO 041 [mychannel] Received block [2] from buffer 2020-03-24 08:23:40.571 UTC [gossip.gossip] JoinChan -> INFO 042 Joining gossip network of channel mychannel with 2 organizations 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 043 Learning about the configured anchor peers of Org1MSP for channel mychannel : [{peer0.org1.example.com 7051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 044 Learning about the configured anchor peers of Org2MSP for channel mychannel : [{peer0.org2.example.com 9051}] 2020-03-24 08:23:40.571 UTC [gossip.gossip] learnAnchorPeers -> INFO 045 Anchor peer with same endpoint, skipping connecting to myself 2020-03-24 08:23:40.571 UTC [gossip.service] updateEndpoints -> WARN 046 Failed to update ordering service endpoints, due to Channel with mychannel id was not found 2020-03-24 08:23:40.574 UTC [committer.txvalidator] Validate -> INFO 047 [mychannel] Validated block [2] in 11ms 2020-03-24 08:23:40.600 UTC [kvledger] CommitWithPvtData -> INFO 048 [mychannel] Committed block [2] with 1 transaction(s) in 25ms (state_validation=0ms block_and_pvtdata_commit=18ms state_commit=2ms) commitHash=[5f88b61407b149a48413433f4670c46531e5c4a8febdc339a9536ff8716a559e] 2020-03-24 08:23:40.608 UTC [comm.grpc.server] 1 -> INFO 049 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.607Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=106.3µs 2020-03-24 08:23:40.622 UTC [comm.grpc.server] 1 -> INFO 04a unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.621Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=94.852µs 2020-03-24 08:23:40.628 UTC [comm.grpc.server] 1 -> INFO 04b unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.628Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=61.276µs 2020-03-24 08:23:40.631 UTC [comm.grpc.server] 1 -> INFO 04c streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.609Z grpc.peer_address=172.19.0.5:53128 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=21.432415ms 2020-03-24 08:23:40.632 UTC [comm.grpc.server] 1 -> INFO 04d streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.624Z grpc.peer_address=172.19.0.3:45792 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=8.246259ms 2020-03-24 08:23:40.635 UTC [comm.grpc.server] 1 -> INFO 04e streaming call completed grpc.service=gossip.Gossip grpc.method=GossipStream grpc.request_deadline=2020-03-24T08:23:50.629Z grpc.peer_address=172.19.0.2:48046 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" error="rpc error: code = Canceled desc = context canceled" grpc.code=Canceled grpc.call_duration=5.756194ms 2020-03-24 08:23:40.641 UTC [comm.grpc.server] 1 -> INFO 04f unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.641Z grpc.peer_address=172.19.0.3:45798 grpc.peer_subject="CN=peer0.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=69.002µs 2020-03-24 08:23:40.647 UTC [comm.grpc.server] 1 -> INFO 050 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.647Z grpc.peer_address=172.19.0.2:48050 grpc.peer_subject="CN=peer1.org2.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=65.359µs 2020-03-24 08:23:40.658 UTC [comm.grpc.server] 1 -> INFO 051 unary call completed grpc.service=gossip.Gossip grpc.method=Ping grpc.request_deadline=2020-03-24T08:23:42.658Z grpc.peer_address=172.19.0.5:53144 grpc.peer_subject="CN=peer1.org1.example.com,L=San Francisco,ST=California,C=US" grpc.code=OK grpc.call_duration=115.148µs 2020-03-24 08:23:43.862 UTC [endorser] callChaincode -> INFO 052 [][a8e37e08] Entry chaincode: name:"lscc" 2020-03-24 08:23:43.863 UTC [lscc] executeInstall -> INFO 053 Installed Chaincode [mycc] Version [1.0] to peer 2020-03-24 08:23:43.863 UTC [endorser] callChaincode -> INFO 054 [][a8e37e08] Exit chaincode: name:"lscc" (1ms) 2020-03-24 08:23:43.863 UTC [comm.grpc.server] 1 -> INFO 055 unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53232 grpc.code=OK grpc.call_duration=1.77226ms 2020-03-24 08:23:43.977 UTC [endorser] callChaincode -> INFO 056 [mychannel][1440b726] Entry chaincode: name:"lscc" 2020-03-24 08:23:45.856 UTC [gossip.channel] reportMembershipChanges -> INFO 057 Membership view has changed. peers went online: [[peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]] , current view: [[peer1.org2.example.com:10051] [peer0.org1.example.com:7051 ] [peer1.org1.example.com:8051 ]] 2020-03-24 08:36:47.118 UTC [endorser] callChaincode -> INFO 058 [mychannel][1440b726] Exit chaincode: name:"lscc" (783125ms) 2020-03-24 08:36:47.129 UTC [endorser] SimulateProposal -> ERRO 059 [mychannel][1440b726] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode mycc:1.0 for transaction github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/runtime_launcher.go:75 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).LaunchInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:130 github.com/hyperledger/fabric/core/chaincode.(*ChaincodeSupport).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/chaincode_support.go:222 github.com/hyperledger/fabric/core/endorser.(*SupportImpl).ExecuteLegacyInit /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/support.go:131 github.com/hyperledger/fabric/core/endorser.(*Endorser).callChaincode /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:183 github.com/hyperledger/fabric/core/endorser.(*Endorser).SimulateProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:247 github.com/hyperledger/fabric/core/endorser.(*Endorser).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/endorser/endorser.go:500 github.com/hyperledger/fabric/core/handlers/auth/filter.(*expirationCheckFilter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/expiration.go:61 github.com/hyperledger/fabric/core/handlers/auth/filter.(*filter).ProcessProposal /opt/gopath/src/github.com/hyperledger/fabric/core/handlers/auth/filter/filter.go:32 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler.func1 /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:169 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:31 github.com/hyperledger/fabric/core/comm.(*Throttle).UnaryServerIntercptor /opt/gopath/src/github.com/hyperledger/fabric/core/comm/throttle.go:54 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 github.com/hyperledger/fabric/common/grpclogging.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpclogging/server.go:91 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:34 github.com/hyperledger/fabric/common/grpcmetrics.UnaryServerInterceptor.func1 /opt/gopath/src/github.com/hyperledger/fabric/common/grpcmetrics/interceptor.go:30 github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/grpc-ecosystem/go-grpc-middleware/chain.go:39 github.com/hyperledger/fabric/protos/peer._Endorser_ProcessProposal_Handler /opt/gopath/src/github.com/hyperledger/fabric/protos/peer/peer.pb.go:171 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).processUnaryRPC /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:982 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).handleStream /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:1208 github.com/hyperledger/fabric/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1 /opt/gopath/src/github.com/hyperledger/fabric/vendor/google.golang.org/grpc/server.go:686 runtime.goexit /opt/go/src/runtime/asm_amd64.s:1337 2020-03-24 08:36:47.176 UTC [comm.grpc.server] 1 -> INFO 05a unary call completed grpc.service=protos.Endorser grpc.method=ProcessProposal grpc.peer_address=172.19.0.7:53236 grpc.code=OK grpc.call_duration=13m3.203460855s The error I've found from the logs above is: 2020-03-24 08:36:47.118 UTC [endorser] callChaincode -> INFO 058 [mychannel][1440b726] Exit chaincode: name:"lscc" (783125ms) 2020-03-24 08:36:47.129 UTC [endorser] SimulateProposal -> ERRO 059 [mychannel][1440b726] failed to invoke chaincode name:"lscc" , error: timeout expired while starting chaincode mycc:1.0 for transaction github.com/hyperledger/fabric/core/chaincode.(*RuntimeLauncher).Launch I've searched online many times and get stuck in this error few days. I think is the problem of node or npm and I've also found some useful information from the community of Hyperledger. But I still don't know how to solve this problem. If you have ideas, please give me a hint. Thanks a lot. https://jira.hyperledger.org/browse/FAB-12318?focusedCommentId=53022&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-53022 https://jira.hyperledger.org/browse/FABCN-256
6fb84db7ba8c82b45b1a3f6d740d67b4c02b20ee80d64f30fdd80f3ea7610be2
['2c91fdc1911341b198641056af396a77']
As explained by tim4dev, you havent logged in using any specific user. If you havent created a user, go to the firebase console and allow a signup type. They are like email and password auth, phone number auth, anonymous, etc. Once you have enabled one of the options, you can sign up using the auth class and sign in / login afterwards. Once you login with a user account on a device, only then will the mCurrent_user_id = mAuth.getCurrentUser().getUid(); statement work and return a non-null id. Hope it solves the problem.
b014d656bd0db6dcd41a598cd99d19574cfb5d4753a398b5d167d6bb8b81f5d4
['2c91fdc1911341b198641056af396a77']
I am getting a null pointer exception whenever i am trying to process two images for color difference. The code is MarvinImageIO.saveImage(currentFrame, "check1.jpg"); MarvinImageIO.saveImage(template, "check2.jpg"); currentFrame=MarvinImageIO.loadImage("check1.jpg"); template=MarvinImageIO.loadImage("check2.jpg"); // System.out.println(currentFrame.getWidth()+" "+currentFrame.getHeight()+" "+template.getWidth()+" "+template.getHeight()); scale(currentFrame, template, template.getWidth(), template.getHeight()); MarvinImagePlugin diff = MarvinPluginLoader.loadImagePlugin("org.marvinproject.image.difference.differenc eColor.jar"); MarvinAttributes attr = new MarvinAttributes(); attr.set("total", 0); System.out.println(attr.get("total")); diff.process(currentFrame, template,attr); The error is on the diff.process statement. The images are not null and so is the attr. Error statement is Exception in thread "Thread-3" java.lang.NullPointerException at org.marvinproject.image.difference.differenceColor.DifferenceColor.process(DifferenceColor.java:67) at marvin.plugin.MarvinAbstractImagePlugin.process(MarvinAbstractImagePlugin.java:65) at censor_player.player$MyThread.run(player.java:142)
7e6bec701da8b2c27426b86ee154efbac85f1863c0e4f3f3efa835f8a97ea6e1
['2c95e2070e4d4911bbe2d90a0400778f']
I recently had this kind of issue, I figured it out that result I was checking was with UpperCase. So, ex: auth.isLoggedIn returns True, and when *ngIf="auth.isLoggedIn" equals it, it goes like this *ngIf="!auth.isLoggedIn === true" and this never return expected result. Check if auth.isLoggedIn returns lowercase true or false without double quotes (not "true"), or is boolean type!. Thank you.
b56957e97b44a6ec7775cdf7f038a79b6d6ceadcfa16054aae40a6e700df2bb0
['2c95e2070e4d4911bbe2d90a0400778f']
I just messed around with this kind of crash/error on production/deployed app with event error "Faulting module name: Windows.UI.Xaml.dll in UWP application". As a solution for my case I had to use default "ContentDialog" Style rather then my custom made style! So if you have used any custom style for any control on that page/window that you want to open, try using without it! Hope this could solve your problem! Thank you.
8aed5f351017cc3d65e3441f2fc4e473f81a78ed4edf3a9a9ca3e139c6da699c
['2c99cda31b1a4f5e83c3768a033013c8']
Reason for the above problem, because at the time you have appended two DataFrames, you forgot to set 'sid' as the dataframe index. So, basically the two DataFrames has different structure when you append it. Make sure to set the index of both dataframes same before you append them. data = [ [30,11], [56, 5], [73, 25]] #test dataframe dataframe = pd.DataFrame(data, columns=['sid', '']) dataframe = dataframe.set_index('sid') print(dataframe) You get, sid 30 11 56 5 73 25 Create and set the index of df, df = pd.DataFrame({'sid' : [2], '' : [100]}) df = df.set_index('sid') You get, sid 2 100 Then append them, dataframe = df.append(dataframe) print(dataframe) You will get the disired outcome, sid 2 100 30 11 56 5 73 25
b0c450148cf0c2981aa8d6e9fe1d366366b9e8346e526c0d64904ced15ba7060
['2c99cda31b1a4f5e83c3768a033013c8']
Definitly python. it has readily available lots of tools and libraries for us. For these type of projects i highly recommend python. Here are some tools and libraries might help you. wikipedia - Get information from wikipedia or to perform wikipedia search pip install wikipedia Request - Making GET and POST requests. pip install requests Beautifulsoup4 - A library that makes it easy to scrape information from web pages. pip install beautifulsoup4 Pyttsx3 - Used for conversion of text to speech in a program it woks offline. pip install pyttsx3 Wolframalpha - Compute expert-level answers using Wolfram's algorithms, knowledgebase and AI technology. pip install wolframaplha Subprocess - Getting system subprocess details which are used in various commands. for example, Sleep, Shutdown etc. This module comes built-in with python. Web browser - To perform web search. built-in with python Twilio - For making call and messages. pip install twilio Tkinter - For building GUI. Comes built-in with python. Hope you will find this information helpful.
531b639770e4d3a025639142fd808053230cdb0a3eba3d099ef339c731fcfd0b
['2c9c164ad74f48d7ba98c671879d8762']
Thank you! I tried adjusting for the number of rows, but now I am getting a different error: **Error in pivot_wider(., names_from = coord, values_from = coordinates) : could not find function "pivot_wider"**. I am using all the libraries you listed in your original response: might I need one last R package to execute this? Thank you!!
a8af4e4c80ccd9cdf774ed3b834702a881eb098b9c8680fc774414110cf2213a
['2c9c164ad74f48d7ba98c671879d8762']
I am working with the Hansen Global Forest Change loss year layer. This raster tells us the year a 30m pixel transitioned to zero forest cover (2000-2014), if relevant (otherwise zero). I am producing zonal statistics over tiles and am trying to get the within-tile count of pixels that transitioned in 2001, 2002, 2003, ...2014. These counts must be stored as separate properties (ex: count_2001 = x, count_2002=y. I can execute this over my tiles year-by-year using a remap function and then counting the non-NA values using a reducer function. For example, for 2001: var gfcLoss2001 = gfcLossYearMasked .remap([1], [1], null); //Need to change band name so future bands do not overwrite each other var gfcLoss2001Clean = gfcLoss2001.select( ['remapped'], ['loss2001']); var loss2001 = tiles.map(function(feature) { return feature.set(gfcLoss2001Clean.reduceRegion({ reducer: 'count', geometry: feature.geometry(), scale: 100, })); }); I am trying to transform this into a function that I can feed a vector of dates [2001, 2002, ...] and corresponding reference numbers [1, 2, 3] (where 1=2001 in the raster) that can execute this code over the 13 years. The main challenge I encounter is with variable naming. We need to give the generated properties (counts) unique names, but I don't know how to incorporate this into GEE. If you have alternative strategies for producing these zonal stats, please let me know as well.
64153655371313d43d092dd354b621cac6a419672624cbe84ec10e8657c458ad
['2ca13c852b724649904152bdeeaae184']
How do I track the memory used by OpenGL textures in Android? I understand the texture memory is on the Video RAM, but do they get swapped in with the RAM? If I call glGenTextures and do not call glDeleteTextures, how does it impact the memory usage of my current process?
ace39b656fa1449ae6bf3e7de4aaed61b8527961b9f02dab8afcf00462712c07
['2ca13c852b724649904152bdeeaae184']
Is there a way to find out the final location of my animated "object" after the animation? Let's say I am animating an ImageView with location in parent as (0,0 - 20,20) using TranslateAnimation and ScaleAnimation over 1 second with setFillAfter(true). How to I find the final location of this "object" (since the View location itself does not move)? I need to continue the animation from this point based on an user input.
5eb23a4aeddd79a39beed9efb3c919bebe8faf4b020e760419a0a2c8c0e727cd
['2ca26ce8d9c04e0cb778409f09392d9c']
I bet you're using the wrong LayoutParams class. Look at your imports at the top of your file. You must be importing a specific static LayoutParams type (e.g. import android.view.ViewGroup.LayoutParams;) Not all LayoutParams classes are equal, and the class you're trying to instantiate may not have the constructor you are trying to use. Is your view's intended parent a FrameLayout? Right now, I'd wager you'd like to use the FrameLayout.LayoutParams constructor, which takes a third int argument to specify Gravity. But your import is specifying a class that doesn't have an (int, int, int) constructor (e.g. ViewGroup.LayoutParams or LinearLayout.LayoutParams). So the compiler complains. EDIT: For your second block, I believe you are missing a parenthesis. Otherwise that looks fine to me. (Again, assuming you're importing the right LayoutParams type. pb.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); //two parens here to close I usu like to be explicit about what LayoutParams class I'm using, to avoid these kinds of mistakes: new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.CENTER)
6167f2439d0c1bf4625741eb5ee972ae8ae05006695ea03d5113d8a24249ce05
['2ca26ce8d9c04e0cb778409f09392d9c']
I'm working on a reusable library for Android. The library will include an Activity that developers can use in their apps. The plan is to distribute the library as a JAR. Consequently, I'm laying out views at runtime in my Activity onCreate(), as I can't use XML resources. However, I'm noticing this weird behavior where there are subtle size differences between my Activity in two contexts: I'm running my project, directly launching the Activity (Manifest LAUNCHER definition). I zip my project classes into a JAR, and import that JAR into another Android project (testing what other developers will do). This wrapping project fires an intent for my Activity. Why would this be? What I see is that the imported lib version (2) looks smaller. It's some kind of scaling factor that's being applied to the direct launch case (1) that isn't being applied to the imported lib. I have tried: making sure all my dimensions are in DiPs converting my DiPs values to scaled View dimensions using getWindowManager().getDefaultDisplay().getMetrics() and TypedValue.applyDimension()
840840b1898841668bd49fbbb42c75b309312092e7425a24ba71b5386498620a
['2ca8ac332875417e91c650d4802b5ac2']
so lets say i have the following data data: [ { key: 1, id: 1, uri: "", image:false }, { key: 2, id: 2, uri: "", image:false }, { key: 3, id: 3, uri: "", image:false }, { key: 4, id: 4, uri: "", image:false } ] I want to update the uri using setState()and so far I have come up with the following using React. `data: update(this.state.data, {1: {uri: {$set: result.uri}, image:{$set: true}}})` however, instead of just having 1, I want to be able to pass in index, i know i can do this with if statements but im sure theres an easier and cleaner way??
66144d9ecca4a762ba0bf5f1779d02b4b8fe6e95b6b995679734fa8e183ce7b5
['2ca8ac332875417e91c650d4802b5ac2']
So I am trying to retrieve images from my expressjs API and I cannot seem to actually retrieve anything, not locally or even remotely. Here is the written code below :) app.use(express.static(path.join(__dirname,'/public/'))); app.use(bodyParser.urlencoded({ extended: true })); app.use(bodyParser.json()); app.get('/getImage/:folder/:imageName', function (req, res) { console.log(path.join(__dirname,'/',req.params.folder,'/',req.params.imageName)); res.sendFile(path.join(__dirname,'/',req.params.folder,'/',req.params.imageName)); res.end(); }); Have I written something wrong? Is there something I am missing? here is the request http://localhost:3000/getImage/public/da4b9237bacccdf19c0760cab7aec4a8359010b0678f63452c5c1d428cd376dd82c55aa33a34e600.jpg
0e3ec83eb00a4f95bb59e7f288e012cb02523a038836e0036867ea61ad72e6c7
['2cae67176d194dd38543d5a48d4257d6']
@KAGG Design Хорошо, приведу я пример: есть сервер с будущем интернет-магазином на woocommerce (или, возможно, другой CMS), который будет продавать товары разного формата. Для некоторых отдельных категорий товаров нужно сделать отдельные приложения, для которых будет проводиться рекламная кампания и т.д. Они планируются делаться на другом хостинге и домене, это совершенно другие приложения, в которых хотелось бы обойтись исключительно клиентской стороной (получить прямой get запрос с сервера с woocommerce и исходя из него рендерить содержимое сайта). Но загружаться все должно на 1м сервере.
116dd67d138204f61092eedcc5b79f5879c9cc0e02969d07517dc6e1600f15e3
['2cae67176d194dd38543d5a48d4257d6']
Например есть магазин http://baby-comf.ru/collection/frontpage/product/kolyaska-2-v-1-mima-xari-flair-2g-black-shassi там есть галлерея http://prntscr.com/gklt4v , которая меняется с помощью селектора модификаций http://prntscr.com/gkltap сейчас работает с помощью апишки, но вылетают баги, должно нормально работать при имитации клика, но ничего не происходит (само событие вызывается, но owl никак не реагирует)
ea33d93400447694705aa65eade4c19bbd79088852c06c3e01b74e4cbf6908e4
['2cc0c411b5a44d518e35459da15d8e7a']
I've been working on a file reader in python where I expect to read ascii files ~100MB. There is a bunch of header information at the top and then just tab delimited columns. Some columns contain non numeric data (which I don't care about right now). I have a matlab implementation that reads a 30MB sample file in less than 1.5sec. My python reader takes about 2 sec in CPython, but about 4 seconds in IronPython. The difference appears to be where the string values get converted floats, but I haven't been able to make it go faster in IronPython. My latest iteration here has the following loop to read and parse the lines #-Parse the actual data lines istep = -1 while len(line) > 0: istep += 1 #-Split the line and convert pasred values to floats timestep = line.split(); for ichan in numericChannels: data[ichan].append(float(timestep[ichan])) line = f.readline().strip() numericChannels is a list of integers specifying which channels I want to read. data is a list of lists where is sub list is a column of data. The difference in performance seems to be coming from the float conversion. Any ideas on what I can do on IronPython to speed this up? I've even tried reading the file a head of time then using the System.Threading.Task.Parallel.ForEach construct to parse the file lines. That didn't help at all. Thanks.
8ce17214c39812807f639760ea3a0772933b2d5ce21e1ea564f702735541cb99
['2cc0c411b5a44d518e35459da15d8e7a']
Try using PyYAML to parse it. Worked from me on your example. https://pypi.python.org/pypi/PyYAML. Then you can avoid the regex headache. import yaml yaml.load('{day_id: 275, cookout_id: 71, description: "Sample text, that, is,driving , me, crazy"}') {'cookout_id': 71, 'day_id': 275, 'description': 'Sample text, that, is,driving , me, crazy'}
bead0d1e0a90f737bfaaa7a69d10a6e0c5695186e8b3b49e2068a95d3a9beba5
['2ccd47c304e14339ab8bc455e09932a1']
I've created a new custom JSON codec for OpenRasta which works fine. I need to pass arguments to the codec's write method when the handler is executed but cannot find any documentation on how to do it. I notice in the implemented WriteTo method, there is a string[] codecParameters parameter, however no idea how to pass them in. Anyone come accross this problem before? Thanks
010aa4467e26270a2cf213d43c5bbe82638d9e7d983ae0f6ba34194a640c84c9
['2ccd47c304e14339ab8bc455e09932a1']
Скажу, одно это глупо и ненужно делать, так как если будет закрываться много тегов, то будут закрываться и теги самого плагина и все поломается. Кому будет нужен вот код: \admin\assets\components\ckeditor\ckeditor\config.js //путь к файлу CKEDITOR.editorConfig = function( config ) { config.allowedContent = true; config.protectedSource.push(//g); //разрешает все закрывающиеся теги // Define changes to default configuration here. For example: // config.language = 'fr'; // config.uiColor = '#AADC6E'; };
61fec382f0a77717ea416d6c761a84516e622836bb87732f7669725087e3948c
['2ccda8059d534ac58e9b022bd31b1826']
I have been using android studio 2.2.3 I have got problem when checking the google play service apk is enabled on my physical device and i have got this exception i have also include multiDexEnabled true this in gradle(app) but still i can't get a toast message which i have include in java code to check whether i have successfully enabled google play service or not. Please help. Here is my exception. Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536 Manifest.xml package="com.mapgoogle.googlemap"> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> android:value="api_key"/> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/> </application> gradle(app) apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "24.0.3" defaultConfig { applicationId "com.mapgoogle.googlemap" minSdkVersion 14 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.1.1' testCompile 'junit:junit:4.12' compile 'com.google.android.gms:play-services:10.0.1' } MainActivity.java package com.mapgoogle.googlemap; import android.app.Dialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.telecom.Connection; import android.widget.Toast; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.maps.GoogleMap; public class MainActivity extends AppCompatActivity { GoogleMap mMap; private static final int Dialog_erroe=9001; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setContentView(R.layout.activity_main); if(serviceok()){ setContentView(R.layout.activity_map); Toast.makeText(this,"Ready to map",Toast.LENGTH_SHORT).show(); }else{ setContentView(R.layout.activity_main); } } public boolean serviceok(){ int isAvaiable= GooglePlayServicesUtil.isGooglePlayServicesAvailable(this); if(isAvaiable== ConnectionResult.SUCCESS) { } else if(GooglePlayServicesUtil.isUserRecoverableError(isAvaiable)){ Dialog dialog=GooglePlayServicesUtil.getErrorDialog(isAvaiable,this,Dialog_erroe); dialog.show(); }else{ Toast.makeText(this,"Can't connect to internet",Toast.LENGTH_SHORT).show(); } return false; } }
fac183434210628777b2e0fcf7d111fd9633c6dea65386360d6501a6a6b4b267
['2ccda8059d534ac58e9b022bd31b1826']
Here is the following structure of database in firebase Code I am getting the current user and then checking the whether the id is null or not and get reference of child and getting key of child. Further more i am getting null in string variable where i tried to get values. private void Check_data() { final FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); if (user.getUid() != null) { FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference myRef = database.getReference("user_info"); DatabaseReference myRef1=myRef.child(user.getUid()); myRef1.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { //GenericTypeIndicator<Map<String, String>> genericTypeIndicator = new GenericTypeIndicator<Map<String, String>>() {}; // Map<String, String> map = dataSnapshot.getValue(genericTypeIndicator); String name = dataSnapshot.child("name").getValue(String.class); String email = dataSnapshot.child("email").getValue(String.class); Name.setText(name); email_txt.setText(email); /* if (image != null) { Glide.with(MainActivity.this) .load(image) .centerCrop() .into(photo_url); }*/ } @Override public void onCancelled(DatabaseError databaseError) { } }); } }
ea8a49168331516b48e1de85573c0dfb32f34891628d2325faf3851f62ffe410
['2cd2c88b457b4269b3096108718d252a']
I have PNG file that contains a grid of tiles. There is a two pixel wide transparent space between each tile but I would like to remove that. I'd like their edges to be flush without a space. Aside from manually selecting each tile and re-positioning it, is there an easier way to remove this gap in Photoshop? Thank you for your help
7a98a58ae9d8ac3d449120b83e976664a47fe4a1bea1346cb528f11107949a33
['2cd2c88b457b4269b3096108718d252a']
@bwall: Both machines are Windows 7, but I *think* (though I'm not sure) I've tried with XP on both as well, with the same results. I'm measuring WLAN speed by copying a 4-GB file around, and it averages around 300 KB/s or so, according to the file copy dialog. On the other hand, Free Download Manager can download Chromium in literally ~10 seconds (and it's > 30 MB)... and yet it takes me *much* longer to copy the same file across WLAN. (I don't believe my measurements are incorrect. :P)
e41eda9ff6edb21a64008c3804158cd7f2459a428cac1ab6652bd40a342089b0
['2cd425d3fd6f4ec2b2cc222ce6503040']
For those of you out there that come across this thread, because you are having similar problems with RNDIS and windows code 10 errors, using the built in configfs libcomposite device, after tons of googling, and going over code on the internet, code in the libcomposite module..... I found that instead of patching the driver I could work around this if I force loaded the usb_f_rndis module directly after libcomposite module, this forces usb_f_rndis to first and second iad slot. The rest of the modules for libcomposite devices will load, as you add the devices in configfs, and Windows will be happy with it. Also, to force windows to load the right driver, make sure you set up the os_desc stuff. There is a nice guide that goes over that here: http://irq5.io/2016/12/22/raspberry-pi-zero-as-multiple-usb-gadgets/
bf31b6c031f317504ae43b31c8cda71d6b750a72dc7c00a3335e178b364c2ce2
['2cd425d3fd6f4ec2b2cc222ce6503040']
Ok, Thank you for the help, it didnt quite do it, but the direction was the answer I needed. :) Code Fixes. C++ Header: __declspec(dllexport) int __cdecl S9xLoadCheatFile (const char *); __declspec(dllexport) int __cdecl S9xSaveCheatFile (const char *); __declspec(dllexport) SCheatData* __cdecl GetData(); struct SCheatData data1; Dll.cpp: SCheatData* __cdecl GetData() { return &data1; } interact with struct data1 directly in save and load functions. VB Code. <StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _ Public Structure SCheat Public address As UInteger Public byte1 As Byte Public saved_byte As Byte <MarshalAs(UnmanagedType.I1)> Public enabled As Boolean <MarshalAs(UnmanagedType.I1)> Public saved As Boolean <MarshalAs(UnmanagedType.ByValArray, SizeConst:=22, ArraySubType:=UnmanagedType.Struct)> Public name() As Char End Structure <StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, CharSet:=CharSet.Ansi)> _ Public Structure SCheatData <MarshalAs(UnmanagedType.ByValArray, SizeConst:=150)> Public c() As SCheat Public num_cheats As UInteger End Structure <DllImport("c:\minGW\bin\Cheat_Functions.dll", CallingConvention:=CallingConvention.Cdecl)> _ Public Function _Z16S9xLoadCheatFilePKc(ByVal filename As String) As Integer End Function <DllImport("c:\minGW\bin\Cheat_Functions.dll", CallingConvention:=CallingConvention.Cdecl)> _ Public Function _Z7GetDatav() As IntPtr End Function Private sub try() Dim tryv As String = "C:\\Users\\Diane\\Desktop\\snes9x\\Cheats\\Super Mario World (U) [!].cht" Dim anotherP As New SCheatData MsgBox(_Z16S9xLoadCheatFilePKc(tryv)) anotherP = System.Runtime.InteropServices.Marshal.PtrToStructure(_Z7GetDatav(), GetType(SCheatData)) MsgBox(anotherP.num_cheats) end sub This works for loading, which verifys the structure is correct. I am thinking that this should work for the save function as well. At least I know that if I do have an issue with it, that the problem will not be with the structures. :) Will post back if I have issues with using this for save feature. Edit, Just tested reversing with System.Runtime.InteropServices.Marshal.StructureToPtr(anotherP, _Z7GetDatav, True), and it worked. So I guess what I was was a couple of things defining the structures properly, and that structuretoptr requires a pointer made in the dll. If only I knew these things 3 days ago. Thank you for your help, even though I still had to mess with it a bit for it to work for my purposes, it gave me a new direction to look in, which was actually helpful. Now, I just have to do the same thing for all the other emulators. lol. :) Shouldnt take to long now that I sort of get it.