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
429b9fba437e02b48ddb72301fa536d22db1d9d65ce6c02265e561b214ae3435
['58dc2ba9aba44a328563d50ed35fe61c']
Remove from your $PATH the /home/pi/bin that is in front. If you’re positive you need it, move it to the back. The $PATH variable is probably set in ~/.profile, ~/.bash_profile, ~/.bashrc or something similar. Only add to the front of $PATH if you absolutely must override system commands. After that, you should look into how non-compatible executable files made it into ~/bin.
c541fccdf677153e2abd7aef1eed187830a5f214eb197bcbc6d63e32251a7a28
['58dc2ba9aba44a328563d50ed35fe61c']
So it's not really "I want a script!" but "How do I make a script run at a specific time?". Which is good, because the former isn't on-topic. It's not even a question. You should edit your question. And since your already have the cron tag, you should perhaps expand on what's keeping you from using it.
0374acd683479c349522106917d88e21fa1047f47335c7816f9f8fb4f4c6e50e
['58df3ef96e2b4dd7bafa61d078617183']
Sounds like you just want the first occurrence of each unique "number of AR" joined with the length associated with that. df.groupby('number of AR').first().merge( df.groupby('number of AR').apply(len).rename("Frequency").to_frame(), left_on='number of AR', right_index=True) # Year Month Day Hour Frequency #number of AR #1651 1979 1 5 18 5 #1652 1979 1 8 6 3 If you don't actually want the first, you should first sort by the value you care about before calling .first().
89bef8f8c16b02a307383faf118c39ce6d3c576f03cedd0e88f1d4d6eab6c545
['58df3ef96e2b4dd7bafa61d078617183']
I am scraping a limited number of items from the top of an infinite-scroll website. links = driver.find_elements_by_xpath("//div[@class='fixed-recipe-card__info']//a") while len(links)<100: driver.execute_script("window.scrollTo(0, document.body.scrollHeight);") links = driver.find_elements_by_xpath("//div[@class='fixed-recipe-card__info']//a") This works wonderfully when the window is active. However, if I have the test browser minimized, the new content does not load and the loop runs infinitely. I'm rather new to selenium, so I'm not quite sure why. I suspect there is a Javascript onChange that isn't being triggered. Is there a javascript command I should add to my script, or another selenium command that will cause the new content to load? I am using Python 2.7, selenium with Chromedriver. An example site is allrecipes.com.
8feef492d308d7293bb5096bcb178a5dbdd5dc596e5f77c2fc23ddb4f196eb81
['58f691dda3954d52ac023633c10cf5ed']
Actually i am making a food app where you can order foods by choosing category of food and adding them to carts. when i sign in and choose category of food and then choose a food to display description and add it to the cart the app stop working and the problem is in the picture below. Here is the picture with the logcat (run) problem https://ibb.co/bJ2Xzw . I receive string null and app stop working. Also am using Firebase If needed more coding i will post it. Thank you. problem from RUN : Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference at com.example.onix.androideat.FoodList.onCreate(FoodList.java:49)
52d90a8569b5b6d7e90ed5caf626c87f77d6d21d4f072f802ff4d3e41566285c
['58f691dda3954d52ac023633c10cf5ed']
I currently trying to make a website with a validating booking form for a university a project about a university portal. It used to work with my javascript validation until I added to validate time. Problem is sumbit button not working when I add to validate time and whenever I remove it is working. HTML and JavaScript /** Validation Form**/ function validateFormOnSubmit(contact) { reason = ""; reason += validateName(contact.name); reason += validateEmail(contact.email); reason += validatePhone(contact.phone); reason += validateID(contact.id); reason += validateWorkshop(contact.workshop); reason += validateDate(contact.date); console.log(reason); if (reason.length > 0) { return false; } else { return true; } } /**Validate name**/ function validateName(name) { var error = ""; if (name.value.length == 0) { document.getElementById('name-error').innerHTML = "Please enter your First name."; var error = "1"; } else { document.getElementById('name-error').innerHTML = ''; } return error; } /**Validate email as required field and format**/ function trim(s) { return s.replace(/^\s+|\s+$/, ''); } function validateEmail(email) { var error = ""; var temail = trim(email.value); var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/; var illegalChars = /[\(\)\<\>\,\;\:\\\"\[\]]/; if (email.value == "") { document.getElementById('email-error').innerHTML = "Please enter your Email address."; var error = "2"; } else if (!emailFilter.test(temail)) { /**test email for illegal characters**/ document.getElementById('email-error').innerHTML = "Please enter a valid email address."; var error = "3"; } else if (email.value.match(illegalChars)) { var error = "4"; document.getElementById('email-error').innerHTML = "Email contains invalid characters."; } else { document.getElementById('email-error').innerHTML = ''; } return error; } /**Validate phone for required and format**/ function validatePhone(phone) { var error = ""; var stripped = phone.value.replace(/[\(\)\.\-\ ]/g, ''); if (phone.value == "") { document.getElementById('phone-error').innerHTML = "Please enter your phone number"; var error = '6'; } else if (isNaN(parseInt(stripped))) { var error = "5"; document.getElementById('phone-error').innerHTML = "The phone number contains illegal characters."; } else if (stripped.length < 10) { var error = "6"; document.getElementById('phone-error').innerHTML = "The phone number is too short."; } else { document.getElementById('phone-error').innerHTML = ''; } return error; } /**Validate student ID**/ function validateID(id) { var error = ""; if (id.value.length == 0) { document.getElementById('id-error').innerHTML = "Please enter your ID."; var error = "1"; } else { document.getElementById('id-error').innerHTML = ''; } return error; } /**Validate workshop select**/ function validateWorkshop(workshop) { if ((contact.workshop[0].checked == false) && (contact.workshop[1].checked == false) && (contact.workshop[2].checked == false) && (contact.workshop[3].checked == false) && (contact.workshop[4].checked == false) && (contact.workshop[5].checked == false)) { document.getElementById('workshop-error').innerHTML = "You must select a workshop"; var error = "2"; } else { document.getElementById('workshop-error').innerHTML = ''; } return error; } /**Validate date**/ function validateDate(date) { var error = ""; if (date.value.length == 0) { document.getElementById('date-error').innerHTML = "Please enter a date."; var error = "1"; } else { document.getElementById('date-error').innerHTML = ''; } return error; } <header> <center><img src="portal2.png" style="width:1000px;height:100px;"></center> <p align="right"> <a href=".pdf" download> <font color="darkblue"> <font size="5"><b>Report</font></b></a> </p> </header> <hr class="line"> <div class="topnav" id="myTopnav"> <a href="Index.html">Home</a> <a href="Timetable.html">Timetable</a> <a href="workshops.html">Book a workshop</a> <a href="contact.html">Contact</a> </div> <br> <br> <form id="contact" name="contact" onsubmit="return validateFormOnSubmit(this)" action="thankyou.html" method="post" target="_blank"> <div> <label><u>First Name:</u></label><br> <br> <input type="text" name="name" id="name" tabindex="1" autofocus /> <div id="name-error" class="error"></div> </div> <br> <div> <label><u>Email:</u></label><br> <br> <input type="email" name="email" id="email" tabindex="2" autofocus /> <div id="email-error" class="error"></div> </div> <br> <div> <label><u>Phone:</u></label><br> <br> <input type="tel" name="phone" id="phone" tabindex="3" autofocus /> <div id="phone-error" class="error"></div> </div> <br> <div> <label><u>Student ID:</u></label><br> <br> <input type="text" name="id" id="id" tabindex="4" autofocus /> <div id="id-error" class="error"></div> </div> <br> <br> <div> <label><u>Please Select a workshop to book:</u></label> <br> <br> <input type="radio" name="workshop" id="art" tabindex="5" autofocus />Art Workshop <br> <input type="radio" name="workshop" id="computer" tabindex="6" autofocus />Computer Workshop <br> <input type="radio" name="workshop" id="film" tabindex="7" autofocus />Film Production Workshop <br> <input type="radio" name="workshop" id="music" tabindex="8" autofocus />Music Performance Workshop <br> <input type="radio" name="workshop" id="journalism" tabindex="9" autofocus />Journalism Workshop <br> <input type="radio" name="workshop" id="sociology" tabindex="10" autofocus />Sociology Workshop <br> <div id="workshop-error" class="error"></div> </div> <br> <p><u>Enter the date you want to book the workshop:</u></p> <input type="date" name="date" id="date" min="2017-10-01" tabindex="11" autofocus /> <div id="date-error" class="error"></div> <br> <br> <div> <button type="submit" name="submit" id="submit" tabindex="12">Sumbit</button> </div> </form> <br> <br> <footer>University. Copyright © 2015 <br> <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Date(); </script> <br> </footer> Any suggestions?
d99058a472861e1c76dc8f1e33494b38927b9240ee510dac8ede2645a5b7aeaa
['590363e1d56442998313a3f7a650b56f']
On the first render i am setting the productsList with all the products in my redux state. When i click to render products corresponding to a specific category, i am able to set a jsx element (filteredProducts). I have printed it in the console as well but the complete list of products is still being rendered. I also tried setting the productsList to null, but it is not working as well. const AllProducts = props => { let productsList = <p>Products are loading. Please wait.</p>; let filteredProducts = null; let filtered = null useEffect(() => { props.onFetchProduct(); },[]); const onCategorySelectClicked = (categoryName) => { filtered = props.products.filter(product => product.category === categoryName); productsList = null; // filteredProducts = filtered.map(product => ( // <ProductCard // productName={product.productName} // retailPrice={product.mrp} // newPrice={product.onlinedailymarketPrice} // quantity={product.unitQuantity} // productBarCode={product.id} // key={product.id} // /> // )) // filteredProducts = <p>Products are loaded.</p>; console.log(productsList); } let categoryOptions = null; if(props.error!==null){ productsList = <p>{props.error}</p>; } if(props.fetched){ productsList = props.products.map(product => ( <ProductCard productName={product.productName} retailPrice={product.mrp} newPrice={product.onlinedailymarketPrice} quantity={product.unitQuantity} productBarCode={product.id} key={product.id} /> )) console.log(productsList); categoryOptions = props.categories.map(category => ( <div> <CategorySelection categoryName={category} clicked={() => onCategorySelectClicked(category)} /> </div> )) } return ( <div className={classes.AllProductsHolder}> <div> {categoryOptions} </div> {/* {productsList!==null ? productsList : null} */} {/* {filteredProducts} */} {productsList} </div> ) }
56116e3094e7e59c5df2c6389166ede35db1f717e3dbf7872089a281a8420b41
['590363e1d56442998313a3f7a650b56f']
You don't even need BeautifulSoup to extract data. Just do this and your response is converted to a Dictionary which is very easy to handle. text = json.loads("You text of the main response content") You can now print any key value pair from the dictionary. Give it a try. It is super easy.
a13a41b434a74e85f8c97f4c2105853c9f1c953fa748caa28dcadaf6c890198c
['590409da979244929482c632ed012826']
The following code gives an error. The error occurs on "var businessIndes: Index!" It keeps asking me to add < Any>! then once I do it tells me to remove < Any>! What's weird is that this is supposed to be a term used by Algolia search, so I do not see what would be causing this. Any help would be appreciated. It's probably something small and obvious but I cannot seem to figure it out. import Foundation import UIKit import Firebase import AlgoliaSearch import SwiftyJSON import AFNetworking class ExploreVC: UIViewController, UITableViewDelegate, UITableViewDataSource,UISearchResultsUpdating, UISearchBarDelegate, UISearchControllerDelegate { let client = Client(appID: "APP-ID", apiKey: "API-KEY") override func viewDidLoad() { } @IBOutlet weak var tableView: UITableView! var searchController: UISearchController! var businessSearch = [Business]() var businessIndex: Index! let query = Query() var searchId = 0 var displayedSearchId = -1 var loadedPage: UInt = 0 var nbPages: UInt = 0
ee82094a88f14029277a1628bddac62029a9af88b7e53e9da649cb80872c4c85
['590409da979244929482c632ed012826']
I have found the solution! Preface: View Controllers have an assumed size. (the size of your phone's screen). That's why whenever I presented a view added a view to the UIView it was always 667 -(iPhone 6 Screen Size). So in order to fix that I did this: Code: if selectedIndex == 0 { vc.view.frame.size.height = 480 } if selectedIndex == 1 { vc.view.frame.size.height = 448 } if selectedIndex == 2 { vc.view.frame.size.height = 715 } if selectedIndex == 3 { vc.view.frame.size.height = 480 } This was placed inside the IBAction. Right after vc is defined.
9dbf84aaf625854fd91139422a113f62613650d7636eddde84428347696fd05b
['591767e1ac6343ec817455808b6d2523']
I'm trying to update a old template. Therefore I want to replace the vmargin package by the geometry package: Code before: \setpapersize{A4} \setmarginsrb{3cm}{1cm}{3cm}{1cm}{6mm}{7mm}{5mm}{15mm} Code after: \geometry{a4paper,left=30mm,top=10mm,right=30mm,bottom=10mm,headheight=6mm,headsep=7mm,foot=5mm,footskip=15mm} However, the margins are not the same. For example, the header line is much higher than before. Is there a way, to get the same margins by using the geometry package? <PERSON>
efbe9333f89843bdb82dd75a49435f9f59b38d89807c506e21ae024766a64034
['591767e1ac6343ec817455808b6d2523']
Es lo que veia en algunos sitios cuando buscaba mi error pero nunca me soluciono el problema que tuve con lo que ellos mencionaban que podria ser la solucion. Incluso en donde me fui guiando para hacerlo, nunca hicieron mencion sobre el Datasource ni presentaron problemas con ello. Es por eso que no se si estoy haciendo algo mal o que es lo que debo hacer en realidad
4c94827b256827a6843e745138236488505afa6535f84fceee997d0483a69fcf
['5918382c476840138c7991e7e00c74ca']
Using refresh token This can also be achieved in less time Get refresh token by API https://{{auth0_domain}}/oauth/token BODY- grant_type:password client_id:abcdefghijklmn audience:https://abcd.com username:abcd password:efgh scope:openid profile email offline_access In Response will generate Refresh Token, this token then can be used in getting accesss_token without again generating refresh token in future. It's a one time process only and it doesn't get expired in a day or a week or a month.
00aee1ff11d5162ca01ff1b5aff2ce4838f88bdf10fa02c100959292e59d8b4d
['5918382c476840138c7991e7e00c74ca']
I was trying to use if else to access [ ] condition pm.test("Cases here", function () { var jsonData = pm.response.json(); if (jsonData === null) { console.log('1'); postman.setNextRequest("Get Count"); } else { console.log('2'); postman.setNextRequest("Create"); } }) "I want Condition when empty should print 1" but my response is getting
5972dc87709d040ffb740635ae26379f5b429d8f2a7b54acb5b00abade6f1f39
['5918fd1c9a7746c0ab5c7b3011c8ca3b']
i have the following code in a angular 4 reactive form : <div class="btn-group" data-toggle="buttons"> <label class="btn btn-primary" *ngFor="let item of list;let i=index" > <input type="radio" name="someName" [value]="item" (click)="onSelectItem(i)" formControlName="someName" [checked]="isChecked(i)"> {{item}} </label> </div> onSelectItem(i) assigns the value of 'i' to a variable, isChecked(i) returns true only if i=that variable However, the buttons won't stay checked when i click them, they just keep the same appearence, it's driving me crazy. A fix would be greatly appreciated, english is my second language, thank you and good day
5e6e986e53b0bffbff5e28fca695d706cb30778b6952f0539e199802f74205fd
['5918fd1c9a7746c0ab5c7b3011c8ca3b']
i have the following perl code : my %conf = ( file => ".cookies", autosave => 1, destroy_at_the_end => 0 ); my $mech_instance = WWW<IP_ADDRESS>Mechanize->new( cookie_jar => HTTP<IP_ADDRESS>Cookies->new( file => $conf{file}, autosave => $conf{autosave}, ignore_discard => $conf{destroy_at_the_end}, )); $mech_instance->agent_alias('Linux Mozilla'); my $url = "http://challenge01.root-me.org/programmation/ch8/"; $mech_instance->get($url); $mech_instance->cookie_jar->save("cookies"); However both "cookies" and ".cookies" files are empty. I'm trying to solve a captcha related exercise on rootme, but the server won't accept my solutions, probably because the cookies aren't stored properly. All documentation seems to indicate that mechanize should be able to work with cookies easily. (I should not even have to manually set the cookie_jar, according to the docs). Does anyone know what is going on ? Thank you for your help
81fd7e91e018c141845cc69713788125824fbb39362fe02c5597c812509a9643
['5940cbd02ecc4477becd35f902992f8c']
how can i simplify these jquery code? any idea? $('#expand').click(function() { $('.bbit-tree-elbow-plus').addClass('bbit-tree-elbow-minus'); $('.bbit-tree-elbow-minus').removeClass('bbit-tree-elbow-plus'); $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-plus').addClass('bbit-tree-elbow-end-minus'); $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-minus').removeClass('bbit-tree-elbow-end-plus') if ($("#preview_root").hasClass("bbit-tree-node-collapsed")) { $('#preview_root').removeClass('bbit-tree-node-collapsed'); $('#preview_root').addClass('bbit-tree-node-expanded'); $('ul.bbit-tree-root .bbit-tree-elbow-end-plus').addClass('bbit-tree-elbow-end-minus'); $('ul.bbit-tree-root .bbit-tree-elbow-end-minus').removeClass('bbit-tree-elbow-end-plus') $('.bbit-tree-node-ct').show(); } $(".bbit-tree-node-ct ul").show(); }); $('#collapse').click(function() { $('.bbit-tree-elbow-minus').addClass('bbit-tree-elbow-plus'); $('.bbit-tree-elbow-plus').removeClass('bbit-tree-elbow-minus'); $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-minus').addClass('bbit-tree-elbow-end-plus'); $('ul.bbit-tree-node-ct .bbit-tree-elbow-end-plus').removeClass('bbit-tree-elbow-end-minus') $(".bbit-tree-node-ct ul").hide('slow'); });
3d5a38ff6f1df131fd3979dd961cd6de597d7173d089047910abe545d67025fb
['5940cbd02ecc4477becd35f902992f8c']
what is the best way to retrieve id from itunes app link? let say i have these link: http://itunes.apple.com/us/app/bring-me-sandwiches!!/id457603026?mt=8 http://itunes.apple.com/us/app/bring-me-sandwiches!!/id457603026 i just want to get the id, 457603026 using php preg_match
cfb3fcc6c8d481248c014c52a920ec0e26066ca42edf456f99267bfa1fe4311a
['5953268de97e475a825718f1079c63bc']
@user46688 - as long as I don't write or change anything in SYS schema since the full cold backup - You shouldn't write or change anything is SYS, but Oracle internal processes will, all the time. I see no reason to complicate your life with this strategy, use RMAN instead.
eacc19bddc695a25d8e34b2590a9ffceead93d3465f8bbe5c6c7c1edfaf0c2de
['5953268de97e475a825718f1079c63bc']
Tengo un ListView personalizado y un botón que al presionarlo guarda un dato, en este botón utilizo "SharedPreferences" las preferencias compartidas, el problema es que el adaptador(Codigo Java) es así: public class Adaptador extends BaseAdapter{ Entonces no puedo llamar el método SharedPreferences para guardar los datos entonces lo que hice cree un archivo Java llamado 'datos.java' y crear la función 'GuardarDatos' para guardar los datos que seria así: public void GuardarDatos(String posicion, boolean valor) { SharedPreferences prefs = getSharedPreferences("settingAlarmas", this.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putBoolean(posicion, valor); //ID - ESTADO editor.apply(); } La funcion '<PERSON>' esta siendo llama desde el adaptador de esta forma: Datos d = new Datos(); d.GuardarDatos("valor",true); //ID- Y Valor El problema es por el contexto en el cual es llamado por el this en el cual este solo sirve para la actividad actual pero Yo no se que contexto utilizar para que funcione la aplicacion porque están siendo llamado otros metodos de otras clases para hacer funcionar el adaptador personalizado
f37badf3a23317605522e63e13a4ff284f2a6cf6a6c2797ccd589e17ef4c32b1
['595fd0ffff514c85abd325402043bd8d']
Plugin conflicts cause most of these problems. If you are able to log into using wp-login.php kindly log inside and check after disabling one by one each plugin and check your site wp-admin in different browser if disabling a particular plugin gives you access to wp-admin then that plugin is the cause of this. It also happens in plesk cpanel sometimes due to permission problems. Kindly check if you are able to add more media and or try adding one more plugin. If it gives error while uploading media that cannot add or permission problem then try to change folder permissions to 755 for wp-admin and you should be good.
86c5fc47aae76933c163d2bb6ff176a4385e145be191b7a6a1dbf0a4b2ef5542
['595fd0ffff514c85abd325402043bd8d']
Correct, my tmux has no scroll-mode. You need to `C-b [` to enter copy mode and then use either the emacs or vi key-bindings to scroll around. This seems like a lot of steps just to scroll, but the benefits of tmux still outweigh these annoyances. I'm on a macbook and there is no PageUp key :-\. (Also, how do I make keys with markdown like you did, <PERSON>?)
8cd81db60c1be663b1f97ff4a7d67cd499472de62f70aa481cb0d87fd381b986
['596962da390a478fb7358fcbc47cc190']
I have some trouble with "locale" in my Rails App with ActiveAdmin after logging. How can i permit params for locale? Started GET "/admin?locale=ru" for ::1 at 2015-02-25 23:05:19 +0100 Processing by Admin<IP_ADDRESS><IP_ADDRESS>1 at 2015-02-25 23:05:19 +0100 Processing by Admin::DashboardController#index as HTML Parameters: {"locale"=>"ru"} AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = ? ORDER BY "admin_users"."id" ASC LIMIT 1 [["id", 2]] Unpermitted parameter: locale Redirected to http://localhost:3000/admin?locale=ru Completed 302 Found in 6ms (ActiveRecord: 0.2ms) my application_controller.rb before_filter :set_locale def set_locale I18n.locale = params[:locale] || I18n.default_locale end def default_url_options(options={}) { :locale => I18n.locale } end config/application.rb config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] # Do not swallow errors in after_commit/after_rollback callbacks. #config.active_record.raise_in_transactional_callbacks = true config.i18n.enforce_available_locales = true config.i18n.default_locale = :ru app/admin/admin_user.rb permit_params :email, :password, :password_confirmation, :role, :locale
4f9281485926cb0b9edc00298e8058c3de2be52d9692d8ccc55a19017649b77e
['596962da390a478fb7358fcbc47cc190']
I want to add export to PDFs in my app in ActiveAdmin, but i don't know how. Have anybody Experience? How i can add simple csv/pdf output in Show for any Order, but not for all? ActiveAdmin.register Order do actions :index, :show, :edit, :destroy index download_links: [:pdf, :xml] #only for all Orders, but bot pdf show download_links: [:pdf, :xml] #This not work for any Order index do column :id column :name column :address column :email column :pay_type column :created_at actions end show do panel "Order Information" do table_for(order.line_items) do |t| t.column("Product") {|item| auto_link item.product } t.column("Quantity") {|item| item.quantity } t.column("Price") {|item| number_to_currency item.product.price * item.quantity } end end panel "User Information" do table_for(order) do |t| column "Name", :name column "Address", :address column "Email", :email column "Pay Type", :pay_type column "Created:", :created_at end end end sidebar "Total price",:only => :show do number_to_currency order.line_items.to_a.sum { |item| item.total_price } end end
74759cdfcc91caba3af6f7795f1c32441142f3466555ba8ddf2cbd1d394431da
['598300bfc6084cbfaffc0bfcac29a859']
Thanks <PERSON> - I on closer inspection I think you are right about the protection diode. Cheers for the pointer about the heat sink, I will be doing a similar thing to what the author did - this implementation was purely a very quick and unfinished prototype. Heatsink, enclosure and a bit more heat shrink is still to come.
ba245597791c57c3e0b9674de814fac05725780dccc9c8723a50e02aaf5be2e1
['598300bfc6084cbfaffc0bfcac29a859']
I want to install a package (libappindicator3-dev) but it's not showing up for me when I try install it -- I'm using the sid/testing repository, so it should be there: http://packages.debian.org/sid/libappindicator3-dev So I was wondering if it's possible to download the .deb package directly without using APT, and install it with dpkg. I'm struggling to find the URL where the packages are located at though, I tried something like: http://ftp.us.debian.org/debian/dists/sid/main/ But there's no packages there and I only see information files. Could anyone possibly tell me where to find the .deb packages from the repositories? Thanks.
54073beb8fee36b26461439b651c574fedf537f41a083360616b243aa2d8ed34
['599f2b0e162340ef831f314dc151df69']
Hi stackexchange users, I have a data (model) class which has two methods which look like this: class ContactDetails { public function setWebsite($address, $type) { //do something... } public function getWebsite($type) { //do something... } } Now I want to create a form where the user can input a website address and choose a type (e.g. "private" or "business") for the address. To make this possible I have created a custom form type like this class ContactDetailsType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { $builder ->add('type', 'text') //better: choice, but for the sake of demo... ->add('website', 'text') ; } public function getName() { return 'ContactDetailsType'; } public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver ->setDefaults(array( 'data_class' => 'ContactDetails', )); } } The controller then looks like this: public function indexAction(Request $request) { //generate completely new cost unit $costunit = new ContactDetails(); //generate form $form = $this->createForm(new ContactDetailsType(), $costunit); $form->add('save', 'submit'); $form->handleRequest($request); if ($form->isValid()) { //yay! } } This obviously doesn't work, as the form component doesn't know how to map these two fields from the type to the data model class. Question: What is the best practise to map the data of two fields of a form to one method call in a data model class and vice-versa?
bf11cba490322b9f3436936f8dbf92cf6c15d2db17d894d115eba54366602ee7
['599f2b0e162340ef831f314dc151df69']
I'm using Symfony 2.7 and try to resume a session which has been interrupted by closing the browser window and clearing cookies. Now I want to resume this session by visiting a page and entering the session ID of the old, interrupted session. The naive approach doesn't work: class TestController extends Controller { public function resumeSessionAction(Request $request) { $request->getSession()->setId('known old id'); $this->redirectToRoute(...); //display route with the data from the old session } } leads to a LogicException Cannot change the ID of an active session Is it generally possible to switch a session if you are working in another session? Thanks for your help!
aa60cba5325e593a923050b71c7f875fdac0f95260bddacd6eb2dab6e140c3de
['599f4253c75a4d9b97b11879e91d8efa']
Looks like you are making an ajax call but not handling the response. and you are right, the success function is missing. You just need to populate the HTML element(you could use 'frame' or 'object' html tags to embed the pdf in the html page) with the response and also handle ajax errors. ajax({ url: '{{root_url}}/timecard/', type: 'POST', data: {'emp_id':employee_id}, dataType: 'html', success: function(response){ if (response) <get document elementid and set the inner html as the PDF response using javascript> }, error: function(xhr,status,error){ if xhr.readyState == 0 || xhr.status == 0 return; else alert("xhr status:" + xhr.status); alert("in get_report function") } }) BTW, your views code here is not clear but you need to output the PDF as an attachment. Something like this: response['Content-Disposition'] = 'attachment; filename="somefilename.pdf"' Output PDFs with django
1bf832cc15ef1514990f402a42fe9190cb813eb4c5e652aab9ac4aff2faecfd1
['599f4253c75a4d9b97b11879e91d8efa']
The way foreign keys are stored is through automatic fields(IDs). Since 'Category' is a foreign field of 'Product', when you make a record entry, the id of category is stored in 'product_category' field in products table. I think your code is a little confusing since you are trying to do somethings django does automatically for you. Like, once you define a foreign key, the id of the foreign key table record is stored automatically, you don't have to get the id of 'category' entry and store it in products table entry. What you are trying to achieve is simple, lets say you have the category_name and nothing else, get the id of the category table entry, category_object = Category.objects.get(category_name = category_name) category_id = category_object .id If you already have the ID of category, then you can skip the above step, and simply use the ID to query the products table to get the needed records Product.objects.filter(product_category = category_id) In your templates, you can iterate through these product records and display whatever is needed. BTW, use the .update() method to update any fields instead of save() method. Something like this: Entry.objects.all().update(blog=b) It will be well worth your time reading through the queries help. Django queries
10570b36f5e5ec971914605a7ea3a3b33a981a7ea789ecca872fa7b6b66ff631
['59a113834de545b3992089748940ee50']
In general, the .NET Framework is designed to maximize backward compatibility. Especially upgrading to a later point release rarely causes any issues. However, always check whether the new .NET Framework version is still supported by your (minimum) target Windows version? See .NET Framework system requirements Note that some of your dependencies might have another version available, which target the newer .NET Framework version, profiting from new features. See upgrade NuGet packages. Here is the complete guide: Migration Guide to the .NET Framework
81e1045e13bdc1a9fa6a536354eedcd6a7aa137a5750b2398fc3e9a0db9b1ea3
['59a113834de545b3992089748940ee50']
xUnit has been designed to be extensible, i.a. via the DataAttribute. InlineData, ClassData and MemberData all derive from DataAttribute, which you can extend yourself to create a custom data source for a data theory, in which you may read from you external file and use e.g. Json.NET to deserialize your data. User <PERSON> wrote about this in his blog regarding JSON, as you mentioned: Creating a custom xUnit theory test DataAttribute to load data from JSON files Source on GitHub Related question with data from CSV file: How to run XUnit test using data from a CSV file And here are two xUnit samples: ExcelData SqlData
146dc990cb8bf412f0333a3ffa82fd5cbe4f85c29e358b54e2197763fcdc768f
['59a3897db360465f81718c6766c1cacb']
For an adapter I've written I would like to have a small delay for the filter (to avoid starting a filter operation on each repeated keys and wait a fraction of a second until the user slows down his/her typing since the list to filter is potentially quite large and and filter operation will take a couple of 100s ms). Looking at the source for the Filter class it provides exactly that opportunity since it has a public Delayer interface which is used to get a delay time when posting a message (via sendMessageDelayed() ) to execute the actual filter on a separate worker thread (to get off the main UI thread). It also deletes any previous message still in the queue that has not yet been executed (due to the delay). So far so good. Seems perfectly simple to just implement that interface and extend the Filter class. However, for some reason the function to set the Delayer is annotated as @hide so strictly speaking this should not be used and could be removed in any future SDK updates. Which means I would be stupid to rely on it. What is the best way to solve this without having to re-implement the complete Filter class yourself (which seems a silly thing to do)? I guess one alternative option would be to setup and use my own handler thread and create a delayed message to call the filter function but it seems a bit heavy handed?
4fa04fdf407c741801ea707be8c33187847696de7d6967b080d9f93b515b0c47
['59a3897db360465f81718c6766c1cacb']
Going through some supposedly "good" sources sources to learn the details and tricks of context handling in Android I have come across one pattern multiple time that I fail to understand. What is the advantage of using a ContextWrapper when you could equally well use the implicit context? For example why use the following in an activity method (defined directly in an Activity class) ... ContextWrapper cw = new ContextWrapper(getApplicationContext()) File filesDir = cw.getFilesDir(); ... Instead of just ... File filesDir = getFilesDir(); ... even though getFilesDir() is defined in the ContextWrapper class the Activity is anyway a subclass of ContextWrapper so you have direct access to the method anyway. So what potential issue (that I fail to see) does this added complexity address?
258851d3dcdbf4eec675783d91a3e4a5f293a674a0b696fa8f8390c6116f8afc
['59b6b3e65f92416fa7e500424882e0f8']
Let's say I wanted to make an app where people would ask questions and get questions, based on their responses. What's an efficient way to do that? I get the feeling creating many View Controllers is not the way I'm supposed to do it. I'd like to know what I should do instead, or what concept I need to become more familiar with to implement something like this.
9ac7b149fd5f3eaefe04ff6372fd74f8bde98d7883b60207a916a1f27ba6d658
['59b6b3e65f92416fa7e500424882e0f8']
Figured it out. Seems like you have to use CoreText to pull it off though, not just TextKit. I still have to figure out how to extend the highlights so they cover the bottoms of letters and not so much of the top. And I have to figure out how to move the highlights so they're "behind" the text and not making the font color lighter, but this will get you 90% of the way there. import UIKit import CoreText import PlaygroundSupport // Sources // https://stackoverflow.com/questions/48482657/catextlayer-render-attributedstring-with-truncation-and-paragraph-style // https://stackoverflow.com/a/52320276/1291940 // https://stackoverflow.com/a/55283002/1291940 // Create a view to display what's going on. var demoView = UIView(frame: CGRect(x: 0, y: 0, width: 500, height: 500)) demoView.backgroundColor = UIColor.white // Haven't figured out if you can create a boundary around a UIView PlaygroundPage.current.liveView = demoView // Apparently it doesn't matter where we place this code // Calculates height of frame given a string of a certain length extension String { func sizeOfString(constrainedToWidth width: Double, font: UIFont) -> CGSize { let attributes = [NSAttributedString.Key.font : font] let attString = NSAttributedString(string: self, attributes: attributes) let framesetter = CTFramesetterCreateWithAttributedString(attString) return CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRange(location: 0, length: 0), nil, CGSize(width: width, height: .greatestFiniteMagnitude), nil) } } // Unwraps optional so our program doesn't crash in case the user doesn't have the specified font. func unwrappedFont(fontSize: CGFloat) -> UIFont { if let textFont = UIFont(name: "Futura", size: fontSize) { return textFont } else { return UIFont.systemFont(ofSize: fontSize) } } let string = "When you hear or read someone weaving their ideas into a beautiful mosaic of words, try to remember, they are almost certainly wrong." var dynamicHeight = string.sizeOfString(constrainedToWidth: 500, font: unwrappedFont(fontSize: 40)).height // dynamicHeight = 500 let boxSize = CGSize(width: 500, height: dynamicHeight) // let boxSize = CGSize(width: 500, height: 500) var imageBounds : [CGRect] = [] // rectangle highlight let renderer = UIGraphicsImageRenderer(size: boxSize) let img = renderer.image { ctx in // Flipping the coordinate system ctx.cgContext.textMatrix = .identity ctx.cgContext.translateBy(x: 0, y: boxSize.height) // Alternatively y can just be 500. ctx.cgContext.scaleBy(x: 1.0, y: -1.0) // Setting up constraints for quote frame let range = NSRange( location: 0, length: string.count) guard let context = UIGraphicsGetCurrentContext() else { return } let path = CGMutablePath() let bounds = CGRect(x: 0, y: 0, width: boxSize.width, height: boxSize.height) path.addRect(bounds) let attrString = NSMutableAttributedString(string: string) attrString.addAttribute(NSAttributedString.Key.font, value: UIFont(name: "<PERSON>", size: 40)!, range: range ) let framesetter = CTFramesetterCreateWithAttributedString(attrString as CFAttributedString) let frame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, attrString.length), path, nil) CTFrameDraw(frame, context) // Setting up variables for highlight creation let lines = CTFrameGetLines(frame) as NSArray var lineOriginsArray : [CGPoint] = [] var contextHighlightRect : CGRect = CGRect() var counter = 0 // Draws a rectangle over each line. for line in lines { let ctLine = line as! CTLine let numOfLines: size_t = CFArrayGetCount(lines) lineOriginsArray = [CGPoint](repeating: CGPoint.zero, count: numOfLines) CTFrameGetLineOrigins(frame, CFRangeMake(0,0), &lineOriginsArray) imageBounds.append(CTLineGetImageBounds(ctLine, context)) // Draw highlights contextHighlightRect = CGRect(x: lineOriginsArray[counter].x, y: lineOriginsArray[counter].y, width: imageBounds[counter].size.width, height: imageBounds[counter].size.height) ctx.cgContext.setStrokeColor(red: 0, green: 0, blue: 0, alpha: 0.5) ctx.cgContext.stroke(contextHighlightRect) ctx.cgContext.setFillColor(red: 1, green: 1, blue: 0, alpha: 0.3) ctx.cgContext.fill(contextHighlightRect) counter = counter + 1 } } // Image layer let imageLayer = CALayer() imageLayer.contents = img.cgImage imageLayer.position = CGPoint(x: 0, y: 0) imageLayer.frame = CGRect(x: 0, y: 0, width: 500, height: dynamicHeight) // Adding layers to view demoView.layer.addSublayer(imageLayer)
51edd4ac2cb176f00e18333efec66e43fd90dcf0e994ab8ffae475abc548f6f6
['59b833cd53c542028e69c3246790d775']
You're going to have problems with accessing both the local and the remote site due to DNS resolution conflicts. The `/etc/hosts` file is going to trump any other sort of DNS resolution. So, if you do set the www entries in your `/etc/hosts`, you're going to be able to access only the local installations. You're never going to be able to access both doing it this way.
c14d9d8ca17a866c1d53bf7c612df5b9ed7f4c062c0586793f696b8755edec45
['59b833cd53c542028e69c3246790d775']
[...the preferred way of implementing cp would include GETting the resource, DELETing it and PUTting it back again with a new name.] One problem with the above approach is lack of atomicity and consistency. Since each of the operations (GET, DELETE and PUT) happen over HTTP (which is stateless inherently) the server cannot enforce atomicity. For any reason, the client may abort after any step before the last step and that would leave the server with an inconsistent state in terms of its data. A possible approach: If the resources are documents (which I guess, they are in your case) I'd explore the option of using WebDAV. If WebDAV is not an option -- create a controller object on the server to manage copy and move operations, client can POST to something like /videos/my_videos/[video_id]/copy In your response you can specify the URI to the copied resource, in the lines of: HTTP/1.1 201 Created Content-type:video/x-msvideo Location:/videos/johns_videos/8765 Note: I prefer sending an ID back and working with resource IDs rather than something like Location: /videos/johns_videos/copied-2-gigabyte-video.avi Move operation is pretty similar except that the server may accept a destination resource. Example: http://example.com//videos/johns_videos/8765/move?destination=[destination] You can extend the above approach such that the server sends a Last-Modified tag to the client and client sends that along with its request. The server will perform the copy/move operations only when that value is still consistent. This will address concurrency issues with the resource being changed while your copy/move operations are still in progress.
87fd741263f7ca42634c6dcc1ed66ba2603c1eb6f1870aef3c83e213370eba2e
['59bdba484a9a47e8a93f8136a6212453']
You are doing it totally wrong. LONG_MAX is an integer, so you can't call strlen (). And it's not the number that gives the longest result, LONG_MIN is. Because it prints a minus character as well. A nice method is to write a function char* mallocprintf (...) which has the same arguments as printf and returns a string allocated using malloc with the exactly right length. How you do this: First figure out what a va_list is and how to use it. Then figure out how to use vsnprintf to find out how long the result of printf would be without actually printing. Then you call malloc, and call vsnprintf again to produce the string. This has the big advantage that it works when you print strings using %s, or strings using %s with some large field length. Guess how many characters %999999d prints.
13e787ce23648444820ac8ca059bffafbc07ce39bc5cabd8f1a875cb71f88d9f
['59bdba484a9a47e8a93f8136a6212453']
To start, user is an optional AnyObject. You can never expect that you can use an optional where anything non optional is required. Typically you will use "if let" to check whether the optional is there. But really, do you want to put an AnyObject in your database? This is asking for trouble. Check first that it has the right type.
2f82faf1a1953724a9dfcd867cf71e905ce4e9ecb1e4c7a8f1d50464cbd5510e
['59c6a30a0ba14d2790bccd685aa862b5']
Hi i'm using devise_token_auth with rails 5.1.6 .When i updated my rails version to 5.2.1 so i can use acts_as_favoritor 2.1.0, i got the error in my elasticbeanstalk environment log: Column `tokens` of type ActiveRecord<IP_ADDRESS>Type<IP_ADDRESS>Json does not support `serialize` feature. Usually it means that you are trying to use `serialize` is there any specific version of devise_token_auth that i can use with rails 5.2.1 ?
26463a7605bf080cfac02c85935047b5a7bd7a06056d624721ecc04c787d9e8d
['59c6a30a0ba14d2790bccd685aa862b5']
I am using <mat-select> for angular material with multiple choice, is there property to set for <mat-option> to check or not an option depending on a param. For Example if I have 3 objects: users = [{ name: 'name1', checked: true}, {name: 'name2', checked: false}, {name: 'object3', checked: true}] I want to get this when my select is displayed: <mat-select placeholder="users" multiple [(ngModel)]="bookform.users" name="data_scientists"> <mat-option *ngFor="let user of users" class="mat-selected" [value]="user.id"> <img src="http://corktrainingcentre.ie/wp-content/uploads/2015/08/person.png" class="member-picture">{{user.name}} </mat-option> </mat-select>
fe6de2e38efb61106cb52c135f867c8fc0e0d1cdf601305bdc25c965e837c45e
['59d8aefa434547e3a0d05364351b2b56']
As described in documentation "message" service message can have multiple arguments, so you need to specify at least argument 'text': "##teamcity[message text='Getting production info']" Your script will be write-host "##teamcity[message text='Getting production info']" if ($LASTEXITCODE -ne 0) { write-host "##teamcity[message text='Production Remote Not Found: Creating Remote']" write-host "##teamcity[message text='Pushing to Remote']" #git push production } else { write-host "##teamcity[message text='write-output: Production Remote Found: Pushing to Remote']" #git push production }
f5c30664e373e631064f84c275566b4b65ef1baca06f2af96c57237c42633d48
['59d8aefa434547e3a0d05364351b2b56']
You can create 2 build configurations: "Functional tests" configuration with VCS trigger. "Deployment" configuration with snapshot dependency on first configuration and also VCS trigger (or other trigger, e.g. Schedule trigger with 'Trigger build only if there are pending changes' option selected). Files will be deployed only if functional tests not failed on same code base. It is what you need?
5822c6cc714a26f8d2c4c5f76c9d8313cae6d7ea1451de7467dd177b7f616d39
['59dae14a366d46e58c5f434b62c3937f']
I tried this and it seems to work. $data = ReviewHeader<IP_ADDRESS>select( <IP_ADDRESS>raw('DATE(review_headers.`created_at`) AS dateTime'), <IP_ADDRESS>raw('(SELECT (ROUND((SUM(IF(rd2.`param_value` >=9, 1,0))/COUNT(rh2.id))*100,2)) - (ROUND((SUM(IF(rd2.`param_value` <7, 1,0))/COUNT(rh2.id))*100,2)) FROM review_headers rh2 INNER JOIN review_details rd2 ON rd2.review_header_id = rh2.id WHERE DATE(rh2.created_at) <= DATE(review_headers.`created_at`) ) AS cumulativeNPS'), <IP_ADDRESS>raw('COUNT(review_headers.id) AS review') ) ->join('review_details', 'review_details.review_header_id', '=', 'review_headers.id') ->groupBy(<IP_ADDRESS>raw('DATE(review_headers.`created_at`)')) ->orderBy('review_headers.created_at')
a8dc33acf2989570de2993d32eaf480eeb5ad3dec0aa3de14b2be90a14265462
['59dae14a366d46e58c5f434b62c3937f']
I know that the answer is really late :) But for the sake of anyone else who may have a similar error. <?php // change from: echo $form; echo $form->render(); ?> I was rendering the elements separately so this is how I did it: <?php // without the renderBegin() and renderEnd() it may give the no object error echo $form->renderBegin(); echo $form->renderElements(); echo $form->renderEnd(); ?>
5e888a439c16e44ea35f747ac818458113a0b77123cb2425f5a02618e74645b2
['59e0dfca7edf4f7fbac6f6aeff0e76a1']
I am beginner to pusher . I want to integrate pusher in android app , eventually i have done this. But i want to make connection of my app with pusher alive when android app is in inactive state. Is this possible to make connection when application is not running. and one more question associated with above is: Can we use pusher for the purpose of push notification in android when my server is on salesforce .
cd6a02f27221b93deae2776ee1245ca4627ab25b19d17bd5e4748dc9288834b9
['59e0dfca7edf4f7fbac6f6aeff0e76a1']
I am license owner in google developer account.I have invited some team members to join this developer program. One of the team member has admin role permission and he published an android app on play store on behalf of our group. What would happen if i delete that user from the team. Who will get the whole rights of published app by that user.
691fdbda78b47a09c2175eb548b4642048e4ea80304665f11840c364a2597cfc
['59ec33a993834c8b81093fc985303609']
This is a 2 Part Question! PART A <IP_ADDRESS> So Till this point all i can figure over was Till Android 4.2.2 there were two ways available to us : Use the logcat and extract information from it Runtime.getRuntime().exec( "logcat -v time -b main PhoneUtils:D"); I used this code to read the logcat and find out the "displayMMIComplete" message here Use the provided intent named "com.android.ussd.IExtendedNetworkService" and listen for this intent and do you task . So what I've acknoweldge till now is, Since 4.0 onwards this intent has been removed and since 4.2.2 onwards printing of USSD message info in the logcat has been removed? Am i right till here And secondly whats the hack or solution now to read the USSD message, there must be some way we can get through it? PART B<IP_ADDRESS> How can we try and intercept all the packets coming on the phone , and read the data those packets are carrying ? What i wanna do with them is, since server send these USSD response to our phone, i wanna know how the android phone receive these packets, What protocol is being used so that we can intercept those packets and read the data !
3b3f22ec44b5a241b2f2a2e4d3004f06d96f2b392da30ce0b597c9bf06fd2381
['59ec33a993834c8b81093fc985303609']
I've this application into which the input text is passed through adb shell , now the problem is whenever i type command : ./adb shell input text 'Khay' works perfectly fine and it display<"Khay"> it in a text-box in the application as it is supposed to be . but when i pass command that is very long something like : ./adb shell input text ' http://stagingapi.something.com/v2/api.php?apikey=2323214\&appid=32432\&imei=324234 ........................................................ is the text is this much longer it gives me an error error:service name too long. now i've a 2part questions. can i somehow pass this long text using adb shell . If option1 is not possible then what is it that i can do about passing this long input text
e36ee4e8f0399a9c713f620542850dcd853eee3b74cb8befcce37f80bf7a32db
['59eee5abc0494718bcae013a82cbe37a']
To find the adapter, run this command. lspci -nnk | grep -iA2 net; lshw -c ne If you're using Broadcom, here's a great resource that will show you how to install the drivers (I had to do this when I installed 15.04 last weekend) http://www.howopensource.com/2012/10/install-broadcom-sta-wireless-driver-in-ubuntu-12-10-12-04/ Hope that helps!
369cf859c84e754478742b067720fa2d9899e447411ff87eb750731d6811a0c5
['59eee5abc0494718bcae013a82cbe37a']
Thanks for your answer. Unfortunately, that didn't work. You can find more details of my problem in [antergos forum](https://forum.antergos.com/topic/11552/headphones-recognised-but-produce-no-sound/5). The file /var/lib/alsa/asound.state has following lines at the start: `control.1 { iface MIXER name 'Headphone Playback Volume' value.0 87 value.1 87 comment { access 'read write' type INTEGER count 2 range '0 - 87' dbmin -6525 dbmax 0 dbvalue.0 0 dbvalue.1 0 }`
134186afbf87e552bc1b68c5c3066fcc9656c2463cbd8d5fb6b06bfb223a82f9
['59f077c4ee7b471db04e97e376eaa72e']
Define "safe" and "worth". It will void your warranty, and you will risk bricking, blocking or otherwise ruining your phone, so it is anything but safe. It will also open the possibility of custom ROMs, modding, debloating, theming, hacking, backing up, extended updates support for recent versions of Android beyond what the manufacturer provides. All this at the expense of stability, bugs and probably worse battery life, and likely also a bunch of proprietary features like better camera and custom device features. Point is this is really a matter of personal opinion. Are those downsides really worth it for you? I am a strong proponent of rooting and custom ROMs especially to get rid of all the bloat and benefit from extra features, but it is admittedly a risk and requires knowhow and dedication.
09d9f45c3707d566baa259e8f91c5be2bfff9110de5075c4d45d10f6e155e0b7
['59f077c4ee7b471db04e97e376eaa72e']
I'd say in general you should refrain from using any absolute paths in your HTML file,they will almost definitely break as soon as you change devices, and is probably a bad practice regardless of the purpose. If you want to do this property I'd strongly recommend creating a master folder for all your recipe related files where you'd keep all the involved assets, like HTML files, photos, and maybe some sort of index. Then maybe store all images in the same subfolder called Pictures or whatever suits you, and refer to them always using a relative path like src="..\pictures\cake.jpg". Same goes for the link to the recipes href="recipes\deserts\pudding.html" always keep reative paths instead of absolute ones. You can then freely transfer or sync your folder structure to your tablet (or any other device for that matter) and have it work seamlessly without additional trouble, as long as you keep the sub directory structure intact. Doing all this by hand at this day and age seems quite arcane though, if you don't mind me saying. You could consider upgrading to something like TiddlyWiki to automate part or all of the process. It is a totally self contained, fully offline single file mini wiki/outliner/database that works from a single HTML file containing all the necessary html, JavaScript, CSS, and data. You can use it partially just to automate building your index and link to your existing html recipes, or fully convert your discrete recipe files into one unified database. Its real power however lies in its builtin tagging and searching functionality that would make accessing your recipes a whole lot more convenient and faster, so transferring your recipes would be beneficial in the long term. You don't even have to do it all at once, you can gradually transfer files one by one and keep some as linked external HTML files. It is also highly configurable and hackable, if you say you already write HTML on your laptop you should have little trouble entering the world of TiddlyWiki markup scripting. You can learn more about it at the TiddlyWiki Google Group, I'm sure there are already plenty of user cases for recipe storage there. You can still keep your data in a fully open, human readable file format, accessible anywhere there is a modern browser.
dfc3cef755f2b368d74d43eeaa4b34871255902d8f775fbdf191325522b14d43
['5a0f27b9b7134597903269417c512f80']
I apologize in advance if I'm fundamentally misunderstanding something here. But I'm trying to figure out where the data is produced that forms the t-distribution on which one calculates the p-value for a coefficient in linear regression. Is the regression run multiple times, maybe on bootstrapped samples, in order to create this distribution?
eb15f3fe6f7ae7467d628ffa894ce9813608e4cb9df525a62002150c1d977b5b
['5a0f27b9b7134597903269417c512f80']
I'm trying to improve my intuition surrounding machine learning algorithms. Let's say I have a continuous feature (for example, let's use the length of a flower stem), and I'm considering using that feature in a classification model to help me predict the type of flower it is (let's restrict the problem to roses vs. violets). Should the mean stem length for roses be statistically significantly different (through a Welch's t-test or some other test) from the mean stem length for violets if this feature is to be predictive in my model?
c113031373f99fdc4ef04faf7095dabf83c60c66fc8d16621b02e1cda5c69bc9
['5a16e5a4bb3f478e89d11cabfae7acc6']
I would suggest you to try to use the binomial theorem expansion which can be proved by induction, for more details about that see https://en.wikipedia.org/wiki/Binomial_theorem. At least on part a) you should get: $$ \sum_0^n \frac{n!}{(n-k)!(k!)}n^k-1 $$ which should expand to something like: $$n^n+nn^{(n-1)}+...+n^2+1-1=0\ mod \ n^2$$ Hopefully using the same Binomial expansion theorem you should get something useful for the second part.
857f420e2cd485d04ba470f003bd9686e0b79e43e11f6935709bb038ede35e01
['5a16e5a4bb3f478e89d11cabfae7acc6']
I think f(u,v) can also be thought as f(x,y) via $uv=y^2$ and $\frac{u}{v}=x^2$. Then to take $$\frac{\partial f}{\partial v}=\frac{\partial f}{\partial x} \frac{\partial x}{\partial v} + \frac{\partial f}{\partial y} \frac{\partial y}{\partial v}$$ This should be equal to $$\frac{\partial f}{\partial v}=\frac{\partial f}{\partial x} (\frac{-u^\frac{1}{2}}{2v^\frac{3}{2}}) + \frac{\partial f}{\partial y} (\frac{u^\frac{1}{2}}{2v^\frac{1}{2}})$$ The second derivative should look like $$\frac{\partial^2 f}{\partial u \partial v}=\frac{\partial }{\partial x}\left(\frac{\partial f}{\partial x} (\frac{-u^\frac{1}{2}}{2v^\frac{3}{2}}) + \frac{\partial f}{\partial y} (\frac{u^\frac{1}{2}}{2v^\frac{1}{2}})\right)\frac{\partial x}{\partial u}+\frac{\partial }{\partial y}\left((\frac{\partial f}{\partial x} (\frac{-u^\frac{1}{2}}{2v^\frac{3}{2}}) + \frac{\partial f}{\partial y} (\frac{u^\frac{1}{2}}{2v^\frac{1}{2}})\right)\frac{\partial y}{\partial u}.$$ At the end you should be able to rewrite everything in terms of x, y, $\frac{\partial^2 f}{\partial x \partial y}$, $\frac{\partial^2 f}{\partial y \partial x}$, $\frac{\partial^2 f}{\partial x^2}$ and $\frac{\partial^2 f}{\partial y^2}$. Hopefully this hint helps.
8d311d95c9de48c0bbdb443ea85e812667556117844b3e4abecbc1b05cb6f2a9
['5a17f7b036ec44678ec833a9f12c9888']
z[l]=w[l]a[l−1]+b[l] In this if I interchange w and a terms i.e. z[l]=a[l−1]w[l]+b[l] I know matrix multiplication constraints that is no. of columns in first matrix should be equal to number of rows in second matrix. If we ignore those constraints, that is these constraints are satisfied z[l]=a[l−1]w[l]+b[l] is valid, then how will this affect my neural network? Will this work? what change can I expect?
ad0ca0e813082348e86160a3e465fd49c0e23a228b0b4772d53931594e120748
['5a17f7b036ec44678ec833a9f12c9888']
ok thank u ..i get it now...but still i have a confusion about the 1−y(wx+b) part. if i am not wrong yi in above equation is the actual output of training example xi. so if suppose yi is -1 , the equation becomes 1+(wx+b) (replacing yi =-1). how this equation will give a value less than or equal to zero so that no penalty is their for right prediction...plz give some intuition on "1−y(wx+b)" this part of equation
6d7bf3b5fd0049ffbf9d319d26827e5cf2a25aeffec3d782ae45b198524226f1
['5a58a3b8fd6a466f9d5cfdc1398cf265']
I want to know the use of KVO in swift as I read in Apple Doc or any other online articles it states that it provides indirect access to properties and addressable via string. I have a set of doubts. If I can set the property directly via person.name = "<PERSON>" they why to use a Set Value for key name = "<PERSON>" indirectly Apple doc says key-value coding compliant can participate in a wide range of Cocoa technologies like Core Data. Why it's used and not in other frameworks It is used during runtime or dynamic to set value. How it is? Is it TypeSafe and how? Its an Objective - C feature then why still used in Swift 4 with latest improvements with ./Type.property access and set
d18c02d57bd2f9543925e57208f41245d0e75fbbee9a6f9c2af7898c41632f0e
['5a58a3b8fd6a466f9d5cfdc1398cf265']
I have a requirement for an editor app where i want to store data in the form of image ,audio and video in realm Object as i am new to realm and swift.where i am able to write data but how to read in form of array of objects.
940526b1fee2837cbe28bcf1871231283492bd465fdb2c392de82265ce7e5903
['5a5fef9c4bc34e5ebda100e9c6e7051f']
Ok, based on the comments received it seems that the ideal solution is to break the modules into sub-modules and use those as dependencies. However, as this is currently a time consuming task, I am posting a quick and dirty solution on how you can include one or more java files into your build by copying the files under a new source directory, src/main/external, and then add this directory as part of your sources. <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>copy-source-java-files</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>src/main/external</outputDirectory> <overwrite>true</overwrite> <resources> <resource> <!-- External source directory --> <directory>../tools/src/main/java/</directory> <includes> <!-- Files to be copied along with their directory paths --> <include>tools/log/Log.java</include> <include>tools/socket/SocketClient.java</include> <include>tools/client/reader/**</include> </includes> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/java</source> <source>src/main/resources</source> <source>../common/src/main/java</source> <!-- Here we add the source with the files copied --> <source>src/main/external</source> </sources> </configuration> </execution> </executions> </plugin> </plugins> </build> The output after compilation would be as follows: root/pom.xml |________client/pom.xml |________/src/main/java |________/src/main/resources |________/src/main/external <----- This contains all external java files.
38eb55df4660ec53901dae71e79ad8767522621030ee6127f67b872bde280066
['5a5fef9c4bc34e5ebda100e9c6e7051f']
I am working on JavaFX the last couple of months. I am trying to find a way to implement a listener that is fired whenever a particular pane is shown on the root pane/scene. In Java, I could implement this using the ancestorListener on JPanel as shown below, but I cannot find the equivalent method on JavaFX. JPanel panel = new JPanel (); panel.addAncestorListener ( new AncestorListener () { public void ancestorAdded ( AncestorEvent event ) { System.out.println("This panel is shown on screen now"); } public void ancestorRemoved ( AncestorEvent event ){} public void ancestorMoved ( AncestorEvent event ){} } );
6b0f5ee766d81a3f1bb2bbcecf2362d30f0db671ae92c04e2c5466057b2e7886
['5a7401abd742413a9c2c88f479531022']
I have an object with users: const data = [ { name: "John", lastName: "Doe", email: "<EMAIL_ADDRESS>", password: "123", following: [{ id: "113"}, { id: "111" } }], id: "112", }, { name: "Jane", lastName: "Doe", email: "<EMAIL_ADDRESS>", password: "123", following: [{ id: "112" }], id: "113", }, { name: "Mark", lastName: "Twain", email: "<EMAIL_ADDRESS><PERSON>", lastName: "<PERSON>", email: "stefa@gmail.com", password: "123", following: [{ id: "113"}, { id: "111" } }], id: "112", }, { name: "<PERSON>", lastName: "<PERSON>", email: "dusica@gmail.com", password: "123", following: [{ id: "112" }], id: "113", }, { name: "<PERSON>", lastName: "<PERSON>", email: "marko@gmail.com", password: "123", following: [], id: "111", }, ]; As you can see all users have an array named "following", and that array contains id's of users which the user follows. I want to access that array "following" to find out which users are not followed. Let's say that we want to check the "following" array of the first user <PERSON> with id="112". const followers = []; let suggestions = null; props.users.forEach((user) => { if (user.id === '112') { user.following.forEach((item) => { followers.push(item); }); } }); followers.map((item) => { suggestions = props.users.map((user) => { if (user.id !== item.id && user.id !== '112) { console.log(item.id); return <div>something</div>; } }); }); I tried something like this, but the result is not what i expected to be. As i said, i want to return users that are not followed and render them because i want them to be visible so the user can follow them. I hope that i was understandable enough. Thanks.
9568297c8922a31b322566044e565cb68e54dc75a1fffeb2fa37d3f2155ae45b
['5a7401abd742413a9c2c88f479531022']
I need to pass two methods to my child component. That component is <NavigationBar/>, and there i have two <li> elements Field and Statistic. When i click on Field i want to execute pausedMethod(){something=true}, when i click on Statistic i want to execute resumeMethod(){something=false}. I can listen for one event like this <NavigationBar v-on:click="pauseMethod"/>, but when i pass another method <NavigationBar v-on:click="pauseMethod" v-on:click="resumeMethod"/> i'm getting an error that i'm call two times for v-on:click. How to pass two methods to componenet and how can i listen for both. Thank you!
1a03107bf56b2278ab208e70edce3caed779bdac090f425e105396f0a1e67d3d
['5a84ce98f0004ef6bccbdc4903d04d41']
Hi this is my first project in both React and Django Rest Framework and I need to figure this out to complete the project. The issue I'm having (I believe it's a React one) is that my api is returning an json response which React receives using axios which works fine since when I do the console log all the data is there and Im also able to pass the data to a tag, etc. I would like to display the photos that are being sent to by the api. The link is not the problem as I am able to view the photo in the browser using the link provided by the api. The problem is that I have multiple images in the api response that are set up as an array. As shown here: postmanResponse Response using console: enter image description here I guess essentially what I'm asking is there a way that I can make an array/object with the image array that my api is delivering so that I can then use it to show the picture in React? Any help will be helpful. Thank you! Here is my code for the React side: // Import Files import React, { Component } from 'react'; // Import Axios import axios from "axios"; // Import Is Mobile import { isMobile } from 'react-device-detect'; // Import Css import "./projectDetail.css"; // Mobile Css import "./projectDetailM.css" // Lightbox import { SRLWrapper } from "simple-react-lightbox"; // Import Footer import <PERSON> from "../Footer/footer" // Project Detail Class class ProjectDetail extends Component { // States state = { data: [], photoIndex: 0, isOpen: false, } // Mount Data to the State componentDidMount() { this.handleFetchItem(); } // Get the project via axios handleFetchItem = () => { // Variables const { match: { params } } = this.props // Set State this.setState({ loading: true }); // Axios Setup axios.get('http://<IP_ADDRESS>:8000/projects/' + params.ID) .then(res => { this.setState({ data: res.data, loading: false }); }) .catch(console.error()); } // Render the page render() { // Const const { data } = this.state; const project = data; // Print to console (Debugging) //console.log(data); // Return Page return ( <div className="projectDetailMainContainer"> <div className="projectDetailGrid"> <div className="projectDetailArea"> <div className="projectNameArea"> <h1 className="projectNameStyling"> {project.title} </h1> </div> <div className="projectAddress1Area"> <h2 className="projectAddress1Styling"> {project.address}, </h2> </div> <div className="projectAddress2Area"> <h2 className="projectAddress2Styling"> {project.address2} </h2> </div> <div className="projectCityArea"> <h2 className="projectCityStyling"> {project.city} {project.zipcode} </h2> </div> <div className="projectProgressArea"> <h3 className="projectProgressStyling"> {project.completed} </h3> </div> <div className="projectReturnButton"> <button className="btnStyleDetailPage" type="button" onClick={() => { this.props.history.replace('/projects') }}> Return to Project List </button> </div> </div> <div className="projectDetailImageArea"> <SRLWrapper> <img className="projectImageStyling" src={require("./placeholders/city.jpg")} alt={project.title} /> </SRLWrapper> </div> </div> <Footer /> </div> ); } } // Export Compoenent export default ProjectDetail;
769e55b852bae3f203d387234bcf952a9b0d552122acf5f2e9ac2a1d9d5b88a1
['5a84ce98f0004ef6bccbdc4903d04d41']
Hi I'm new in react so sorry in advance if I missed something obvious. I'm having problems with returning links from my json while using the map function. I have been trying to use the map function to return several links that are in an array in json file that I have but I seem to be doing something wrong. I would like to go through the array "Images" and get each link and print it in the console (For now. I will use it later to show the image). Here is the result of using the code below: [![Using file.images.src][1]][1] If I do file.images it returns this: [![Using file.images][2]][2] (I have no idea why it prints twice) Here is my code import React, { Component } from 'react'; // Project Detail Class class ProjectDetail extends Component { constructor() { super(); this.state = { data: [ { "id": 19, "title": "Example 1", "address": "Example -address", "address2": "Example -address", "city": "Example City", "zipcode": "00000", "client": "Example 1 llc", "commercial": true, "residential": false, "completed": "Completed", "featured": true, "images": [ { "src": "http://<IP_ADDRESS>:8000/media/images/waves.jpg" }, { "src": "http://<IP_ADDRESS>:8000/media/images/volcano.jpg" }, { "src": "http://<IP_ADDRESS>:8000/media/images/city.jpg" } ] } ] } } // Render the page render() { return ( <div> {this.state.data.map((file) => { return console.log(file.images.src) } )} </div> ); } } export default ProjectDetail; The result I'm looking for is: http://<IP_ADDRESS>:8000/media/images/waves.jpg http://<IP_ADDRESS>:8000/media/images/volcano.jpg http://<IP_ADDRESS>:8000/media/images/city.jpg The json file format is done by django-rest-framework (maybe thats causing it) Thank you for your time :)
021cebefbfdabea1808d796d9ed62cbecbb027fe7f7f89c5324a154bfaf5a8f7
['5a89fec3692045fd987cc7b8d52de712']
You also can use the new searchPaths setting since 1.0.1 config: server: git: uri: http://host:port/configuration/git/app.git repos: team1-config: uri: http://host:port/configuration/config.git searchPaths: team1* pattern: team1_* team2-config: uri: http://host:port/configuration/config.git searchPaths: team2* pattern: team2_* By using searchPath, you can keep everything within a config-repo but divided into different folder. Potentially, each folder for a different project.
a4d84a982800a108be9a8844c34ae55f8644407ff812d17e9631d38e9c2d6c8f
['5a89fec3692045fd987cc7b8d52de712']
Without a pattern the server doesn’t deliver any configuration from any of the files in the repo. On top of that while pattern: “*” works, it only works for first repo. After that, the Cloud Config Server cannot load any configuration from any file in any other repo no matter what pattern is given. This includes the default repo. If you don't need the pattern, you can simply using the git: uri: ssh://git@stash:7999/scc/common-config.git If you need to use the repo with pattern, make sure your application's spring.application.name in bootstrap.yml has the same pattern. For example, spring: application: name: domain-foo-app-a
300aefbf49c75d52aa591331f26ab3d1fb1923222d768242f5a6dba20941929a
['5a8e9941d5c84316850cf8deb62b0860']
The EnfantParents is a hidden table From the above I assume you are using EF with auto "link" table, your Enfant entity has Parents navigation property and your Parent entity has Reservations navigation property. Then you can achieve the same result as the SQL query with a LINQ query like this: var query = db.Enfants .Where(e => e.Parents.SelectMany(p => p.Reservations).Any(r => r.CrecheId == 1));
da0f76e80852fb11a1686117ad3d041f89afa2beb6f7c04230a7807823fd8bf0
['5a8e9941d5c84316850cf8deb62b0860']
Once you have control on the underlying data source class, you can add a special property used just for data binding (this way not breaking the existing code) and use attributes to control which one applies to UI. Let assume your class is something like this class MyClass { // .... public byte[] Password { get; set; } } You can change it as follows class MyClass { // .... [Browsable(false)] public byte[] Password { get; set; } [DisplayName("Password")] public string PasswordText { get { ... } } } and will get the desired behavior in DataGridView and similar controls.
24707ea17e1c6a70ba0290a997b557316da21582beb46b626ff98781c586ee63
['5aa8475054a44fd380ba5078d4e802e1']
You can use something like that let list = document.querySelectorAll('.product') for (let item of list){ item.children[0].remove() } <ul class="myclass"> <li class="product-category product"> <a href="#">del</a> <a href=""> all product info here </a> </li> <li class="product-category product"> <a href="#">del</a> <a href=""> all product info here </a> </li> <li class="product-category product"> <a href="#">del</a> <a href=""> all product info here </a> </li> </ul>
fa502d6d84f5a7248a331a4f7c2df5f39b66b4dbfe990bebb637432af5ab8981
['5aa8475054a44fd380ba5078d4e802e1']
One more way to solve this. let array = [{x: 205, y: 205},{x: 230, y: 205},{x: 255, y: 205}, {x: 205, y: 205},{x: 205, y: 205},{x: 205, y: 205}] let sortedArray = [] array.forEach(elem => { if (!sortedArray.includes(JSON.stringify(elem))) { sortedArray.push(JSON.stringify(elem)) } }) sortedArray = sortedArray.map(elem => JSON.parse(elem)) console.log(sortedArray)
b1b879c07d9abf3bab1b32f240214ec99231bf4d30a244edf46a81ea7ec35f15
['5aadea49e0ea42e6aa045d0e2201a532']
I am trying to join 2 height balance trees. for that purpose, I am writing join() function in C. I have done everything as per as instruction but for something, it is showing segmentation error. I understand that segmentation error happen when there is a bad pointer. I am trying to code in C. I could not figure out where is the bad pointer. I could not understand where did I do wrong. in the code, there is the part 2 and 2.1 in join() function. If I could do that, rest of the parts are pretty much identical. Please let me know where is the error and mistake in my code. please do not give any rude comment, I am learning advanced data structure. thank you in advanced. // I have 2 trees tree1 and tree2. this part is the part when I am joining. there are other parts in the code, but other parts are identical to this part of the code. If I could figure out what I did wrong here, I can figure out for the rest part // join() function tree_node_t *join(tree_node_t *tree1, tree_node_t *tree2, key_t separating_key) { tree_node_t *common_root, *tmp2, *new_node, *tmp_node, *tmp1, *up; int finished; //------------------introduction---------------------------------------------- // we have 2 height balanced tree tree1 and tree2. these 2 trees are arguments. // all keys in tree1 smaller than all keys of tree2 tree1->key < tree2->key; //----------------------------------------------------------------------------- //-------------------part 1---------------------------------------------------- while(abs(tree1->height - tree2->height) <= 1){ common_root = get_node();// adding a common root common_root->left = tree1;// putting tree1 at left tree1->upper = common_root; common_root->right = tree2;// putting tree2 at right tree2->upper = common_root; common_root->key = separating_key; } //-------------------------------------------------------------------------------- //--------------------part 2------------------------------------------------------ while(tree1->height <= tree2->height - 2){ tmp2 = tree2; /*while(tmp2->left != NULL){ tmp2 = tmp2->left; }*/ while(tmp2->left != NULL && tmp2->height <= tree1->height){ // -------------------------start of part 2.1---------------------------- while(tmp2->left != NULL && tmp2->height == tree1->height && tmp2->upper->height == tree1->height + 2){ up = tmp2->upper; new_node = get_node(); new_node->height = tree1->height + 1; up->left = new_node; new_node->right = tmp2; new_node->left = tree1; new_node = tmp2->upper; up = new_node->upper; new_node->key = separating_key; up->height = tree1->height + 2; }
0c990f9a45e7f788cb256e6717990a9b54ef292f0bf3dcb1b4eb09a240cc64f1
['5aadea49e0ea42e6aa045d0e2201a532']
i am trying to pull from a repository in bitbucket. i am giving bash-4.1$ hg pull https://<EMAIL_ADDRESS>/golmschenk/i4330-notification but it shows like this pulling from https://<EMAIL_ADDRESS>/golmschenk/i4330-notification searching for changes adding changesets adding manifests adding file changes transaction abort! rollback completed abort: Input/output error bash-4.1$ please let me know how to solve this problem. thanx in advance
c65b51d1ca6c6ecbcee2fdc7a98743dfedccc3ce3adbfbba871d80eee70e687b
['5abffb17f53543eb8a1d1937b19f6a1f']
I have a VF page that works fine in a Dev org, but when installed in another org it breaks with: SObject row was retrieved via SOQL without querying the requested field: Namespace__Hub__c.Namespace__ClientName__c <apex:page standardController="Hub__c" extensions="HubControllerExtension"> <apex:form > <apex:pageBlock title="Hub"> <apex:pageBlockSection columns="1"> <apex:pageMessages /> <apex:inputField value="{! Hub__c.ClientName__c }"/> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton action="{! save }" value="Save" /> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page> When I look at the VF code that's installed in the new org, the only difference is the first line: <apex:page standardController="Hub__c" extensions="HubControllerExtension"> is now: <apex:page standardController="Namespace__Hub__c" extensions="Namespace.HubControllerExtension"> It seems that the actual input field is still <apex:inputField value="{! Hub__c.ClientName__c }"/> and not <apex:inputField value="{! Namespace__Hub__c.ClientName__c }"/> which looks wrong to me. If I copy the HubControllerExtension class into a new class in the new org, and create a new VF page that prepends the Namespace to the fields, everything works: <apex:page standardController="Namespace__Hub__c" extensions="HubControllerExtensionTwo"> <apex:form > <apex:pageBlock title="Hub"> <apex:pageBlockSection columns="1"> <apex:pageMessages /> <apex:inputField value="{! Namespace__Hub__c.Namespace__ClientName__c }"/> </apex:pageBlockSection> <apex:pageBlockButtons > <apex:commandButton action="{! save }" value="Save" /> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page> However, if I try to prepend the namespace in the input field in the Dev org, it fails in the Dev org. I was under the impression that a managed package would automatically prepend the namespace when installed in another org. What am I doing wrong?
5b08468b4525ee41e3ebb1e6aae0cba5343646067a4eb49050360c66cca2c767
['5abffb17f53543eb8a1d1937b19f6a1f']
We have a setup here were users can remote into our network via VPN and then remote to their desktops. This was all working fine. The other day, we moved DNS from one server to another. I changed all the entries I could find in the ASA to the new DNS server's IP but now after connecting via VPN, you can't ping or RDP to any of our servers or desktops via IP or FQDN. I tried clearing the DNS cache to no avail. Any ideas as to what I am missing here? Thanks.
8291a25048f0354c4e2c51977939ed12e9f019c3e0ebac09100aec376a2eaa6c
['5ac377df41d44028a4deca64b1ebb601']
I have a <select> element defined like this: <select> <option>1</option> <option>2</option> <option>3</option> </select> I would like to get the same functionality (being able to select an option), except I want to permanently display all the options, instead of hiding them in a drop-down-list. I basically want to make a listbox. Would this be possible? Is there already an element that will do this? Would I have to modify the element?
ba7953ab7d208509d42d25396aec270a7d227395cae7795b23f1e0ede46cbe8f
['5ac377df41d44028a4deca64b1ebb601']
I am drawing a line chart. Sometimes there is no value (null) for a certain time. I want to draw a line between two points even if there are null points in-between example: ['2010-01-01',123],['2010-01-02',null],['2010-01-03',349] I want it to draw a line between 2010-01-01's data and 2010-01-03's data, ignoring 2010-01-02's null value Is this possible?
29281ae09b7e6a97d4da8828e686b768ebcad41a303191fbaa36675e3f6f08ea
['5ac56463bff5482f94298b908d653e14']
Currently I am trying to solve a problem with a nested for loop. I have solved it using the reverse method before. Now I am given it a go with a nest for loop. I am confused on why my code doesn't work. Would love and appreciate some guidance. Thanks in advance. function palindrome(str) { var splitStr = str.split(""); for(var x = 0; x < splitStr.length; x++){ for(var j = splitStr.length-1; j >= 0; j--){ if(splitStr[x] === splitStr[j]){ return true; } } return false; } } palindrome("racecar");
38164bc308a5146b77579a625c3474aa1aa561e8be3e8ed5689fd4f22a96adb3
['5ac56463bff5482f94298b908d653e14']
I've been working with a dataset and solved some of the constraints given but now I am stuck. Any help and explanation is very appreciated. The question is: Write the function bot_spammers that accepts the absolute path of the activity logfile, and returns a list of all the spammer names The conditions to identify a spam is : - The user has no original tweets. - The user has at least one retweet. - All the retweets of this user occur within 1000 milliseconds of the original tweet. - In the corner case where the retweet occurs exactly 1000 milliseconds after the original tweet, it should also be considered as a spam retweet. - The output list must not contain duplicates. Here is my solution so far: let dataEntry = data.trim().split('\n').map(dataLog=>{ return JSON.parse(dataLog); }); dataEntry[0]; let users = {}; let secondOutput = [] for(let i = 0; i < dataEntry.length;i++){ if(!users[dataEntry[i].user]){ users[dataEntry[i].user] = { actions:{ [dataEntry[i].action]:0}, bot:false}; } else{ users[dataEntry[i].user].actions[dataEntry[i].action]+=1; } } Currently my user object stores users the first time they are seen, but I am also getting tweets as NaN. Am I storing the users wrong? Also here is the sample data I am working with: let data = `{"action": "tweet", "id": 8270627288848549106, "message": "woop #vim", "timestamp": 1487149317226, "user": "<PERSON>"} {"action": "retweet", "target_id": 8270627288848549106, "timestamp": 1487149317678, "user": "spambot"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149320543, "user": "neovim"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149320596, "user": "eevee"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149320730, "user": "r00k"} {"action": "tweet", "id": 9428781849524299055, "message": "woop #chess", "timestamp": 1487149394095, "user": "<PERSON>"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149397523, "user": "<PERSON>"} {"action": "tweet", "id": 16606634614844517897, "message": "woop #ruby", "timestamp": 1487149445603, "user": "hugopeixoto"} {"action": "retweet", "target_id": 16606634614844517897, "timestamp": 1487149446020, "user": "spambot"} {"action": "retweet", "target_id": 16606634614844517897, "timestamp": 1487149446592, "user": "noob_saibot"} {"action": "tweet", "id": 14936153188153171323, "message": "woop #vim", "timestamp": 1487149463067, "user": "eevee"} {"action": "follow", "target": "eevee", "timestamp": 1487149466209, "user": "pkoch"} {"action": "tweet", "id": 1801829421162967878, "message": "woop #processes", "timestamp": 1487149468671, "user": "r00k"} {"action": "retweet", "target_id": 1801829421162967878, "timestamp": 1487149469555, "user": "noob_saibot"} {"action": "follow", "target": "r00k", "timestamp": 1487149472418, "user": "pkoch"} {"action": "tweet", "id": 17893479187194161545, "message": "woop #chess", "timestamp": 1487149492184, "user": "GMHikaru"} {"action": "retweet", "target_id": 17893479187194161545, "timestamp": 1487149493120, "user": "noob_saibot"} {"action": "follow", "target": "GMHikaru", "timestamp": 1487149495548, "user": "Vachier_Lagrave"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149495615, "user": "<PERSON>"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149496034, "user": "<PERSON>"} {"action": "tweet", "id": 5861128972147966174, "message": "woop #infra", "timestamp": 1487149496888, "user": "Pinboard"} {"action": "retweet", "target_id": 5861128972147966174, "timestamp": 1487149497698, "user": "noob_saibot"} {"action": "retweet", "target_id": 5861128972147966174, "timestamp": 1487149497790, "user": "robot"} {"action": "retweet", "target_id": 5861128972147966174, "timestamp": 1487149498273, "user": "_ko1"} {"action": "tweet", "id": 15546610455779134048, "message": "woop #infosec", "timestamp": 1487149655432, "user": "tqbf"} {"action": "retweet", "target_id": 15546610455779134048, "timestamp": 1487149656272, "user": "robot"} {"action": "follow", "target": "tqbf", "timestamp": 1487149659229, "user": "FioraAeterna"} {"action": "follow", "target": "tqbf", "timestamp": 1487149659338, "user": "Pinboard"} {"action": "tweet", "id": 16097723073400512850, "message": "woop #foss", "timestamp": 1487149769185, "user": "sarahjeong"} {"action": "retweet", "target_id": 16097723073400512850, "timestamp": 1487149769498, "user": "spambot"} {"action": "retweet", "target_id": 16097723073400512850, "timestamp": 1487149770023, "user": "noob_saibot"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149772395, "user": "tqbf"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149772583, "user": "<PERSON>"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487149772811, "user": "hugopeixoto"} {"action": "tweet", "id": 1645453767952446018, "message": "woop #infra", "timestamp": 1487149868897, "user": "pkoch"} {"action": "retweet", "target_id": 1645453767952446018, "timestamp": 1487149870292, "user": "_ko1"} {"action": "follow", "target": "pkoch", "timestamp": 1487149872809, "user": "amix3k"} {"action": "tweet", "id": 4857568027760499546, "message": "woop #infra", "timestamp": 1487149889607, "user": "amix3k"} {"action": "tweet", "id": 11656701733571143507, "message": "woop #ruby", "timestamp": 1487149891498, "user": "_ko1"} {"action": "follow", "target": "_ko1", "timestamp": 1487149895292, "user": "hugopeixoto"} {"action": "tweet", "id": 1787602799334447130, "message": "woop #vim", "timestamp": 1487150049615, "user": "neovim"} {"action": "retweet", "target_id": 1787602799334447130, "timestamp": 1487150050440, "user": "noob_saibot"} {"action": "retweet", "target_id": 1787602799334447130, "timestamp": 1487150050564, "user": "robot"} {"action": "retweet", "target_id": 1787602799334447130, "timestamp": 1487150050939, "user": "_ko1"} {"action": "follow", "target": "neovim", "timestamp": 1487150053298, "user": "r00k"} {"action": "tweet", "id": 8809744136707487373, "message": "woop #pens", "timestamp": 1487150169467, "user": "0xabadidea"} {"action": "retweet", "target_id": 8809744136707487373, "timestamp": 1487150169781, "user": "spambot"} {"action": "retweet", "target_id": 8809744136707487373, "timestamp": 1487150170468, "user": "noob_saibot"} {"action": "retweet", "target_id": 8809744136707487373, "timestamp": 1487150170858, "user": "_ko1"} {"action": "tweet", "id": 7918310494010412941, "message": "woop #hardware", "timestamp": 1487150194893, "user": "FioraAeterna"} {"action": "retweet", "target_id": 7918310494010412941, "timestamp": 1487150195198, "user": "spambot"} {"action": "follow", "target": "FioraAeterna", "timestamp": 1487150198306, "user": "0xabadidea"} {"action": "follow", "target": "FioraAeterna", "timestamp": 1487150198449, "user": "SwiftOnSecurity"} {"action": "tweet", "id": 7755774894324805211, "message": "woop #chess", "timestamp": 1487150224598, "user": "<PERSON>"} {"action": "retweet", "target_id": 7755774894324805211, "timestamp": 1487150225462, "user": "noob_saibot"} {"action": "follow", "target": "MagnusCarlsen", "timestamp": 1487150228060, "user": "<PERSON>"} {"action": "tweet", "id": 12826016841040824010, "message": "woop #ruby", "timestamp": 1487150233715, "user": "Una"} {"action": "retweet", "target_id": 12826016841040824010, "timestamp": 1487150234096, "user": "spambot"} {"action": "retweet", "target_id": 12826016841040824010, "timestamp": 1487150234523, "user": "robot"} {"action": "retweet", "target_id": 12826016841040824010, "timestamp": 1487150234662, "user": "noob_saibot"} {"action": "follow", "target": "Una", "timestamp": 1487150236840, "user": "hugopeixoto"} {"action": "follow", "target": "Una", "timestamp": 1487150236850, "user": "_ko1"} {"action": "tweet", "id": 4421172895615467875, "message": "woop #gamedev", "timestamp": 1487150245711, "user": "ChuckBergeron"} {"action": "follow", "target": "ChuckBergeron", "timestamp": 1487150249293, "user": "eevee"} {"action": "tweet", "id": 11109614754327691681, "message": "woop #infosec", "timestamp": 1487150302864, "user": "moxie"} {"action": "retweet", "target_id": 11109614754327691681, "timestamp": 1487150303352, "user": "spambot"} {"action": "retweet", "target_id": 11109614754327691681, "timestamp": 1487150304336, "user": "_ko1"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150305886, "user": "FioraAeterna"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150306165, "user": "Pinboard"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150306470, "user": "0xabadidea"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150306605, "user": "tqbf"} {"action": "tweet", "id": 14726206988050621829, "message": "woop #chess", "timestamp": 1487150406492, "user": "SergeyKaryakin"} {"action": "retweet", "target_id": 14726206988050621829, "timestamp": 1487150407311, "user": "robot"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150409851, "user": "MagnusCarlsen"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150409997, "user": "Vachier_Lagrave"} {"action": "tweet", "id": 2834894569111365477, "message": "woop #infosec", "timestamp": 1487150788572, "user": "SwiftOnSecurity"} {"action": "retweet", "target_id": 2834894569111365477, "timestamp": 1487150789526, "user": "noob_saibot"} {"action": "retweet", "target_id": 2834894569111365477, "timestamp": 1487150789942, "user": "_ko1"} {"action": "follow", "target": "SwiftOnSecurity", "timestamp": 1487150791611, "user": "hugopeixoto"} {"action": "follow", "target": "SwiftOnSecurity", "timestamp": 1487150791850, "user": "amix3k"} {"action": "follow", "target": "SwiftOnSecurity", "timestamp": 1487150792303, "user": "FioraAeterna"} {"action": "tweet", "id": 8729815892990076215, "message": "woop #chess", "timestamp": 1487150819870, "user": "<PERSON>"} {"action": "retweet", "target_id": 8729815892990076215, "timestamp": 1487150820325, "user": "spambot"} {"action": "retweet", "target_id": 8729815892990076215, "timestamp": 1487150820748, "user": "noob_saibot"} {"action": "follow", "target": "<PERSON>", "timestamp": 1487150823060, "user": "<PERSON>"} {"action": "tweet", "id": 4049417484390121080, "message": "woop #chess", "timestamp": 1487150969996, "user": "Vachier_Lagrave"} {"action": "retweet", "target_id": 4049417484390121080, "timestamp": 1487150970474, "user": "spambot"} {"action": "retweet", "target_id": 4049417484390121080, "timestamp": 1487150971366, "user": "_ko1"} {"action": "follow", "target": "Vachier_Lagrave", "timestamp": 1487150973029, "user": "<PERSON>"} {"action": "follow", "target": "Vachier_Lagrave", "timestamp": 1487150973245, "user": "<PERSON>"} {"action": "follow", "target": "Vachier_Lagrave", "timestamp": 1487150973870, "user": "SergeyKaryakin"} {"action": "tweet", "id": 6255551220274019073, "message": "woop #infosec", "timestamp": 1487151346348, "user": "hugopeixoto"} {"action": "retweet", "target_id": 6255551220274019073, "timestamp": 1487151346777, "user": "spambot"} {"action": "retweet", "target_id": 6255551220274019073, "timestamp": 1487151347760, "user": "_ko1"} {"action": "follow", "target": "hugopeixoto", "timestamp": 1487151349400, "user": "amix3k"} {"action": "follow", "target": "hugopeixoto", "timestamp": 1487151349759, "user": "moxie"} {"action": "follow", "target": "hugopeixoto", "timestamp": 1487151350302, "user": "Pinboard"} {"action": "follow", "target": "hugopeixoto", "timestamp": 1487151350320, "user": "0xabadidea"} {"action": "tweet", "id": 14172137775635128506, "message": "woop #cosplay", "timestamp": 1487151684539, "user": "eevee"} {"action": "tweet", "id": 9654574229292990286, "message": "woop #ruby", "timestamp": 1487152103458, "user": "_ko1"} `;
b3eebb8295aba5e678fd534b24d69510e2b29f2be7391e6da662fbb80f8af3ac
['5aca379e658741999252756812b10f4a']
It turned out that JS passes primitives(numbers, booleans, strings) by values and objects(also arrays) by reference. So when you work with complicated state object and pass objects as props to child components - it's really easy to mutate upper-level state. For me it was input-field-change-handler like this handleInput(e) { let data = this.state.data data.input = e.target.value this.setState({data}) } Because data from this.state is an object, it's passed by reference And state is mutated at line data.input = e.target.value before setState occures.
9a5f6cbdb1f54d35e1927d004affee956b0a0fee1755cb3e6fc1157406813fd8
['5aca379e658741999252756812b10f4a']
So I have stateUpdater like this stateUpdater(field, val){ let obj = {...this.state.json} obj[field] = val this.setState({json: obj}) } (It is passed to children components from Main so I can update Main state on lower-level events.) And I have componentDidUpdate like this componentDidUpdate(prevProps, prevState){ console.log(prevState.json.ingredient_groups) console.log(this.state.json.ingredient_groups) ... } So when I delete an element from array in json.ingredient_groups it logs Array[7] Array[7] but expected behavior is Array[8] Array[7] TRIED TO: Make a copy of obj in stateUpdater using spread operator, JSON.parse(JSON.stringify(obj)), Object.assign({}, obj) Update state like this stateUpdater(field, val){ let obj = {...this.state.json} this.setState((prevState, props) => { return {json: Object.defineProperty(obj, field, val)} }) } Use getSnapshotBeforeUpdate() None of these helped
64e425ac5373ea37742ee0c98392d98c63b2b57a4b6a95198a5808f5be7b09c8
['5acf1a6827e343de834fd40ac8a0ad47']
I'm having an issue accessing my website (heatcool.com) from outside of my network by URL. Server Environment: Windows Server Here's what I know: 1) I CAN access within my network by IPV4 IP, Public IP and URL 2) I CAN access from outside my network by Public IP 3) I CAN NOT access from outside my network by URL 4) I can ping my url and it resolves to the correct IPV4 IP 5) NSlookup maps my url back to the IPV4 IP 6) I CAN NOT access the URL from a proxy server So, I think I've concluded that it's not a DNS issue. What else should I look at?
b85c72fccea7b317cc5138ebe6aa27aed796c4d755a0c4d82ae2c6a0bc25d6d5
['5acf1a6827e343de834fd40ac8a0ad47']
Recently bought a Logitech MK850. It has Ctrl, Fn, Opt, Cmd buttons on the left. I'm trying to switch the Ctrl and Fn keys so that it's the same as the Macbook keyboard (which has Fn then Ctrl). Tried the Keyboard preferences but no luck - it doesn't seem to let me modify the Fn keys. Any idea how to map keys? (FWIW: recently switched to Mac and trying to get used to the new key layout)
9f9ded135a967d36aaa0e29e49b1964a4e8172d702a1ee71641fdcf2cd5e4312
['5ad7ec8b22094e35a5be563105acad18']
My code to address the problem below worked, but can someone help me understand this: why did my code only access the key and not the value? This has been a consistent issue I've had understanding dictionaries - just started studying them this week. I expected to either get an error or some jumbled mess of countries and numbers. Can you perhaps explain how I would have written the code to add the key alone to a new list? Create a list of the countries that are in the dictionary golds, and assign that list to the variable name countries. Do not hard code this. golds = {"Italy": 12, "USA": 33, "Brazil": 15, "China": 27, "Spain": 19, "Canada": 22, "Argentina": 8, "England": 29} countries = [] accum = 0 for item in golds: countries.append(item)
df857ee9e1854702978bf275a2bec0099d1329719f744412aed385c4b819a60b
['5ad7ec8b22094e35a5be563105acad18']
I'll type the question my code is in response to below for clarity, but I'm having 2 issues. It seems to be adding correctly up to a point, and the result for the count of the other words in the sentence seems to be accurate, but rabbit suddenly jumps from 1 to 4 and I'm not sure why. I'm also getting this: Error: AttributeError: 'int' object has no attribute 'items' Here is the problem followed by my code. Thanks! Provided is a string saved to the variable name sentence. Split the string into a list of words, then create a dictionary that contains each word and the number of times it occurs. Save this dictionary to the variable name word_counts. sentence = "The dog chased the rabbit into the forest but the rabbit was too quick." sentence_case = sentence.lower() sentence_list = sentence_case.split() sentence_dictionary = {} word_counts = 0 for item in sentence_list: if item in sentence_dictionary: word_counts += 1 sentence_dictionary[item] = word_counts else: sentence_dictionary[item] = 1
1a363ef80cd61b90819df42797d611911273ff30a44a2e4bd73db8a8c7248f7c
['5ad9feab7a5749278a34a7c83578d20c']
By the way, to ensure my statement, _"You should use labels in the most possible upper scope (if possible, function scope)."_, I would write the while-loop as a GOTO-loop. Because using a GOTO-statement within a while-loop hurts a structured text while-loop ^^. What you are actually looking for is an interleaving loop (An interleaving loop consists out of 2 or more loops, looping into each other.), a tool which structured texts doesn't provides, the only way is a GOTO. GOTO is even the most precise way to accomplish this task, any other method is just a work around.
189a59a34e4fc3c1429eff44d06af7e53a423c810bd91cc75d3d9a03736c301d
['5ad9feab7a5749278a34a7c83578d20c']
Thank you for your reply. I'm answering to your _"Comments on aspects of the original code besides code repetition:"_: I know about the fact of bit-mask operations, but don't do they increase runtime? Using `DIR_N | DIR_S | DIR_W` may need more CPU-cycles than just passing a constant. I agree to your statement of not using magic numbers, but I didn't wanted to change the already posted source. I saw that argument of `getdir()` checking for valid input by itself, but in perspective to my code, this would be redundant and unnecessary. I would reduce the code repetition, but at cost of runtime.
42b54de8b72ea34f5205cc82d62916d79967ad8aa219ba84a4ff2d8fa732294f
['5ada1b7e595f461d9bc32e1184e49ea0']
Make the member private and add a setter/getter pair. In your setter, if null, then set default value instead. Additionally, I have shown the snippet with the getter also returning a default when internal value is null. class JavaObject { private static final String DEFAULT="Default Value"; public JavaObject() { } @NotNull private String notNullMember; public void setNotNullMember(String value){ if (value==null) { notNullMember=DEFAULT; return; } notNullMember=value; return; } public String getNotNullMember(){ if (notNullMember==null) { return DEFAULT;} return notNullMember; } public String optionalMember; }
bf747a5b8a700b091d0ac269feb8045c4c1972eb9af07856123b19dedf6c35a9
['5ada1b7e595f461d9bc32e1184e49ea0']
Non-Atomic Concurrent Session Management access can be simulated with the following pseudo coded logic: function main(){ $locker = new SessionLocking(); /** read elements the $_SESSION "cached" copy. **/ $var1 = $_SESSION['var1']; $var2 = $_SESSION['var2']; /** Pseudo Atomic Read **/ $locker->lock(); //session is locked against concurrent access. $var3 = $_SESSION['var3']; $locker->unlock(); //session is committed to disk (or other) and can be accessed by another script. /** Psuedo Atomic Write **/ $locker->lock(); //session is locked against concurrent access. $_SESSION['var4'] = "Some new value"; $locker->unlock(); //session is committed to disk (or other) and can be accessed by another script } CLASS SessionLocking { private static $lockCounter=0; private static $isLoaded=false; function __constructor(){ if (!self<IP_ADDRESS>$isLoaded) load(); } private function load(){ $this->lock(); $this->unlock(); } private function lock(){ if ($lockCounter<1) try {session_start();} Catch(){} $lockCounter++; } private function unlock(){ if ($lockCount<1) return; $lockCounter--; if ($lockCounter<1) try {session_write_close();} Catch(){} } }
96bc6a683d02edd491611c3d773171480fa6e0d5a6f7a4608793be2bd02eecf7
['5ae090d83a2e455480433494eabf8115']
So for second question If want to do kinda nested(multipurpose?) comobobox you need to make event that changes it. This sub will run when user try to select something so it might not be "bulletproof" Private Sub cmbRoomType_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbRoomType.SelectedIndexChanged '' If cmbRoomType.SelectedValue = Not vbNull Then ''when user select some item <- so value is not nothing Dim selectedValueByUser As String = cmbRoomType.SelectedValue '' you might add that for sql query? Dim selectedValueByUser2 As String = cmbRoomType.SelectedItem '' or this 'clear dt cmbRoomType.DataSource = Nothing cmbRoomType.Items.Clear() Using con1 As New SQLiteConnection(ConStr) Using com As New SQLiteCommand("Select RoomNumber, RoomID FROM rooms", con1) con1.Open() Dim dt As New DataTable() dt.Load(com.ExecuteReader) cmbRoomType.DataSource = dt cmbRoomType.DisplayMember = "RoomNumber" cmbRoomType.ValueMember = "RoomID" End Using End Using End If End Sub Second option i can think of is to use another dropdown that is placed on same location that the first one then instead of If cmbRoomType.SelectedValue = Not vbNull you can use cmbRoomType.Visible = 0 cmbRoomType2.Visible = 1
5c9be94f95bcd2a8361ba04ba95bb637ba1a3ea0b265ff6c9c5fd194fac9746f
['5ae090d83a2e455480433494eabf8115']
im working with automate my script to scrape counters from lan-website and im pulling my hairs now. code looks like this <TR><td><p align="left" style="margin-left: 30;"><b>title</b></p></td><td><p> </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">table one</p></td><td><p> Task&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;average </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;"></p></td><td><p> number&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">1-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 6490&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">2-4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 442&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">5-10&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 44&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;6 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">11-20&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;15 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">21-30&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;25 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">31-50&nbsp;&nbsp;&nbsp;&nbsp;C</p></td><td><p> 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;40 </p></td> </TR> <TR><td><p align="left" style="margin-left: 40;">sum</p></td><td><p> 6982&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1 </p></td> </TR> so in every site i have same words repeating like 1-2, 2-4, 5-10 etc and i want to extract numbers "below it" like 6490, 442 in specific order so it should looks like task - counter 1-1 = 6490 2-4 = 442 to do this i use import requests from lxml import html pageContent=requests.get( 'http://x.html') tree = html.fromstring(pageContent.content) scraped = tree.xpath('//p/text()') print scraped witch obviously prints something like this \xa0\xa0\xa0\xa0\xa0task ', u'1-1\xa0\xa0\xa0\xa0\xa0\xa0counter', u' 6490 i'm stuck guys... tried to use other methods but i failed.
6f35efb68a67dc2ec208a54932394775a1fd3e191153e41d185ebc429543218c
['5ae2cb186374423185c29c0963ba7011']
With the changes in Android O, ANDROID_ID is now scoped per app signing key, as well as per user. Factory resetting the device will also generate new ANDROID_ID value. My questions is, what other alternative ID (that's more potent) does you folks use aside from Android ID? I did some research learnt that Google suggested us to use AdvertisingId, but user can reset their AdvertisingId anytime they want. I have also looked at the Key/Value backup to backup the existing Android ID and associate it and new values. This approach is good, but the backup is associated with a Google account. So this does not work if the user resets the device and sign-in with a different Google account. My goal here is to get a device specific identifier to be used for fraud/malicious detection and I am having a difficult time trying to gauge what kind of identifier to use. I know that I can just use IMEI, but Google recommended to avoid using it and it also requires android.permission.READ_PHONE_STATE permission.
c1496bd6889ac09f3e0eb61eb8d9ec3040b5f17ef9d029a0b57f8a56c9befea3
['5ae2cb186374423185c29c0963ba7011']
I've implemented GA in my app like what it stated on the Google Developers page. I was getting real time data, events and screen views just fine. However, I decided to turn screen view off because I was getting too many screen views events and have to reduce the number of events sent to GA. So I went on to set this attribute to false. <bool name="ga_autoActivityTracking">false</bool> Well, I was able to get rid of the screen view events in the app, but the real time data isn't being tracked too. Is there a way to get real time data tracking without having to track screen view events? Thanks in advance!
a4104a2e9c3046339266cb82fd70bf4521fd2f2ce293bc44a22663e15b03e701
['5ae4edccc2524423a4cc7e0c4833aa55']
I followed the steps of this post https://developer.jboss.org/thread/194827 Integration to set up and run JBPM Designer. The only difference is that I am using jbpm-designer-2.3.0.Final-tomcat.war. The problem that I faced is that I cannot see the run simulation button. I can see only the process paths button. What should I do to make the "run simulation" button visible?
10becef8a671827212c366e5a5d5f2ad561fa826a4b8ae07fe592d3e1d4de53a
['5ae4edccc2524423a4cc7e0c4833aa55']
I used to had exactly the same problems. I dont think there is any way to solve your problem. I offer you to create an app were you can change your h s v parameters on run time and checking from threshold if your combination is good enough. I used this project for that . I hope it will help http://www.osslab.com.tw/@api/deki/files/3550/=An_autonomous%252c_co-operative_telerobotic_agent_framework_for_WowWee_Rovio_-_Konstantinos_Tsimpoukas_1130191.pdf
0077dd92ad5ee422498d7382dcf68f45ff2c4d26f72e23c7d6dbdca17ec2d1ac
['5aef22aa574341609a1b0a71443dd90e']
Firstly, you might consider using same mapping for GET/POST requests as a standard like: @GetMapping("/new") ... @PostMapping("/new") Also @Valid Album album parameter should be annotated as @ModelAttribute. You should not add model attributes if binding result has errors. (Actually, you should not add any model attribute for a POST method.) You should not create that savedAlbum object with albumService.save(). That method should be void.
7ba1bb017dedd5e4c23c202e7ac9782a6b62427c1788cdf9fb2c23da2ec7a3ab
['5aef22aa574341609a1b0a71443dd90e']
You also need set model and view name in post/create method. By the way, handling methods with ModelAndView is valid but I think it would be better to use the String approach. It's much better to read and a standart way. So your controller will look like: @Controller @RequestMapping("/accounts") public class AccountController { @Autowired private AccountService accountService; @GetMapping("") public String home(Model Model) { List<Account> accountsForCurrentUser = this.accountService.getAccountsForCurrentUser(); model.addAttribute("accounts", accountsForCurrentUser); return "pages/accounts/index"; } @GetMapping("/new") public String newAccount(Model model) { model.addAttribute("account", new Account()); return "pages/accounts/create"; } @PostMapping("/new") public String createAccount(@Valid @ModelAttribute Account account, BindingResult bindingResult) { if (bindingResult.hasErrors()) { return "pages/accounts/create"; } "redirect:/accounts"; } }
8f074ff5fba3613fe8b4d30df94a277bf43b4f41e70c37e5750f73b97454d8b9
['5afb16ed0feb4a0683a0fc19a32f3f08']
I have org-mode on two computers. On one, the version is 8.2.5h; one the other, 8.3.2. Evaluation of source blocks works on the machine with the 8.2.5h version but not on the 8.3.2 version. Here is a minimal example: * Emacs org / R / latex. Make a random number. #+BEGIN_SRC R :session *R* x <- rbeta(1000,10,10) #+END_SRC Plot the whole thing. #+BEGIN_SRC R :session *R* :exports none pdf(file="fig1.pdf", width=8, height=6) hist(x, main="") dev.off() #+END_SRC Now put it in this text file. #+BEGIN_SRC latex \begin{figure}[h!] \centering \includegraphics[width=.9\textwidth]{fig1.pdf} \caption{Gamma distribution} \label{fig:hist-gamma} \end{figure} #+END_SRC Now a latex equation: #+BEGIN_SRC latex \begin{equation} \label{eq:eq1} y_{it} = \beta_0 + \beta_1 X_{it} + \varepsilon_{it} \end{equation} #+END_SRC When I export this to latex with org mode version 8.2.5h, I get a pdf with the figure, the latex equation etc. When I export the same file to latex with org mode version 8.3.2, the source blocks are not evaluated; only the code for the first source block is shown. I played with changing switches, none of these works. Is this a bug?
acb7fc992057b2cc1b053f066b9f84e16d2b64589cd7b7b8d542df9e9aac6f55
['5afb16ed0feb4a0683a0fc19a32f3f08']
This issue was addressed in a similar post here by <PERSON>: https://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01600.html Results are not noticed without a newline. However, it is also important to put the newline argument in the printed argument, otherwise the result will include ">" from the next line in R. So this works: #+BEGIN_SRC R :session *R* :results output raw cat(c("1","2","3","\n")) #+END_SRC #+RESULTS: 1 2 3
260b789a237908098a778b6393d2daadffb3780357064981350b7f831bdebb69
['5afbb7c760cb498b8743cf568cf76686']
I have inissider network analyzer tool running on my window 7 machine. I also have 2 different networks running in my house. Each network is on different router. When i run inSsider it shows that i am connected to one of those network but max rate for one is 156 and second one is 144. Should it not be same? I dont think i understand what is going on here.
0ef21dd53a23be04b2c6c71e76e3876650eabad402218b88966ae4dae0ca2f38
['5afbb7c760cb498b8743cf568cf76686']
Ok i think i am good now. I pulled one end out of that patch panel. I terminated one end at keystone and the other end has a plug. I tested it and it looks good. I plugged plug end in the one of the router ports and using patch cable (connected to keystone) i connected my laptop. Everything works. I used standard B. Thanks for helping me
81627dfd007e9c46e059f519224efcfe209c2e32e961aa77e667e7b30e292feb
['5b0c6298bd534fa8b8b2a0a6fb3bedd3']
Lab employee here. I can't speak for all labs but here's how it works at mine (note that we do both photographic and press printing as well as a few other methods). It all depends on the type of equipment that is going to be printing your product. Traditionally photographic prints are done on a minilab or equivalent piece of equipment which prints in RGB. When you order a flyer or a business card it is going to be done using a press which prints in CYMK. There's many other ways of printing beyond photographic and press but those will be the most common. While it is true that one can convert between the two color spaces there's certain colors that simply can't be converted. Take a look at the following image for an idea of the different gamuts that exist for various color spaces: If you were to send an image in RGB to be printed on a CYMK device where there's colors that fall out of the gamut of what CYMK can achieve, a substitution will occur that attempts to get close to your intended color. This can cause your once vibrant and beautiful RGB image to come out looking dark and dull on a CYMK printer for example. For this reason we suggest customers send us their images in RGB format when a photographic product will be produced and CYMK when ordering a press printed product. In reality most of our press printed work is also sent to us in RGB and our customers feel the output is satisfactory. Not all customers feel this way and those that want truly accurate color do send their press printed images in CYMK color space.
8deefe752aa379885a429dae07ea7ae97ca80427e16ca0b0e0d3fa99458a0448
['5b0c6298bd534fa8b8b2a0a6fb3bedd3']
I think the main reason for non-transparency is issues of envy between officemates, and the fact that companies can save on their expenses since a lot of people don't try for a raise when they are clearly qualified for a higher rate. This is just speculation though, so don't quote me on this.
1fa18bc1e2880c76d6a8dea55a3f9828da36e8fa8ab1d2b271bdd2d00195ec96
['5b31ef06f5e243459f5aa91a29fcc13f']
I had the same problem since Coronas last update. I fixed the problem by removing the if check for the event phase. Just comment out the event.phase check in your listener function: function listener(event) --if event.phase == "began" then print(event.name.." occurred") storyboard.gotoScene("facebook", "fade", 400) end
64434af909d946af15e2bfbcacb435718085af9ba8cb4de17cf97e6c7cb152d2
['5b31ef06f5e243459f5aa91a29fcc13f']
There is a way! I finally figured it out! First make sure that you have the subl command for the terminal, and set subl as your git editor (with the -w option): Edit your .bash_profile to look like this: export EDITOR="/usr/bin/subl -w" Then do a git commit -v for the message to open. Inside of the sublimeText2 window, click on the lower right corner where it says Plain Text and change the option to: Open all with current extension as > Diff and you should get colors everytime you get the COMMIT_EDITMSG.
12e672d8b47a0f0094894711de518182ded0e3a1084e75d034e4864bd4fce62d
['5b4fc97cf5a6451f87e76302e463498f']
Trying to get very simple ('toy') 2-layer neural network to build model, as a learning example to make sure the math flows correctly. The model should learn that a '1' on the first and last feature equates to a '1' output. features = [] features.append([[0, 0, 0, 0, 0], [0]]) features.append([[0, 0, 0, 0, 1], [0]]) features.append([[0, 0, 0, 1, 1], [0]]) features.append([[0, 0, 1, 1, 1], [0]]) features.append([[0, 1, 1, 1, 1], [0]]) features.append([[1, 1, 1, 1, 0], [0]]) features.append([[1, 1, 1, 0, 0], [0]]) features.append([[1, 1, 0, 0, 0], [0]]) features.append([[1, 0, 0, 0, 0], [0]]) features.append([[1, 0, 0, 1, 0], [0]]) features.append([[1, 0, 1, 1, 0], [0]]) features.append([[1, 1, 0, 1, 0], [0]]) features.append([[0, 1, 0, 1, 1], [0]]) features.append([[0, 0, 1, 0, 1], [0]]) # output of [1] of positions [0,4]==1 features.append([[1, 0, 0, 0, 1], [1]]) features.append([[1, 1, 0, 0, 1], [1]]) features.append([[1, 1, 1, 0, 1], [1]]) features.append([[1, 1, 1, 1, 1], [1]]) features.append([[1, 0, 0, 1, 1], [1]]) features.append([[1, 0, 1, 1, 1], [1]]) features.append([[1, 1, 0, 1, 1], [1]]) features.append([[1, 0, 1, 0, 1], [1]]) However I cannot get any error/cost to show up... Epoch 3 completed out of 10 cost: 0.0 Epoch 5 completed out of 10 cost: 0.0 Epoch 7 completed out of 10 cost: 0.0 Epoch 9 completed out of 10 cost: 0.0 Accuracy: 1.0 Thanks in advance for having a quick look: here is the notebook...
f8c8ab333a13a520811bf19cd47a34d70d3859e7edb3fe53ace746a0ad0ffff2
['5b4fc97cf5a6451f87e76302e463498f']
The problem turned out to be the output, it needed to be a 2-class array. Not sure why this is necessarily the case. features.append([[0, 0, 0, 0, 0], [0,1]]) features.append([[0, 0, 0, 0, 1], [0,1]]) features.append([[0, 0, 0, 1, 1], [0,1]]) features.append([[0, 0, 1, 1, 1], [0,1]]) features.append([[0, 1, 1, 1, 1], [0,1]]) the working notebook is here.
906238d910a92f9f5d077be298ba9abd27f278e3e0c03076713c27360b9463ed
['5b513f148acb4999b1b48834421490b5']
I get warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long unsigned int *' [-Wformat] for the code below unsigned long buf[254]; char systemlogmsg[500]= {'\0'}; snprintf(systemlogmsg, sizeof(systemlogmsg), "INFO: %lu ", buf); what should I have used instead of %lu? Furthermore, I tried to use snprintf(systemlogmsg, sizeof(systemlogmsg), "INFO: %lu ", (unsigned long int *) buf); but it did not help. How should I have passed the cast?
e8005690466c36533011c037daa4fe70c169821f484a7b4b6e99a4fa1bfe4a76
['5b513f148acb4999b1b48834421490b5']
I would like to add wpa_ctrl.h on a C code, and the source code has the following header files: #include "includes.h" #include "common.h" how do I suppose to have them? Do I need to install any package or do they suppose to be at the kernel header files or in the include path? If I need to include it manually, then each file depends on some many header files that needs to be added manually, is there a convenient way to add the files that are needed
47bf589abf1556c031361de78279b4f855e1801e5d95f26e1c5ab64a08537ebf
['5b52e8c76e9b44928bb761f47f980f14']
I have generated an AngularJS project with yeoman, and have the standard 'Allo, 'Allo! page working. I then decided to add restangular to the project, so executed "bower install restangular" which correctly installed the package (bower list shows the restangular reference). However, I expected the index.html file to automatically be update with the correct script references to restangular and its dependencies. Am I using the wrong yeoman convention for installing additional dependencies?
9947e278f339eabe9ce7cbcbddc4aaae52da5cde57c87040e57cf54edce71670
['5b52e8c76e9b44928bb761f47f980f14']
I've been looking for a tool/utility that provides a console-like option for building JSON data APIs on top of a relational database. I've come across deployd (http://deployd.com/) and emergent one (http://www.emergentone.com/), and am wondering if there is anythign similar for internal relational Dbs. Success would be the ability to configure rather than program the APIs exposing data.
68c0c443bc4ca83686b0752cafad9697cb6f10ef45098218faab4eda8c005f23
['5b5c2f91dba04c2c9a3abfd68ebaca18']
I found the solution from Google, when using the rsync method then add the ssh account to Vagrantfile content: config.ssh.username = "vagrant" config.ssh.password = "vagrant" config.vm.synced_folder ".", "/var/www", type: "rsync", rsync__exclude: ".git/" and remove lines from 77 ~ 79 at file C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-xxx\plugins\synced_folders\sync\helper.rb "-o ControlMaster=auto " + "-o ControlPath=#{controlpath} " + "-o ControlPersist=10m " +
971533fb13d9a4b93ba3449eff005b617d2ef3947b8dae7e3ef6c5148197088c
['5b5c2f91dba04c2c9a3abfd68ebaca18']
I got the below errors once I run vagrant up and using rsync method in config type There was an error when attempting to rsync a synced folder. Please inspect the error message below for more info. Host path: /e/virtual-boxes/scotchbox/ Guest path: /var/www Command: rsync --verbose --archive --delete -z --copy-links --chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHostKeyChecking=no -o IdentitiesOnly=true -o UserKnownHostsFile=/dev/null -i 'E:/virtual-boxes/scotchbox/.vagrant/machines/default/virtualbox/private_key' --exclude .vagrant/ --exclude .git/ /e/virtual-boxes/scotchbox/ vagrant@<IP_ADDRESS>:/var/www Error: Warning: Permanently added '[<IP_ADDRESS>]:2222' (ECDSA) to the list of known hosts. dup() in/out/err failed rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
26407a4c4999492f67444d4f9649d5e245c05595be95e9572e6d3f645c8d8eb8
['5b66bf3f31784c7e904845c24ef906fe']
In your case, you have not used editor.commit() function. Here is the whole code //Store in SharedPreference val preference=getSharedPreferences(resources.getString(R.string.app_name), Context.MODE_PRIVATE) val editor=preference.edit() editor.putBoolean("isLoggedIn",true) editor.putInt("id",1) editor.putString("name","Alex") editor.commit() //Retrieve from SharedPreference val name= preference.getString("name","") val id= preference.getInt("id",0) val isLoggedIn= preference.getBoolean("isLoggedIn",false)
e195d9bffc855df5f92054a06327dc59d109aca3aaeca91470145ee2000bdf65
['5b66bf3f31784c7e904845c24ef906fe']
<PERSON> answer help me alot, I changed my model code: public class ProductTest { String code,desc,name; ArrayList<Object> packs; public ArrayList<Object> getPacks() { return packs; } public void setPacks(ArrayList<Object> packs) { this.packs = packs; } public ProductTest() { } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public String getName() { return name; } public void setName(String name) { this.name = name; } } I also updated my MainActivity.java class where I am fetching data: mFirestore.collection("catend").addSnapshotListener(new EventListener<QuerySnapshot>() { @Override public void onEvent(QuerySnapshot documentSnapshots, FirebaseFirestoreException e) { if (e != null) { Log.d(TAG, "onEvent: error" + e.getMessage()); } for (DocumentChange document : documentSnapshots.getDocumentChanges()) { switch (document.getType()) { case ADDED: ProductTest productModel=document.getDocument().toObject(ProductTest.class); Log.d(TAG, "onEvent: response"+document.getDocument().getData()); Log.d(TAG, "onEvent: code="+productModel.getCode()); //work Log.d(TAG, "onEvent: description="+productModel.getDesc()); //work Log.d(TAG, "onEvent: name="+productModel.getName()); //work Log.d(TAG, "onEvent: packs"+productModel.getPacks()); //Work for (int i = 0; i <productModel.getPacks().size() ; i++) { try { JSONObject jsonObject=new JSONObject(productModel.getPacks().get(i).toString()); Log.d(TAG, "onEvent: subcode= "+jsonObject.getString("subcode")); Log.d(TAG, "onEvent: subprice="+jsonObject.getString("price")); Log.d(TAG, "onEvent: weight="+jsonObject.getString("weight")); } catch (JSONException e1) { e1.printStackTrace(); } } break; case REMOVED: break; case MODIFIED: break; } } } }); Output: Android studio logcat
b3876ca09fd1396c518f7f82ee60940d3e8f2b429dbd6c74f7631afa43675a32
['5b68a4f977fa41809d73d7c9a2b85df1']
Finally find out hot to solve this issue. According to this link kotlin-maven-plugin jpa adds only default constructor for entities, but does not make entities open. So i changed plugin configuration to next one and it worked: <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>${kotlin.version}</version> <configuration> <compilerPlugins> <plugin>jpa</plugin> <plugin>all-open</plugin> <plugin>spring</plugin> </compilerPlugins> <pluginOptions> <option>all-open:annotation=javax.persistence.Entity</option> <option>all-open:annotation=javax.persistence.Embeddable</option> <option>all-open:annotation=javax.persistence.MappedSuperclass</option> </pluginOptions> <args> <arg>-Xjsr305=strict</arg> <arg>-Xjvm-default=enable</arg> </args> </configuration> <executions> <execution> <id>kapt</id> <phase>generate-sources</phase> <goals> <goal>kapt</goal> </goals> <configuration> <sourceDirs> <sourceDir>src/main/kotlin</sourceDir> </sourceDirs> <annotationProcessorPaths> <annotationProcessorPath> <groupId>com.querydsl</groupId> <artifactId>querydsl-apt</artifactId> <version>${querydsl.version}</version> <classifier>jpa</classifier> </annotationProcessorPath> </annotationProcessorPaths> </configuration> </execution> <execution> <id>compile</id> <phase>process-sources</phase> <goals> <goal>compile</goal> </goals> </execution> <execution> <id>test-compile</id> <phase>test-compile</phase> <goals> <goal>test-compile</goal> </goals> <configuration> <sourceDirs> <sourceDir>src/test/kotlin</sourceDir> <sourceDir>target/generated-sources/kapt/test</sourceDir> </sourceDirs> </configuration> </execution> </executions> <dependencies> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-noarg</artifactId> <version>${kotlin.version}</version> </dependency> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-allopen</artifactId> <version>${kotlin.version}</version> </dependency> </dependencies> </plugin>
8db4a458f27db5237f6b4fd5a3cf35993e973fdedd651f9beca95aceb51359da
['5b68a4f977fa41809d73d7c9a2b85df1']
I'm trying to create CRUD endpoints for entity A. This entity has a field with collection of ids of another entity B. Entity B lives on remote server. I want to Validate that entities B with passed ids actually exists on remote server. Save in local database both fields of entities B: id and name name of entity B can be received from remote server via endpoint. And via this endpoint I can validate that entities B with passed ids exists on remote server. In my app I tried to separate the logic, so there is one spring component for validating entity B and other for mapping from DTO representation of entity A to internal representation. And I need to call remote server with the same request for both purposes: for validation of existence and for mapping with id and name on entity B. I have an idea with short time cache, but it seem odd to me to use cache for such purpose. Other way is to call this endpoint in some upper service and pass received data to validator and to mapper, but with such implementation upper service need to know this internal details of validator and mapper (that they need information from remote server) Is there an other way around to do it with spirng? Thank you!
430e25def3169fa087225e1f687819be455fc7920c46bbaa0a7862811dbddf7a
['5b6ed260778344babeb9354471813ce7']
http://developer.android.com/sdk/installing/installing-adt.html Here is the link to adt plugin Scroll down till you see a downloadable zip file of adt. Download it Unpack it And copy paste the files n folders of that zip file in to the eclipse folder If prompted for overwrite, select yes.. You will be good to go..
cd48489f18909757b490a91789e3b027b5ffef3f412c3712f74f08da2eeafdb2
['5b6ed260778344babeb9354471813ce7']
I was wondering how to go about interrupting the hover function with an unhover function? For eg , I have a circle(made by css : border-radius=half of width ,where width=height) on webpage , on hovering it , it starts to increase its width and height from 200px to 500px , also the border radius from 100px to 250px.. and the reverse on unhover. But as i notice , the animation is completed till the end even when i unhover it The eg as demonstrated above has the following code: <script> $("#circle").hover(function() { $(this).animate({height:"500px" , width:"500px" , borderRadius:"250px"},1500); }, function unAnimate() { $(this).animate({height:"200px" , width:"200px" , borderRadius:"100px"},750); } ); </script>
a72ca4dee45d61ae7feb427ac4be2e7a9f8e48b837e1aaaa7b3937c44bb537a5
['5b7211e5bd1444c78c3f6f9c48b13d60']
I have the following problem: I would like to have a flashcard software in which I can write Latex formulas without to have installed Latex itself (Miktex etc) on my device. I suppose this is possible since XMind has also Latex integrated without having to install anything. As far as I could see Anki needs Latex to be installes? Any other options. Further it would be cool to have this also on my mobile device. Any suggestions? Based on this https://en.wikipedia.org/wiki/List_of_flashcard_software I see only Mnemosyne to be a solution but do I have to install Latex in this case?
07357ed757139efc2b4ed1980dd418ae7eb4fc4b4a8bbc5d6662e100b422c9b5
['5b7211e5bd1444c78c3f6f9c48b13d60']
Thank you very much! It worked after I reboot my computer. Sorry for this lateness of my reply, the calculation work do not admit a reboot. After all worked normal, I have also tried the command demsg | grep ath, and what I got is : (sorry I have to trim this message) [4.248277] ath <IP_ADDRESS> EEPROM regdomain : 0.65, ...., [150.693146] ath9k : ath9k : Driver unloaded. I am very happy that my wlan card works, but do you think this message is normal?
6352596fe99da32e6c2638e57c81cb8a1f0de9d951b8ac8f0877b702925e35d4
['5b744f92d28745adaf0a99e61e957c70']
Better if you could post the code to see how you are sending the intent with extras to current activity too, for what I´m seeing here, the error is in this line: Bundle bundlefrankrijk = getIntent().getExtras(); // is returning null object And when youre trying to: int scorefrankrijk = bundlefrankrijk.getInt("finalScoreFrankrijk"); // NullPointerException throwed Cause your bundle is null from beginning, you should check if you´re sending correctly the intent with extras, please use the method: mIntent.putExtra("key", intValue) and check that youre receiving it like this: if (getIntent().getExtras() != null){ getIntent().getExtras().getInt("key");} or just like this too: if (getIntent().getExtras() != null){ getIntent().getExtras().get("key");} Remember, if the key is just different in some character, it will return NULL. Please read this for more info: https://developer.android.com/reference/android/content/Intent.html
a9a8e5dc6c2afca8445b6f3702cb71a6507b2afb2da3ff2649d3447edbbf7262
['5b744f92d28745adaf0a99e61e957c70']
I found a solution finally, just set the FloatingActionButton´s visibility to GONE in activity´s onPause() method and then set its visibility to VISIBLE in activity´s onResume() method, works nice for this case cause the FloatingActionButton recover its anchored properties when is shown again, Source code: @Override protected void onResume() { fab.setVisibility(View.VISIBLE); super.onResume(); } @Override protected void onPause() { super.onPause(); fab.setVisibility(View.GONE); } That´s all, Hope it helps everybody with this weird issue.
db519e11347a4dee20df79082b61bf4acdf6a326291b5249ee537baa5f488d4e
['5b79d7ea9cb5487a8a2a862c9170d15e']
so Im trying to calculate a number raised to a power from user input, using scanf, but i keep on getting a segmentation fault.Does any one know why?This is my code: int power( int base, int exponent){ int total=1; int temp = power(base, exponent/2); if (exponent == 0) return total; // base case; if (exponent % 2 == 0)// if even total= temp * temp; return total; if(exponent %2 !=0)// if odd total =(base * temp * temp); return total; } void get_info(){ int base, exponent; printf("Enter a base number: "); scanf("%d", &base); printf("Enter an exponent: "); scanf("%d", &exponent); //call the power function printf("%d",power(base,exponent)); } int main(){ //call get_info get_info(); return 0; } Any help would be much appreciated.Thank you.
e0fdc4aacfcb5ede24dbdec32a124e20f46e2e81945b18038c7bb6fd670a866b
['5b79d7ea9cb5487a8a2a862c9170d15e']
I wanted to make a 3 x 3 map with dots as their location. when you click a dot then it will change the path that you are using, i.e the line will be changed to that route. This being the color of it as well as the line position does anyone know how? This is what I had already. Now im confused of how to make a function that would implement this functionality. import React from "react"; import styled from 'styled-components'; import { scaleLinear } from "d3-scale"; var mapStyles = { position: "relative" }; var svgStyles = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0 }; function Map({ width, height, nodes }) { var xScale = scaleLinear() .domain([0, 100]) .range([0, width]); var yScale = scaleLinear() .domain([0, 100]) .range([0, height]); return ( <div id="map" style={mapStyles}> <svg style={svgStyles} width={width} height={height} viewBox={`0 0 ${width} ${height}`} > {links.map((link, i) => ( <line key={i} x1={xScale(nodes[link.s].x)} x2={xScale(nodes[link.d].x)} y1={yScale(nodes[link.s].y)} y2={yScale(nodes[link.d].y)} strokeWidth={5} stroke={ nodes[link.s].done === true && nodes[link.d].done ? "#CBFF5B" : "grey" } /> ))} {nodes.map((node, i) => ( <circle key={i} cx={xScale(node.x)} cy={yScale(node.y)} r="20" fill={node.done === true ? "#CBFF5B" : "grey"} /> ))} </svg> </div> ); } var nodes = [ { x: 10, y: 10}, { x: 10, y: 30, done: true }, { x: 10, y: 50, done: true }, { x: 50, y: 10, done: true}, { x: 50, y: 30} , { x: 50, y: 50 }, { x: 90, y: 10 }, { x: 90, y: 30 }, { x: 90, y: 50 } ]; var links = [{ s: 3, d: 1 }, { s: 1, d: 2 }]; export const NodeMap = () => { const avg = () => { var elem = [ 0, 1, 2,] var sum = 0; for( var i = 0; i < elem.length; i++ ){ sum += parseInt( elem[i], 10 ); //don't forget to add the base } return sum/3; } return ( <Container> <div className="App"> <Map width={666} height={1340} nodes={nodes} links={links} /> </div> </Container> ); };
fea6a4e6a53a0f6b2000f26d0366b40ebeb00f3970f8263fa2793bc65e087e83
['5ba0090520b84acaac1e1d6352a62400']
There are 2 main differences between Interfaces and abstract super-classes: Abstract Classes code reuse is possible by using an abstract super-class you can only inherit one super-class Interfaces every method has to be implemented in each sub-class a class can inherit more than 1 interface (multiple inheritance)
a604bf0e04c26d262075a5f074535d257879169cd4a6b7b55eb7a37531d6c50f
['5ba0090520b84acaac1e1d6352a62400']
If you really just wanna remove the compile error, you can try something like 'a = a', or 'error = error'. The arguments coming from some people here, stating that such compile errors are great because they prevent a lot of cruft are true for most situation, so you should avoid such constructs. On the other side I quite like to test, whether the code I write does actually compile! And in that case it's good, not having to remove all declared & unused variables. So use the 'a = a' construct rarely and don't leave them there!
8877c0b9c776693b741cd0fd0a3fcf9be960e4761fc91c27e7db8217fe16ecfb
['5ba32a6a15fc4c20a437e65f21ea84fd']
I am struggling with passing parameter to selector when by using withLatestFrom, which was mapped earlier from load action payload loadLocalSubServices$: Observable<Action> = this.actions$.pipe( ofType(LocalSubServiceTemplateActions.LocalSubServicesTemplateActionTypes.LoadLocalSubService), map((action: LocalSubServiceTemplateActions.LoadLocalSubService) => action.payload.globalSubServiceId), // and below I would like to pass globalSubServiceId withLatestFrom(this.store.pipe(select(fromLocalSubservices.getSearchParams(globalSubServiceId)))), map(searchParams => searchParams[1]), mergeMap((params) => this.subServiceService.getLocalSubServices(params).pipe( map(localSubServices => (new LocalSubServiceTemplateActions.LocalSubServiceLoadSuccess(localSubServices))), catchError(err => of(new LocalSubServiceTemplateActions.LocalSubServiceLoadFail(err))) ) ) );
878af58dcf333e78dbe2db970ed3485163cb8fa120f127f912e1f6d89e13a8e6
['5ba32a6a15fc4c20a437e65f21ea84fd']
try to edit quantityupdate function so it actually saves qtytotal variable value to local storage: function quantityupdate() { var div = document.querySelectorAll('.each-cart-row'); var qtytotal = localStorage.getItem( "cart") || 0; for (var i = 0; i < div.length; i++) { var card = document.querySelectorAll('.add-to'); card = 1; qtytotal = <PERSON> + card; } localStorage.setItem( "cart", qtytotal); var count = document.querySelector('.totalqty').innerText = qtytotal; return }
d723ccb5d392a85910666f4ec24fd073e9f04616c8d742cd1d76c2f561f6357f
['5ba4c5f85c914cbb8499f75f796691cd']
I'm trying to get basic ad level data from Facebook's insights API using facebook-python-business-sdk with python 3.7. The problem is I'm only getting 25 results back, even in accounts that have more than 25 active ads. I'm using the get_insights method on each account, passing a 'level':'ad' param and filtering on a specific date. I've also checked whether I've reached facebook's limit (using the explanation provided here) and I'm not even close to the limit. The get_insights method doesn't have a 'limit' param and either way I don't want to limit it at all as some accounts may have hundreds or even thousands of ads. This is the code I'm using from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adaccountuser import AdAccountUser from facebook_business.adobjects.campaign import Campaign as AdCampaign from facebook_business.adobjects.adsinsights import AdsInsights access_token = '******' app_secret = '******' app_id = '******' FacebookAdsApi.init(app_id, app_secret, access_token) me = AdAccountUser(fbid='me') my_accounts = list(me.get_ad_accounts()) params={'time_range': {'since': '2019-06-29', 'until': '2019-06-29'},'level': 'ad'} fields = [AdsInsights.Field.account_id, AdsInsights.Field.account_name, AdsInsights.Field.ad_id, AdsInsights.Field.ad_name, AdsInsights.Field.adset_id, AdsInsights.Field.adset_name, AdsInsights.Field.campaign_id, AdsInsights.Field.campaign_name, AdsInsights.Field.spend, AdsInsights.Field.impressions, AdsInsights.Field.clicks, AdsInsights.Field.outbound_clicks, ] for account in my_accounts: ads = account.get_insights(params=params, fields=fields) print(ads) print(len(ads)) I expected to get all ads in each account but I'm only getting a maximum of 25 ads per account. Any help will be greatly appreciated! Thanks
fec911eb6033c72b3aee518b5d0937208dec81249b3eb02bfd47172553461acd
['5ba4c5f85c914cbb8499f75f796691cd']
The solution is just to add a 'limit' param, see below: from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.adaccountuser import AdAccountUser from facebook_business.adobjects.campaign import Campaign as AdCampaign from facebook_business.adobjects.adsinsights import AdsInsights access_token = '******' app_secret = '******' app_id = '******' FacebookAdsApi.init(app_id, app_secret, access_token) me = AdAccountUser(fbid='me') my_accounts = list(me.get_ad_accounts()) params={'time_range': {'since': '2019-06-29', 'until': '2019-06-29'},'level': 'ad', 'limit': '20000'} fields = [AdsInsights.Field.account_id, AdsInsights.Field.account_name, AdsInsights.Field.ad_id, AdsInsights.Field.ad_name, AdsInsights.Field.adset_id, AdsInsights.Field.adset_name, AdsInsights.Field.campaign_id, AdsInsights.Field.campaign_name, AdsInsights.Field.spend, AdsInsights.Field.impressions, AdsInsights.Field.clicks, AdsInsights.Field.outbound_clicks, ] for account in my_accounts: ads = account.get_insights(params=params, fields=fields) print(ads) print(len(ads)) Thanks to @Matteo
f61792d5fc8522c9fa4b078c01ad8e21f3ca4fd4a3cc5f3e01d5b646875ea862
['5baf5fbc1bb944f5976938b733a921f4']
I am using node-postgres for a database connection. For that I have APIs like that: app.post('/api/insert', urlEncodedParser, function(req, res) { // do stuff }) Now I need synchron steps: Select specific id from table user Check if id from table user already exists in table list 3a) if id in table list does not exist, then insert data in table list 3b) if id in table list exists, then update data in table list So I have following code: var userid = 0; var listEntry = 0; client .query('SELECT "ID" FROM "User" WHERE "PW" = $1 AND "Name" = $2', [req.body.pw, req.body.name]) .then(res => userid = res.rows[0]) .catch(e => console.error(e.stack)) .query('SELECT " FROM "List" WHERE "UserID" = $1', [userid]) .then(res => listEntry = res.rows[0]) .catch(e => console.error(e.stack)) .query('INSERT INTO "List" ("UserID", "LastDate")', [userid, req.body.date]) .then(res => userid = res.rows[0]) .catch(e => console.error(e.stack)) .query('UPDATE "List" SET "LastDate" = $1', [req.body.date]) .then(res => userid = res.rows[0]) .catch(e => console.error(e.stack)) .finally(() { client.end() }); What do I need to change that I can have this synchron steps as listed above? Sorry, I am new to javascript and node-postgres.
38cc10fb0aed9cd910ad4d4eafb9e88a38bdca9a3d092136218926337cfda00b
['5baf5fbc1bb944f5976938b733a921f4']
How can I convert following string into an array in nodejs? "Content: [{id: 1, value: 1, number: 1},{id: 13, value: 1, number: 3},{id: 14, value: 1, number: 3},]" I tried JSON.parse, but there was an error: Unexpected token c in JSON at position 2. Do you have any ideas?
7a2f4655e79f5d2c9bc29a4d06a56edaed6e7c1e91b58844c040c3c48bbd157b
['5bb1b0bdc92a4009a944173593477340']
I have resolved the situation by: Making my directory structure simpler as well as the file names. It was over-engineered. I have my root folder now and then just one level below that for folders. The Ajax url path, which I was struggling with was amended to 'serverside/like.php', which picked up the php file but nothing happened. Reviewing the like.php code I had an include("../con/config.php") without a ';'. I added this and it's now working fine. Thank you for everyone's help. Much appreciated as always. New folder structure:
6ec6a622ef4bfaa993cecd414cdcb99353c79e701de2b774e924593aeb7557da
['5bb1b0bdc92a4009a944173593477340']
Looking through similar code I have on my website I found the below solved the issue. Because the content div is a parent that is there when the page loads, before the Ajax request creates the rest of the html, I used this to attach to the showMore div. Thank you <PERSON> for your help! $(document).ready(function(){ $(".content").on("click",".showMore a", function() { var $this = $(this); var content = $this.parent().prev() var linkText = $this.text().toUpperCase(); if (linkText === "SHOW MORE") { linkText = "Show less"; content.switchClass("hideContent", "showContent", 400); } else { linkText = "Show more"; content.switchClass("showContent", "hideContent", 400); } $this.text(linkText); }); });
c3bb74e5d3974710179dbfa8e6704c281ffd9aab76321dc5d5e2a57e7a6b5d49
['5bd1aa51875b4003a6d4daaea267575b']
http://legacy.datatables.net/ref I am running an older version of DataTables, which so far has proven satisfactory for my needs. I have found the answer I am seeking, but just don't know WHERE?? the file is located within DataTables folder structure ???? - ( I want to make changes to the default # of records shown ) aLengthMenu `[!$(document).ready( function() { $('#example').dataTable( { "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]] } ); } ); // Setting the default display length as well as length menu // This is likely to be wanted if you remove the '10' option which // is the iDisplayLength default. $(document).ready( function() { $('#example').dataTable( { "iDisplayLength": 25, "aLengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]] } ); } );` Any suggestions as to where this piece of code is located so I can change it? Thank you in advance
616c14f9c2f97bea66daae2a0c8399305d4c95d5fe619285fc899127856b77d1
['5bd1aa51875b4003a6d4daaea267575b']
I added Weblinks to my website as I have done for years. The Weblinks show up at the page just fine, but underneath each link an edit button appears that anyone can edit each link. I have spent 2 days chasing the answer... I just want the normal links to appear and not the edit icons underneath. www.ignacioval.com/contact/iv-links Any suggestions How to get rid of these edit icons underneath each Joomla 3+ link? Thank you in advance
119d426ca341315f28e465368d1bc1029333dd117cbeecee6a4e235259bde667
['5bdb848d3fd24ba3bb651b627b539040']
Chrome Lighthouse is telling me that to improve my performance I need to decrease my Max Potential First Input Delay (as it calls it). I searched how to improve it but I only found things related to javascript and my page is only using html and css (no javascript). Please can someone tell me how to improve it? ( I already minified my html and css )
513ccb066bdf7d5dd6f21a64a48427df99d42a9d8205840c1bb0963085f1690d
['5bdb848d3fd24ba3bb651b627b539040']
try to derive data from other data (for example if you have a voting app, instead of storing the number of people that voted, the number of people that upvoted and the number of people that downvoted, you can store only the upvotes and downvotes and do maths to calculate the total amount of people who voted)
fc1dbec517f3206110d34bc39cf60e7f134cf64c7a55501e44ffa9636237de94
['5be2a5cacfa742a1b7d07785d94e2ea7']
You're drawing the pointer at the same position as the run button still, because you don't ever check if the pointer's position is in your recording bounds. Also, you might want to scale your pointer's position with your recording bounds. For example, you can check to see if the pointer is left or up from the viewing rectangle by doing something like this (Offset variables are basically how far away from the left and top did you start recording): p = m.getPointerInfo(); Point location = p.getLocation(); image = bot.createScreenCapture(recordingArea); //Check location here. if( location.x < recordingArea.x + <<offset x variable>> || location.y < recordingArea.y + <<offset y variable>>){ //Code to change cursor position to outside of viewing rectangle here. } if(cursor!=null){ Graphics g = image.getGraphics(); g.drawImage(((ImageIcon)cursor).getImage(), location.x,location.y,null); }
275ce53a4d0f0545103a3176a99a9a7362ee50372426372cbac38e403405c59f
['5be2a5cacfa742a1b7d07785d94e2ea7']
For Android you would probably want to do something like this: initialize(); setButtonListeners(); new Thread() { public void run() { try { sleep(3000); } catch (Exception e) { } finally { Intent menuIntent = new Intent(SplashLoadScreen.this, MainMenu.class); startActivity(menuIntent); } } }.start(); I'm not too familiar with BlackBerry, but it seems like you use pushScreen() instead of startActivity(), and you don't use Intents like Android does, so perhaps something as this: initialize(); //Method to initialize all variables you might want to use. //...Some code new Thread() { public void run() { try { sleep(3000); //Time in milliseconds //to make this thread sleep before executing whatever other code. } catch (Exception e) { } finally { pushScreen(new MyScreen()); //Push next screen } } }.start(); The try{} catch(){} finally{} thing is exception handling. Basically, if any errors happen when it's attempting to sleep for 3000 millis, then it will catch all Exceptions (a.k.a. errors) and do whatever's in catch(){}. Then, after either the try {} (if no exceptions have been found) or the catch(){} (if errors have been found) is finished, it does whatever's in the finally{}. This case finally will push the next screen.
42bc24823b370d127248bb98ff0db9e861f79f76b89ca6be69640364f4d44fee
['5bf07c4bccd2425ab5416b4571c6abd8']
My Situation I'm running the latest Ubuntu 18.04 and I'm capable of opening a WEP encrypted hotspot, but for security reasons I'd like to avoid WEP and use WPA2 instead. Needless to say, opening nm-connection-editor doesn't let me choose any other options in the Security tab, so here I am. What I've tried I found this thread regarding pretty much my issue, which in turn points to this thread, with more details explained, however I got confused in certain areas. According to the second thread, determining whether or not a wireless device supports Wireless Access Points (WPA) comes down to using the iw list command and looking for an "AP" element in the output Supported Interface Modes list. Makes sense, however my output list lacks the "AP" and I can run a HotSpot just fine, so I had a hard time following any further. Is It a Drivers Issue? I have a dual boot set up on my PC, I used to run Windows 10 exclusively before I installed Ubuntu next to it. Windows 10 is capable of creating a WPA2 protected HotSpot with my device! The only thing I can think of that would be different between the operating systems is my drivers, but I'm only given one option in the Software & Updates menu, which is proprietary and should function correctly. Bottom Line I would be very grateful if someone could explain to me: What dictates the availability of certain WAP encryption types in Ubuntu, What can I do to enable WPA2 (and if it's not possible, why?)
f34bc4f6eb9389293653aad375f31ed16770dd3075a12ae2be67a0c767432abb
['5bf07c4bccd2425ab5416b4571c6abd8']
I have an Open Graph achievement at the following URL: http://rinth.bucket1.s3.amazonaws.com/Achievements_LOCAL/Achievement1.html When I attempt to register it, I get a response of: status code 400: OAuth "Facebook Platform" "invalid_request" "(#3502) Object at achievement URL is not of type game.achievement" When I bring up the debug tool to have it validate the HTML: http://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Frinth.bucket1.s3.amazonaws.com%2FAchievements_LOCAL%2FAchievement1.html I get the following errors: Object Base Domain Not Allowed: Object at URL 'http://rinth.bucket1.s3.amazonaws.com/Achievements_LOCAL/Achievement1.html' of type 'game.achievement' is invalid because the domain 'rinth.bucket1.s3.amazonaws.com' is not allowed for the specified application id '217132388329112'. Missing Required Property: The og:url property is required, but not present. Missing Required Property: The og:type property is required, but not present. Missing Required Property: The og:title property is required, but not present. I verified that this domain IS allowed by our application. Just in case, I also tried the entire process using a different domain (which resulted in the exact same error). The graph URL at the bottom of the debug tool prints the following: { "error": { "message": "An unknown error has occurred.", "type": "OAuthException" } } Any ideas on what I'm doing wrong?
7acd62096c6e1b290dd5bbab9a98c322ede0be7b95340701ffd64545893b4939
['5bf09788a15b45c6b61d857cbc765e61']
As <PERSON> commented, os.system uses a shell that is often not bash. on top of this, bash -c 'command' does not write to .bash_history. You could, of course, just make something like this: import os def runcommand(command): with open(os.path.expanduser('~/.bash_history'), 'a') as f: f.writelines([command]) os.system(command)
77454ddee6ae4d5dbc8c3d979996d1f7d0d931b31e3d1b57972a2661cccbffc2
['5bf09788a15b45c6b61d857cbc765e61']
ManualResetEvents my poor attempt to regain control of code execution during async tasks. Especially during tests, without them you can't test lambdas, event delegates, and some other async things ..You may try test -> T_012_CheckAndRetryAsync without passing manual reset event, as far as I remember execution stack into an infinite loop.
5e297c6670b81468d8eee9bc095f2794807ec64a5134ef2d7195afd7ac966ee9
['5bfe09e3ed984172a8a64b197985c4cc']
You can use .ebextensions (commands/container_commands) or lifecycle hooks For e.g. we use the following commands to install newrelic agent $ cat .ebextensions/newrelic.config commands: 00-cmd: command: yum install -y http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm test: "[ ! -f /etc/yum.repos.d/newrelic.repo ]" 01-cmd: command: yum install -y newrelic-sysmond test: "[ ! -f /usr/sbin/nrsysmond ]" 02-cmd: command: usermod -a -G docker newrelic ignoreErrors: true
f8dfa9f80cabb899842ca30f3a7a5ac6450163345db8e5514c125e17238232c5
['5bfe09e3ed984172a8a64b197985c4cc']
i've this working on my other servers it's just this new server is cuzing the error and only on cronjob I had mostly the same issue but with inkscape binary. It works perfectly via apache but doesn't work via nginx. The root of the issue was environment variable PATH. For example from cron # crontab -l * * * * * echo $PATH > /tmp/path.log # cat /tmp/path.log /usr/bin:/bin From the console # echo $PATH /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/nodejs/bin
8baa41cf167b618f020ba72f86df0ced017c77f61dda048c68c44320e2c41d07
['5c00cd5181a84f9c92c3d8643774623f']
You can use ggplot2 and data.table, I think it is easier, here is the code: library(data.table) library(ggplot2) dat <- data.table(Spring = c(runif(9,0,1),2), Summer = runif(10,0,1), Autumn = runif(10,0,1), Winter = runif(10,0,1)) dat1 = melt(dat) ggplot(data=dat1,aes(x=variable,y=value)) +geom_boxplot(outlier.colour = "red") ggplot(data=dat1,aes(x=variable,y=value,colour=variable)) +geom_boxplot() boxplot by group
08ca3e8e671565459871568b972658c6fa1074f374a35d2e905955b9300e18a3
['5c00cd5181a84f9c92c3d8643774623f']
I use devtools to install the Rcpp: devtools<IP_ADDRESS>install_github("RcppCore/Rcpp") Then the version of Rcpp has changed: > packageVersion("Rcpp") [1] ‘1.0.1’ And I load the tidyverse and see it is successfull. > library(tidyverse) ── Attaching packages ─────────────────────────────────────── tidyverse 1.2.1 ── ✔ ggplot2 3.0.0 ✔ purrr 0.2.5 ✔ tibble 2.1.1 ✔ dplyr <IP_ADDRESS> ✔ tidyr 0.8.1 ✔ stringr 1.3.1 ✔ readr 1.1.1 ✔ forcats 0.3.0 ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr<IP_ADDRESS>filter() masks stats<IP_ADDRESS>filter() ✖ dplyr<IP_ADDRESS>lag() masks stats<IP_ADDRESS>lag()
34dcb97e91dfc488fd975ba5401f5b4e3f305c05f03f20c24becc0312c98c45b
['5c03de56de4246078df385e1c90dea62']
on my website when button is clicked then other javascript should download from server and apply to current page. is it possible to do that, could anyone please share some info on it. Thank you basically want i am trying to do is <input type="button" class="btntab" onclick=\'$p.apply.javascript('+ v_id +',"'+v_url+'")\' value="'+lg('applyjava')+'" style="margin:10px 0px;" > Above code will display the button and on click will call the function $p.apply.javascript with two parameters (ID and url to download the javascript) here in below function $p.apply.javascript(v_id, v_url){ Here i want to download the javascript and apply on current page...which is located at window.location = 'http://www.example.com/java.php?url='+ v_url; } what above function is doing is redirecting me to http://www.example.com/java.php?url='+ v_url; and displaying the javascript in browser. Instead i want to download this javascript and apply on current page (may be after page refresh or something) Could any one please share some info if you have done something similar or know how to do this. thank you...in advance
eae04953502fac704dcf80bcc75869678da99230ea971504acfb1a89c2700539
['5c03de56de4246078df385e1c90dea62']
I have webpage i am using very large size background image for that, the issue is when normally we visit the page it will display website contents and then load the background image. in my case the situation is different my webpage is waiting untill the background image is loaded and then start displaying the page contents. I use very simple CSS body{background-image:url('http://www.example.com/myimage.jpg')} other css goes here.... and webpage load flow is Background image load first (webpage display no contents it just load the image) | then load the contents. I want to load the contents first and then background image anybody have idea how to do that. (using simple method) or asynchronous loading of background-image and contents.
40063e1c9c73aa1b916faa9c49a4e6e24f26e4f0ac56843960fe5f52f8685138
['5c0ea79385514400a8d2422760700e2e']
Wondering if anyone can clarify. I have some results from lit of a sample mean estimate, and 95% CI's. I can use the CI's to calculate the standard error of the mean. If we I want to find the standard deviation and don't know the population estimates do I interpret the standard error of the sample mean as the standard deviation? I only have this info to work with: mean=-0.32, 95% CI -0.60 to -0.05, n=3090). Thanks
f41dea5479fcb380841ab9cd27cd894b53c7d6a5edd1d349e51f64d103d7c196
['5c0ea79385514400a8d2422760700e2e']
I did not considered using the fact that $I = E[UV]$, it appears to be significantly shorter and way less complex. But since we don't have the same results one of us has done a miscalculation (possibly me since my calculation involves way more steps). +1 for suggesting the use of probability tools rather than going head down into the integral.
65d2fe02d9736ec8ca4b8e234886c1de37d507f23220adb364c2f8d0fcb23714
['5c1e95c9ec0143f598022b4cf5b98c4c']
Yes you can do this. Try to make your matrix manually not by wizard. and keep your field at right hand side and in one column type column names as it is. In <PERSON> report I've done it . I'm sure ti will be done in SSRS also. This is not a big deal. Or You can pivot your query and do the same.
65461aaf789efe1a1a47ca8f1dc3c96967f10b59dcb3580d8639afc7d366bd7b
['5c1e95c9ec0143f598022b4cf5b98c4c']
I'm stuck with container to container communication. I've deployed web application and web api in docker for windows. I can access web api directly from browser. I'm calling this using services endpoint in my web application as I studied on the internet but it is not getting connected. http://dockerSampleWebApi:8083/weatherforecast/ this is my service endpoint I'm using in my code. dockerSampleWebAPI is service name defined in docker-compose file.
85ca7903343ace0dc269eda88896c69da6cc91cff2d7fe6424493d20ba1825c5
['5c27dc9d3909493baf4ddd9ce6161a9e']
I'm not exactly sure what you want, but have you tried: request.getRequestDispatcher("/xxx.jsp").forward(request, response); The response.sendRedirect("/xxx.jsp" ) is just what it is, it tells the browser to go look somewhere else (http 301 with a location header of "../xxx.jsp"). No information is passed along in this redirect. That's what RequestDispatcher is for.
fe1193a216c2b3f10ac60d37881a4b2bb1577b5028f40b5b4fd0be68f8a34ada
['5c27dc9d3909493baf4ddd9ce6161a9e']
I eventually found an explanation on help.nextcloud.com by <PERSON>. Here is a summary of the steps to use. Working as root or using sudo. Find where the nextcloud data is stored. You typically will find this in the /var/www/nextcloud/config/config.php. Search for datadirectory such as grep datadirectory /var/www/nextcloud/config/config.ph/config.php Determine which sub-directory you want to place the data you are loading and load the data to that directory. Change the ownership: chown www-data:www-data -R /<directory you loaded to>/ cd /var/www/nextcloud Include the new directories and files into the nextcloud database with: sudo -u www-data php console.php files:scan --all This may take some time. The 187,000 files on my system took 17 minutes to do the scan.
c520bd7508b8c8b7fc4d22b740443a9f8d5f7f1cab5e1a041f092d0eb1d5da99
['5c411412a74b47bcb745642afe3270b1']
I'm a StringTemplate newbie with a really basic. I'm trying to utilize this to send automated emails. I've read as much as I can to digest what is out there. I'm starting with a simple test case and having trouble getting properties of objects to render. As a test case I have the following in my template file email.stg. delimiters "$", "$" activate(person) ::= <<$person.personFirstName$>> I'm trying to pass my Person object and have the template render the personFirstName property. This would call a getter Person.personFirstName() which is public. My java code looks like: Person _thePerson = //fetched from database STGroup group = new STGroupFile(/tmp/email.stg); ST st = group.getInstanceOf("activate"); st.add("person", _thePerson); System.out.println("the person first name is: " + _thePerson.personFirstName()); System.out.println(st.render()); My output reflects that the personFirstName property is available via java but my template does not render it. the person first name is: <PERSON> <nothing is returned here> If I limit the activate template to this: activate(person) ::= <<$person$>> I get the following result where the person object is rendered as _thePerson.toString(). the person first name is: <PERSON>, <PERSON><IP_ADDRESS>= <<$person.personFirstName$>> I'm trying to pass my Person object and have the template render the personFirstName property. This would call a getter Person.personFirstName() which is public. My java code looks like: Person _thePerson = //fetched from database STGroup group = new STGroupFile(/tmp/email.stg); ST st = group.getInstanceOf("activate"); st.add("person", _thePerson); System.out.println("the person first name is: " + _thePerson.personFirstName()); System.out.println(st.render()); My output reflects that the personFirstName property is available via java but my template does not render it. the person first name is: Ivan <nothing is returned here> If I limit the activate template to this: activate(person) <IP_ADDRESS>= <<$person$>> I get the following result where the person object is rendered as _thePerson.toString(). the person first name is: Ivan 999999999 - Johnson, Ivan G Any help would be greatly appreciated so I can move on to the more complex template that I'm trying to get to.
26f46944dbf9db3e8c3b488d642c99715981e5ee472a0c3c700069f89afb3690
['5c411412a74b47bcb745642afe3270b1']
Answering my own question: I think this is the answer from the Introduction here - https://theantlrguy.atlassian.net/wiki/display/ST4/Introduction. "...in general they follow the old JavaBeans naming convention. StringTemplate looks for methods getP(), isP(), hasP() first. If it fails to find one of those methods, it looks for a field called p." I took that to mean that "p" would work as a method name as well but was wrong. I'm using Enterprise Object Framework and, unfortunately, my model .java files' attribute accessors do not use the "get*" convention which means ST never requests them. They are also not stored as fields. I'll have to think of a way around it but I don't think I'm inclined to change large scale model frameworks to accommodate this. If I add cover (get*) methods it works but that is not the best solution. Generally, I've never encountered this issue since WebObjects template engine will render with or without "get*."
fa68b8006bc9844d8992a358d86eba8be6a9c659d299eade69701ba5c07f7eff
['5c49218894ed4ee48dcba2b76d8e135b']
You can prove this (indeed, a more general theorem that $r$-surgery on a knot $K \subset S^3$ is diffeomorphic to $r$-surgery on the unknot iff $K$ is the unknot, $r \in \mathbb Q$) using monopole Floer homology or Heegaard Floer homology; see "Monopoles and Lens spaces surgeries" or "Holomorphic disks and genus bounds" respectively. As far as I know, though, this is in a much different direction than <PERSON> and <PERSON>'s work.
934edff36af8a1c5ed9ac7cb2293c95fb3a4c06ae72c1be94d54e54913096ff6
['5c49218894ed4ee48dcba2b76d8e135b']
$T^3$ is the group given by the 3-torus, aka $\Bbb R^3/\Bbb Z^3$, and the action of $GL_3(\Bbb Z)$ descends from the action on $\Bbb R^3$. When you take connected components (the mapping class group) you are just left with $GL_3(\Bbb Z)$. I just thought I would mention these slightly stronger results as well which include information on the higher homotopy groups of Diff in addition to the mapping class group $\pi_0$ Diff, because they are accessible thanks to <PERSON>.
1f76a82599f1e5e1e2c4ff9a39d05cea78cfb9306f0051bd7512e1034614866b
['5c55e25eb3f54be88242049e78773b0d']
<PERSON>, The above style i.e. css shows that you have not assigned height. Please try adding _height:auto in class which will look like .col1,.col2{ width: 33%; _height:auto; height:auto; text-align: right; margin-left:3px; padding-right:3px; line-height:17px; } Basically, many browsers fail to recognize the height when assigned to a particular div or any element . In this case we use the above work arounds. I hope the above helps you. Thanks, <PERSON>
9771c51f1e09f6ad95b458bbd51ca8460ad99c6de997561a2dc8b99e6c39303f
['5c55e25eb3f54be88242049e78773b0d']
<PERSON> If the purpose of your writing is to express what is wrong with <PERSON>, who is it aimed at? Either people already agree with you, and you aren't adding much to what they already know (why would it be of interest if you are 'preaching to the choir')... or are you trying to shed light on issues with the guy to people who actually like him? Personally, that would be interesting to read if you find a way to persuade people to think of him differently....
9171186cd19464eecac2b4c0b038e966a33634bd808324aa2d1ab8c4e95d4874
['5c5e898183454bf0a25a88d20da4de18']
I'm developing a game in xcode 6 with swift. I have a scorelabel var scoreLabel: SKLabelNode!. Now in one of my methods I show my label: scoreLabel = SKlabelNode(fontNamed: "TrebuchetMS-Bold") scoreLabel.text = "\(score)" scoreLabel.fontSize = 30 scoreLabel.fontColor = SKColor .redColor() scoreLabel.position = CGPoint(x:780, y:180) addChild(scoreLabel) That shows my score as for example: 2500. Is it possible to show this upside down? 2 5 0 0 Sorry, I wrote this as list, because I wasn't able to write upside down here. Thanks for answers.
e9703ca9b7f99d9fc5741707524904da4708209541de768a4113666becc8bbcb
['5c5e898183454bf0a25a88d20da4de18']
i try to run some code, when my finger is moved to the same position, where the imageview is. I defined the position of the image view: CGRect imagepos = myImage.frame; And the position of actual touch position: UITouch *myTouch = [[touches allObjects] objectAtIndex: 0]; CGPoint currentPos = [myTouch locationInView: self.view]; I tried withCGPointEqualToPoint it not worked. Then i tried with CGRectContainsPoint it also not worked, because, when imagepos and currentpos have the same x coordinates, my "some code" is running (my finger is not moved to the image, they had only the same x positions. Y positions are totally different). How can I say, when my finger (also in the method touchesmoved) touch/is moved to/is at anywhere of the image, run some code or a method? Thanks for Answers.
68f692da48cef5cb7284a563a1420528a1e0929e0737ae4c5e8905fcb009c072
['5c66f6f343714163962d83b397271c07']
I have Woocommerce (Subscriptions) and Elementor. I'm trying to add a page/content within the Myaccount area of Woocommerce - new navigation menu item. Creating the endpoint and navigation menu bit works without issue. The issue I'm facing is displaying a page created in elementor. One page (also created in elementor) works without issue while the other doesn't. The page created in elementor is fairly simple that essentially creates 4 columns, 10 rows. Within each row there is button that uses shortcodes to get the button text and url to navigate to when pressed. This is all tested and works without issue when accessing the page directly. If I use this code $post = get_post(1114); $content = apply_filters('the_content', $post->post_content); echo $content; on the endpoint to display the page the output is just a list of rows of text showing the table cells from left to right. This only shows the button text (no sign of the URL) and is not formatted in anyway like the page in the elementor editor is (or if accessed directly) e.g if the table is H1 H2 H3 H4 R1a R1b R1c R1d R2a R2b R2d R2d The display is H1 H2 H3 R1a R1b R1c R1d R2a R2b R2c R2d If I use the below code $content = \Elementor\Plugin<IP_ADDRESS>$instance->frontend->get_builder_content_for_display( 1119); echo $content; the table largely displays correctly with all formatting etc. The one thing that isn't working is the button text. Instead of displaying the text returned by shortcode it just displays the shortcode. I'm sure I'm just missing something that needs to be processed somewhere but I have no idea what it is and the Elementor pages don't give much away unfortunately. Any help would be appreciated.
a1c5196aba76f83eabed54427f8cc8f904e583dcba201585167881fa4e9500f1
['5c66f6f343714163962d83b397271c07']
I'm trying to disable a number of WC Subscriptions emails (so they don't get sent). I know that I can do this in the admin settings area manually however I'm trying to do this via PHP (in a plugin). The reason for this is so that when it's moved from the test site to the live site the relevant files can be simply copied across and it's good to go without any manual settings changes. As an example - removing the new renewal order that gets sent to the site admin. add_action( 'woocommerce_email', 'SA_unhook_unneeded_emails' ); function SA_unhook_unneeded_emails( $email_class ) { //remove new_renewal_order email (sent to admin) remove_action( 'woocommerce_order_status_pending_to_processing_renewal_notification', array( $this, 'trigger' ) ); remove_action( 'woocommerce_order_status_pending_to_completed_renewal_notification', array( $this, 'trigger' ) ); remove_action( 'woocommerce_order_status_pending_to_on-hold_renewal_notification', array( $this, 'trigger' ) ); remove_action( 'woocommerce_order_status_failed_to_processing_renewal_notification', array( $this, 'trigger' ) ); remove_action( 'woocommerce_order_status_failed_to_completed_renewal_notification', array( $this, 'trigger' ) ); remove_action( 'woocommerce_order_status_failed_to_on-hold_renewal_notification', array( $this, 'trigger' ) ); //remove_action( 'woocommerce_order_status_completed_renewal_notification', array( $this, 'trigger' ) ); } Uncommenting the last remove_action makes no difference. The emails are still sent. I've tried changing woocommerce_email to wp_head to see if made any difference but none whatsoever. There seems to be little documentation (at least that I can find) on the WC subscriptions hooks so I'm struggling to work out what exactly I need to do to get this working. Any help would be appreciated.
3f837f4a45de47445746e68627557fb46c9faa38042498e9c39b17f410c920a9
['5c72da08c7ff4e0f9a5af3c75460aa9b']
OK! I figured it out, thanks to this link: https://github.com/florentbr/SeleniumBasic/issues/128 Managed to download the latest version of the Chrome Driver http://chromedriver.storage.googleapis.com/index.html?path=2.24/ Looks like there's no equivalent fix for Firefox, have to roll back to version 46. Hopefully an update will be released, but in the meantime, I'm so very happy to have at least one browser working again. Cheers guys.
d3f5924f42e45f124ccc87414c8b6e3b08b738e646472068f93b7ecad7ebbefc
['5c72da08c7ff4e0f9a5af3c75460aa9b']
In my Module1.vb code, if I assign a Watch to Form1.Width, I get the error "Reference to a non-shared member requires an object reference", and if I assign a Watch to Form1, I get the error "Form1 is a type and cannot be used as an expression" However, Debug.Print Form1.Width works. I read here (https://msdn.microsoft.com/en-us/library/aa262343(v=vs.60).aspx) that Visual Basic creates a hidden global object variable for every form class. It's as if Visual Basic had added the following declaration to your project: Public Form1 As New Form1 Is Visual Studio Watch insisting on accessing Form1 as a Class rather than as an instance (as in Debug.Pring)? Am I missing something obvious?
42e7927e5933dfa63de59e149ea65c9eaa0a5054582132ca810f285ab2d95238
['5c83cdea9a5241e2ad6a51bf2dacd470']
A moving point has its distance from (1,3) always one-third of its distance from (8,2). Find the equation of its Locus. My equation displays a circle formed by the loci, I don't know if it's right. Please help me find the equation, Thank you in advance to those that can answer.
d35f0aa85cf2d2ddcc1055b21c501d3d86f115dd74df6b94a7452ac88495e80a
['5c83cdea9a5241e2ad6a51bf2dacd470']
The joists are 16in apart. I've been thinking about growth with the beams too...I'll probably back them away from the tree a couple inches when I make the recommended changes to them. I regret having to pause and reassess midway, but you live and you learn, better safe than sorry, etc. etc. right?
1e15db44491a3ee6e411e27cf1db4314729f0573a8cc50f036e9ccacb0052eba
['5c8588bd2b8749e289c5cabf5eb5190c']
Figured out the answer. I had to define the recordset and db, and then reference the recordset results to display to the textbox after button update. The Code was largely the same: Private Sub btnSearch_Click() On Error Resume Next Dim strSQL As String Dim ctl As Control Dim strWhereClause As String Dim db As Database Dim rs As DAO.Recordset Dim textBox As Control Dim finalSQL As String Set db = CurrentDb 'Init beginning of SQL select statement sWhereClause = " Where " sSQL = "SELECT * FROM Customers " 'Loop through filled in Controls on form to get value For Each ctl In Me.Controls With ctl Select Case .ControlType Case acTextBox .SetFocus If sWhereClause = " Where " Then sWhereClause = sWhereClause & BuildCriteria(.Name, dbText, .Text) Else sWhereClause = sWhereClause & " and " & BuildCriteria(.Name, dbText, .Text) End If End Select End With Next ctl Me.txtSQL = sSQL & sWhereClause finalSQL = sSQL & sWhereClause Set rs = db.OpenRecordset(finalSQL) If rs.RecordCount > 0 Then 'If Matching Record(s) are found, pull result into appropriate fields Me.UserID = rs!UserID Me.FirstName = rs!FirstName Me.LastName = rs!LastName Me.Department = rs!Department MsgBox "No Users Found Matching Specified Search Criteria.", vbOKCancel, "No Results Found" End If
cb9011fa95c1583391c36d7da706077b40f4962088fcc89dc5f2e77163019183
['5c8588bd2b8749e289c5cabf5eb5190c']
I'm trying to make a simple batch script to wipe/zero a flash drive and reformat it. It's for others, so i'm attempting to make it relatively safe, by blocking formatting to C:, D:, etc. I'm looking for an IF ELSE type command i can use, to be an error catch-all. Here's (the main portion of) what i have ATM :again echo. cls echo. echo Please select the drive letter for the flash echo drive you wish to erase echo. echo **** DO NOT SELECT C: OR D: **** echo. echo. echo *** Enter letter (no colon) ONLY e.g. "E" *** echo. set /p answer= cls echo. echo. echo. if /i "%answer:~,1%" EQU "e" format E: /x /fs:FAT32 /v:FORENSICS /p:2 if /i "%answer:~,1%" EQU "f" format F: /x /fs:FAT32 /v:FORENSICS /p:2 if /i "%answer:~,1%" EQU "g" format G: /x /fs:FAT32 /v:FORENSICS /p:2 if /i "%answer:~,1%" EQU "h" format H: /x /fs:FAT32 /v:FORENSICS /p:2 if /i "%answer:~,1%" NOT exist goto again && echo Please provide a valid drive letter for flash drive echo. Now I know that if /i "%answer:~,1%" NOT exist goto again && echo Please provide a valid drive letter for flash drive is not valid syntax, but what could I use in order to achieve the same goal? I know there is a more effecient way to do this (e.g. instead of defining 4 variables for likely drive letters, put a single variable that listens to user input and accepts it if it exists.) This is my first foray into batch scripting (and scripting in general) and i'm learning on-the-fly, so the "dumber" you can make it, the better. Thanks in advance.
9810902029c28381a246a7f6a8718eef658484d7556900d9cfddc888cc47c05c
['5c85ce7881d74d03b75e14b1e36f5220']
Here's a simple example illustrating a schema and a MongoDB query similar to the example you gave. I've written this in the mongo shell for simplicity; the node.js version will be similar. Hopefully this will give you an idea how to get started. First we add some documents to the subscriber collection: db.subscriber.insert({ date_added: ISODate('2014-01-01'), first_name: '<PERSON>', language: 'en' }) db.subscriber.insert({ date_added: ISODate('2014-01-10'), first_name: '<PERSON>', language: 'es' }) db.subscriber.insert({ date_added: ISODate('2014-01-20'), first_name: '<PERSON>', language: 'en' }) db.subscriber.insert({ date_added: ISODate('2014-01-30'), first_name: '<PERSON>', language: 'sjn' }) Here's a query similar to the example you give, matching documents that satisfy any of a condition based on a date range, a substring match of first name, or an exact match of the language: db.subscriber.find({ $or: [ {date_added: {$gte: ISODate('2014-01-30')}}, {first_name: /Jim/}, {language: 'es'} ]}) And here are the documents returned by that query: { "_id" : ObjectId("530f6edc32292f1f130aae16"), "date_added" : ISODate("2014-01-10T00:00:00Z"), "first_name" : "<PERSON>", "language" : "es" }, { "_id" : ObjectId("530f6edc32292f1f130aae17"), "date_added" : ISODate("2014-01-20T00:00:00Z"), "first_name" : "<PERSON>", "language" : "en" }, { "_id" : ObjectId("530f6edc32292f1f130aae18"), "date_added" : ISODate("2014-01-30T00:00:00Z"), "first_name" : "<PERSON>", "language" : "sjn" } Does that help you get started?
d7b1f1f0dd3b3dbab47b3f3f9cad699edc02b5defce61cfeeaac63af1d3bd022
['5c85ce7881d74d03b75e14b1e36f5220']
Mean will correspond to the overall average brightness of the image and sd will correspond to the contrast, that is, the difference between the brightest and darkest parts of the image. So if the mean remains the same, as in your example, but sd is increased, then overall average brightness remains the same, but the darkest parts of the image get darker and the brightest parts get brighter, increasing the contrast.
413ef71f20f417b7b895749d3f0212adfb4110cc80e1ecd58eab1757d3dc0a1b
['5c880022ea5f443da49b4c430b540c8f']
I have had this problem show up on multiple computers with different arrangements of hardware: a laptop I used to own, a computer I built for work with an Intel CPU, and the computer I'm typing this on with an AMD Ryzen CPU. Occasionally (not every time), when the computer reboots to install updates the reboot will stop halfway. The power light will still be on and the keyboard and mouse will still be powered, but the monitor screen is black and the computer is unresponsive to any stimulus. Why is this happening? I have done many searches to try and research causes of this and have turned up many answers, none of them helpful. My BIOS is up to date. Some suggested reverting the Intel Management Engine driver, which doesn't apply to the AMD computer. Some suggested turning off fast boot, but I've seen that that option doesn't affect restarts, only shutdowns. This happens most often restarts. In particular, the work computer is almost never shut down, so it only experiences reboots to install updates. Literally the only thing all these computers have in common is Windows 10. The laptop only started having this problem when upgraded from Win 7 -> Win 10. I've checked many of the "similar questions" on this site, and none of them seem to be asking about my exact problem. I'm at my wit's end here and don't know what else I can do to fix this stupidly ridiculous problem.
c20d611743b3b289101bcc96e818dde36fa27de8551bf29c1b1dbcbb007ba69e
['5c880022ea5f443da49b4c430b540c8f']
This is quite frankly making me very mad. I've turned on File History, and I've recently upgraded to Windows 10. In the Backup Options (I presume the new name for File History), there are several folders I wish to not be backed up, named Dropbox, Google Drive, Downloads, and Desktop. I have gone into the settings and deselected these folders several times, but after some unknown amount of time (shorter than a couple of hours), the folders will be selected again for syncing. I remove them again, and some time later they add themselves back. Having Google Drive, Downloads, and Desktop backed up is unnecessary and only a small nuisance, but Dropbox getting backed up is KILLING my storage space. It's my work dropbox account which has 150 GB in over 400,000 files (and that's just the stuff I selected). I synced it to my personal computer for the purpose of reducing that obscene file account and size by zipping up large folders (many of the files are duplicates and only needed for archival purposes, not immediate access) because my personal computer's SSD will fare much better for the task than my work computer's spinning rust drive (not to mention my work computer somehow has the absolute worst case of fragmentation I have ever seen). The main problem is that Backup seems very...paranoid (generous?) about taking backups. I have it set to once per hour, and it looks like it takes a new version of every file very frequently, even if nothing changed. My 4 TB external drive that had nearly 1 TB free was eaten up within days. Clearing out all but the most recent version of file, it listed 4.5 million files for deletion. I started this morning and I still have 3.2 million left. It'll probably take another week or more to finish cleaning up the dropbox, so I need excluding it from the backup to stick. How can I do that?
37731bc363a61fb8321c00d37f82824b11a76269fd96e65c6443dea220cb1ce1
['5c8d1ef7688d4cbf99d7427c96bb3cdb']
Every time I think I have got these triggers figured out I have to create something new and I am stupid all over again! This time I have to update a field on the account with either 'R', 'Y' or 'G' (Actually it will eventually be a stoplight). The date to update that field is on the case depending on case status, age, etc there is a field that shows either 'R', 'Y' or 'G'. What I need to trigger to do it to look at all cases and if any of them are 'R' update the account field to 'R'. If they are not 'R' or 'Y' then mark it 'G' and if they are neither 'R' or 'G' mark it Yellow. (If you can help me past the error I would really appreciate it! Finally getting the Apex training in June!!) I have come up with the code below, I know it is probably not right, but I cannot get past the first error to figure out the rest. I keep getting this error: Error: Compile Error: Didn't understand relationship 'Case' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 13 column 51 Here is the code trigger UpdateAccountFromContacts on Account(before update) { Set<Id> accountIds = new Set<Id>(); for (Account a : Trigger.new) accountIds.add(a.Id); Map<Id, Account> accounts = new Map<Id, Account>( [ Select a.Id, (Select CaseStatusCalcGRY__c From Case Where CaseStatusCalcGRY__c != null) from Account a where a.ID in :accountIds] ); for (Account a : Trigger.new) { Account accFromMap = accounts.get(a.Id); if (accFromMap.Case.size() > 0) { (CaseStatusCalcGRY__c == 'R') { Acc_CaseStatusCalcGRY = 'R'; } else if (CaseStatusCalcGRY__c != 'R') && (CaseStatusCalcGRY__c != 'Y') { Acc_CaseStatusCalcGRY__c = 'G'; } else if (CaseStatusCalcGRY__c != 'R') && (CaseStatusCalcGRY__c != 'G') { Acc_CaseStatusCalcGRY__c = 'Y'; } else { Acc_CaseStatusCalcGRY__c = null; } } }
4c075fd961ce30e9ffc752f0582922415f4a8a1c3d979f80ae812982cbe7157c
['5c8d1ef7688d4cbf99d7427c96bb3cdb']
The good news is there are houses and driveways on the property so it's not the entire 11,000 sq ft. My plan is for redoing all the landscaping (unrelated to the glass) and replacing a lot of the dirt. In the meantime I've become a glass farmer.
cfe6dcbdcfa3e6a2521a8ce43d0e110e164ef3511d5cdd617623e5a9fb626fa7
['5c91d192f8c449f39304bfe0d9346da7']
I'm writing a java template to test the methods of my classes. The classes to be tested have a private constructor and static methods: public class ProdClass { private ProdClass() { } public static EnumType myMethod() { // do something } } In my template class for testing i write this code using the java reflection: String className = "com.myproject.mypackage.ProdClass"; String testMethodName = "myMethod"; Object[] obj = {}; ... OTHER CODE FOR RENDERING ... Class<?> params[] = new Class[obj.length]; for (int i = 0; i < obj.length; i++) { if (obj[i] instanceof Integer) { params[i] = Integer.TYPE; } else if (obj[i] instanceof String) { params[i] = String.class; } else if (obj[i] instanceof EnumType) { params[i] = EnumType.class; } } Class<?> cls = null; Method testMethod = null; try { cls = Class.forName(className); testMethod = cls.getDeclaredMethod(testMethodName, params); } catch (NoSuchMethodException e1) { e1.printStackTrace(); } catch (SecurityException e1) { e1.printStackTrace(); } catch (ClassNotFoundException e1) { e1.printStackTrace(); } Object resultTest = null; try { resultTest = testMethod.invoke(cls.newInstance(),obj); } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | InstantiationException e) { e.printStackTrace(); } if (resultTest != null) { System.out.println(" Result: " + resultTest.toString()); } But I get the following error: java.lang.IllegalAccessException: Class com.myproject.testpackage.TestTemplate$1$1 can not access a member of class com.myproject.mypackage.ProdClass with modifiers "private" at sun.reflect.Reflection.ensureMemberAccess(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at com.myproject.testpackage.TestTemplate$1$1.run(TestTemplate.java:264) at java.lang.Thread.run(Unknown Source) Because I have a private constructor. Would someone know how to solve the problem without becoming public the constructor. Thanks a lot.
52927a45cfdce4f2770fff31f83f602be196abc1d89e16ab2068b35aa7706c00
['5c91d192f8c449f39304bfe0d9346da7']
I'm trying to understand the roots function.. I was looking for a java code that implemented the similar function matlab r = roots(p). For example, if p = [1 -6 -72 -27], matlab returns r = 12.1229 -<PHONE_NUMBER> I admit that I have no idea what it means in practical function roots, but I need to use it within an algorithm in my java application. I tried using this code with Efficent-java-matrix-library: public class PolynomialRootFinder { /** * <p> * Given a set of polynomial coefficients, compute the roots of the polynomial. Depending on * the polynomial being considered the roots may contain complex number. When complex numbers are * present they will come in pairs of complex conjugates. * </p> * * @param coefficients Coefficients of the polynomial. * @return The roots of the polynomial */ public static Complex64F[] findRoots(double... coefficients) { int N = coefficients.length-1; // Construct the companion matrix DenseMatrix64F c = new DenseMatrix64F(N,N); double a = coefficients[N]; for( int i = 0; i < N; i++ ) { c.set(i,N-1,-coefficients[i]/a); } for( int i = 1; i < N; i++ ) { c.set(i,i-1,1); } // use generalized eigenvalue decomposition to find the roots EigenDecomposition<DenseMatrix64F> evd = DecompositionFactory.eigGeneral(N, false); evd.decompose(c); Complex64F[] roots = new Complex64F[N]; for( int i = 0; i < N; i++ ) { roots[i] = evd.getEigenvalue(i); } return roots; } } but this code returns [ -2.5747724050560374, -<PHONE_NUMBER>, 0.08248855576608725 ] for the example that I propose. I ask you: the roots function matlab and the roots function in java is the same function? Do you have any idea to implement a java function similar the roots in matlab?
a7ca2ede5be01248644cd4c64d574a67db7b4849c74bde478620492ed0fa13b6
['5ca04e6efa494519897133dee1a61376']
Short answer: no The Angular app runs in the users browser. That means any logs using console.log will be logged on the user side in their browser and Kubernetes will not know about it. The part that runs in Kubernetes is actually a static web server like Nginx or perhaps a NodeJS server that is just serving up the files. If you have a backend service (like NodeJS) the logs in the server process will show up in stdout and stderr. Those can be picked up in Kubernetes. To get the logs from Angular you would need to send them from the client to the backend over REST or something similar.
9bf11fac3480721c8605a790fd1504da6f3613dd28833029874fa95d4dd5aff4
['5ca04e6efa494519897133dee1a61376']
You can use the DataStore REST API directly. Otherwise, you will need a sort of proxy. One way to do this is to host an app on AppEngine that will expose Datastore entities to you as REST APIs. Another approach you can use if you do not wish to pay for an AppEngine instance is to use Google Cloud Functions.
12bf8b8a5b0ac95bd70380be4f9b341e45ff04224b34fb6945d45f4281b3d6b0
['5cb41d5cb22f418f88ff22f591476fa7']
Usually, a client would make an HTTP OPTIONS request to the resource. If the PUT is listed in the "Allow" header, then the resource can be modified. If there is a Content-Type response of application/JSON, then a field could be added to the JSON metadata that marks the payload as READ-ONLY.
ad6d59eddb2e1fd18034ba2a27e2fbdefffadc43f9ecee419ce77824d4c5587f
['5cb41d5cb22f418f88ff22f591476fa7']
Here is how I examine the value of the cookie "fslanguage" and set the Accept-Language header in the request based on the language. You could easily do a backend rule (see use_backend) instead of a reqrep rule. acl langCookie_en cook(fslanguage) en reqrep Accept-Language:\ (.*) Accept-Language:\ en,\1 if langCookie_en acl langCookie_fr cook(fslanguage) fr reqrep Accept-Language:\ (.*) Accept-Language:\ fr,\1 if langCookie_fr acl langCookie_de cook(fslanguage) de reqrep Accept-Language:\ (.*) Accept-Language:\ de,\1 if langCookie_de acl langCookie_es cook(fslanguage) es reqrep Accept-Language:\ (.*) Accept-Language:\ es,\1 if langCookie_es acl langCookie_pt cook(fslanguage) pt reqrep Accept-Language:\ (.*) Accept-Language:\ pt,\1 if langCookie_pt acl langCookie_it cook(fslanguage) it reqrep Accept-Language:\ (.*) Accept-Language:\ it,\1 if langCookie_it acl langCookie_ru cook(fslanguage) ru reqrep Accept-Language:\ (.*) Accept-Language:\ ru,\1 if langCookie_ru acl langCookie_ja cook(fslanguage) ja reqrep Accept-Language:\ (.*) Accept-Language:\ ja,\1 if langCookie_ja acl langCookie_ko cook(fslanguage) ko reqrep Accept-Language:\ (.*) Accept-Language:\ ko,\1 if langCookie_ko acl langCookie_zh cook(fslanguage) zh reqrep Accept-Language:\ (.*) Accept-Language:\ zh,\1 if langCookie_zh
e917365aeaf154265eeea48d3bdc3bbb8a4fd8032f49209f4f70ff8c64d9d040
['5cb86a79a3504094bccc5d5ef60e466e']
I am currently using a RESTful API for Woocommerce to add items into cart. It's supposed to accept "product_id" and "quantity" as the parameters based on the documentation for the API in which I used the following code to do so: JSONObject addcart = new JSONObject(); try { addcart.put("product_id", 28); addcart.put("quantity", 1); Log.e("params", addcart.toString()); } catch (JSONException e) { e.printStackTrace(); } JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, domain+api,addcart, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Toast.makeText(OrderActivity.this, response.toString(), Toast.LENGTH_LONG).show(); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(OrderActivity.this, error.toString(), Toast.LENGTH_LONG).show(); } }) { @Override public Map<String, String> getHeaders() throws AuthFailureError { Map<String, String> params = new HashMap<String, String>(); params.put("Content-Type", "application/json"); return params; } }; Controller.getPermission().addToRequestQueue(request); } However I received this error message when executing the POST request: E/params: {"product_id":28,"quantity":1} E/Volley: [365] BasicNetwork.performRequest: Unexpected response code 500 for http://domain+api The product is not added into the cart and through a GET request the response is "Cart is empty!". What am I doing wrong? I am pretty sure the the API works but I can't figure out why my POST request isn't going through and constantly getting error 500. Can anyone give me some advice? (If anyone wants to know the doc: https://seb86.github.io/WooCommerce-Cart-REST-API-Docs/?shell#add-to-cart)
1aaaf106ee8423bec1d71d9ca3ecc304468cbc7dc00fd2a941d7802d9022f118
['5cb86a79a3504094bccc5d5ef60e466e']
I am able to solve the problem after using the code below: StringRequest addrequest = new StringRequest(Request.Method.POST, "http://domainname/test/wp-json/wc/v2/cart/add?product_id=28&quantity=14" , new Response.Listener<String>() { @Override public void onResponse(String response) { Toast.makeText(OrderActivity.this, response, Toast.LENGTH_LONG).show(); Log.e("Response", response); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(OrderActivity.this, error.toString(), Toast.LENGTH_LONG).show(); Log.e("Error", error.toString()); } }) { @Override public Map<String, String> getHeaders() throws AuthFailureError { Map<String, String> params = new HashMap<String, String>(); boolean dbempty = helper.checklogin(); if (!dbempty) { params.put("Authorization", "Bearer " + helper.getToken()); } params.put("Content-Type", "application/json"); return params; } }; Controller.getPermission().addToRequestQueue(addrequest); I received the following String request response and the item is indeed added on my localhost website: E/Response: <br /> <b>Warning</b>: is_numeric() expects exactly 1 parameter, 3 given in <b>C:\xampp\htdocs\test\wp-includes\rest-api\class-wp-rest-request.php</b> on line <b>858</b><br /> <br /> <b>Warning</b>: is_numeric() expects exactly 1 parameter, 3 given in <b>C:\xampp\htdocs\test\wp-includes\rest-api\class-wp-rest-request.php</b> on line <b>858</b><br /> {"key":"33e75ff09dd601bbe69f351039152189","product_id":28,"variation_id":0,"variation":[],"quantity":14,"line_tax_data":{"subtotal":[],"total":[]},"line_subtotal":979.86,"line_subtotal_tax":0,"line_total":979.86,"line_tax":0,"data":{}} I had tried other POST method String request where I received the exact same warning message and the POST request did not went through but it worked when I did it this way eventhough I still receive the error message. But hope this helps others using the same API with the same problem. NOTE: The new header I added which consists of Authorization key and Bearer Token value is to give each user a unique CART of their own so that they do not share the same cart. This is not needed to solve the problem.
8cb849b5b43de9c0037e200522317db59338e7ae1f3ad64c39b5bc188d3a2722
['5cc35c78fc5e4d34829df5bec21d60a1']
Please, someone help me. I want create a pointcut with spring AOP that intercept all method annotated with annotation was inheritance by another. In my example, I want c TaskControl.class @Documented @Target({METHOD, ElementType.ANNOTATION_TYPE}) @Retention(RUNTIME) @Inherited public @interface TaskControl { /** * taskSelectorAnnotation * @return */ Class<? extends Annotation>[] value() default {}; } TypeTaskCriteria.class @Documented @Target({METHOD}) @Retention(RUNTIME) @TaskSelectorStrategy(value = TypeTaskSelector.class) @TaskControl public @interface TypeTaskCriteria { Class<?> genericType() default void.class; boolean defaultPreTask() default true; Class<? extends Task>[] pre() default {}; boolean defaultPostTask() default true; Class<? extends Task>[] post() default {}; } ExampleTest.class has one method like the follow: @TypeTaskCriteria(pre = PreRetrieveTask.class, post = PostRetrieveTask.class) public Page<T> retrieve(Integer pageNumber, Integer pageSize, String filterExpression, String sortExpression, String expandExpression, Map<String, String> parameters) throws InvalidParameterException, UnexpectedException { And my pointcut is: @Around("@annotation(br.org.ccee.fusion.core.api.task.TaskControl)") public Object executeChains(ProceedingJoinPoint pjp) throws Throwable { (if I change to the TypeTaskCriteria, the pointcut works fine) Someone has a anwser ???? Thanks !!!! <PERSON>
1cb4c5464776d490a7181a8f855f12cdae2e6d5112a6ed770ef4b0f98dc1c538
['5cc35c78fc5e4d34829df5bec21d60a1']
Look the follow sample: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <context:property-placeholder location="classpath:test.properties"/> <bean class="br.org.energia.csi.scl.batch.spring.configuration.NSCLAnnotationBeanPostProcessor" /> <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor" /> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> <bean class="org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor" /> <context:component-scan annotation-config="false" base-package="br.org.energia.test"> <context:include-filter type="annotation" expression="javax.ejb.Stateless" /> </context:component-scan> The attribute that turn off CommonAnnotationBeanPostProcessor is "annotation-config='false'". But when you do that, you need configure the PostProcessors that you need.
cac0cdb125c646433023edbdb5576da907b610c1c3778c5b69a5206530a08c60
['5ce2135bf37246f380676b5c84810151']
I have a backup service which stores the backup files in a share directory on a Windows server , but it fails and if I look in the logs I see this error: 13:02:13 <PERSON> notice tsrv-cmdqx(Backup->server)[30043] Result::_add(514) Connection to myfileserver failed (Error NT_STATUS_BAD_NETWORK_NAME) 13:02:13 <PERSON><IP_ADDRESS>_add(514) Connection to myfileserver failed (Error NT_STATUS_BAD_NETWORK_NAME) 13:02:13 AXSDBG notice tsrv-cmdqx(Backup->server)[30043] Result<IP_ADDRESS>_add(514) Connection to myfileserver failed (Error NT_STATUS_BAD_NETWORK_NAME), repeated 1 times I googled it as saw this is a SAMBA error. If I try to connect to myfileserver and path with the provided credential from a windows system it works. How can I check why the services doesn't sees this name?
2efbb86d23abededd11ece6b3358f979c1caf8f97b49324bd493ae83bf6183c4
['5ce2135bf37246f380676b5c84810151']
I am not getting an IP in the subnet <IP_ADDRESS>/24 where the DHCP is working and should serve an IP, I am getting instead only an IP in the subnet <IP_ADDRESS><PHONE_NUMBER>(link local address) that is probably given by Windows which runs on the laptop I am using to test this, which makes me think it might be a problem of the network firewall blocking the DHCP Discovery service. And if that is caused by the firewall, which ports I should be opening for DHCP Discovery to work?
d49d376ef167e89f6f72fb0cf7536e3d627394b9664b01de1fecb6e544fdd9c1
['5ce33e4ebc49415bb9d19289c4d4283e']
Show that $\Vert v\Vert^2= \langle v,AA' v\rangle \iff AA'=I$. My thoughts: let $AA'=M$. Then, the above implies $$ \sum^n_{i=1}(1-M_{ii})v_i^2+\sum^n_{i=1}\sum^n_{j\neq i}v_iM_{ij}v_j=0. $$ How would one go about showing $M_{ii}=1$ and $M_{ij}=0$?
0e7a24ea28e820d8d99853155e1a42506288e3f177cee0c25abdaacd55ef7c0d
['5ce33e4ebc49415bb9d19289c4d4283e']
We are planning on using schema's in our confirmation emails to our users to enable Google Now cards as well as provide an action for users to modify their reservations. I am curious how long the approval process typically takes. We've already sent our test email to <EMAIL_ADDRESS> and filled out the registration form here. I'm curious how long the application process typically takes before we should expect to hear something back.
0aecdb340a7e15949de2b72907ddc4f0461e963136b35d5a56297c650051363a
['5cfebe11cb7945988906c0c40f6a6d6e']
Aaah! ok! I thought that the associativity property was something like this "if you have three elements, and need to make a binary operations on them, it does not matter which two you make first, they will always yield the same result" but from your explanation that is more the definition of a group that it is both associative and commutative. Because if they are associative it does not mean that (f * g) * h = (f * h) * g, it just means that (f*g)*h=(g*h)*f and (f*h)*g=(h*g)*f and (g*f)*h=(f*h)*g. What do you think?
17e9969a2c1075caf13804d2bbd3d7040f9f5c7e619b9956a2b79a02dc833e1c
['5cfebe11cb7945988906c0c40f6a6d6e']
Great! Thanks. I think my real confusion was that I thought that for a group to be associative under a certain operation meant that no matter how you combined three elements into a two step binary operation they will always be equivalent (Which would be complying with the six cases I list up there). But from your answer I see that that idea I had about what the associative property is, is more of the associative and the commutative property together.
a8e9dfd0ed393228b5c8346ad5cce1e5fbff3a7bd4cb739ff1c3830bc5713b9d
['5d0845c2f23f4aabbbb762ef04100fb1']
In build.gradle.kts file, I include this code on the top line. Then I use KotlinCompilerVesion.VERSION below. import org.jetbrains.kotlin.config.KotlinCompilerVersion Some code works fine, but some code failed: It seems like only plugins block can not enable this import. Here works fine: dependencies { Implementation(kotlin("stdlib-jdk7", KotlinCompilerVersion.VERSION)) Implementation(kotlin("test", KotlinCompilerVersion.VERSION)) } Here always wrong: plugins { id("com.android.application") kotlin("android") kotlin("android.extensions") /* * Error: Unresolved reference: KotlinCompilerVersion */ id("kotlinx-serialization") version KotlinCompilerVersion.VERSION /* * Error: Unresolved reference: KotlinCompilerVersion */ id("kotlinx-serialization") version "$KotlinCompilerVersion.VERSION" /* * Error: Unresolved reference: KotlinCompilerVersion */ id("kotlinx-serialization") version "${KotlinCompilerVersion.VERSION}" } How can I use it correctly in here, without declare an ext.xxxVersion var?
39dfdfaa54bafbd117deedff92908c3f371f14ac653e9dc31200e2086dc6526f
['5d0845c2f23f4aabbbb762ef04100fb1']
Try this defensive programming code. This should avoid NPE problem, but the root reason are: You should refactor your game code with some Design Mode (try MVC at lease). You should not relay on the TextView String Value for game logic decision. Some UI Tree node maybe has been changed inside the loop. public boolean checkEndOfGame(LinearLayout cartes, LinearLayout piles){ if(nbCartes == 0){ return true; } for (int i=0; i< piles.getChildCount(); i++){ LinearLayout sorte = (LinearLayout)piles.getChildAt(i); for(int j=0; j< sorte.getChildCount(); j++){ View sorteChild = sorte.getChildAt(j); if(sorteChild instanceof ConstraintLayout){ ConstraintLayout pile = (ConstraintLayout)sorteChild; if(0 == pile.getChildCount) { Log.e("TAG", "<PERSON>'s child count = 0 "); continue; //or break ? } View pileChild = pile.getChildAt(0); if(pileChild instanceof TextView) { TextView textePile = (TextView) pileChild; int noPile = Integer.valueOf(textePile.getText()); for(int k=0; k< cartes.getChildCount(); k++){ View cartesChild = cartes.getChildAt(i); if(cartesChild instanceof LinearLayout) { LinearLayout rangee = (LinearLayout)cartesChild; for(int l=0; l< rangee.getChildCount(); l++){ View carteChild = rangee.getChildAt(l); if(carteChild instanceof ConstraintLayout) { ConstraintLayout carte = (ConstraintLayout)carteChild; View tv = carte.getChildAt(0); if(tv instanceof TextView) { TextView texteCarte = (TextView) tv; int noCarte = Integer.valueOf(texteCarte.getText()); if(i>0){ //UP if(noCarte>noPile){ return false; } }else{ //DOWN if(noCarte<noPile){ return false; } } } } } } } } } } } return true; }