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
d541c0b4712cdf3a4f65379969db7aa906936c1239452e76deac6a7a36504d59
['8883f0bfbe0245c2be8a43ac4ec87949']
i create a widget thats show papular and recent post but thats show all of the time 2013 08 02 whats problem? thats show correct with wp_query bu show more extra string i cant clear that. function posts($sort = 'recent', $items = 3, $echo = TRUE, $bg_color = 'black') { $return_html = ''; if($sort == 'recent') { $posts = get_posts('numberposts='.$items.'&order=DESC&orderby=date&post_type=post&post_status=publish'); $title = __('Recent Posts', THEMEDOMAIN); } else { global $wpdb; $query = "SELECT ID, post_title, post_content FROM {$wpdb->prefix}posts WHERE post_type = 'post' AND post_status= 'publish' ORDER BY comment_count DESC LIMIT 0,".$items; $posts = $wpdb->get_results($query); $title = 'Popular Posts'; } if(!empty($posts)) { $return_html.= '<h2 class="widgettitle">'.$title.'</h2>'; $return_html.= '<ul class="posts blog '.$bg_color.'_wrapper">'; $count_post = count($posts); foreach($posts as $post) { $image_thumb = get_post_meta($post->ID, 'blog_thumb_image_url', true); $return_html.= '<li>'; if(has_post_thumbnail($post->ID, 'large')) { $image_id = get_post_thumbnail_id($post->ID); $image_url = wp_get_attachment_image_src($image_id, 'thumbnail', true); $return_html.= '<a href="'.get_permalink($post->ID).'"><img class="alignright frame" src="'.$image_url[0].'" alt="" /></a>'; } $return_html.= '<strong class="title"><a href="'.get_permalink($post->ID).'">'.$post->post_title.'</a></strong><br/><span class="post_attribute">'.get_the_time('F j, Y', $post->ID).'</span>'; $return_html.= '</li>'; } $return_html.= '</ul>'; can anyone help me? sorry for my bad english.
bf0ef779ea91609ab37d017b8db6c9f01c063519cdf49474a2a46be8e6d4be11
['8883f0bfbe0245c2be8a43ac4ec87949']
my 404 page in my site in Wordpress not show when user type a incorrect address and show a page with widget and other thing. i use a custom permalink %postname% before this change 404 work correctly but after change my permalink not work. can any one help me wordpress doc cant help me. sorry for my bad english
4eb98c4cb8709d27ee45fa0f7f05e737d054b324518803901f6eb616191c1bbe
['8892dcd9a4234b6e94bf7b30a587d825']
@Did They are joint and individual cumulative distribution functions. One can integrate some function $h(x)$ on $F(x)$, and that would be equivalent to integrating $h(x)*f(x)$ on x for an absolutely continuous RV, and summing over $h(x)*f(x)$ for a discrete RV, and the summation of the two if the RV is mixture. This answer is more general than mine because it covers discrete, continuous or mixture distributions by not specifying their pdf's or pmf's. Also if B is singularly continuous, has something like a Cantor dbn, then $F_B$ will not be differentiable, hence need to stay as drhab gives it.
ac0d760f440fcdfcbd48e1056978add40595bb9a39fd4f009f20f99340ce9561
['8892dcd9a4234b6e94bf7b30a587d825']
I think this should do the trick string[] arr = { "red", "red", "blue", "green", "Black", "blue", "red" }; var results = from str in arr let c = arr.Count( m => str.Contains(m.Trim())) select str + " count=" + str; foreach(string str in results.Distinct()) Console.WriteLine(str); Output: red count=3 blue count=2 green count=1 Black count=1
2709cbeeeb7c3b1a2b81f9e1cd95b769afa85b4b8b5f6ecc942c82138300f15c
['88b38f4616e94735a3ee63d93e1e3602']
You can do BucketedRandomProjectionLSH [1] to get a cartesian of distances between your data frame. from pyspark.ml.feature import BucketedRandomProjectionLSH brp = BucketedRandomProjectionLSH( inputCol="features", outputCol="hashes", seed=12345, bucketLength=1.0 ) model = brp.fit(df) model.approxSimilarityJoin(df, df, 3.0, distCol="EuclideanDistance") You can also get distances for one row to column with approxNearestNeighbors [2], but the results are limited by numNearestNeighbors, so you could give it the count of the entire data frame. one_row = df.where(df.id == 1).first().features model.approxNearestNeighbors(df2, one_row, df.count()).collect() Also, make sure to convert your data to Vectors! from pyspark.sql import functions as F to_dense_vector = F.udf(Vectors.dense, VectorUDF()) df = df.withColumn('features', to_dense_vector('features')) [1] https://spark.apache.org/docs/2.2.0/api/python/pyspark.ml.html?highlight=approx#pyspark.ml.feature.BucketedRandomProjectionLSH [2] https://spark.apache.org/docs/2.2.0/api/python/pyspark.ml.html?highlight=approx#pyspark.ml.feature.BucketedRandomProjectionLSHModel.approxNearestNeighbors
74cfdac5e04633960e2f648f80caf8fb6861da8c3ab91445a65b840a06e23901
['88b38f4616e94735a3ee63d93e1e3602']
One way to make this work for OSX & Linux is to use namedpipes to signal to batch jobs that they can continue. Unfortunately it requires splitting up "Task *.1" & "Task *.2", but it's the best I can come up with for the moment. #!/bin/bash function cleanup { rm -f .task.a.1.done .task.b.1.done } trap cleanup EXIT cleanup mkfifo .task.a.1.done mkfifo .task.b.1.done { echo "Task A.1" echo -n "" > .task.a.1.done } & { echo "Task B.1" echo -n "" > .task.b.1.done } & { echo "Task X" } { cat < .task.a.1.done echo "Task A.2" } & { cat < .task.b.1.done echo "Task B.2" } & wait
3242eddce17b0400a14561f7ff3fa97125f40581692a8669a8257015dea18152
['88c1573d829d43619320dbdcd2af4bc5']
If someone has this problem, you can solve it, using timeout service. It will put state switching call at the end of queue. Also, you should use promises. Rejecting it will prevent initialization of that state: resolve:{ checkLogin: function(){ var deferred = $q.defer(); var $state = $injector.get('$state'); if (!window.localStorage.getItem('user-id')) { $timeout(function(){$state.go('signin');}); deferred.reject(); } else { deferred.resolve(); } return deferred.promise; } },
29089153784784b4ffe132996afdf2c083ecb84236b9dcbc6220088f625ce8d7
['88c1573d829d43619320dbdcd2af4bc5']
Angular does not follow all the fields of $scope all the time. What it does - it runs $digest from time to time. In this case, after the body of $watch function finished. So, in this case, you changed the field, showed alert and after you closed the alert, it changed the name, started $digest, which started this function once more.
8891d4e7e788e3e77480ffef2ebae76971eba27f8edf8de76a7f66f607fb0fc0
['88c63a54daa94f9d9c56e193b190ec0d']
You can use the xarray python package's xr.to_netdf() method, then optimise memory usage via using Dask. You just need to pass names of the dimensions to make unlimited to the unlimited_dims argument and use the chunks to split the data. For instance: import xarray as xr ds = xr.open_dataset('myfile.nc', chunks={'time_counter': 18}) ds.to_netcdf('myfileunlimited.nc', unlimited_dims={'time_counter':True}) There is a nice summary of combining Dask and xarray linked here.
227f7aadad236616b457b2384501681ddd2272d4ce5a1cc5ceb57196a5d6fbac
['88c63a54daa94f9d9c56e193b190ec0d']
Sometimes datasets have a number of variables with a selection of other 'things' that contribute to them. It can be useful to show the contribution (e.g. %) to a variable of these different 'things'. However, sometimes not all of the 'things' contribute to all of the variables. When plotting as a bar chart, this leads to spaces when a specific variable does not have a contribution from a 'thing'. Is there a way to just not plot the specific bar for a variable in a bar chart if the contribution of the 'thing' is zero? An example below shows a selection of variables (a-j) that have various things that could contribute to them (1-5). NOTE: the gaps when the contribution of a 'thing' (1-5) to a variable (a-j) is zero. from random import randrange # Make the dataset of data for variables (a-j) columns = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'] data = np.array([np.random.randn(5)**2 for i in range(10)]) df = pd.DataFrame(data.T, columns=columns) for col in df.columns: # Set 3 of the 5 'things' to be np.NaN per column for n in np.arange(3): idx = randrange(5) df.loc[list(df.index)[idx], col] = np.NaN # Normalise the data to 100% of values df.loc[:,col] = df[col].values / df[col].sum()*100 # Setup plot figsize = matplotlib.figure.figaspect(.33) fig = plt.figure(figsize=figsize) ax = plt.gca() df.T.plot.bar(rot=0, ax=ax) # Add a legend and show plt.legend(ncol=len(columns)) plt.show()
f2f709c60683770b9de5417f75f635c295c1e7738c6aad1fb4fbef7ab5d75361
['88c745210ba44c0394c2c64bc5741179']
Thanks for the response! I have tried disabling that setting but it made no appreciable difference. My graphics card is a GTX 1050 Ti SC. Resource Monitor indicates that it too is basically idle. When this setting is checked usage is around 6-8%. It drops to 2% when I uncheck it.
1bfb6449dcb5fdb39692f34c48be5890be9f01969dd75a6f9ec3319aded6c6d3
['88c745210ba44c0394c2c64bc5741179']
You could do something like this (using almost the above answer example) Scenario: Insert and Verify data blah blah Given I insert the following items into some form | Code | Name | Price | | 001 | Product 1 | 1,00 | | 002 | Product 2 | 1,50 | | 003 | Product 3 | 2,00 | Then the items should appear on the list At the Given step you perform interactions to insert the items and save them in a variable to use later on the Then step to check existance
38674e6d712f166e927b0719c2f9a0a4309438c671c46be137809fb35bbbadcd
['88cab3b1b5ed4165b658228febd8a56a']
Found the problem: The plugin in question depends on another assembly that is part of our code base, uses the Microsoft.Xrm.Sdk.dll and is added to the GAC of the CRM box. This assembly was build with the 2013 SDKs and deployed to the GAC earlier on. This was what was causing the deployment to fail. Solution: Rebuild this assembly and the plugin with the 2011 dlls and reinstall to the GAC and then redeploy to the plugin. Be warned still.. the 2013 SDK developer toolkit is not backwards compatible to a 2011 deployment. It will assume to use the 2013 DLLs.
647103268c60ecf3bf788e38a2065746cf8c5d012c31730fc8a5b84f89a0c9c0
['88cab3b1b5ed4165b658228febd8a56a']
OK.. I've figured out how to fix this: Right-click on the project Click 'Manage NuGet Packages' Uninstall WCF Data Services Client (version 5.6 was installed), it will remove other dependant packages Resinatall the WCF Data Service Client (5.6.1) through clicking the online tab on the left Seems like there is a problem with version 5.6 of this package
0faf282aaf9d2026bc1dcc996c1e846b95bb18c0d7a5b423bfa1299b56a12e73
['88cbadb853654ac3b700070f4618603e']
(Correct me if I misunderstand your answer) You seem to say that the diverse powers are able to correct the mistakes made by the others. What does ensure that these are mistakes? What does empeach abuses? Suppose that Judiciary decides "A" and the president says "I invalidate A". What can empeach him to do so if it is not justified.
7e76383d10025a47c4ae793333729021ae83f14159999b1d69a3b59e8496c091
['88cbadb853654ac3b700070f4618603e']
what are default password of these users : root, daemon, bin, sys, sync, games, man, lp, mail, news, uucp, nobody. You can check the status by looking in the shadow password file (/etc/shadow) at the second field. By default these accounts are locked (the password is set to *), which disables logins. Can anyone login through ssh or ftp by these users ?? Not unless you have set a password for them.
281a9139842da641b88a167a2ed0a0f6fd6c015c4b5c42e259ba3de448208cbb
['88d35e21160d4d1383e05a367fec4eac']
First to all... Is the select loading data? Maybe you´re not using an controller directive. <div class="controls" data-ng-controller="MyController"> <select class="span3" ng-model="selectedEngine" ng-options='engine.element as (engine.number + " " + engine.name) for engine in engines' data-ng-change="passNumber(engine.number)"> <option value="">Please Select...</option> </select> &nbsp; <span class="help-inline" id="loadingEngines" rel="spinner"></span>
9eaa02b02e36e909f09aece086265a6ad2ceb7a222503da70e4286d6f26e2ca6
['88d35e21160d4d1383e05a367fec4eac']
Try this... function Square(length){ this.length = length; //Constructor } Square.prototype.calcPerimeter = function(){ return this.length * 4; } Square.prototype.calcArea = function() { return this.length * this.length; } var s = new Square(5); s.calcPerimeter(); Using this pattern you can simulate inheritance in javascript, this pattern is called "Prototype". Hope this work for you.... Regards
44db2665edd3d04ee23e233994b9dab344b7478f548b0874081a2613221d7c18
['88dcb2b94be44059bb83fb04e9986a6a']
422 is a default response when validation fails. When you processing ajax response, you need to process "success" and "error". Example from my code: $.ajax({ url: $(this).data('url'), type: "post", dataType: "json", data: values, success: function (data) { $('#list').append(data.view); }, error: function (data) { var errors = $.parseJSON(data.responseText); $.each(errors, function (key, value) { $('#' + key).parent().addClass('error'); }); } }); By the way, you can pass a _token parameter with your ajax post, then you don't need to disable CSRF protection. Just add a hidden input {!! Form<IP_ADDRESS>token() !!} in your form that you send to a server via ajax.
e9db152f3bae23f247c797c9f4c900db9e68e7e0b17bc65c81562f9732c838a7
['88dcb2b94be44059bb83fb04e9986a6a']
I have a Discussion, a Comment and a User. I want to show unread comments count for each User. The question is: where should I place a code, that provides the number of unread comments? This is not a part of Domain, just a presentation concerns. My idea is to create a UnreadCommentsCounter that depends on UnreadCommentsRepository, accepts DiscussionId and UserId, and returns integer. I will access this UnreadCommentsCounter somewhere in Application layer, in some DiscussionPayloadObject (smart DTO) which has access to Discussion[] and returns what Presentation layer needs. Questions are: Where should I keep a UnreadCommentsCounter itself? In Application? If so, in which folder, Application/Support or Application/Services or...? Should I use data provided by UnreadCommentsRepository directly inside UnreadCommentsCounter, or add some UnreadComments value object and use it inside UnreadCommentsCounter? If I need that value object, where should I keep it? Probably not in Domain. Next to UnreadCommentsCounter?
99f3a5669d10fa8e0f55af2f22ab19070ed7d09d3a93869353aa7c15e5fd1b99
['88f42824d80549f2a17ce15251b672ff']
/hello, I am trying to learn how to use "break" commend in java as well as continuing loop with "y or n" choice. I am writing this game Guessing Number and I have some trouble with "y" choice. I will try to explain, to write a game of guessing number was easy so I started to add some conditions like the possibility on the and to play again or not, later I was thinking that would be more interesting if I add possibility to quit any time player wish, but that does not working correctly. Please help, thats my code package guessinggame; import java.util.Random; import java.util.Scanner; /** * public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { System.out.println(" Welcome "); Random rand = new Random(); Scanner input = new Scanner(System.in); boolean play_again = true; while (play_again) { int number_guess = rand.nextInt(100)+1; int number_of_tries = 0; int guess; String another = "y"; boolean win = false; while (win == false) { System.out.println(" Try too guess a number between 1 and 100 "); guess = input.nextInt(); number_of_tries++; if (guess == number_guess) { win = true; } else if (guess < number_guess) { System.out.println(" Guess is too low " + "\n Guess another number to continue or n to quit "); if (input.hasNext("n")) { play_again = false; break; } } else if (guess > number_guess) { System.out.println(" Guess is too high " + "\n Guess another number to continue or n to quit "); if (input.hasNext("n")) { play_again = false; break; } } } System.out.println(" You Win!!! "); System.out.println(" The number was " + number_guess); System.out.println(" It took you " + number_of_tries + " tries " + "\nWould you like to play again? (y/n): "); if (another.equalsIgnoreCase("y") == true) play_again = true; else { play_again = false; } } } }
bd7dc8bf53ec61c6fb3a4c93be34e2ef258ce32a3a2e459c3615b6d151725deb
['88f42824d80549f2a17ce15251b672ff']
Hello I am trying to write program to convert roman numbers (like MCLII) into arabic numbers. After hours spending in front of the computer and textbook I have a code that is not completed. Please help me find out why the program is wrong and does not print anything at the end. thank you public class Main { public static void romanToDecimal(java.lang.String romanNumber) { int decimal = 0; int lastNumber = 0; String romanNumeral = romanNumber.toUpperCase(); for (int x = romanNumeral.length() - 1; x >= 0 ; x--) { char convertToDecimal = romanNumeral.charAt(x); switch (convertToDecimal) { case 'M': decimal = processDecimal(1000, lastNumber, decimal); lastNumber = 1000; break; case 'D': decimal = processDecimal(500, lastNumber, decimal); lastNumber = 500; break; case 'C': decimal = processDecimal(100, lastNumber, decimal); lastNumber = 100; break; case 'L': decimal = processDecimal(50, lastNumber, decimal); lastNumber = 50; break; case 'X': decimal = processDecimal(10, lastNumber, decimal); lastNumber = 10; break; case 'V': decimal = processDecimal(5, lastNumber, decimal); lastNumber = 5; break; case 'I': decimal = processDecimal(1, lastNumber, decimal); lastNumber = 1; break; } } System.out.println(decimal); } public static int processDecimal(int decimal, int lastNumber, int lastDecimal) { if (lastNumber > decimal) { return lastDecimal - decimal; } else { return lastDecimal + decimal; } } public static void main(java.lang.String args[]) { System.out.println("PLEASE ENTER ANY NUMBER IN ROMAN NUMERIC FORMAT:"); Scanner input = new Scanner(System.in); int romanToDecimal; romanToDecimal = input.nextInt(); } }
57c8b4c45312a7e76699bde5def9e43334065d84c11f57d13cac211d3f79cfb1
['88ff33fe08c845e88d41551eef977757']
I have finally found a way to get it done. The best way to do it is to first create a timer with the required amount of time. and then to call the task( which is the pulse generating program) every time the timer overflows. The program for the timer can be run in the background. the timer can be created and set using the timer_create() and timer_settime() respectively. A different program can be called from one program using fork() and execl(). The program can be run in the background using the daemon(). By using all these things we can create our own scheduler.
db9ae90f64faa90f7aeb5aeaa25bdcdb798b371f5f6fd6919ae20ce20cee3935
['88ff33fe08c845e88d41551eef977757']
Can we schedule a program to execute every 5 ms or 10 ms etc? I need to generate a pulse through the serial port for 1 khz and 15 khz. But the program should only toggle the pins in the serial port , so the frequency has to be produced by a scheduler. is this possible in linux with a rt patch?
038f4fcd50d7993e2019670d8612e0cc59efd2630ac9b21f9f0eb23dd78038b7
['890ab28654c9456987d11ef559c40aeb']
I have a List<String> of names referring to Documents that I want to retrieve from FireStore. I want to access the contents after they are finished loading so I have implemented an OnCompleteListener in the Fragment that uses the data. However, I am not sure how to run a loop within a Task to query FireStore for each Document. I am querying FireStore in a Repository class that returns a Task object back through my ViewModel and finally to my Fragment. I want the Repository to return a Task so that I can attach an OnCompleteListener to it in order to know when I have finished loading my data. My Repository Query method: public Task<List<GroupBase>> getGroups(List<String> myGroupTags){ final List<GroupBase> myGroups = new ArrayList<>(); for(String groupTag : myGroupTags){ groupCollection.document(groupTag).get() .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() { @Override public void onComplete(@NonNull Task<DocumentSnapshot> task) { if(task.isSuccessful()){ myGroups.add(task.getResult().toObject(GroupBase.class)); } } }); } return null; //Ignore this for now. } I know this won't return what I need but I am not sure how to structure a Task that incorporates a loop inside of it. Would I need to extract the contents of the List<String> in my Fragment and run individual queries for each item? Any suggestions would be greatly appreciated.
769cd2d1027e88188bef834f53710003f596c0dec4a1bed57038986079b99a2e
['890ab28654c9456987d11ef559c40aeb']
I am a beginner starting to design a simple app to keep track of golf scores. I spent some time trying to figure out how to provide the user with a notification that they are unable to enter a letter under the score text box. I have tried using an array that contains the entire alphabet but have not been able to get it to work. I am currently now experimenting with InputFilter but I am not having any success; the app simply crashes when a letter has been entered. EditText input1 = (EditText)findViewById(R.id.scorePrompt); TextView output1 = (TextView)findViewById(R.id.textTotal); String blankCheck = input1.getText().toString(); //CHANGE INPUT IN scorePrompt TO STRING InputFilter filter = new InputFilter() { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) { for (int i = start; i < end; i++) { if (Character.isLetter(source.charAt(i))) { // Accept only letter & digits ; otherwise just return Toast.makeText(getApplicationContext(),"NO LETTERS",Toast.LENGTH_SHORT).show(); return ""; } } return null; } }; I suspect that it is because I am not directly connecting the Inputfilter to my blankCheck, but I am unsure. Any help is appreciated!
8a21597147d524b50200bf477e62ef96854cec110639d4ec57c70f34de092a14
['890e1a1795dc4ba998733c894c67551c']
Use 12 AWG. Reason: Later, you or someone else will come across the outlet and think, "Oh Wow! a 20 Amp outlet! and will either plug a lot of stuff into it, or will want to expand the power and add more outlets. If you spent the extra couple dollars to use the 12 AWG now, you won't have to re do it later! You don't need to be heating the insulation in your walls anyway. (Also I'm pretty sure wire thinner than 12 AWG is not to code for 20A circuits.)
140ab02123d767c73953f85f7da40fa7a6438126867ea3d28cd6f52cf069fa0e
['890e1a1795dc4ba998733c894c67551c']
already done with no results !! i note that the new records that i have added in geonetwork give the same error when i try te display the full wiew : An error occurred while loading a metadata view for the first option (full wiew1) and the second one (full option 2]) : The record with identifier was not found or is not shared with you. Try to sign in if you've an account. do you think that i committed an error when i upgrade my geonetwork !! if you know the right way i can applied for test !!
db71c7b893fa2f5e9e2496e66adb9b6e5d3128b5ab681a978fd959acad46d5a3
['8943f7cb7db64a38ac7f1b0c2a3fc1f3']
I have a cluster setup locally. I have configure ingress controller with traefik v2.2. I have deployed my application and configured the ingress. Ingress service will query the clusterIP. I have configured my DNS with the A record of master node. Now the problem is i am unable to access the application through ingress when the A record is set to master node. I have accessed the shell of ingress controller pod in all the and tried to curl the clusterIP. I cannot get response from the pod in master node but the pods in worker node give me the response i want. Also I can access my application with A record is set to any of the worker node. I have tried to disable my firewalld service and tried but its same. Did i miss anything while configuring? Note: I have spin off my cluster with kubeadm. Thank You.
46ca2abccd6301fb4548737ffc480959d230bdc5c70c1af72654d332a2edd67f
['8943f7cb7db64a38ac7f1b0c2a3fc1f3']
I am new to elk stack. Let me explain what i am trying to do. I have a application that is running separately for different users i.e. 5 different users will have 5 independent instance of the same application. I am using filebeats to send the logs from the application to logstash where it will be processed first before being sent to the elasticsearch. What i want is to write the application which enables the users to view the logs of theirs instance of application only. Now what i tried to do is creating the logstash pipeline for each the user with different port which will process the log and send it to elasticsearch with the different index name. Can you suggest me if this is the best practice or i am doing it wrong? Is there a more better way to do it without having separate pipeline for individual users with separate port? I think the way I am doing it is wrong and it will be harder for me to manage when the instances will grow in numbers. Thank You
babdab99955d24ecf10314e609f3358d20dfa14deb7c6ab6c9dfeb2f4d9e708e
['89546c63039a487ea95aa158375aba13']
A hash function is any function that can be used to map data of arbitrary size to data of fixed size. The values returned by a hash function are called hash values, hash codes, hash sums, or simply hashes. The dictionary in python is just a hash map. And sets could only contain strings or chars or numbers, but not dics or another sets. You might wanna look at: https://docs.python.org/2/tutorial/datastructures.html#sets
5d39eafb8631dcdb305817c19ffd5c46499f6dc18eedb27a16d4afc20f19d9ad
['89546c63039a487ea95aa158375aba13']
I'm trying to split String like: "Stack Overflow #forum #website"; -> "Stack Overflow" "#forum #website" I tried to use split function like:str.split("( )#", 2);, but the output was like: "Stack Overflow" "forum #website". It seems that the () does not work, what should I do to fix this? Thanks in advance.
154be96d8e4985206d874b2620b86705005c59cd93300ae45924a600589df3f1
['89589d6bd886451a82736dd68fb7c7a6']
You may get some answer here. However, I think that this is better to answer by experiment. I watch a youtube video which suggests how to find solution. https://www.youtube.com/watch?v=z_JKwK2eAyo I think that the video list out two things that will help you Ask practical people, e.g. People who works in car maintenance Try to find youtube video to see whether any one did the experiment before Actually you have already done one of the video suggestion which is to visit forum and ask.
248c4fa8871115de5c9c9dc4a9823096db2e245cd06aa8a2deffebf079ea8238
['89589d6bd886451a82736dd68fb7c7a6']
Thanks for the suggestion in (2) - that's very relevant. About (1): How do I exactly do this? Probably I'm suffering from a very general thick-headedness but I think I need a formula of the following form to create this table: Y = a + b1*X1 + b2*X2 + ... + bp*Xp
08695abc0c0edd7c33d7aa4e69529837460cd2ce471fb84111dbc2df3427f474
['895e7d86a6774c7c9058d101572aa194']
I am getting crash reports. net/mac80211/driver-ops results in drv_remove_interface. My network interface is removed and I can't connect to the WiFi. I can recover this by shutting down or going in and out of flight mode. It looks like it crashes once I unsuspend it. I can't report this. My kernel is tainted. It's VirtualBox modules: vboxpci, vboxnetadp, vboxnetfit and vboxdrv. Is VirtualBox causing the issue or is it just restricting me from sending the report? Do I need to reinstall VirtualBox after the upgrade? Is there a bug in Fedora with VirtualBox and the network interface? Is this message misleading and completely unrelated to VirtualBox? Regardless, I uninstalled it. As most sites referred to the removal in lower case, I just want to highlight that it is title case in Fedora. sudo dnf remove VirtualBox-5.2.24-1.fc29.x86_64 sudo dnf remove VirtualBox-kmodsrc-5.2.24-1.fc29.noarch sudo dnf remove VirtualBox-server-5.2.24-1.fc29.x86_64 sudo dnf remove virtualbox-guest-additions-5.2.24-1.fc29.x86_64
733f7d5b0210ce8f9e60c78afcda1fda2c208e3110845243c1d279de994e979e
['895e7d86a6774c7c9058d101572aa194']
Compiling LuaJIT with a C++ compiler would not solve the problem of "safely throw C++ exceptions" because parts of LuaJIT are written in assembly language and because at runtime machine code will be genenerated and executed dynamically if LuaJIT's Just-In-Time-Compiler is active. Therefore it is crucial that the machine code is able to handle C++ exceptions. See also the section C++ Exception Interoperability at the LuaJIT's website http://luajit.org/extensions.html#exceptions. There is a table that explains under which conditions it is safe to throw C++ exceptions. However the questions mentions the file LuaJIT-2.0.4/src/host/minilua.c. As is written the comment header of this file: /* This is a heavily customized and minimized copy of Lua 5.1.5. */ /* It's only used to build LuaJIT. It does NOT have all standard functions! */ So in theory it should be possible to compile this stripped down plain C lua with a C++ compiler. But this would not affect the LuaJIT runtime. If you want to compile plaina Lua (and not LuaJIT) with a C++ compiler, I would recommend to take the original Lua's source code from http://www.lua.org/ftp/, because the minilua.c in LuaJIT source is stripped down in such a way that it is not possible to compile it with a C++ compiler without modifications, whereas the original Lua source code can be compiled with a C++ compiler without bigger problems.
3300d5487f34b7d540ecd9ec3fba978455dbc026b792f623347901f110750933
['8967881b91654596b4cc57cd53020384']
I am not able to comment on your post due to a lack of reputation, but when I did something similar to this, I used a CancellationToken. It's been around for quite some time now (.NET 4.0), and is generally accepted in most .NET Async APIs. It should achieve what you're trying to do. The documentation for the concept is located here. You don't have to put a WebClient in your class (as a field) if you don't want to. Most of the interactions I've seen with web servers (in C#) behave very similar to the Entity Framework in that you generally send a request, which yields some form of IEnumerable that you have to deal with. So, you could wire up a service util for handling the common bits for a web client, and generate a unique one per request. I did something similar to that, and it worked well, but you need to be cautious of shared state in that scenario (construction really needs to be construction - not use of a singleton - if you're generating a unique client every time). I hope this helps!
cc2c6a262ec50b3dc8ae356fa8cc92be7b657d89573ff265281b60d014f3d4fa
['8967881b91654596b4cc57cd53020384']
I got a comment from a reviewer who suggested that i should remove Chinese character in the table which shows different names of a plant from different countries. Actually i typed pinyin( Chinese character), namely Ding Cao(丁草). I saw several published papers do the same thing. But i have no academic proof or authentic documents so far. So please share or give some consultancies if someone encountered. Thanks very much.
0e49a2baa0afa045e8ce2df9300c3b19298b28432370b2a8dc63ad18aa915abe
['896cc8a88c324e2ca490a3e2c6aabc9f']
Go to .vtigerfolder/modules/Install/views/index.php and change the code as shown in solution protected function applyInstallFriendlyEnv() { version_compare(PHP_VERSION, '5.5.0') <= 0 ? error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED) : error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); set_time_limit(0); } ====Solution:====== The code below shows if your php version is less than 5.5.0 then set error reporting to notice, error and deprecated other wise or else set error reporting to E_error,E_notice,E_deprecated and E_strict which is changing the actual setting you set in php.ini //Change below line version_compare(PHP_VERSION, '5.5.0') <= 0 ? error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED) : error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); //USE This code instead version_compare(PHP_VERSION, '5.5.0') <= 0 ? error_reporting(E_ERROR & ~E_NOTICE & ~E_DEPRECATED) : error_reporting(~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & E_WARNING);
081af087b35f9fbf2eba0377ab4409e003550f8eee3bc2ef9534b652e601ab30
['896cc8a88c324e2ca490a3e2c6aabc9f']
i want to show rating of each item or name of company with company name (driven from another table in database) in "li" tag of html (transporters.php). I have got the rating for each company page individually (transporters2.php) but i want to get all the ratings of all the companies or items in "li" tab so user can overview it and after clicking an "li" item it will show the profile of company "transporters2.php". Here are my two files transporters.php and transporters2.php and also their snapshots. transporters.php and transporters2.php ,Mydatabase Note: Both files are working correctly there is no syntax error, if an error occurs that might be occurred while posting the question thanks. Transporters.php <?php include "header.php"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <script src="../js/jquery.js" type="text/javascript"></script> <link rel="stylesheet" href="../css/rating.css" /> <script type="text/javascript" src="../js/rating.js"></script><title>Transporters</title> <!-- Bootstrap Core CSS --> <link href="file:///C|/xampp/htdocs/bin/css/bootstrap.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="file:///C|/xampp/htdocs/bin/css/modern-business.css" rel="stylesheet"> <!-- Custom Fonts --> <link href="file:///C|/xampp/htdocs/bin/font-awesome/css/font awesome.min.css" rel="stylesheet" type="text/css"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> <link href="../css/example.css" rel="stylesheet" type="text/css" /> <link href="../css/style.css" rel="stylesheet" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"> </script> </head> <body> <!-- Page Content --> <div class="container"> <!-- Page Heading/Breadcrumbs --> <div class="row"> <div class="col-lg-12"> <h1 class="page-header">Transporters <small> Companies</small> </h1> <ol class="breadcrumb"> <li><a href="index.php">Home</a> </li> <li class="active">Transporters</li> </ol> </div> </div> <!-- /.row --> <!-- Content Row --> <div class="row"> <div class="col-lg-12"><?php require("Config.php"); $sql =mysql_query("SELECT * FROM transporters"); ?> <ul style="list-style:none;"> <?php while($row=mysql_fetch_array($sql) ) { $cid=$row['CompanyID']; ?> <div class="panel-group" id="accordion"> <div class="panel panel-default"> <div class="panel-heading"> <li><div class="product" style="font: 10px verdana, sans-serif;margin: 0 auto 40px auto;width: 71px;height: 4px;margin-right: 75%;"> <div id="<?php echo $cid ?>" class="ratings" style="border: 1px solid #CCC;overflow: visible;padding: 10px;position: relative;width: 182px;height: 47px;float: left;margin-left: -195px;"><div class="star_1 ratings_stars ratings_vote"></div><div class="star_2 ratings_stars ratings_vote"></div><div class="star_3 ratings_stars ratings_vote"></div><div class="star_4 ratings_stars ratings_blank"></div><div class="star_5 ratings_stars ratings_blank"></div> </div> <a href='transporters2.php?CompanyID=<?php echo $cid;?>'><?php print $row['CompanyName']; ?> </a></div> </li> </div> </div> </div> <?php }//end of while loop ?> </ul> </div> </div> <script> function sendcompanyname() { var x= document.getElementById("cpn").value; } </script> </body></html> Transporters2.php <?php $db=mysqli_connect("localhost","root","","db1") or die("unable to connect"); include("header.php"); $cname; if(isset($_GET['CompanyID'])){ $CompanyID = $_GET['CompanyID']; $get_name= "SELECT * from `transporters` where `CompanyID`='$CompanyID'"; $run_name= mysqli_query($db,$get_name); while($row_name=mysqli_fetch_array($run_name)){ $cname = $row_name['CompanyName'];} } include("settings.php"); connect(); $ids=array(1); ?> <!DOCTYPE html> <html> <head> <script src="../js/jquery.js" type="text/javascript"></script> <link rel="stylesheet" href="../css/rating.css" /> <!--<script type="text/javascript" src="../js/rating.js"></script>--> <script> $(document).ready(function() { $('.ratings_stars').hover( // Handles the mouseover function() { $(this).prevAll().andSelf().addClass('ratings_over'); $(this).nextAll().removeClass('ratings_vote'); }, // Handles the mouseout function(){ $(this).prevAll().andSelf().removeClass('ratings_over'); } ); //send ajax request to rate.php $('.ratings_stars').bind('click', function(){ var id=$(this).parent().attr("id"); var num=$(this).attr("class"); var poststr="id="+id+"&stars="+num; $.ajax({url:"../bin/rate.php",cache:0,data:poststr,success:function(result){ document.getElementById(id).innerHTML=result;} }); }); }); </script> </head> <body> <!-- Page Content --> <div class="container"> <!-- /.row --> <div class="row"> <?php for($i=0;$i<count($ids);$i++) { $rating_tableName = 'ratings'; $id=$CompanyID; $q="SELECT total_votes, total_value FROM $rating_tableName WHERE id=$id"; $r=mysql_query($q); if(!$r) echo mysql_error(); while($row=mysql_fetch_array($r)) { $v=$row['total_votes']; $tv=$row['total_value']; $rat=$tv/$v; } $id=$CompanyID; $j=$id; echo'<div class="product"> Rate Item '.$j.' <div id="rating_'.$id.'" class="ratings">'; for($k=1;$k<6;$k++){ if($rat+1>$k)$class="star_".$k."ratings_stars ratings_vote"; else $class="star_".$k." ratings_stars ratings_blank"; echo '<div class="'.$class.'"></div>'; } echo' <div class="total_votes"><p class="voted"> Rating <strong>'.@number_format($rat).'</strong>/5 ('.$v. 'vote(s) cast) </div> </div></div>';} ?> <div class="col-lg-12"> <h2 class="page-header"><?php echo $cname;?></h2> </div> <!--<div class="col-md-3 col-sm-6"> <div class="panel panel-default text-center"> <div class="panel-heading"> <span class="fa-stack fa-5x"> <i class="fa fa-circle fa-stack-2x text-primary"></i> <i class="fa fa-car fa-stack-1x fa-inverse"></i> </span> </div> <div class="panel-body"> <h4>Show Drivers</h4> <p>Show drivers of this company.</p> <button id="popup" onclick="div_show()" class="btn btn primary">Add</button> </div> </div> </div>--> <div class="col-md-3 col-sm-6"> <div class="panel panel-default text-center"> <div class="panel-heading"> <span class="fa-stack fa-5x"> <i class="fa fa-circle fa-stack-2x text-primary"></i> <i class="fa fa-support fa-stack-1x fa-inverse"></i> </span> </div> <div class="panel-body"> <h4>Show routes</h4> <p>check which routes are following this company...</p> <a href="routes.php?CompanyID=<?php echo $CompanyID;?>" class="btn btn primary">show routes</a> </div> </div> </div> <div class="col-md-3 col-sm-6"> <div class="panel panel-default text-center"> <div class="panel-heading"> <span class="fa-stack fa-5x"> <i class="fa fa-circle fa-stack-2x text-primary"></i> <i class="fa fa-database fa-stack-1x fa-inverse"></i> </span> </div> <div class="panel-body"> <h4>Schedule</h4> <p>Check the timings of journey.</p> <a href="quotations.php" class="btn btn-primary">Show Schedule</a> </div> </div> </div> <div class="col-md-3 col-sm-6"> <div class="panel panel-default text-center"> <div class="panel-heading"> <span class="fa-stack fa-5x"> <i class="fa fa-circle fa-stack-2x text-primary"></i> <i class="fa fa-database fa-stack-1x fa-inverse"></i> </span> </div> <div class="panel-body"> <h4>Show Drivers Positions</h4> <p>Check the positions of all drivers.</p> <a href="positions.php" class="btn btn-primary">Show Drivers Positions</a> </div> </div> </div> </div> </div> <!---END Page Content--> </body> </html>
5fc48e82d974c32525dd118b549960f57151c821ba2dc42ef682f977e38c04ae
['8999e93f6dbd4792bcc314a38254cd75']
Try this I hope it would be helpful for you!! In Swift 2+ let request = NSMutableURLRequest(URL: NSURL(string: "http://uniworx.ifi.lmu.de/?action=uniworxLoginDo")!) request.HTTPMethod = "POST" let postString = "Username=Yourusername&password=Yourpassword" request.HTTPBody = postString.dataUsingEncoding(NSUTF8StringEncoding) let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { data, response, error in guard error == nil && data != nil else { // check for fundamental networking error print("error=\(error)") return } if let httpStatus = response as? NSHTTPURLResponse where httpStatus.statusCode != 200 { // check for http errors print("statusCode should be 200, but is \(httpStatus.statusCode)") print("response = \(response)") } let responseString = String(data: data!, encoding: NSUTF8StringEncoding) print("responseString = \(responseString)") } task.resume() In Swift 3 You can var request = URLRequest(url: URL(string: "http://uniworx.ifi.lmu.de/?action=uniworxLoginDo")!) request.httpMethod = "POST" let postString = "Username=Yourusername&password=Yourpassword" request.httpBody = postString.data(using: .utf8) let task = URLSession.shared.dataTask(with: request) { data, response, error in guard let data = data, error == nil else { // check for fundamental networking error print("error=\(error)") return } if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 { // check for http errors print("statusCode should be 200, but is \(httpStatus.statusCode)") print("response = \(response)") } let responseString = String(data: data, encoding: .utf8) print("responseString = \(responseString)") } task.resume()
3d95da00c60b51119fec314710cd9f4cd53859710be6e94259a53cd5fd911117
['8999e93f6dbd4792bcc314a38254cd75']
I am struggling with the issue of Facebook login, Yesterday Facebook login working correctly but today when I run my app it's not working don't know why, why it's not working suddenly I already configured all things related to Facebook login in Facebook develop console everything is configured Please help me out if you have any idea, I already enable Keychain sharing also. Code for Facebook Login @IBAction func onClickFacebookLoginAction(_ sender: Any) { var message = String() if Reachability.isConnectedToNetwork() == true{ let loginView:FBSDKLoginManager = FBSDKLoginManager() loginView.loginBehavior = FBSDKLoginBehavior.web loginView.logIn(withReadPermissions: ["email","public_profile","user_friends"], from: self, handler: { (result, error) in if(error != nil){ print("Error while try to login with facebook-\(error?.localizedDescription)") }else if (result?.isCancelled)!{ print("User cancel the facebook login") }else{ if result?.grantedPermissions != nil{ if (result?.grantedPermissions .contains("email"))!{ self.ShowProgressHUD() self.fetchUserInfo() }else{ message = message.appending("Facebook email permission error") self.showAlertMessage(message: message, title: "") } } } }) } } func fetchUserInfo() -> Void { if (FBSDKAccessToken.current() != nil) { let graphRequest:FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "/me", parameters:["fields": "id, first_name, last_name, name, email, picture"]) graphRequest.start(completionHandler: { (connection, result, error) in if(error != nil){ self.showAlertMessage(message: (error?.localizedDescription)!, title: "") } else { print("Result is:\(result)") self.dictionary = result as! [String : AnyObject] let name = self.dictionary["name"] as!String let email = self.dictionary["email"] as! String let token = FBSDKAccessToken.current().tokenString print("name is -\(name)") print("email is -\(email)") print("token is -\(token)") DispatchQueue.main.async { let SelectionViewObj = self.storyboard?.instantiateViewController(withIdentifier: "ViewController") as! ViewController self.navigationController?.pushViewController(SelectionViewObj, animated: true) } } }) } }
3ef3727d324909d3e39c50084ae188a6f3ffdf9413ecb7821b88de49fa46a9ba
['89a1707ee9244d34a2c0fbef235eda45']
dequeue() methods is popping out items from the front , but to remove all the occurrences of any string , you need to modify your remove() method to - void remove(Item item) { Node cur = this.first; Node prev = null; if(this.first.item.equals(item)){ item = dequeue(); cur = this.first; } while (cur != null) { /* if (cur.item.equals(item)) { item = dequeue(); }*/ while(cur != null && !cur.item.equals(item)) { prev = cur; cur = cur.next; } if(cur == null) return; prev.next = cur.next; cur = prev.next; } return ; }
e6862cdd6665bd53b9761b1993658b26d342816850be928debf80323e62af6c5
['89a1707ee9244d34a2c0fbef235eda45']
To clarify your doubt , according to your implementation both Employee objects i.e. e1 and e2 are equal , so they will be added to set only once. However , in HashMap, you are adding two separate Keys - ABC and XYZ, so hash code of keys will be calculated. (Not of Employee Class), that's why size of your hashMap is 2. You can refer to following link for deeper understanding of HashMap's internal working -https://www.geeksforgeeks.org/internal-working-of-hashmap-java/
1948e7127a113fb11e54e9a0dbdcb90673efd2e74c31750d0455033951f4c891
['89df1053d5c84bd4be125d05aba70424']
I am currently running a batch file that backs up all my files created or modified within the past 24 hours using an old version of Winzip. I use 7 zip for a lot of archiving and would like to be able to use it for this purpose but it does not have switches that let you select files based on their date/time stamp. I do NOT want to copy files to a directory based on their time stamp and archive them form there. Any suggestions?
986182d01dfbf6fe2e21837a7305eee1efceadbf0d7d67cc029108b6b8df89d6
['89df1053d5c84bd4be125d05aba70424']
I'm using pdflatex and the classicthesis package to write and format my thesis. A narrow text width and broad margins (for margin paragraphs) are used in this layout. Using this general page layout, I now want to insert a multi-page landscape table and would like to allow the table to span the whole page, i.e. use the margins to include a few more rows in the table. How can I achieve that? I tried using "newgeometry" provided by the geometry package (as suggested here) but if I do that (outside of the landscape environment), also the page number and header position change (which I don't want). My MWE: \documentclass[twoside,fontsize=12pt,a4paper]{scrbook} \usepackage[beramono,pdfspacing]{classicthesis} \usepackage[inner=20mm,top=15mm,bottom=25mm,textwidth=120mm,% marginparsep=5mm, marginparwidth=40mm]{geometry} \usepackage{longtable,lscape,lipsum} \begin{document} \chapter{A chapter} This is the page layout... \section{A section} ..with a reference to table \ref{tab:long}... \graffito{..and comments in the margins.} \lipsum[1] \begin{landscape} \setlength\LTleft{0pt} \setlength\LTright{0pt} \begin{longtable}{@{\extracolsep{\fill}}crrrrrrrrrr} \caption[]{\normalsize First caption\footnotemark{}.\label{tab:long}}\\[10pt] \toprule Item number&1&2&3&4&5&6&7&8&9&10\\ \midrule \endfirsthead \caption{Table caption (continued)}\\[10pt] \toprule Item number&1&2&3&4&5&6&7&8&9&10\\ \midrule \endhead A&---&---&---&---&---&---&---&---&---&---\\ B&---&---&---&---&---&---&---&---&---&---\\ C&---&---&---&---&---&---&---&---&---&---\\ D&---&---&---&---&---&---&---&---&---&---\\ E&---&---&---&---&---&---&---&---&---&---\\[20pt] F&---&---&---&---&---&---&---&---&---&---\\ G&---&---&---&---&---&---&---&---&---&---\\ H&---&---&---&---&---&---&---&---&---&---\\ I&---&---&---&---&---&---&---&---&---&---\\ J&---&---&---&---&---&---&---&---&---&---\\[20pt] K&---&---&---&---&---&---&---&---&---&---\\ L&---&---&---&---&---&---&---&---&---&---\\ M&---&---&---&---&---&---&---&---&---&---\\ N&---&---&---&---&---&---&---&---&---&---\\ O&---&---&---&---&---&---&---&---&---&---\\[20pt] P&---&---&---&---&---&---&---&---&---&---\\ Q&---&---&---&---&---&---&---&---&---&---\\ R&---&---&---&---&---&---&---&---&---&---\\ S&---&---&---&---&---&---&---&---&---&---\\ T&---&---&---&---&---&---&---&---&---&---\\[20pt] U&---&---&---&---&---&---&---&---&---&---\\ V&---&---&---&---&---&---&---&---&---&---\\ W&---&---&---&---&---&---&---&---&---&---\\ X&---&---&---&---&---&---&---&---&---&---\\ Y&---&---&---&---&---&---&---&---&---&---\\[20pt] Z&---&---&---&---&---&---&---&---&---&---\\ \bottomrule \footnotetext{Also, I want to have a footnote to the first table caption that is placed after the last segment of the table.} \end{longtable} \end{landscape} \end{document} My original table spans four pages and I want to reduce it to three. I hope that somebody will be able to help me!
01fc1e04d0ca4b73259ee4803974716fae7e9b9d8c3bdadfd02a482d801c36d0
['89f9534fbcce486aa21bcc9ff4688006']
I made a game and I am trying to make it work with stable baselines. I've tried different algorithms I've tried reading stable baselines documentation, but i can't figure out where to start tuning. My game is here: https://github.com/AbdullahGheith/BlockPuzzleGym And this is the code i ran to train it: import gym import blockpuzzlegym from stable_baselines import PPO2 env = gym.make("BlockPuzzleGym-v0") model = PPO2('MlpPolicy', env, verbose=1) model.learn(250000) for _ in range(10000): action, _states = model.predict(obs) obs, rewards, dones, info = env.step(action) env.render() I tried 25000000 timesteps, but it still wouldn't work. As you might tell, i am new to ML, and this is my first project. Any indications are welcome. I tried using the parameters the MiniGrid parameters from stable baselines zoo (without the env wrapper)
3fad9cb184616fd85187d8af7c436f22855cfa479944cdb5f45cc4faec933417
['89f9534fbcce486aa21bcc9ff4688006']
Make sure that you have your biservicesconfig.xml in /app/oracle/fmw12213/user_projects/domains/bi/config/fmwconfig/biinstances/coreapplication/ points to the same host:port as the file in ActionFrameworkConfig.xml. Also has the ending /analytics-ws/saw.dll For me, that looked like this: <server>http://localhost:7033/analytics-ws/saw.dll</server>
400a710c57a9d25efab61037ddaa3ac20b4b9074277acbbf3bfcec14e3171ed9
['8a0afd0550a94a9d92018bf152f6bcef']
Try this: $showTheTickets = array(); $user_id = $_SESSION['user_id']; $getTickets = mysqli_query($mysqli,"SELECT * FROM tickets WHERE user_id = $user_id") OR die (mysqli_error($mysqli)); while($row = mysqli_fetch_array($getTickets)){ $row = array( 'ticket_id' => $row['ticket_id'], 'subject' => $row['subject'] ); $showTheTickets[] = $row; } And then: <?php foreach ($showTheTickets as $stt): ?> <div class="preview"> <?php echo $stt['ticket_id'] ?> <?php echo $stt['subject'] ?> </div> <?php endforeach; ?> Hope it helps...
a8b6ae65aa18d77b6e16c8e67fd066c0cab81c5f26c19179a54ad917963bc569
['8a0afd0550a94a9d92018bf152f6bcef']
So I have an app that send a synchronous request to my remote server and all goes right running it from xcode. The question is that when I archive the app and send it to TestFlight, the tester receive no response, making the same request. I'm using the xcode's Devices window to see the log within the device with the Adhoc build and it gives me a empty object coming from the server. I have also made the request from a browser's web client to certify there is no error on the server. Here goes the code: -(NSDictionary *)postData:(NSString *)data toUrl:(NSString *)url { if( nil == url || nil == data ){ return nil; } NSString *fullUrl = [NSString stringWithFormat:@"%@%@", [self baseUrl], url]; NSURL * serviceUrl = [NSURL URLWithString:fullUrl]; NSMutableData *dados = [NSMutableData data]; [dados appendData: [data dataUsingEncoding: NSUTF8StringEncoding]]; NSMutableURLRequest * serviceRequest = [NSMutableURLRequest requestWithURL:serviceUrl]; [serviceRequest setValue:@"application/json; charset=UTF-8" forHTTPHeaderField:@"Content-type"]; [serviceRequest setHTTPMethod:@"POST"]; [serviceRequest setHTTPBody:dados]; NSHTTPURLResponse * serviceResponse; NSError * serviceError; NSData *dataResponse = [NSURLConnection sendSynchronousRequest:serviceRequest returningResponse:&serviceResponse error:&serviceError]; NSString *status = [self statusFamily:serviceResponse.statusCode]; NSDictionary *dataFromResponse = [[QMParser sharedParser] dataToDictionary:dataResponse]; return [NSDictionary dictionaryWithObjectsAndKeys:serviceResponse, @"response", status, @"status", dataFromResponse, @"data", nil]; }
cc858127c45914224bff84ca4331897afbc1426453a3f5d6710bd3da89b554a4
['8a0b11efd2754107b2aa015bca28b2ad']
Ok, I've finally found the solution. For unknown reason, Excel doesn't understand proper ISO 8601 format when retrieving refreshed data from HTML. All datetimes should be passed in yyyy-MM-dd / yyyy-MM-dd HH:mm:ss / HH:mm:ss formats with correct mso-number-format parameter defined in styles section (mso-number-format:"mm\\/dd\\/yyyy" in my case).
01ef782d77a59d99a8003fcf8dbc04442e53f3322995ba17425d86aff0b3c242
['8a0b11efd2754107b2aa015bca28b2ad']
Could someone please shed some light on the following question: there is Microsoft.Data.Edm namespace and Microsoft.OData.Edm namespace. Both have IEdmModel interface, EdmModelBase and EdmModel implementations, etc. The most interesting thing is that ASP.NET Web API OData package uses Microsoft.Data.Edm.Library.EdmModel internally (instance of that class is returned by ODataModelBuilder, for example). So what is the point of Microsoft.OData.Edm namespace?
ca9723f0433886f5854c778bf9a700a04183ec1f44b7ee666762ba93616352c9
['8a24158bb8604153becb95c3fde355c0']
i am trying to pass the string variable dynamically like this def calling(): str='Login_CSA' import importlib mod = importlib.import_module(str) mod.%str(10, 20, 30, 40) calling() but i am unable to pass the variable getting syntax error "syntax error" and i tried with concatinating like mod.+str(10,20,30,40) still iam not able to get can u guys show me how to pass a variable dynamically like other languages in python
5320795a02fa08416b0dae4f2458892c10f22d05d18b6ee4568830493f3ab82c
['8a24158bb8604153becb95c3fde355c0']
i am trying to open Google website by <PERSON> using python language. Here It invoking Firefox browser but unable to paste the URL , i think the version which i am using is not supported i am using selenium v2.35 and Firefox 10.0 Is these both are compatible or else please suggest me which Firefox version i have to install I used the following code to invoke the browser from selenium import webdriver def Main(): driver=webdriver.Firefox() driver.maximize_window() url = driver.get("http://google.com") Main()
319ef582587cfd6013ab539b16b673be173fc34898edd207e161853c62e1143c
['8a24774355134b958245c13e7b27ef89']
Is it possible using the following property of Fourier transforms; $$\frac{d^nf(x)}{dx^n} = 2\pi i\nu \hat{f}(x)$$ to show that the Fourier transform of the heaviside step function is equal to; $$\hat{f}[\theta(t)] = \frac{1}{2\pi i \nu}$$ Using the property listed above we can write: $$\hat{f}[\theta'(t)] = 2\pi i\nu\hat{f}[\theta(t)]$$ But since we know the (distributional) derivative of the Heaviside step function is the Dirac delta function. $$ \hat{f}[\delta(t)] = 2\pi i\nu\hat{f}[\theta(t)]$$ $$\implies \hat{f}[\theta(t)] = \frac{\hat{f}[\delta(t)]}{2\pi i \nu}$$ And since the Fourier transform of the delta function is just $1$ we get: $$ \hat{f}[\theta(t)] = \frac{1}{2 \pi i \nu}$$ I am unsure if this process is correct or rigorous since my knowledge and understanding of distributions and generalised functions is limited. If this method presented above is indeed allowed I am unsure why this answer contradicts the answer shown on Mathworld which states the Fourier transform of the Heaviside step function is equal to: $$ \frac{1}{2}\bigl[\delta(k)\space - \frac{i}{\pi k}\bigr]$$ There is also another article here https://www.cs.uaf.edu/~bueler/M611heaviside.pdf which does not return my answer. Any comments, corrections or answers are greatly appreciated. Thanks!
8b64056cc0170c9c46596ba76efa779edd194444e26118ade1c1fa8f9109a9cf
['8a24774355134b958245c13e7b27ef89']
Thank you for the answer, but could I please ask you the following questions. We have changed the domain of the integral from [0,1] to [0,1), why is this allowed? And when applying the DCT we do not need to consider that the dx's in the integrals are actually the <PERSON> measure? I can follow most of this but still confused.
3dc9f6792743a12b3f0cc50af46495b72d5ff63dd57ea234a2adc2c49659b57e
['8a276e3aaf08426e8d5022af4261e1a6']
There are the various issue can be there 1. wc_add_order_item_meta (Woo version < 3.0.0) If you're thinking to add item_meta to each of your product and then yes it will get displayed automatically on Thank You Order Page. Please use "$item->add_meta_data('Your_Key',$order_val);" [WC_version >= 3.0.0] Please make sure you've already set that "key" to your cart_item_meta by using this hook -> "woocommerce_add_cart_item_data". Hope this may help you :)
0246cb14ca63dbf63b61a6b71a963bbad5dfc587f257dc0d87a7b12fd679daf1
['8a276e3aaf08426e8d5022af4261e1a6']
add_action( 'woocommerce_before_calculate_totals', 'set_the_discount' ); function set_the_discount( $cart ) { foreach ( $cart->cart_contents as $key => $value ) { //please check whether your item is the second item of your cart or not? //if this is your second item in your cart //Set the 50% discount $product_id = $value['product_id']; $product = wc_get_product($product_id); $get_price = $product->get_price(); $new_price = $get_price / 2; $value['data']->set_price($new_price); } } This hook can be used to set the price directly to the cart. Hope this may help
a31c1708863d878be9597e52365d7394601052df176cb893d1ee1fdff3956237
['8a2b0274e3e944689fc6c108840745c0']
Your SQL code for create and drop table looks valid. There is a line in your logcat-log: "no such column" which means your "getAllConfirmed" is executet but your migration is not working, so keep an eye on this: Increment the version number of your database, maybe your upgrade script is not executed (So just increment the "2" to "3" in your super constructor call) If this is not working, you can just uninstall the app from the device/emulator, like forpas mentioned in the comment. Set a breakpoint and see if the create table/upgrade command was executed In general, if you want to add a column, it is better to just ALTER the table and add the column. But I guess you are just at the beginning of your app and you would like to keep things more easy, so your method is valid as long you haven't released your app. If you just started, I just want let you know, Android has introduced a new way for db creation, which is more common and simple: https://developer.android.com/training/data-storage/room This does not fix your problem, but if you are able to upgrade, this would simplify the db creation of your project
11e2d19572f91dddd700963cb5d72d416b7f020f4438ff341de031e92608a47c
['8a2b0274e3e944689fc6c108840745c0']
I found a simple solution on http://technology.finra.org/code/serialize-deserialize-interfaces-in-java.html for my problem. With the template InterfaceAdapter, each class name will stored additional in the json file. So the retrieval method, to restore the classes know the exact class and not just the interface. This works well for me.
f64997399efb006e8c354331f45c62d780fe80bb75748c3d9977640e09cc0071
['8a30a46f47e14073903db03e65e66337']
I am looking for a periodic solution (with period $2\pi m$, for some integer $m$) to the following ODE $$\ddot{x}+x-\frac{1}{x}=0.$$ ($x(t)=\pm 1$ trivially solves this equation). Note that this system is integrable, so the quantity $$E=\dot{x}^2+x^2-\log x^2$$ is constant for any solution. Separating variables and integrating gives $$t=\int\frac{dx}{\sqrt{E-x^2+\log x^2}}.$$ However, I haven't been able to solve the integral. Maybe thinking of this as a physical system with potential $V(x)=x^2-\log x^2$ would be useful (though I haven't been able to employ this fact). I'd appreciate any suggestions.
349541c95444a5bc5596985904788043d27a635715c182b8f346b6f345d6a987
['8a30a46f47e14073903db03e65e66337']
Thank you for your answer. One question about how this construction depends on $k$: since the homeomorphism type of the universal cover of $M$ depends on $k$, I think the limit sets $\Lambda$ *cannot* be homeomorphic for different values of $k$; however, your answer seems to indicate that $\Lambda$ is homeomorphic to the classical <PERSON> set *for any $k\geq 2$* (in particular, the homeomorphism type of $\Lambda$ is independent of $k$). Have I misunderstood something?
dcd37d62d946d8626e562b0804698c64342057ca2cd50b3ec83c016730bfa9ab
['8a31ffdd1fea4facb0952a852567c362']
You can't kill the adb server from Eclipse, simply because that feature has not been implemented in Eclipse ADT plugin. This is from Android Official documentation on Eclipse ADT plugin: adb: Provides access to a device from your development system. Some features of adb are integrated into ADT such as project installation (Eclipse run menu), file transfer, device enumeration, and logcat (DDMS). You must access the more advanced features of adb, such as shell commands, from the command line.
e68ab1b33dec06913fff35574da42bdd7f206fbeba59af8b95d17b65892b63d9
['8a31ffdd1fea4facb0952a852567c362']
Based on the code you have shared, I've created a sample web-app and committed the code in git-hub. Application is divided into 2 modules: main : contains modules/index/view and modules/profile/view other : contains 'modules/order/view and modules/search/view When you request for modules/index/view or modules/profile/view, main.js is downloaded if not downloaded yet. Similarly when request is placed for modules/order/view or modules/search/view, other.js is downloaded if not downloaded yet. Remember to use require.js v2.1.10 or greater, as it has bundle feature which is required for generating other.js. You can further modularize it by defining order, search, profile as independent modules in build.js, so that they are downloaded only when needed. Output of executing build command : media/js/main.js ---------------- media/js/lib/jquery/jquery-min.js media/js/lib/underscore/underscore-min.js media/js/lib/backbone/backbone-min.js media/js/router.js media/js/app.js media/js/main.js media/js/modules/index/model.js media/js/modules/index/view.js media/js/modules/profile/model.js media/js/modules/profile/view.js media/js/other.js ---------------- media/js/modules/order/model.js media/js/modules/order/view.js media/js/modules/search/model.js media/js/modules/search/view.js The execution flow goes like this: index.html => media/js/main [it has index/view, profile/view, app.js and all the dependencies]. By default Index view is shown, as it is configured for home route. When Profile links is clicked, no more files are downloaded, as main.js is already downloaded. When Search / Order links are clicked, other.js is downloaded.
b0c651d68a9499bd467a90165632d0f240f7a11fa9ba2828e9c8df707cbf64e0
['8a4dc6bb63c54bbaa408cb5450401df0']
TL;DR: I have a column with a timestamp column. I want to filter by a particular date. Should I add a date coulmn? id(AI/PK) some fields timestamp *date?* So the query with only a timestamp colum would be something like SELECT ? FROM [TABLE] WHERE YEAR(timestamp) = '2015' AND MONTH(timestamp) = '04' AND DAY(timestamp) = '1' vs a query with an additional date column SELECT ? FROM [TABLE] WHERE date = date('<PHONE_NUMBER>')? I'm currently in a planning and design phase of my project. But it will be a very huge table in production. So the cons of having a date column are obviously the increased size of the table. I guess the con of not having a date column would be decreased performance. No? Well I'm not sure if it's that easy.
c0b56c7196711775336caddbd18335ac0f5b837ccb6f766810b94322eecacf8b
['8a4dc6bb63c54bbaa408cb5450401df0']
Okay after googling for some minutes it seems this is the regular way to prefix each line of output with sed But I get an error I don't understand. What does this mean and how can I fix this? $ sed 's/^/#/' test.txt sed: -e expression #1, char 0: no previous regular expression What my test.txt looks like - it's really just a test ### test.txt a b c d e f g h Oh yeah.. the version $ sed --version GNU sed version 4.2.1 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law.
4322533bde820fa59a5abca9b7b89dfe0c1b0b23e7db12e0b1873fa763d75bab
['8a57aa8767bf4a5d882ea7b5c027d4fe']
My advice for you : read more about Database Engine :) cause once you connect you DB Engine to a Database : either it is local or on remote machine (Server) its the same thing when you look at it from your application. 1- First watch this read more about this : SQL Server Management Studio 2- watch this (how you connect to a remote database) enter link description here 3- Very important is to allow connection from Remote Machine enter link description here 4- Once you are able to connect to the remote database from your SQL Server, everythg is the same on EF.
aabc034cee21ab04089e594175790d128a6e23570226e937954beef09cc6c335
['8a57aa8767bf4a5d882ea7b5c027d4fe']
Im Beginner and i wanted to know if what i am doing is right, cause i've being queering a single table of 350 records and it took almost a minute to display ! i think I'm doing something wrong. So this is how i am doing it : CODE INSIDE THE CLASS : SPOT /// <summary> /// Return The City Of this Spot /// </summary> /// <returns>City Of The Spot</returns> public City GetCityOfThisSpot() { City value; using (var ctx = new GhanDBEntities()) { var firstOrDefault = ctx.Spots.FirstOrDefault(s => s.IdSpot == IdSpot); var city = firstOrDefault.City; value = city; } return value; } and then in my winform i use something life this : CODE IN THE WINFORM : List<City> listOfCities = new List<City>(); foreach (var spot in listOfspot) { listOfCities.Add(spot.GetCityOfThisSpot); } I think i shouldn't do it this way, because foreach Spot i am creating a context and destroying it !? can you correct me please.
df2423521929e221c1f0b580958a5eb5d7b668642eb49a20be88d5e950428fd2
['8a5ff6f1967b4fd4877f82a4f82de8ff']
The following rewrite rule will do the trick: #Rewrite non https to https RewriteCond %{HTTPS} off RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L] #Rewrite non-www to www RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Also, Don't forget to change your wordpress URL to www and https or it will create a loop. To change WordPress URL edit wp-config.php and add the following lines under WP_DEBUG line: define('WP_HOME','https://www.example.com'); define('WP_SITEURL','http://www.example.com'); As far as I am aware, if you change the wordpress URL to www, it will automatically redirect non www wordpress urls to WWW, so if you face any redirect loops, just remove the lines after #Rewrite non-www to www from htaccess and you will be good to go. Hope this helps. <PERSON>
838d1094e6c227d73315a5c11e6554bbe7aae813b149d5991d797c70b7253a4c
['8a5ff6f1967b4fd4877f82a4f82de8ff']
According to Waitress Documentation: unix_socket Path of Unix socket (string). If a socket path is specified, a Unix domain socket is made instead of the usual inet domain socket. Not available on Windows. Instead of running it from a named pipe you can run it in a local port and reverse proxy that port with nginx. So instead of following DigitalOcean article's step 6 you can do this: location / { proxy_pass http://<IP_ADDRESS>:8000; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Port $server_port; } And you can add the waitress serve command to Windows scheduled tasks, see here. Hope this helps.
3e65eb908690a988b8c826b6afed27ad61d8b34d3b293a6e5711ca6ad3f7de55
['8a7272009cf84d7cb5a31951c7293175']
In this onLoadFinished method I get the content of a particular database column and set it on an EditView (mEditView), the id of which has been defined earlier in OnCreate method: @Override public void onLoadFinished(Loader<Cursor> loader, Cursor cursor) { if (cursor.moveToFirst()) { int textColumnIndex = cursor.getColumnIndex(NoteEntry.COLUMN_TEXT); String content = cursor.getString(textColumnIndex); mEditView.setText(content); } Now I need to use the variable "content" outside this method. For example, I write a method to make a toast message containing the "content" appear on the screen: private void displayContent(String content) { Toast.makeText(this, content, Toast.LENGTH_SHORT).show(); } I want this toast to be displayed when an Actionbar menu button is clicked. But here a face a problem - when I include displayContent(String content) in OnOptionsItemSelected, I get an error because the variable "content" is not being recognized. @Override public boolean onOptionsItemSelected(MenuItem item) { switch(item.getItemId()) { case R.id.display_toast: displayContent(String text); } return true; default: return super.onOptionsItemSelected(item); } Passing "String content" as second input to onOptionsItemSelected also doesn't solve the problem. I'm new to Android programming, and despite of spending a lot of time searching for a solution on the web I couldn't find an answer. So I would be very thankful for any help.
9c74c7e01c8a635e1ac01a5be54cc2396fe4d5d7d709dcb96fa60aec6fc045a5
['8a7272009cf84d7cb5a31951c7293175']
I have dynamically created EditTexts which I want to have a blinking cursor after creation, but I don't want them to have any bottom line. According to the recommendations I've found, I removed the line by setting the background of the EditTexts to transparent (editText.setBackgroundResource(android.R.color.transparent), as suggested by the docs). But now when the EditText is created, it has no blinking cursor, although I request focus for it (editText.requestFocus()). After making a check I saw that it is really focused. I've tried everything I could find so far (for example, this: http://techfeeding.blogspot.com/2015/10/set-cursor-drawable-programmatically-in.html), but it didn't help to display the cursor - it appears only when you start to type, but this isn't the desired behavior. Somebody advised to set the input type, but it also didn't help: setInputType(InputType.TYPE_CLASS_TEXT). Setting isFocusable() and isFocusableInTouchMode() to true also gave no results. The EditTexts have to be transparent, they can't have colored backgrounds, so changing the BG color to another one isn't a solution. When setting the background to transparent via XML (on another EditText), it works fine - the cursor is there after calling requestFocus(). But when doing the same programmatically the result is different. How can I achieve this through code? My code in a custom View: EditText edText = new EditText(getContext()); RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); rootLayout.addView(edText, params); params.leftMargin = Math.round(pointX); params.topMargin = Math.round(pointY); edText.setLayoutParams(params); edText.setBackgroundResource(android.R.color.transparent); edText.requestFocus();
6e4d02f106c78c4b76b0d133fee362757c3c509d231f13468ad5a00dcdf21fcc
['8a7f302e309545e1b33edc89327a6bec']
I have a question regarding handling NULL value in a column in ORACLE Table. So, when i query a table, i get this error message in every NULL value occurences Notice: Undefined index: STATUS in C:\xampp\htdocs\WeltesInformationCenter\AdminLTE\pages\tables\assignmenttable.php on line 481 my query is like this SELECT MASTER_DRAWING.*, (SELECT PREPACKING_LIST.PACKING_STATUS FROM PREPACKING_LIST WHERE MASTER_DRAWING.HEAD_MARK = PREPACKING_LIST.HEAD_MARK) STATUS FROM MASTER_DRAWING WHERE PROJECT_NAME = :PROJNAME My question is, how to handle NULL value so that when it sees a null value, it can return some value such as 0 or any string. Thanks
58086c3bb14bfda66c81c0bc28f9c45931e5ed812d0101febe75d7ed6df5af32
['8a7f302e309545e1b33edc89327a6bec']
I have a scenario here in which I am confused to solve. So here is the matter, I have a PHP page with the project selector that gives the value into monitorIndex.php And in the monitorIndex.php im using that given value with this if(isset( $_POST['cd-dropdown'])) $_SESSION['cd-dropdown'] = $_POST['cd-dropdown']; in which I use $_POST['cd-dropdown'] as the value used everywhere now my question is, when user click on the navigation menu to go to a page called monitorTable.php, how do I still use the $_POST['cd-dropdown'] ? and how to make variable alive when user navigate out from that page and go back to monitorIndex.php and keeping the $_POST['cd-dropdown'] alive thank you so much
9fa1b7993bc1a1f78fa7944a5876c8425e85f72afb414283ef47ba22942e2c89
['8a97e9f682a74f5585a01a17b0a6241b']
Thanks for the reply. I've tried plotting $ln(E)$ vs. $ln(h)$ where $E$ is the absolute error and $h$ is the mesh size and noticed it has a slope of ~ $2.00$ so I guess this cubic spline interpolant has error $O(h^{2})$, is that right? (Btw, here is the graph: http://i.imgur.com/JaVcHbW.png)
941f449a5a381d213cd62a93f2f4a7589fe689d80247ade84493a2a97babeae0
['8a97e9f682a74f5585a01a17b0a6241b']
The frequency does not tell you how the signal is modulated. The parts you show work with amplitude shift keying (ASK) or more precisely on/off keying (OOK) in such cheap devices. But there are other methods of modulation like frequency shift keying (FSK) and variants thereof. So the frequency alone is not enough to get interoperability. In most cases the cheap OOK is used but it is not guaranteed to do that. You would need something like an SDR to check the frequency and modulation. This sounds more complicated that it really is and not as expensive. All you need is a USB DVB-T receiver with a specific chip RTL2832U like this one from china. And a free software like GQRX. With this tools at hand you can easily debug 433MHz devices.
2818d82591095abaaf3e7e0bde5d5e9799819c0c34790154111bdde204594c73
['8a980af064d9462b9f90c483c4f23907']
Hey guys I have a question regarding form and queryset: Im creating a form where I select a faction from a list of factions. After the form is created, im redirect to another form where I can add soldiers to this list, but I see every soldiers of every factions in this form, I would like to be able to see ONLY soldiers of the faction I selected on the previous form. Can you help please on this please ? Im a bit lost on what to search for... My models: class Faction(models.Model): title = models.CharField(max_length=30) picture = models.FileField(blank=True,) race = models.ForeignKey(Race, on_delete=models.CASCADE,default=None, blank=True, null=True) def __str__(self): return self.title def get_absolute_url(self): return reverse("home") class List(models.Model): faction = models.ForeignKey(Faction, on_delete=models.CASCADE) title = models.CharField(max_length=30) format_points = models.IntegerField() description = models.CharField(max_length=30) author = models.ForeignKey( get_user_model(), on_delete=models.CASCADE, ) def __str__(self): return self.title def get_absolute_url(self): return reverse("home") class Soldier(models.Model): title = models.CharField(max_length=30) picture = models.FileField(blank=True,) points = models.IntegerField() factions = models.ManyToManyField(Faction) def __str__(self): return self.title class SoldierToList(models.Model): soldier = models.ForeignKey(Soldier, on_delete=models.CASCADE,) list = models.ForeignKey(List, on_delete=models.CASCADE,) author = models.ForeignKey( get_user_model(), on_delete=models.CASCADE, ) My views: class ListCreateFormView(CreateView): template_name = 'armybuilder_list_create.html' model = List form_class = CreateListForm def form_valid(self, form): form.instance.author = self.request.user form.instance.race = "toto" return super().form_valid(form) def get_success_url(self): return reverse_lazy('add_unit_to_list', kwargs={'pk': self.object.pk}) class AddUnitsToListFormView(LoginRequiredMixin,FormView): model = SoldierToList form_class = SoldierToListForm template_name = 'armybuilder_add_unit_to_list.html' def get_queryset(self): return Soldier.objects.filter(factions=Tyranids) ## for some test, I need to change this line I think ? def form_valid(self, form): form.instance.author = self.request.user form.instance.list_id = self.kwargs['pk'] return super().form_valid(form) My forms: class CreateListForm(forms.ModelForm): class Meta: model = List fields = ('faction','title', 'format_points', 'description') class SoldierToListForm(forms.ModelForm): class Meta: model = SoldierToList fields = ('soldier',) My urls: path('list/create', ListCreateFormView.as_view(), name='create_list'), path('list/own/<int:pk>/addunit', AddUnitsToListFormView.as_view(), name='add_unit_to_list'), Thanks for your help and have a great day !
08f4ba5c1182cbceb5a13d19145bd01ea4d527b2f525dca966426a502e58cf21
['8a980af064d9462b9f90c483c4f23907']
The queryset in my view dont send back any result, however when Im executing the raw SQL command with DB Browser for example I have the result I want, I dont understnad why my queryset dont send back anything... I got a 404 Not Found - No soldier to list found matching the query the view: class EditUnitsToListUpdateView(UpdateView): model = SoldierToList fields = ('soldier', 'list', 'author') template_name = 'armybuilder_edit_unit_to_list.html' def get_queryset(self): print (self.model.objects.filter(list=54).query) return self.model.objects.filter(list=54) My models: class List(models.Model): faction = models.ForeignKey(Faction, on_delete=models.CASCADE) title = models.CharField(max_length=30) format_points = models.IntegerField() description = models.CharField(max_length=30) author = models.ForeignKey( get_user_model(), on_delete=models.CASCADE, ) def __str__(self): return self.title def get_absolute_url(self): return reverse("home") class Soldier(models.Model): title = models.CharField(max_length=30) picture = models.FileField(blank=True,) points = models.IntegerField() factions = models.ManyToManyField(Faction) def __str__(self): return self.title class SoldierToList(models.Model): soldier = models.ForeignKey(Soldier, on_delete=models.CASCADE,) list = models.ForeignKey(List, on_delete=models.CASCADE,) author = models.ForeignKey( get_user_model(), on_delete=models.CASCADE, ) My urls: path('list/own/<int:list_id>/<int:faction_id>/addunit', AddUnitsToListFormView.as_view(), name='add_unit_to_list'), path('list/own/<int:pk>/<int:faction_id>/editlist/toto', EditUnitsToListUpdateView.as_view(), name='edit_unit_to_list'), The raw sql that work when executed separatly: SELECT "armybuilder_soldiertolist"."id", "armybuilder_soldiertolist"."soldier_id", "armybuilder_soldiertolist"."list_id", "armybuilder_soldiertolist"."author_id" FROM "armybuilder_soldiertolist" WHERE "armybuilder_soldiertolist"."list_id" = 54 Thanks for your help guys and have a great day !
ce0a7853257398099db6c58b2ade1b3c521e149b6e796900085b28c4ae2098ac
['8a9cebc296a34b5f8c8a60f49c6ee143']
I have created a hyperlink in ms word for a WEBM video. The video runs in chrome. But while clicking on the hyperlink ,it asks for default video player to play in. Does not play this in windows media player. However video runs in browser but just clicking the hyperlink on word does not play this. Pls help.
b97a95872af836e9ee625a456266ed5c470b13eaf2908316b583bc8e20587871
['8a9cebc296a34b5f8c8a60f49c6ee143']
New to mysql and have been told by many, that creating foreign keys in mysql is not necessary? how will table relationships be consistent and cascading would be done then? Where can i find info about what foreign key has been created on my mysql tables? desc table_name or show create table_name is not giving any info....
6913ddd1e6e785a96c5d496f4a6459b91b5e6d2d8fbcee19239a2ec4dbb3450e
['8aaf1feb3ac94c37a0a1de7120e54a85']
I'm trying to figure out how to incorporate multiple ObjectCreate() events into a single email notification instead of one email notification for each. I would also like to send it to the client once per day as a sort of daily update for each changed file that day. Is there a built-in way to accomplish this or do I need to write some code? Thanks!
d9ce83218d7ed8f90929fdc1c044a1e681b63a97c79304ff4caa210525e17d91
['8aaf1feb3ac94c37a0a1de7120e54a85']
I have around 80 Windows 7 machines in my office that were been set up in the past with Administrator accounts. I would like to change them to Power Users so they can still do certain things without authorization from us, but not change system settings. I want to push a batch file to all machines at the same time initiating this, but I don't know how to identify the user's account specifically to change, as they're all named differently. For example, net user outputs this: Administrator Guest <userofmachine> I would like to pull from that output somehow and proceed with changing their localgroup. I'm used to doing this on Linux, but unfamiliar with this aspect of Windows. Any ideas? Thanks!
5b6c78752ae227c181e9264115e689f9e8ce020c22a53fc80f68f493a4f4d832
['8ab3f488aa864ace8b89590a338449ff']
I have a main frame which has an array list containing a list of items for an order. I then have a button which creates a new window that has a form allowing the user to pick multiple options for an item, this information is then put into an object. I want to return this object back to the original frame so that I can add it to the order array list. However I'm not sure how to go about this as my frames have their code auto generated as I'm using netbeans.
906dde71edb96e8ca7bc78ea2637afca6c282f7c713795b5b84a430a933c2069
['8ab3f488aa864ace8b89590a338449ff']
I have this list in which I want to go through and convert certain elements of the list into a string. The first 3 functions work, however, the last one (placeRainfull) does not. When I try to load the script, I get this error: Couldn't match expected type ‘Place’ with actual type ‘[Place]’ I want the function to go through each element in the list and have it run through the addDayWithRainfull function. Code getRainfull <IP_ADDRESS> Place -> (String, [Int]) getRainfull (Place p _ _ rf ) = (p, rf) convrtIntArray <IP_ADDRESS> [Int] -> [String] convrtIntArray rainfullArray = map show [ i | i <- rainfullArray] addDayWithRainfull <IP_ADDRESS> (String, [Int]) -> String addDayWithRainfull (p, rf) = p ++ " " ++ unwords (convrtIntArray rf) placeRainful <IP_ADDRESS> [Place] -> String placeRainful places = addDayWithRainfull (getRainfull places)
9a2a8e965d7d718be98e39f4284ae12e16ebcf8342874649104acf511397bda9
['8ab7802fa53344d0a8861653d49ced37']
I am trying to collect the date of birth for a user if he specifies that he is Under18.... I have defined 2 claims as follows <ClaimType Id="extension_DateofBirth"> <DisplayName>Date of Birth</DisplayName> <DataType>dateTime</DataType> <UserInputType>DateTimeDropdown</UserInputType> </ClaimType> <!--Adding Custom Attribute for AgeGroup --> <ClaimType Id="extension_AgeGroup"> <DisplayName>Your Age Group</DisplayName> <DataType>string</DataType> <UserInputType>DropdownSingleSelect</UserInputType> <Restriction> <Enumeration Text="Under 18" Value="Under18" /> <Enumeration Text="Adult" Value="Adult" /> </Restriction> </ClaimType> Now in my I have added the following code in <ValidationTechnicalProfiles> <ValidationTechnicalProfile ReferenceId="Get-DOB" ContinueOnError="false"> <Preconditions> <Precondition Type="ClaimEquals" ExecuteActionsIf="false"> <Value>extension_AgeGroup</Value> <Value>Under18</Value> <Action>SkipThisValidationTechnicalProfile</Action> </Precondition> </Preconditions> </ValidationTechnicalProfile> </ValidationTechnicalProfiles> and another Technical Profile as follows that is referenced "Get-DOB". which is as follows <!--Adding write of DOB based on validation Profile--> <TechnicalProfile Id="Get-DOB"> <InputClaims> <InputClaim ClaimTypeReferenceId="extension_DateofBirth" /> </InputClaims> <OutputClaims> <OutputClaim ClaimTypeReferenceId="extension_DateofBirth" /> </OutputClaims> <IncludeTechnicalProfile ReferenceId="AAD-Common" /> </TechnicalProfile> </TechnicalProfiles> I have 2 issues: if I select Under18 the DOB should appear on the screen which it is not. After I select Under18 and press continue the explorer gets stuck on we are processing your information forever
b6b934f0619eb2c0d6ddfed5c79dc2c36b55a744e70c537282ff7baced8d6547
['8ab7802fa53344d0a8861653d49ced37']
I am having this strange issue with my Custom Policies…. Based on SocialAndLocalAccountsWithMfa starter pack. The behaviour that we are looking for is as follows and is achieved with User flows is When the user sign-outs form the application and then hits sign in again, he should be prompted for a reauthentication. But when I use the same app to execute custom Policy it will reauthenticate without entering creds. I have adjusted the but nothing. I added and changed following in <UserJourneyBehaviors> <SingleSignOn Scope="Policy" KeepAliveInDays="7" /> <SessionExpiryType>Rolling</SessionExpiryType> <SessionExpiryInSeconds>900</SessionExpiryInSeconds> <JourneyInsights TelemetryEngine="ApplicationInsights" InstrumentationKey="your-application-insights-key" DeveloperMode="true" ClientEnabled="false" ServerEnabled="true" TelemetryVersion="1.0.0" /--> </UserJourneyBehaviors> is there a way to check if there is a failure to sign out for the user or any way to debug the issue? Or way to change the behaviour? The application goes to the logout URL when the user hits Signout form application. https://mytenanct.b2clogin.com/mytenanct.onmicrosoft.com/b2c_1a_signup_signin/oauth2/v2.0/logout?post_logout_redirect_uri=https%3A%2F%2Flocalhost%3A44316%2F&x-client-SKU=ID_NET451&x-client-ver=<IP_ADDRESS> Following is the url when user Clicks SignIn from the application and get logged in without authentication. Request URL: https://mytenanct.b2clogin.com/mytenanct.onmicrosoft.com/b2c_1a_signup_signin/oauth2/v2.0/authorize?client_id=ac8ca2c8-4cc3-43e3-8fd3-dcd592557f99&redirect_uri=https%3A%2F%2Flocalhost%3A44316%2F&response_mode=form_post&response_type=code%20id_token&scope=openid%20profile%20offline_access%20https%3A%2F%2FMYTENANCT.onmicrosoft.com%2Fdemoapi%2Fread%20https%3A%2F%2FMYTENANCT.onmicrosoft.com%2Fdemoapi%2Fwrite&state=OpenIdConnect.AuthenticationProperties%3Du1frIXk828jwoiEmCMuqTDTomxyjWAjDSV2---SUMJX7jDgjnKFPX4iO5VEbXPGHVgHA6GcLzPWjooSpDcTxM9iAoRUGXxDbyhBCLexjWNEMG7dqSu-wa2AqntAbcV1a0mk9dykGyrypS8gsuPtbNPvkgO_8YRuYSlRiJy8tYSA&nonce=637285777554418842.MjY2ZmVjYmEtMDY0ZS00ZTljLTk0MDUtMzk2MzkxODAyODUyZjc0NTkxZGEtN2I5YS00ODViLThkZTYtMWIwMjUyNjg3ZTc2&x-client-SKU=ID_NET451&x-client-ver=<IP_ADDRESS> Any Help will be highly appreciated to track it down or change the behaviour I have also configured [Single-Sigout][1] but doesn’t change the behaviour.
e3e8f02c82d1bc1afb0963ab19e8f8c6e524eaf0be030109ee67e6f4162b8d53
['8ab87328a4ff41a395b7fbbc4d116db1']
I would like for the form to give two error messages, one of "required" when the field is left blank, and another when the password is not enough characters in lenght, this is what I have, any help will be appreciated. I only get the "minimum characters" } else if ($element.hasClass('password-validator')) { var message = $.validator.settings.messages.require; len = $element.prop('minlength') ? $element.prop('minlength') : 6; if (!$.validator.isString($element.val(), len)) { if (len >=5) { message = 'The minimum password length is ' + len; } else if (len == 0) { message = 'Required'; } $.validator.debug('validator(): error on password type for ' + $name); $.validator.addErrorMessage($name, message); $returnValue = false; return true; }
1a19491cf957de647b93a22e8693c82c9f4b3ea29fc4327240206562968b7b05
['8ab87328a4ff41a395b7fbbc4d116db1']
I am having trouble with a loading image in chrome, it looks fine in safari and firefox, but in chrome I get the view of two half loading images instead of one whole one. I am not sure how to solve this problem, any help is appreciated. THE HTML: <div class="execute-actions"> <div class="loading"></div> </div> THE CSS: .loading { position: relative; background: url("../../assets/img/core/loading.gif"); background-position: 912px 0px; width: 48px; height: 48px; } Part of THE JS that references the loading animation: $(window).ready(function () { if ($("html[data-useragent*='MSIE 8']").length) { if ($("div.loading")) { setInterval(function () { $("div.loading").css({"background-position-x": "-=48px" }); }, 35); } } else { if ($("div.loading")) { setInterval(function () { $("div.loading").css({"background-position": "-=48px" }); }, 35); } }
f437f489219c484a982fa39e467aeb7852f9bcde81cb2a1b0d01e34d16768637
['8ac793015f98443ab4cc47822cb8f62c']
Yes, complete inversion of my part on vertices & edges notions. I warned that I was a novice, but still I'm very sorry. So, the problem is vertex-disjoint paths. The source is a vertex, as well as sinks. I'm going to edit the problem. I think the solution is similar though: I collapse my (vertices) sinks into one and use the solutions already proposed in my question. I think I saw something on the constraint on the maximum number of edges Emax. If someone know how to deal with the constraint, I'll be happy to have it, otherwise, I'll edit this answer with the appropriate link.
9b6aecc9e6bec9c445a1a072a6d0806240f6c27413394eee6e45cd166ac5a27f
['8ac793015f98443ab4cc47822cb8f62c']
I achieved the 'Maximum number of vertex-disjoint path' problem, which is indeed pretty straightforward: 1. create the dual edge-disjoint problem version of the graph (explained in links in the OP) 2. Collapse all sinks into one as mentioned by <PERSON> 3. Use a max-flow algorithm which will give you the desired value for each node. However, this does not answer the original problem. <PERSON> gives a good reference in [another question](http://math.stackexchange.com/questions/<PHONE_NUMBER>/find-the-maximum-number-of-vertex-disjoint-paths-in-a-graph-with-a-constraint).
71efd53402f8e40defb3442cb2744b1e0e797216dd87e0678d35781b6590aca6
['8acece3cde694786bf0cb6aa4a0ca5b0']
I am sure this question seem silly to many of you but it really happen for me, the code I shared below works perfectly when I debug it thoroughly in firebug if not, and just running the code without debugging it raise an error, function edit(Barcode) { $('#pnlSize').show('fast'); if ($('#test2 option').size() < 2) { $.ajax({ url: '@Url.Action("selectedItemChanged")', type: 'GET', dataType: "JSON", data: { barcode: Barcode }, success: function(sizes) { var options = '<option value="Z">سایز را انتخاب کنید</option>'; for (var i = 0; i < sizes.length; i++) { console.log(sizes); options += '<option value="' + sizes[i].ID + '">' + sizes[i].Size + '</option>'; } $("#test2").html(options); } }); } var val = $('#test2 :selected').text(); if (val != 'سایز را انتخاب کنید' && val != null) { location.href = '@Url.Action("AddToCart", "ShoppingCart")?Barcode=' + Barcode + '&size=' + $('#test2 :selected').text();; } } the reason is that when do not debug it, it tries to run this : location.href = '@Url.Action("AddToCart", "ShoppingCart")?Barcode=' + Barcode + '&size=' + $('#test2 :selected').text();; but as dropdown has not being filled yet and user has not chosen any size, so addtoCart return null. Please kindly help me with this
27698f0a875080d008e0b7413709a5e95a3f8f4636c03d7aab501684a1d0f811
['8acece3cde694786bf0cb6aa4a0ca5b0']
I kindly ask you patiently read my story for solving a seemingly simple problem, my main purpose is to do thousand separator in datagridview, It means when I am typing 12345 it becomes 12,345 the difference with other task is to do this when the user is typing not when he or she leave the cell, I couldnt find any method in datagridview events that be fired whenever I add a digit in cell, for example if the purpose is to write 12345 in feeColumn it has to be fired five times, After many research I came across with this code to do, but it has some problems: myGrid: ItemName Quantity FeeColumn Private void grdTrading_CurrentCellDirtyStateChanged(object sender, System.EventArgs e) { If (grdTrading.IsCurrentCellDirty ) { grdTrading.CommitEdit(DataGridViewDataErrorContexts.Commit) } } Private void grdTrading_CellValueChanged(object sender , System.Windows.FormsDataGridViewCellEventArgs e) { grdTrading.Columns[ColumnFee.Name].DefaultCellStyle.Format=(Decimal.Parse(grdTrading.Rows[0].Cells[ColumnFee.Name].Value.Tostring())).Tostring("#,##0") } Now What is wrong? When it firstly goes to grdTrading_CurrentCellDirtyStateChanged and do commitedit it no longer allow to put any data in cell and remove the data while the user change its cell now you suppose there is data, it successfully be run, and even run cellValueChanged once I add any digit to the fee column, I mean 1 then 12 then 123 then 1234 then 12345 but still there is no comma in my grid when I am typing, I am really fed up with this problem, any help or any other solution is welcome to me pal,
53399b24e7a6be13842a3f4fc9a806884281cf09aafd042c533a58af31db11fa
['8ad080572b024d89af625b9da15b0ba3']
We have a problem with just one of the databases on our SQL2008 Server. For some reason recently the log file is just growing and growing. The server runs the following backups Weekly - Full Daily - Diff Hourly - Transactional I have followed the information here (Why Does the Transaction Log Keep Growing or Run Out of Space?) but without any luck and have confirmed the following: The database is in FULL recovery mode Backups are occuring as expected (Hourly, Daily, Weekly) The log file is full, it's that that there is space that can be recovered Looking at the log_reuse_wait_desc returns 'NOTHING' The website associated with the database is the most used site we have, but the database and usage is still small (under 5Gb of data) a few hundred users a day, but the Log file gets over 10Gb after a couple of days. Anyone any idea what could be causing this? The only way I can find to get around this is to switch to 'SIMPLE' recovery mode. Shrink the file, switch back to 'FULL' then do a new Full backup to start a new chain. Thanks for any advice you can provide
b7a9e9cc621c7c8946a46a7beb249a7302e3f7b000fbff6f1214e5d298fdfc47
['8ad080572b024d89af625b9da15b0ba3']
My Wordpress website admin page http://example.com/wp-admin keeps redirecting me to the subdomain I created when adding the site to my CPanel. I have to use wp-login.php when accessing the Wordpress admin dashboard. I'm using BlueHost as my hosting provider. They can't seem to help me figure this out. I have to use wp-login.php when accessing the Wordpress admin dashboard. Any help is appreciated. A
5bebef32c567a35ef4bc178013787a1ea684d2cbca1520c805475fcd413a7728
['8ad3dac7425a45909768efb08f294709']
I am using php code to upload an image, in my images.php file I have a directory which looks like the first line in the block of code below. I realise this won't work for a mac (I am working off a windows). This is obviously a problem as if I am working off a mac I will have to change this line of code each time I swap between computers. Is there anyway to automatically update it. I researched PATH_SEPARATOR but I have no idea how to incorporate into my code. $target_dir = "..\\img\\uploads\\"; $imageFileType = strtolower(pathinfo($_FILES["fileToUpload"] ["name"],PATHINFO_EXTENSION)); $target_file = $target_dir . uniqid() . '.' . $imageFileType ; $user_id = $_SESSION['userId']; If anyone has any ideas, please let me know. Thank you in advance
edbc1f9ff98946f9832683560a22ac822ee69f7d08a6b03af0296c2a8539b6bb
['8ad3dac7425a45909768efb08f294709']
I am creating a forgot my password page on a website and I am trying to get messages to show to alert the user that to check their email. However I am getting this error Parse error: syntax error, unexpected '"msg"' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in URL on line 21 PHP code require_once('config1.php'); if (isset($_POST['email'])) { $email = $conn->real_escape_string($_POST['email']); $sql = "SELECT user_id FROM zz_login WHERE email='$email'"; $result = mysqli_query($conn, $sql, MYSQLI_USE_RESULT); if (mysqli_num_rows($result) > 0) { $token = "qwertyuiopasdfghjklzxcvbnm1234567890"; $token = str_shuffle($token); $token = substr($token, start, 0, length, 10); $sql = "UPDATE zz_login SET token='$token', tokenExpire=DATE_ADD(NOW(), INTERVAL 5 MINUTE) WHERE email='$email' "; $result = mysqli_query($conn, $sql, MYSQLI_USE_RESULT); exit (json_encode(array("status" => 1 "msg" => 'Please check your email inbox!'))); } else exit (json_encode(array("status" => 0, "msg" => 'Please check your inputs'))); } Line 21 is: **exit (json_encode(array("status" => 1 "msg" => 'Please check your email inbox!'))); ** Does anyone know what is wrong with my code?
567bc2653db16ad4269222eeb39793b7c41dff5b0c22b555bf73284b9dfdd22c
['8b02190425674d5595c6f68c5b557ded']
I have make function but it doesn't want to work , I don't know why or what the wrong because I think all is good function ifemptySet($who,$set){ if(empty($who)){ $who = "$set"; } } if(isset($_POST['saveinfosite'])){ $site_name = strip_tags($_POST['site_name']); ifemptySet($site_name,"null"); echo $site_name; } When I set the " input " empty , php (echo) doesn't print anything , but when I write something in the "input" , I show only what I have put in the Input (Sorry for my english)
c6b8568c0cc60f6034786ecf0d3e3bbd8c2249fc495cb475ed75b59c13d59af6
['8b02190425674d5595c6f68c5b557ded']
I try to do that $names = $request->input('name'); $forid= $request->input('forid'); $ArrayNames = explode(",",$names); $dataArrayNames = array(); foreach($ArrayNames as $name) { $dataArrayNames[] = array('name'=>$name, 'forId' => $forid); } Model<IP_ADDRESS>insert(array($dataArrayNames)); But i get the error message " preg_replace(): Parameter mismatch, pattern is a string while replacement is an array " NOTE : $request->input('name') = 'nameA,nameB,nameC'
e5c42b68bb869874aee82e29ff52755c5cdb5de401817311a206b6db426bdd23
['8b079f4fc24247f4b63a3a3aba34e999']
Since your computations only take a few seconds, there will be hardly any benefit from parallelizing you FEM computation itself. But since you need to do many individual simulations you can parallelize that part. Instead of running each simulation in series you can run the simulations in parallel $\rightarrow$ one simulation per available core. Python is a good choice to handle your processes. I recently had to implement something similar. The subprocess package came in very handy. import subprocess # parallel process processes = [] for i in range(0, N): command = "yourCommand" processes.append(subprocess.Popen(command, shell=True)) print("process started: ", command) for p in processes[:]: processes[i].wait() print("done.") The code above starts N processes in parallel and waits for all of them to finish.
146b552ed80027009ff791fdaf0bd118f23ca89339a6d034ea0886fcd2e3af38
['8b079f4fc24247f4b63a3a3aba34e999']
This sounds like an example of equivocation, which Wikipedia defines as follows the misleading use of a term with more than one meaning or sense (by glossing over which meaning is intended at a particular time). It generally occurs with polysemic words (words with multiple meanings). However, the term equivocation is mainly used for using two senses of the same word within a single argument, rather than a debate. See also equivocation on LogicalFallacies.info.
9b2792997280db37fbcc89128a0f45056c301c0bd13cf159ba3537140275ff37
['8b094cf53cec4292ad088ea09d54f57e']
There is a not well known bugs in the Facebook intent parser. Some of them are solved but not completely-with new bugs. Thus, msg.putExtra(Intent.EXTRA_TEXT,"http://Iam_a_good_boy.com/no_doubts.asp"); requires a URL(link). It is the cause of the message, which you have seen on the target Facebook page.
bdffcfe8d521e50938bc81a0a9e8ee26afa5a2318826acd4acec61c37f280b50
['8b094cf53cec4292ad088ea09d54f57e']
Basically the answer should be yes and no. Except to very serious reason. Not because Spring synchronizes work for you- it does not do it(by default a Controller is a Singleton bean). Of coarse a thread safety must be kept along a method call, but normally mechanism of Servlets wipes out necessity to synchronize something, because a request executed inside a thread. So,during a call of any @RequestMapping annotated method the whole call stack executed in one thread. In the root it is outgoing from the service-do(Get, Post..) methods of a Servlet and then handlers map acted, which Spring builds (see http://www.studytrails.com/frameworks/spring/spring-mvc-handler-mappings/ http://technicalstack.com/dispatcher-servlethandlermapping-controller/ for example). Spring calls handling method from map of handlers, after URL has resolved. No other tricks. So think, you work inside a doPost(...) for instance method of DispatchServlet. Is a Servlet thread safe? No of coarse. Can you do it thread safe-yes, use locks, synchronized, what else and make your Servlet to be a bottleneck! Exactly the same is about controller. A doGet/Post/what else method of Servlet has basically a functional model, all data are in HttpServletRequest object. The same manner should be used in Controller object- used data classes, and stack instead of fields. You can synchronize access to them, but by paying price of bottleneck. Of coarse you can use atomics, by is it so needed? If you need to keep any state during session, you can use @Scope("session") after @Controller or (for singleton controller) a handler method with signature (..., HttpSession) both of them has pro and cons. But note, that you created additional CPU and GC expenses. Anyway, you are responsible for Controller thread safety when you want to use fields and exit from concept of stateless. Normally a cache (redis for instance) is preferable for a client state keep. At least you can restore state when a failure occurred. Stateful controllers out of session scope basically have no reason.
be3075c2a32c11a4d37c3e18a62b0dba574b8f5b42393cc0dfc9972b0d505e42
['8b123e425c9943f8b5aad7af2cfee4cd']
We have this particular piece of code running on weblogic, its function is to return a java object specific to input class from XML input string. The code itself will be used by multiple of threads (50+). public static Object toXMLObject(String XMLString, Class xmlClass) throws Exception { StringReader strReader = null; try { JAXBContext context = JAXBContexts.getJAXBContext(xmlClass); //Cached JAXBContext Unmarshaller unmarshaller = context.createUnmarshaller(); strReader = new StringReader(XMLString); return unmarshaller.unmarshal(strReader); } catch(Exception e){ throw e; } finally { if(strReader != null){ strReader.close(); } } } What we've seen from thread dump is that multiple of threads (51 threads) trying to lock on a single object ExecuteThread: '52' for queue: 'automation'" daemon prio=3 tid=0x0000000103bcf800 nid=0x1a4 waiting for monitor entry [0xfffffffac2cfb000]** java.lang.Thread.State: BLOCKED (on object monitor) at sun.misc.URLClassPath.getLoader(URLClassPath.java:279) - locked <0xfffffffb89f00ed8> (a sun.misc.URLClassPath) at sun.misc.URLClassPath.findResource(URLClassPath.java:145) at java.net.URLClassLoader$2.run(URLClassLoader.java:385) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:382) at java.lang.ClassLoader.getResource(ClassLoader.java:1002) at java.lang.ClassLoader.getResource(ClassLoader.java:997) at java.lang.ClassLoader.getResource(ClassLoader.java:997) at weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:168) at weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182) at weblogic.utils.classloaders.FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:129) at weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:154) at weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192) at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.SAXParser. (Unknown Source) at org.apache.xerces.parsers.SAXParser. (Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser. (Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl. (Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at weblogic.xml.jaxp.RegistrySAXParser. (RegistrySAXParser.java:65) at weblogic.xml.jaxp.RegistrySAXParser. (RegistrySAXParser.java:46) at weblogic.xml.jaxp.RegistrySAXParserFactory.newSAXParser(RegistrySAXParserFactory.java:91) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.getXMLReader(AbstractUnmarshallerImpl.java:86) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194) at com.util.XMLParserUtil.toXMLObject(XMLParserUtil.java:699) ExecuteThread: '78' for queue: 'automation'" daemon prio=3 tid=0x000000010363b800 nid=0x1be waiting for monitor entry [0xfffffffabf8fb000]** java.lang.Thread.State: BLOCKED (on object monitor) at sun.misc.URLClassPath.getLoader(URLClassPath.java:279) - waiting to lock <0xfffffffb89f00ed8> (a sun.misc.URLClassPath) at sun.misc.URLClassPath.findResource(URLClassPath.java:145) at java.net.URLClassLoader$2.run(URLClassLoader.java:385) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findResource(URLClassLoader.java:382) at java.lang.ClassLoader.getResource(ClassLoader.java:1002) at java.lang.ClassLoader.getResource(ClassLoader.java:997) at java.lang.ClassLoader.getResource(ClassLoader.java:997) at weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:168) at weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182) at weblogic.utils.classloaders.FilteringClassLoader.getResourceInternal(FilteringClassLoader.java:129) at weblogic.utils.classloaders.GenericClassLoader.getResourceInternal(GenericClassLoader.java:154) at weblogic.utils.classloaders.GenericClassLoader.getResource(GenericClassLoader.java:182) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1192) at org.apache.xerces.parsers.SecuritySupport$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at org.apache.xerces.parsers.SecuritySupport.getResourceAsStream(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.findJarServiceProvider(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.ObjectFactory.createObject(Unknown Source) at org.apache.xerces.parsers.SAXParser. (Unknown Source) at org.apache.xerces.parsers.SAXParser. (Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser. (Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl. (Unknown Source) at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source) at weblogic.xml.jaxp.RegistryXMLReader.getXMLReader(RegistryXMLReader.java:523) at weblogic.xml.jaxp.RegistryXMLReader.getXMLReaderInternal(RegistryXMLReader.java:453) at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:158) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:211) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:184) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:137) at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:194) at com.util.XMLParserUtil.toXMLObject(XMLParserUtil.java:699) Did we implement JAXB code properly? How could we overcome this problem. Ps. we've overriden JAXP with latest version (1.4.6) on JDK1.6.0_33
97406b08a4f8fecd1ed5784528ede25908ab5a7799936719c6456ac0747184fd
['8b123e425c9943f8b5aad7af2cfee4cd']
here is the scenario: Row1 in Excel: Project A: Task A Jan-20; Task B Mar-20; Task C Apr-20 || Row2 in Excel: Project B: Task A Feb-20; Task B Mar-20; Task C Apr-20 || Row3 in Excel: Project C: Task A Feb-20; Task B Apr-20; Task C May-20 Task A dates keyed in column B; Task B dates keyed in column C; Task C dates keyed in column D How can I reflect this into chart to generate each project as a series with multiple dates?
9f9b0bef31f70db87faccf5b388512b20978768265045afd851fa8fc05c54634
['8b15539aae1d49c3962c38e343d8a1f6']
That's a problem already solved by OSGi. The real problem is not to load a new jar version. This could be done with your own classloader that releases the file lock. The real problem is how to handle instances of different versions of the same class. Restart does omit these problem. If you really need different jar versions in one application use OSGi.
c89939245da115e0bf473263063abde39da038071ec2d7eef079f738d66de2c0
['8b15539aae1d49c3962c38e343d8a1f6']
Hi <PERSON>, thanks for your swift answer. The Default Page style as alway been Multi-Page, it's a 10 pages documents, and I have a Retina 15 inch (2880x1800), this fleeting is very short, and appear after each compilation. But strange enough, when I open for the first time an existing tex file, at the first compilation, no fleeting, then if I make another change, this fleeting appears, at at each change in the source file...
3fc092404b4844c5f5250d101c13b8110a099c89f9ca38763f89db6cc6592e8f
['8b2be09fa978441db028f29e2349943f']
If your data is relatively time-dense (and relatively space-sparse), it might work best to use a 3d kd-tree on the spatial dimensions, then simply reject the points that are outside the time window of interest. That would get around your mixed space/time metric problem, at the expense of a slightly more complex point struct.
417528b27e357bc064353da443826695186eb0c9fe9d5da7fccce10864520b5d
['8b2be09fa978441db028f29e2349943f']
I won't tackle your general question (I'm not a huge XML fan myself), but I will comment on your comparison of INI and XML files. XML is good at describing arbitrarily structured data (trees, etc.). INI files best described categorized dictionary type data (key, value pairs). For the specific example you gave of a menu system, XML is a much better bet as it can reflect the menu tree directly.
8637bdc96e7fb5e3381f9fb1c0ac364dc68e91f4831d977f046f4dd112838136
['8b3477b7a58e40158f3ba964625055aa']
Use wholeTextFiles() on SparkContext val rdd: RDD[(String, String)] = spark.sparkContext .wholeTextFiles("file/path/to/read/as/rdd") SparkContext.wholeTextFiles lets you read a directory containing multiple small text files, and returns each of them as (filename, content) pairs. This is in contrast with textFile, which would return one record per line in each file.
c7acde2ad7d72e95708c8b80ac7960869e0f8e1aabd3ec4a4dd7fe95e0e9ef67
['8b3477b7a58e40158f3ba964625055aa']
It's safe In Paypal_Lib.php file validate_ipn() method will send the POST data(received to ipn method) to paypal server if (isset($_POST)) { foreach ($_POST as $field=>$value) { // str_replace("\n", "\r\n", $value) // put line feeds back to CR+LF as that's how PayPal sends them out // otherwise multi-line data will be rejected as INVALID $value = str_replace("\n", "\r\n", $value); $this->ipn_data[$field] = $value; $post_string .= $field.'='.urlencode(stripslashes($value)).'&'; } } to verify whether that POST request came from paypal or other server. Now Paypal will responds to verification request with VERIFIED or not. If it's verified means payment had made in paypal server So you can proceed to next steps. If it don't respond with VERIFIED for validation request, it means that's the fake request(come other than paypal server).
58d09c171c430807f7f28063329e12cf7566c54fcbb80ef7a39ebb3121da0cec
['8b3f591426c1424b82a898ce84e25e2a']
I am doing pagination using jquery datatable. My data is not exctaly table, 1 row from db say id, name, location...... i display in jsp in 3 rows like first row id,second row name then third row location...i have 1500 hunderd rows in db. For this i need to do pagination. And also when the user clicks on next link it should go to server for next records. I know how to get the restricted number of results from server side .... I need help for jsp configuration.....i am new to jquery...how to configure datatable. Any ideas how to do it?
e76a4d7e53da7673c6cbaab3a1b3d797d2214c58da6fc21a20067060ad775f41
['8b3f591426c1424b82a898ce84e25e2a']
is there any directive in angularjs to implement the link preview in angularjs. I need to show the link preview while sharing a link in my web site similar to google plus. There is some directive https://github.com/LeonardoCardoso/Link-Preview. But it uses php. I need without php.
b1ffd8c1f649984bae1135c649842e37a40eff37ed37f28fda531e531bf24060
['8b4ef0d36c9346e78614a750fe923869']
Say your list is named "items - <div ng-repeat="item in items track by $index"> <div ng-show="item.isresult === '0'"> N/A </div> <div ng-hide="!item.isresult === '0'"> {{stringToBeDisplayed}} </div> </div> I'm guessing your string is a variable you're storing. I'd also suggest you use boolean values for item.isresult instead of strings or numbers to avoid possible errors.
2d219b95a63496948729c826f45820212845476829cca8d1e7f9bd88f5aa4f6e
['8b4ef0d36c9346e78614a750fe923869']
Use the class pull-right to pull your elements to the right side of the page. <ul class="nav nav-pills"> <li class="pull-right"> <a href='#'id="port">Portfolio</a> </li> <li class="pull-right"> <a href='#'id="youtube">Youtube</a> </li> <li> <a href='#'id="blog">Blog</a> </li> <li> <a href='#'id="photo">Photography</a> </li> </ul> Alternatively, use .pull-right { float: right } if you're not using bootstrap. Hope this helps!
27c460ee914f10b722288e0aee0889bf3d454132eef2813f9cd201a5fa02b02e
['8b543e68d91244a990a9224a74d8845d']
<!-- --> <!-- Amy start task implementing this marker aspect is automatically ended as soon as the workflow starts --> <!-- Note this only applies to the Activiti Workflow Engine --> <!-- --> <aspect name="bpm:endAutomatically" /> It will start the workflow automatically and pass it to the next task. It's useful when starting a workflow in Java and you don't want to pass a list of variables to it.
ae2dff0900bf6bc99385acf2f2f14cf3259acd8a09c38225032722d9699fc082
['8b543e68d91244a990a9224a74d8845d']
<!-- language: lang-js --> <script> var jproducts = []; var selectCount= 0; function myFunction() { var select = document.getElementById("mySelect"); // test if select value already exist options = select.getElementsByTagName('option'), for (var i=options.length; i--;) { if (options[i].selected) selectCount +=1; if (function 'is_not_in_products_array') jproducts.push(options[i].value) } // remove unselected products for (var j=0; j< (jproducts.length-selectCount); j++;) jproducts.shift(); } </script> Finnaly the products array will containt only the last selected <select id="myselect" multiple="yes" name="products[]" onchange="myFunction()"> <option value="wood">Wood</option> <option value="iron">Iron</option> <option value="gold">Gold</option> <option value="dust">Dust</option> <option value="food">Food</option>
ed17c287a606a33a4cbee60703be0a841dc0643d21ac5a6ecba9ee8d61a8bff4
['8b58ee0b6c7a4c609a87ec7be07bb4e7']
--Firstly your store procedure should look something like this: CREATE PROCEDURE report_procedure( IN d1 DATE, dnow DATE, d2 DATE, val INT ) BEGIN SELECT * FROM yourtablename WHERE date1 = d1 AND datenow > dnow AND date2 > d2 AND value = val; END --The store procedure contains the select statement. -- then you can call the store procedure like that: CALL report_procedure('2013-02-01',now(),'2015-01-01','1'); --hope it helps
5232f4cf8c5d3c2a585c5c28d6f04380c2127e3cad2ea41917c7fb1578a9f5d7
['8b58ee0b6c7a4c609a87ec7be07bb4e7']
I have an web form application where, in the course of using the application, a user might click from en.mydomain.com to us.mydomain.com what's a good way to share session info across multiple subdomains without using SQL SERVER? I have already tried to include in the web.config the following line: <httpCookies domain=".mydomain.com"/> but it didn't work for me.
739965ff34fe7d64935869bc3ed442019fee2ba0570cda254459fb0bd31c210c
['8b622392181e4bb497901e93f96c730a']
I create a file and store some text in it. On WSL it works, but on my server it doesnt work? It this a user permission issue on the server or is there something wrong in the code. file_name = str(self.pk) + 'host.ics' with open(file_name, 'w') as my_file: my_file.writelines(c) Its created on my WSL but on the linux server it gives this error: in send_email_client with open(file_name, 'w') as my_file: PermissionError: [Errno 13] Permission denied: '12host.ics'
9e04e0c82eb62e90b81a31f97ec6191013bef57ca72f704ab56fd9ad0aa75527
['8b622392181e4bb497901e93f96c730a']
I converted an array [5,10,1] in javascript to store it in the cookies. JSON.stringify(stored_list) In my cookies stored as [%225%22%2C%2210%22%2C%221%22] How can I read this now in Flask Python as a dict for example? Because the following code does not work. cookies = request.cookies.get('cart_ids') print(json.loads(str(cookies)))
a9ee6bf9635fae0bb1fd0d3976413af75b670084a09b6a956a9ccd95868cb32c
['8b6dc40be88142ffa9e6d0a01bedb7e4']
That was it. I used a different browser and had the same issue until I cleared all history and active logins and re-logged into G+. Then the Play store only saw the one account that was authorized to get the beta. Too bad they don't have something better than a 404 to tell that to the user.
a6fe9e246d2ec142e205d5a78e92c599418fe294a6857c174934a231e42d7799
['8b6dc40be88142ffa9e6d0a01bedb7e4']
I got my invitation a week ago. I've tried that link several times since then and each time it returns a 404 error. I've used the beta program in my own app but with the Google Communities option not G+. When I went through communities to the link for my app, it took me to an opt-in page. I was expecting to see the same for the stack exchange app but I'm not seeing that just the 404.
0efb13c25d9ca7b5bfe457fcecb86c4809acf48704313324ad2ecdaafba8aba9
['8b71e16c05b942329b88ef624586f01e']
I'm trying to set a Keyboard Shortcut in Visual Studio 2013 to Shift + Tab. However, when I put my cursor in the 'Press shortcut keys' textbox and attempt to press the Shift + Tab combination it doesn't put anything into the textbox and tabs back to the previous control! Is there something that I am missing to let Visual Studio know that I am in fact entering a keyboard shortcut, and not using the command?
af407f25b070bb290b2fd57618464d6b5a6c0123873a784491e17e546b3971c5
['8b71e16c05b942329b88ef624586f01e']
Ok, so I am trying to extract the information from a cache.dat database sent from another business. I am trying to get at the data using the ODBC. I am able to see the globals from the samples namespace when trying to export to Access, but I can't get the data from this new database to show up. I've tried to tackle this problem two ways. First, I simply shut down Cache, replaced the existing database in InterSystems\TryCache\mgr\samples and restart cache. Once I restart I can see all the globals in the Management Portal from the new database. If I test the ODBC connection from the Windows ODBC administrator it connects. However, when I try to pull them into an access database using ODBC there are no tables showing up to import. I've also tried to add the database to my Cache but it gave me the error: ERROR #5805: ID key not unique for extent 'Config.Databases' I tried to fool around with the values in there but to no avail. This is my first time messing with anything like this and any, ANY help would be awesome.
d743235c63162f2d5faa1f3a2cc03935dd47a5d69125417e33fd33ad891cb9dc
['8b78b659e8fe4526b97efd103fca12c4']
In regular python scripts, you can pass command line parameters to python scripts with the sys.argv. For example, a python script named parameter_pass.py that contains: # simple python example import sys val = sys.argv[1] print(val) Called with python parameter_pass.py hi prints 'hi' to the console. But the same does not work for a pyomo solve command line call as far as I can tell. Is there a way to pass command line parameters beyond solver options to a pyomo model?
534b3a8bf31ad0c41dec768c36b0b9ec3fc8799788efd0f3ba414cc13e7c4d26
['8b78b659e8fe4526b97efd103fca12c4']
I really like how the pheatmap package creates very nice looking heatmaps in R. However, I am trying to add x and y axis labels to the output (if one were just in plot(), one would use: xlab = 'stuff'). A simple example is as follows. require(pheatmap) ## Generate some data d <- matrix(rnorm(25), 5, 5) colnames(d) = paste("bip", 1:5, sep = "") rownames(d) = paste("blob", 1:5, sep = "") ## Create the heatmap: pheatmap(d) The above yields the following heatmap: I cannot for the life of me figure out how to add an 'xlab' or 'ylab' to this plot. Thoughts?
b204f922e8f8a8608fc772ce44762f891323348eef206cfc47cfbd3089b00811
['8b9ace057c664c2fa06c0306b3784f65']
I'm using enterprise library for logging. So, to hold my configurations, I'm using the client's app.config. The requirement changed to "split EL configuration and UI configuration". I did it using enterpriseLibrary.ConfigurationSource. Split the configurations to app.config(For UI) and EL.config(For EL). Now I want to hide the reference to this EL.config from app.cpnfig, so that the mere existence of this EL>config is hidden from the User. App.config Code: <enterpriseLibrary.ConfigurationSource selectedSource="EntLib Configuration Source"> <sources> <add name="EntLib Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35" filePath="C:\My.CommonServices.Logging\My.CommonServices.Logging\EL.config" /> </sources>
0b605abd2305867f286a2268407bf83ee545d7c19e665b91e500760773a1b1a0
['8b9ace057c664c2fa06c0306b3784f65']
I'm using Enterprise library 5.0. Using fluent interface I was able to configure Trace Listners for File based and Event based logging. Is there any way I can configure it for Database listner. My idea is not to use any external configuration file specific to Logging configuration. I used the following, I'm able to log in a flatFile, Event viewer. When I try to log using DBListner, I'm not getting any error message but the message also is not getting logged. Can anyone shed some light? .SendTo.RollingFile("Flat File Trace Listener") .ToFile("Trace.log") .WithHeader("----------------------") .FormatWith(new FormatterBuilder() .TextFormatterNamed("Text Formatter") .UsingTemplate("Timestamp: {timestamp}{newline}Message: {message}{newline}Category: {category}{newline}Priority: {priority}{newline}EventId: {eventid}{newline}Severity: {severity}{newline}Title:{title}{newline}Machine: {machine}{newline}Application Domain: {appDomain}{newline}Process Id: {processId}{newline}Process Name: {processName}{newline}Win32 Thread Id: {win32ThreadId}{newline}Thread Name: {threadName}{newline}Extended Properties: {dictionary({key} - {value}{newline})}")) .SendTo.EventLog("Formatted EventLog TraceListener") .FormatWithSharedFormatter("Text Formatter") .ToLog("Application") .LogToCategoryNamed("General").WithOptions.SetAsDefaultCategory() .SendTo.Database("Formatted Database TraceListener") .UseDatabase("MyDatabase") .FormatWith(new FormatterBuilder().TextFormatterNamed("TextFormat")) .WithWriteLogStoredProcedure("WriteLog") .WithAddCategoryStoredProcedure ("AddCategory") .LogToCategoryNamed("DBLogger").WithOptions.SetAsDefaultCategory(); builder.ConfigureData() .ForDatabaseNamed("MyDatabase") .ThatIs.ASqlDatabase() .WithConnectionString("Data Source=.\SQLExpress;Initial Catalog=Logging;Integrated ecurity=True;") .AsDefault();
fcd93a53ede318f37fe4a1dba357a168f374b181818055ab1d3af51b0184407f
['8ba1fea19915411c9ee9b26d94ee2697']
i admit, i like clean, nicely indented html too. often it doesn't work out the way i want, because of the same reasons you're having. sometimes manual indentation and linebreaks are not preserverd, or it doesn't work because of subtemplates where you reset indentation. and the machines really don't care. not about whitespace, not about comments, the only thing they might care about is minified stuff, so additional whitespace and comments are actually counter-productive. but it's so pretty *sigh* sometimes, if firebugs not available, i just like it for debugging. because of that most of the time i have an option to activate html tidy manually for the current request. be careful: tidy automatically corrects certain errors (depending on the configuration options), so it may actually hide errors from you.
5c47530d0d00a71e74f866de4a96d87634f6e4a8540613d0abc940908172e5ef
['8ba1fea19915411c9ee9b26d94ee2697']
Using Longitude and Latitude to Determine Distance This problem can be most easily solved by using spherical coordinates on the earth. Have you dealt with those before? Here's the transformation from spherical coordinates to normal rectangular coordinates, where a=latitude and b=longitude, and r is the radius of the earth: x = r Cos[a] Cos[b] y = r Cos[a] Sin[b] z = r Sin[a] Then we'll use the following property of the dot product (notated [p,q]): [p,q] = Length[p] * Length[q] * Cos[angle between p & q] (...) at least, if height isn't important to you. if you need the height and/or distance dependend on roads or walkability (is this even a word?), i think google maps would be more exact.
c0c313b5d498c54ff1eb46950a1ef347f9502ea3870b51dc1d48c068b6892a61
['8bbc6326352a424c9222c1863e4ad030']
I have one Behavior Subject that is a private field in my service private data = new BehaviorSubject<Email>({ body: '', email: '' }); Can I create method for updating just one field of Email object and emitting it to stream? Something like this? setBody(inputBody: string) { this.data.next({body: inputBody}); } The problem here is I need to leave other field unchanged. Is it possible? Maybe it's possible to create one 'generic' method for updating any field by its name?
17b7f9026f4a7852f28291836ee1a713d674cbd51671cba2b2ebf3e196bc52c9
['8bbc6326352a424c9222c1863e4ad030']
I have class with some properties: export class Task { name: string; state: number; } In my component.ts I have an array of objects with class Task (tasks). In template I show them like this: <div *ngFor='let task of tasks'> <p>{{ task.name }}</p> <p>{{ task.state }}</p> </div> Is it possible to change styling of my div based on task.state property? For example, I want it to be with red background when it's 0 and yellow when it's 1. I think I need to use directives, but I can't understand how.
f5323616408657454bebfbdec77dd1d516490c22e7e57c5a35374b46de055e48
['8bd2f6e308fb48759056167fcb0d72af']
Might not be the most elegant solution, but you could make a global order class that isn't mapped as an @Entity and include it in your regional orders with @Embedded class GlobalOrder { @Column(name = "total") private Integer orderTotal; ... } @Entity @Table("emeaorder") class EMEAOrder { @Embedded private GlobalOrder globalOrder; @Column(name = "tax") private Integer euSalesTax; ... }
0f51d02976d54da57f4241e0b3f494efc0a8125fffd865be49a735f93d742808
['8bd2f6e308fb48759056167fcb0d72af']
Is a group of three numbers some meaningful quantity or entity in your application (they look like some kind of coordinate to me!)? If so just combine them into an object. List<MyVector> list = new ArrayList<MyVector>; list.add(new MyVector(-221.5, -301.6, 19.2)); list.add(new MyVector(-249.3, -312.2, 19.7)); for(MyVector v : list) { System.out.println(v.toString()); } Otherwise use @x4rf41's suggestion.
64885a10323cd4cf15a8790de8df5ea126317204c491cd6b98bc4df19c59b043
['8be329c746634daa91145239f5d49461']
Thanks a lot ! That's a really nice and simple way to show that the identity is not a homeomorphism. Since the spaces of compactly supported sections of different vector bundles are isomorphic as lcs (see e.g. proof of Theorem I.6.14 in <PERSON>'s and <PERSON>'s book and the refs in there), it is probably not even necessary to modify the proof for the more general case, assuming that the base manifold is non-compact and ranks of bundles are nonzero.
6a2a4c16f00f298f1f5f1322ef7cfa56a8090032109d6daa70bc2119609c2c6b
['8be329c746634daa91145239f5d49461']
So it is necessary to do the explicit construction of bundle charts ... good to know! Thanks for the very detailed instruction how to do this, I really appreciate this. I had a rough plan how to do it but I did not realize that smoothness of the parallel transport w.r.t the "transportation curve" can be used in this way to obtain smoothness of the charts. Concerning the topology on the fibres: Thanks for offering help, I think I have enough information for the time being. If I can not work it out, I'll post again.
7a5c71cd62442744e64d409d793ee38242b21801d64d47e1971119ac37a2d1c3
['8c080259d2ec4e7fa11b1425e4302d62']
Dear stack overflow readers, I am having a dataset for which I have "raw" data and for which I additionally compute some kind of smoothing function for. I then want to plot the raw data as points, and the smoothing as a line. This works with the following: Loc <- seq(from=1,to=50) Loc <- append(Loc,Loc) x <- seq(from=0,to=45,by=0.01) Val <- sample(x,100) labels <- NULL labels[1:50] <- 'one' labels[51:100] <- 'two' x2 <- seq(from=12,to=32,by=0.01) Val2 <- sample(x2,100) raw <- data.frame(loc=Loc,value=Val,lab=labels) smooth <- data.frame(loc=Loc,value=Val2,lab=labels) pl <- ggplot(raw,aes(loc,value,colour=lab)) + geom_point() + geom_line(data=smooth) print(pl) The result looks like this: The problem is that my actual data contains so many data points that using the same colour palette is going to be very confusing (the difference between point and line will be almost indistinguishable). Preferably, I would make the geom_lines() slightly darker. I've tried with scale_colour_hue(l=40), but that results in the the geom_points() to be darker as well. Thanks for any suggestions!
624b98b5ae221fef36b8ae4ac9fa0a18581ed283cb311109a7533b46e2df2afe
['8c080259d2ec4e7fa11b1425e4302d62']
Consider the following: %.foo: %.bar echo $< > $@ Assuming we have one file 1.bar, the command executed is simply echo 1.bar > 1.foo. However, when % contains a path, rather than just a file name, it start becoming finicky. My problem is that I want to prepend another path to %.bar, the pattern becomes completely mangled. I.e., when %.bar is nice/path/1.bar, this becomes impossible: %.foo: /project/something/%.bar echo $< > $@ This will run, but it executes echo nice/path//project/something/1.bar > 1.foo in stead of echo /project/something/nice/path1.bar > 1.foo The reason for this is in how make does its pattern rules. From the docs: When the target pattern does not contain a slash (and it usually does not), directory names in the file names are removed from the file name before it is compared with the target prefix and suffix. [...] The directories are ignored only for the purpose of finding an implicit rule to use, not in the application of that rule. Thus, ‘e%t’ matches the file name src/eat, with ‘src/a’ as the stem. When prerequisites are turned into file names, the directories from the stem are added at the front, while the rest of the stem is substituted for the ‘%’. The stem ‘src/a’ with a prerequisite pattern ‘c%r’ gives the file name src/car Is there any way I can turn this off for a specific rule?
3956252bc19d567ce829b22780cb4161082a501faf9b7688cc0d3a2a3f9186b6
['8c25fa9a3f5845fa8ae99508ae57305e']
@SycoraxsaysReinstateMonica I'm fine with that but I mean the question itself is still answerable since I was since asking about calculating error and confidence. I only started talking about runtime and why I was asking this question because people kept telling me to use wc. Disregarding runtime I think it's still an interesting question but it's usefulness is questionable
3a2f8fa6a13ab24555ab05eb71c10459f1e32d206d8460734199a8dfef7bd126
['8c25fa9a3f5845fa8ae99508ae57305e']
<PERSON> I'm not totally sure what you mean by "sentence". The files I'm working with here are logs of networking connections were each row/line is a different connection. I guess I could take sentence to be determined by where \n is but still the connections are temporally related so I think taking a contiguous chunk of bytes would hurt accuracy. I'll add this info in an edit!
6551a0af985513b3ca38f0d8d56655d4c1e6249f61db912f6b79989e374ce951
['8c3098f4dd314f5aa97ed572d9037b1c']
I have two projects. Project A & B. Project B is dependent on project A. To run project B, I have to add project A's depedency in project B's pom.xml. If I change something from Project A. I have to do mvn install again to update local repository with latest code of project A. Then I can run Project B. Can I access Project A's changed code in project B without doing mvn install?
573dd01a7e12869f36d877f2168566aa21747108a3b05bd688f78c545180b50b
['8c3098f4dd314f5aa97ed572d9037b1c']
There are two issues in your projects. 1.Wrong configuration in arquillian.xml. Check https://git.io/vNaYu for correct configuration of arquillian.xml 2.You are using old version of arquillian-container in your profile arq-widlfly-remote. It should be <dependency> <groupId>org.wildfly.arquillian</groupId> <artifactId>wildfly-arquillian-container-remote</artifactId> <version>2.0.0.Final</version> <scope>test</scope> </dependency>
ebc43a43685e9e4a6616bc193c0a8f3a2ff3159fe3552bec673dc18a556f643a
['8c40f38fd6ad47adb578d943591590d3']
I'm trying to enable sorting on all the data, as I'm also doing pagination on the client side. I'm having another issue with the paging that it is only showing the first 25 records and when I change pages, the new set of 25 records does not show, but I would like to figure out this sorting issue. function DataUploadHistoryController($window, $scope, $modal, $state, toaster, PagerService, DataUploadHistoryFactory, $timeout) { var vm = this; vm.uploads = []; vm.includeCancelled = false; vm.uploadDataModal = {}; vm.pager = {}; vm.setPage = setPage; vm.itemsByPage=25; $scope.sortType = 'uploadDate'; $scope.sortReverse = true; activate(); function activate() { getUploadHistory(); $scope.$watch('vm.includeCancelled', getUploadHistory); $scope.$on('closeUploadModal', function(event, response) { if (vm.uploadDataModal.opened) { vm.uploadDataModal.close(); getUploadHistory(); var poller = function() { DataUploadHistoryFactory.getUploadById(response.dataLoadExecutionId).success(function(response) { if(response.status.statusCd !== 'NEW'){ if(response.status.statusCd === 'ERROR') toaster.error('Could not load execution. Please remove.'); else toaster.success('Data execution load complete.'); getUploadHistory(); return; } $timeout(poller, 5000); }) } poller(); }; }); $scope.$on('cancelUploadModal', function(event, response) { if (vm.uploadDataModal.opened) { vm.uploadDataModal.close(); getUploadHistory(); }; }); /* $scope.$on('closeDownloadTemplateModal', function() { if (vm.downloadTemplateModal.opened) vm.downloadTemplateModal.close(); }); */ } var checkProcessingPoller = function() { DataUploadHistoryFactory.getUploadHistory(vm.includeCancelled).then( function(response) { _.each(response.data, function(upload) { if(upload.processing = upload.status && ['PROCESSING'].indexOf(upload.status.statusCd.trim()) > -1){ $timeout(checkProcessingPoller, 5000); console.log("Checking Status"); } }); vm.uploads = response.data; }); } checkProcessingPoller(); function getUploadHistory() { DataUploadHistoryFactory.getUploadHistory(vm.includeCancelled).then( function(response) { _.each(response.data, function(upload) { upload.inProgress = upload.status && ['INPROGRESS','NEW'].indexOf(upload.status.statusCd.trim()) > -1; }); vm.uploads = response.data; if($state.params.reupload){ uploadProductionData(); $state.params.reupload = false; } vm.setPage(1); vm.itemsByPage=25; }); } $scope.sortBy = function(keyName){ $scope.sortReverse = !$scope.sortReverse; $scope.sortType = keyName; }; Here is the html <div class="chrthdr" ui-view="header"></div> <div id="userResults"> <div class="card card-full-width"> <div class="card-header dark-blue"> <a class="card-config" data-toggle="uploadHistory" data-placement="left"><i class="glyphicon glyphicon-info-sign"></i></a> <div class="card-title">Data History</div> </div> <div class='form-horizontal range-date' style="overflow-y: auto;"> <form> <div class="panel-body"> <div> <span class="btn btn-primary btn-xs pull-left" style="margin-bottom: 5px; margin-right: 5px" type="button" ng-click="vm.uploadProductionData()">Upload Data</span> <label> <input type="checkbox" ng-model="vm.includeCancelled">Include removed executions </label> <!--<span class="btn btn-primary btn-xs pull-left" style="margin-bottom: 5px; margin-left: 5px" type="button" ng-click="vm.viewTemplates()">Download Template</span>--> </div> <div> <table class="table"> <tr> <th ng-click="sortBy('uploadDate')" >Upload Date <span ng-show="sortType == 'uploadDate' && sortReverse" class="fa fa-caret-down"></span> <span ng-show="sortType == 'uploadDate' && !sortReverse" class="fa fa-caret-up"></span> </th> <th>Product</th> <th>Comments</th> <th ng-click="sortBy('templateName')">Template <span ng-show="sortType == 'templateName' && sortReverse" class="fa fa-caret-down"></span> <span ng-show="sortType == 'templateName' && !sortReverse" class="fa fa-caret-up"></span> </th> <th>Last Updated By</th> <th>Last Updated</th> <th>Status <span class="fa fa-caret-down"></span> </th> <th>Actions</th> </tr> <tr ng-repeat="upload in vm.uploads | orderBy:'uploadDate':true | limitTo: vm.itemsByPage"> <td style="white-space: nowrap;">{{upload.uploadDate}}</td> <td>{{upload.product}}</td> <td style="white-space: nowrap;">{{upload.comments}}</td> <td style="white-space: nowrap;">{{upload.templateName}}</td> <td style="white-space: nowrap;">{{upload.lastUpdatedByUser}}</td> <td style="white-space: nowrap;">{{upload.lastUpdateDate}}</td> <td style="white-space: nowrap;">{{upload.status.statusName}}</td> <td> <button class="btn btn-primary btn-xs pull-left" style="margin-bottom: 5px; " ng-hide="upload.status.statusCd === 'NEW' || upload.status.statusCd === 'ERROR'" ng-click="vm.loadStagingPage(upload.dataLoadExecutionId, upload.product, upload.status)">View</button> <span class="btn btn-primary btn-xs pull-left" style="margin-bottom: 5px; " type="button" ng-click="vm.cancelDataExecution(upload.dataLoadExecutionId)" ng-show="upload.inProgress || upload.status.statusCd === 'ERROR'">Remove</span> </td> </tr> </table> <div class="text-center"> <ul ng-if="vm.pager.pages.length" class="pagination"> <li ng-class="{disabled:vm.pager.currentPage === 1}"> <a ng-click="vm.setPage(1)">First</a> </li> <li ng-class="{disabled:vm.pager.currentPage === 1}"> <a ng-click="vm.setPage(vm.pager.currentPage - 1)">Previous</a> </li> <li ng-repeat="page in vm.pager.pages" ng-class="{active:vm.pager.currentPage === page}"> <a ng-click="vm.setPage(page)">{{page}}</a> </li> <li ng-class="{disabled:vm.pager.currentPage === vm.pager.totalPages}"> <a ng-click="vm.setPage(vm.pager.currentPage + 1)">Next</a> </li> <li ng-class="{disabled:vm.pager.currentPage === vm.pager.totalPages}"> <a ng-click="vm.setPage(vm.pager.totalPages)">Last</a> </li> </ul> </div> </div> </div> </form> </div> </div>
6810389402e8bf3e6a7b7388db0e7be88a73b88c6804f36504663a05b5419d6b
['8c40f38fd6ad47adb578d943591590d3']
I have a method that is taking a date and converting it to a long integer. Map<String, Object> row = new HashMap<>(); for (int i = 0; i < columns.size(); i++) { String colName = columns.get(i); if ("productionDate".equals( colName )) { row.put(colName, ((Date) obj[i]).getTime()); } else { row.put(columns.get(i), obj[i]); } I know this line is where it is changing the format, I'm looking for a way to convert it to MM-DD-YYYY row.put(colName, ((Date) obj[i]).getTime());
82c070c42366be2fa2925b502ee70f25d227ec8c0ca808a02b3636f0f4ab05d6
['8c49a4732a8c4a3294d4b81eb2724d4b']
hope someone can help. Within PLSQL I do a soap call and I receive XML result from SOAP. I need to retrieve an element-value. This worked fine on this XML: <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:executeObjectResponse xmlns:ns2="http://www.uc4.com/uc4/"> <runID>1120864</runID> </ns2:executeObjectResponse> </S:Body> </S:Envelope> with this code: declare v_doc DBMS_XMLDOM.DOMDocument; v_Value VARCHAR2 (2000); v_node DBMS_XMLDOM.DOMNode; v_nodelist DBMS_XMLDOM.DOMNodelist; begin ... XML result from soap call catched in CLOB => l_result v_doc := DBMS_XMLDOM.newdomdocument (l_result); v_nodelist := DBMS_XMLDOM.getelementsbytagname (v_doc, 'runID'); v_node := DBMS_XMLDOM.getfirstchild (DBMS_XMLDOM.item (v_nodelist, 0)); v_value := DBMS_XMLDOM.getnodevalue (v_node); DBMS_OUTPUT.put_line ('value a: ' || v_Value); value a: 1120864 I however do have an issue with the following XML. I need to retrieve the value for this tag: <name>&amp;RESULT#</name> I tried several things, but just can't find the propper code. The result from SOAP I catch in a CLOB (l_result). <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:getTaskDetailsResponse xmlns:ns2="http://www.uc4.com/uc4/"> <groups> <name>General</name> <label>SCRI.ADP.SOAP.TEST (1120864)</label> <items> <name>Object name</name> <value>SCRI.ADP.SOAP.TEST</value> </items> <items> <name>Queue</name> <value>CLIENT_QUEUE</value> </items> <items> <name>Version</name> <value>6</value> </items> <items> <name>RunID</name> <value>1120864</value> </items> <items> <name>Activator</name> <value>1115216</value> </items> <items> <name>User</name> <value>ADP_SOAP/ADP</value> </items> <items> <name>Activation</name> <value>2017-05-24T13:38:44</value> </items> <items> <name>Start</name> <value>2017-05-24T13:38:45</value> </items> <items> <name>End</name> <value>2017-05-24T13:38:45</value> </items> <items> <name>Runtime</name> <value>0:00:00</value> </items> <items> <name>Status</name> <value>ENDED_OK - ended normally</value> </items> <items> <name>Return code</name> <value>0</value> </items> <items> <name>Event ID</name> <value>1120864</value> </items> <items> <name>Enable Rollback</name> <value>No</value> </items> </groups> <groups> <name>Object variables</name> <label>SCRI.ADP.SOAP.TEST (1120864)</label> <items> <name>&amp;EXT_HOSTNAME#</name> <value>sz4183</value> </items> <items> <name>&amp;EXT_SOAP_ID#</name> <value>sz4183</value> </items> <items> <name>&amp;EXT_SOAP_WF#</name> <value>JOBP.ADP.SOAP_TEST1</value> </items> <items> <name>&amp;RESULT#</name> <value>/dev;/u01;/etc/mnttab;/etc/dfs/sharetab;/dev/fd;/export;/rpool;/mnt/ora_dba</value> </items> </groups> </ns2:getTaskDetailsResponse> </S:Body> </S:Envelope> I played around with this, but without success: declare v_doc DBMS_XMLDOM.DOMDocument; v_Value VARCHAR2 (2000); v_node DBMS_XMLDOM.DOMNode; v_nodelist DBMS_XMLDOM.DOMNodelist; begin ... XML result from soap call catched in CLOB => l_result v_doc := DBMS_XMLDOM.newdomdocument (l_result); v_nodelist := DBMS_XMLDOM.getelementsbytagname (v_doc, '&amp;RESULT#'); v_node := DBMS_XMLDOM.getfirstchild (DBMS_XMLDOM.item (v_nodelist, 0)); v_value := DBMS_XMLDOM.getnodevalue (v_node); DBMS_OUTPUT.put_line ('value: ' || v_Value); end; All sugestions are welcome. cheers Wim
0fa985c1de351a1d44047472ab5963cc5d4ae07a06f73d9eccba7c1b9ea90b1a
['8c49a4732a8c4a3294d4b81eb2724d4b']
I found that the code works. dbms_xmldom.freeDocument(v_doc); v_doc := DBMS_XMLDOM.newdomdocument (l_result); v_nodelist := DBMS_XMLDOM.getelementsbytagname (v_doc, 'name'); v_node := DBMS_XMLDOM.getfirstchild (DBMS_XMLDOM.item (v_nodelist, 19)); v_value := DBMS_XMLDOM.getnodevalue (v_node); DBMS_OUTPUT.put_line ('name: ' || v_Value); v_nodelist := DBMS_XMLDOM.getelementsbytagname (v_doc, 'value'); v_node := DBMS_XMLDOM.getfirstchild (DBMS_XMLDOM.item (v_nodelist, 17)); v_value := DBMS_XMLDOM.getnodevalue (v_node); DBMS_OUTPUT.put_line ('value : ' || v_Value); result is: name: &RESULT# value : /dev;/u01;/etc/mnttab;/etc/dfs/sharetab;/dev/fd;/export;/rpool;/mnt/ora_dba What I'm still trying to find is how to search for the element &RESULT# and the value belonging to this element. Now I did count the element (19 for name and 17 for value), just to check the code. cheers <PERSON>
0ff0083cf30175f11c54fcbe73d3416b7d7afe27f10a19bf0a3817c6f9177b89
['8c4b6f0bc059448c88f0748594587a9a']
I have two indexes for sphinx on my webserver for online movies website. 1st is for movies data, and 2d for actors data. Before i add 2nd index i used that code public function sphinx_search($str) { require_once('../tools/.sphinxapi.php'); $sphinx = new SphinxClient(); $sphinx->SetServer("<IP_ADDRESS>", 9312); $sphinx->SetMatchMode(SPH_MATCH_ANY); $sphinx->SetSortMode(SPH_SORT_RELEVANCE); $sphinx->SetFieldWeights(['vis_title' => 100, 'title_en' => 5]); $result = $sphinx->query($str, '*'); $ids = []; if ($result && isset($result['matches'])) { foreach ($result['matches'] as $k=>$v) { $ids[] = $k; } } return $ids; } Then i used these ids to search in mysql table movie Is it possible to select specific index to search in? I mean select movies index or actors index in code $sphinx->query($str, '*') p.s.: sorry about my english
3114ed639566edd0c2df18e326428348cb37fb3b704bb5f9ad7550d43d0feb22
['8c4b6f0bc059448c88f0748594587a9a']
I'm using php for creating set of computed properties in my app based on ID property of each object in my main array of data stored in property deals. So i have now computed properties like list_10_deals_cnt, list_20_deals_cnt, list_30_deals_cnt etc. Now, how can I create these dynamic created properties in span with class dials__cnt while looping my array of data? {{'list_'+el.id+'_deals_cnt'}} is not working as i wish, its display just a string like list_10_deals_cnt instead to display a computed value. P.S. sorry about my english. <div class="dials" id="app"> <div class="dials__column" v-for="(el, index) in deals"> <div class="dials__header"> <div>{{el.title}}</div> <div>сделок: <span class="dials__cnt">{{`'list_'+el.id+'_deals_cnt'`}}</span>, <span></span> руб</div> </div> <draggable drag-class="draggable-ghost__class" class="dials__block" :list="el.items" group="deal" @change="log(el.id, $event)"> <div class="dials__card" v-for="(el, index) in el.items" :key="el.title" > <div class="card__header"> <div class="card__title">{{ el.customer_name }}, {{ el.customer_company_name }}</div> <div class="card__date">{{ el.created_at }}</div> </div> <div class="card__body"> <a :href="'/deal/detail/'+el.id" class="card__link">{{ el.title }}</a> </div> <div class="card__footer"> <span class="card__price">{{ el.price }} руб </span> <span v-for="(tag, index) in el.tags" class="card__tag">{{ tag }}</span> </div> </div> </draggable> </div> </div> <script> new Vue({ el: '#app', data: { deals: <?php echo json_encode($deals, JSON_UNESCAPED_UNICODE); ?> }, computed: { <?php foreach ($deals as $k=>$v) { echo 'list_'.$v->id.'_deals_cnt: function() {return this.deals['.$k.'].items.length},'; } ?> }, methods: { log: function(id, evt) { if (evt.hasOwnProperty('added')) { let dealID = evt.added.element.id; console.log('сделка ID '+dealID+' перемещена в статус '+id+'. Отправляем аякс запрос на обновление статуса в бд'); // ajax for update } } } }); </script>
3da4f44be0be2880cc7bed798e0d550fa6b76b07b333a1a8ec47d8417a23b57f
['8c53fbad41c343cb8c911812dc45a204']
It is happening because every time else part is getting executed. To correct this, you should compare Grade[index] == 'A' and not Grade[index] == A The right code would be: Grade = [""]*20 A=0 B=0 C=0 D=0 F=0 for index in range (20): Grade[index]=str(input("Input A, B, C, D or F: ")) print (Grade) for index in range(20): if Grade[index]=='A': A=A+1 elif Grade[index]=='B': B=B+1 elif Grade[index]=='C': C=C+1 elif Grade[index]=='D': D=D+1 else: F=F+1 print(A, B, C, D, F)
b508771c104393a91ab18f7e7fb93719efe67c196577acc928356a415e47e1c9
['8c53fbad41c343cb8c911812dc45a204']
Declare the variable in the global scope. You are trying to set the variable which is not declared. fullFileName = '' def getFilePath(): global fullFileName FileDir=filedialog.askdirectory(title = "Select Folder") fullFileName.set(FileDir) print(fullFileName) Another alternative if you don't want fullFileName in global scope then you can try: def getFilePath(): FileDir=filedialog.askdirectory(title = "Select Folder") fullFileName=FileDir print(fullFileName)
82751f3d25a15504081b09ccc1f26319b71a7c1154c30e7b3fb968cdba6a5149
['8c6dae19f3a047c097cbc339170a5952']
For example I was thinking that maybe $U(2)$ acts transitively on $S3$ (does it?) and $B$ is the stabilizer of point $(1,0,0,0)$ so I could identify $U(2)/B$ with $S3$ but $S3$ can have group structure, while $B$ is not normal in $U(2)$ therefore I am confused...
d7115b9f8fcb607b8d7cd72de0d35f4b7181ff4d9a9dca309d8bc4a513939ae2
['8c6dae19f3a047c097cbc339170a5952']
Sometimes I come across exam tasks that basically ask me to "Find the Matrix Group that preserves (or is isomorphic to a Group that preserves) a given function from a vector space to a field". Usually the answer is a "named" Group, i.e., one of the standard ones (orthogonal, unitary, symplectic...) or a tensor product of more of them. For instance I am asked to find the Group that preserves (in its action on $\mathbb{R}^3$) the $\mathbb{R}^3\rightarrow \mathbb{R}$ function $$2x_1x_2+x_3^2$$ where $x_1, x_2, x_3$ are the coordinates of a vector in $\mathbb{R}^3$. I believe this is equivalent to the Group $G$ of matrices $g$ such that $$g^T A g=A\qquad \forall g\in G$$ where $$A=\begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$ However, I cannot find any better way to describe this group, nor can I find a relation with any of the usual Matrix Groups. If the problem was bidimensional I would try to brutally calculate the properties of the Matrix elements of $g$, but in $d\geq 3$ this becomes tedious, there has to be a clever way. How would you approach such a problem in general?
4d5f0eb5d24c88daa2b102b94a7877e9a61ea9541f05c9d24fadd69091009209
['8c72b925729240ed9274260e7b6e6c39']
I have a local p4 server on my computer to manage my code versioning. I would like to move my development to Bitbucket - so I've opened an account there. The first logical kickoff, as I see it, would be migrating the P4 environment to git (while keeping all history of course) - which seems to be a headache for the unpracticed git user. I've tried git-p4 from git bash, but git for windows is apparently compiled w/o Python. Got git-p4.py. Tried (in cmd): git-p4.py clone //depot/foo/bar/@all //opt/dest/. Got "libiconv-2.dll is missing" error. Then I've stopped because I think that I'm doing something entirely wrong. Please help me understand how to do it right... Thanks.
3e1577ccb85ffb6c2a5e645bce9c8563658bdedc6c136e327a56d0589b1ea495
['8c72b925729240ed9274260e7b6e6c39']
I have a subroutine that returns a hash. Last lines of the subroutine: print Dumper(\%fileDetails); return %fileDetails; in this case the dumper prints: $VAR1 = { 'somthing' => 0, 'somthingelse' => 7.68016712043654, 'else' => 'burst' } But when I try to dump it calling the subroutine with this line: print Dumper(\fileDetailsSub($files[$i])); the dumper prints: $VAR1 = \'somthing'; $VAR2 = \0; $VAR3 = \'somthingelse'; $VAR4 = \7.68016712043654; $VAR5 = \'else'; $VAR6 = \'burst'; Once the hash is broken, I can't use it anymore. Why does it happen? And how can I preserve the proper structure on subroutine return? Thanks, <PERSON>.
17e5350eda96c5e20004a594af968cd5cd4afb9ee2800d555913d00918bf5bfa
['8c8d426fc256485fb23f16c21793699f']
I have the following query: <?php $args = array( 'hide_empty' => false, 'orderby' => 'title', 'order' => 'DESC' ); $terms = get_terms( 'projets-location', $args ); if ( !empty( $terms ) && !is_wp_error( $terms ) ){ foreach ( $terms as $term ) { ?> <h5 id="<?php echo $term->slug; ?>" class="filter-menu-item" data-filter=".<?php echo $term->slug; ?>"> <strong><?php echo $term->name; ?></strong> </h5> <?php } } ?> which shows all the taxonomy terms from the projets-location taxonomy, I've added the orderby and order attributes above but STILL they're not displaying in alphabetical order at all, am I being stupid her or is there something I'm going wrong? Any suggestions would be greatly appreciated!
b6c7c80c59ad0394d19d45a312e93e11d82a47d9f033ae67e3ff2b5900a4b8db
['8c8d426fc256485fb23f16c21793699f']
I'm trying to figure out if it's possible to show the submenu's outside of the relevant li tag. For example, this php: wp_nav_menu(array( 'menu' => 'side', 'container' => false, 'menu_class' => 'side-menu' )); ?> will render the menu like so: <ul id="menu-main" class="menu"> <li id="menu-item-01" class="menu-item">Menu 01</li> <li id="menu-item-02" class="menu-item">Menu 02 <ul class="submenu"> <li class="submenu-item">Sub 01</li> <li class="submenu-item">Sub 02</li> <li class="submenu-item">Sub 03</li> </ul> </li> <li id="menu-item-03" class="menu-item">Menu 03</li> <li id="menu-item-04" class="menu-item">Menu 04</li> </ul> ...when what I'd actually like to achieve is something like this: <ul id="menu-main" class="menu"> <li id="menu-item-01" class="menu-item">Menu 01</li> <li id="menu-item-02" class="menu-item">Menu 02</li> <ul class="submenu"> <li class="submenu-item">Sub 01</li> <li class="submenu-item">Sub 02</li> <li class="submenu-item">Sub 03</li> </ul> <li id="menu-item-03" class="menu-item">Menu 03</li> <li id="menu-item-04" class="menu-item">Menu 04</li> </ul> with the relevant submenu sitting below it's corresponding menu item, the reason being the submenus are initially hidden and slide down upon clicking the relevant menu item and each menu item is styled, thus wrapping a submenu inside it throws everything out. Is this at all possible?
d34e503629bb362f4876327754a9a9cf3d66f3a3ad1ca9c2dd63215c0a9b2115
['8c9244d54bc645729f39593909a534a5']
I have a div element <div id="divKPI" class="divKPI" > <asp:Label ID="lblKPI" runat="server" CssClass="lblKPI"></asp:Label> </div> I have the class .divKPI { padding-top:800; text-align:center; } It is setting the label to center but not positioning the label element.Please help me.I have also used "top" but of no use
2c131b0bd8f7774418d7ba2ff7fc2dafe612e6986a33ac67b243067346312850
['8c9244d54bc645729f39593909a534a5']
I am trying to call ajax web method when button is clicked. This is the following code I have written. $(function() { $("<%=btnRatingSubmit.ClientID%>").click(function (e) { var textrating = $('#<%= btnRatingSubmit.ClientID %>'); $.ajax({ type: 'POST', url: 'NewRatings.aspx/SubmitRatings', data: '{rating: \'' + textrating.val() + '\'}', contentType: 'application/json; charset=utf-8', dataType: 'json', success: function doNothing(data) { }, error: function throwError(data) { }, }); }); This is asp button I am using <asp:Button ID="btnBack" runat="server" Text="Back To Results" OnClick="btnBack_Click" /> The code behind is [WebMethod] [ScriptMethod] public static void SubmitRatings(string rating) { if (HttpContext.Current.Request.QueryString["ID"] != null) { if (HttpContext.Current.Session["LoginId"] != null) { string str = HttpContext.Current.Request.Form["lblRate"]; RatingsBAL bal = new RatingsBAL(); bal.StoreRatings(HttpContext.Current.Session["LoginId"].ToString(), HttpContext.Current.Request.QueryString["ID"], Convert.ToInt32(rating)); } } } But for some reason the web method is not being fired. Can anyone help me please? Thanks in advance.
bd1c3c58c90d9a4afbe8083d293125d25311198ec260db52c343b3d8eb1bbdb2
['8c960f93ec104a7aae107bd64620383f']
I am facing a serious blockage on a project of mine. Here is the summary of what i would like to do : I have a big hourly file (10 Go) with the following extract (no header) : ID_A|segment_1,segment_2 ID_B|segment_2,segment_3,segment_4,segment_5 ID_C|segment_1 ID_D|segment_2,segment_4 Every ID (from A to D) can be linked to one or multiple segments (from 1 to 5). I would like to process this file in order to have the following result (the result file contains a header) : ID|segment_1|segment_2|segment_3|segment_4|segment_5 ID_A|1|1|0|0|0 ID_B|0|1|1|1|1 ID_C|1|0|0|0|0 ID_D|0|1|0|1|0 1 means that the ID is included in the segment, 0 means that it is not. I can clearly do this task by using a python script with multiple loops and conditions, however, i need a fast script that can do the same work. I would like to use BigQuery to perform this operation. Is it possible to do such task in BigQuery ? How can it be done ? Thanks to all for your help. Regards
cf2b988c5bb0f1035977d860739d625992184e1fce4aba8544552453d1f18685
['8c960f93ec104a7aae107bd64620383f']
I am facing an issue related to a project of mine. Here is the summary of what i would like to do : I have a big daily file (100 Go) with the following extract (no header) : ID_A|segment_1 ID_A|segment_2 ID_B|segment_2 ID_B|segment_3 ID_B|segment_4 ID_B|segment_5 ID_C|segment_1 ID_D|segment_2 ID_D|segment_4 Every ID (from A to D) can be linked to one or multiple segments (from 1 to 5). I would like to process this file in order to have the following result (the result file contains a header) : ID|segment_1|segment_2|segment_3|segment_4|segment_5 ID_A|1|1|0|0|0 ID_B|0|1|1|1|1 ID_C|1|0|0|0|0 ID_D|0|1|0|1|0 1 means that the ID is included in the segment, 0 means that it is not. I am using the following query to get the result : select id, countif(segment = 'segment_1') as segment_1, countif(segment = 'segment_2') as segment_2, countif(segment = 'segment_3') as segment_3, countif(segment = 'segment_4') as segment_4, countif(segment = 'segment_5') as segment_5 from staging s cross join unnest(split(segments, ',')) as segment group by id; This solution worked for me until the number of segments became a lot higher (900+ segments instead of 5 in my first example). This is creating a huge query that cannot be passed as an argument through bq cli. Is there any workaround that i can use ? Thanks to all for your help. Regards
dde0963563f807abc03a252a55b9610021996385b2514d17c772ce526d08f96c
['8ca801481a4b4bd1b3367befb257bc61']
Great, all this was very helpful. I will take @JeremyC and JJJ advice and opt to just improve the readability. The PhD thesis is about fluid mechanics, so it is not related at all with language usage. It will surely contain other more important inaccuracies. BTW, the author's guide provided by my university does not cover this topic.
52c802c95c3954ac694a3ab5f4bfbc43f745d0b1031e79870b613cf0384cbf5e
['8ca801481a4b4bd1b3367befb257bc61']
Instead of looking for _root.param, use _root._url then parse out your parameters by hand. var url: String = _root._url; var param: String = 'param='; var paramStart: Number = url.lastIndexOf(param); var paramValue: String = url.substring(paramStart + param.length, url.length); trace(paramValue); SWFBridge is awesome and overkill for something like this.
20a91b0117677f806926726f3cc7fd7ec1930bd9a8d5945b339128c667b7a063
['8cac2d476e334047869194a5cf43b848']
First plz watch the picture below. I also got a same error code. In my case, the size of "Source image" was 640 x 480. I assigned sx, sy parameter with 10,10 and sWidth,sHeight parameter with 640,480. And then I got same error code that you got. Because sx,sy parameter shift the capture window 10,10 pixels, sWidth,sHeight window is in out of range. In my thinking, I caused INDEX_SIZE_ERROR because there is no data to refer. , I put the oversized sWidth an sHeight. drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight)
519dd0b19e803a4d702ccd778dda0d1f51443023eab80f8fad63106c40c7385a
['8cac2d476e334047869194a5cf43b848']
I want to check the performance of the gzip decoding speed in a web browser. In the Java or c#, we can easily check the gzip decoding time. But I can not measure the decoding time in the web browser. plz help me. I want to check some decoding speed of gzipped html files. With JavaScript can I measure the performance.
44bb485c329a71143bc43da3a808a2714f26182697a58504e17644115ece1118
['8ccdd3fca09a4532bce2d1aa69f5ad0e']
Is it possible to use FileMaker Server 13's new WebDirect system to serve Instant Web Publishing solutions that were developed and maintained in FileMaker Pro 12 Advanced? I've enabled IWP from within FMP 12 Advanced and can connect via web browser while it is running in FMP. Once I copy it to FileMaker Server it no longer has web running on the project. The demo project (FMServer_Sample.fmp12) that came with FileMaker Server 13 runs web by default and works fine from Server. IF I open FMServer_Sample.fmp12 in FileMaker 12 Advanced it will not show up in the FMP IWP list in my web browser. I can open FMServer_Sample.fmp12 in FMP12 Advanced and make edits and saves, and it will still work in FM Server 13 WebDirect.
06b46cbcca0c82a5f2ff932e89219bf4bc48f300437b8e811806e421aa9ee496
['8ccdd3fca09a4532bce2d1aa69f5ad0e']
When the "git log" and @{u} answers initially gave me "unknown revision" errors, I tried out <PERSON>/romkyns suggestion of git push --dry-run. You will get an output such as "5905..4878 master->master". 5905 is the latest commit that the remote has and commits through (and including) 4878 will be applied to the remote. You can then use 5905..4878 as arguments to several other git commands to get more details: git diff 5905..4878 # Gives full code changes in diff style git log --online 5905..4878 # Displays each commit's comment
66fd2949a0ab0e25fc70447f56f659426419fd0a3135f904917802f2e3a6c681
['8cd6a19972624742ab2c3d1923d0dfdc']
Is it possible to build static (.a) library using ndk-build from several other static (.a) libraries. For example, I have several libraries: lib1.a, lib2.a, lib3.a and I need to build libmegalib.a lib Using LOCAL_WHOLE_STATIC_LIBRARIES and include $(BUILD_STATIC_LIBRARY) dosn't help. It creates libmegalib.a lib, but it contains "!<arch>" content only (8 bytes). But I need libmegalib.a contain all my libs: lib1.a, lib2.a, lib3.a
7e4f4e0e2c3deac72d6c2c8edb2763dcccd3b61afdf7a4b59d30a66f0075a5f5
['8cd6a19972624742ab2c3d1923d0dfdc']
I need to implement list view that must show selected item in the center of list view. Is it possible? The problem is that list view forbid scrolling before top item and after last item. The only workaround here I found is to add several dummy header and bottom items and use setSelectionFromTop() method for right positioning. Is there any other better way? Thanks
a878d7f9e0bfb9e8cb59d3d3ab9b1017a7e50916d9cbde517f222b942d5c7560
['8cdc99a0511c4cb4814f151f83c7e7f4']
Aha! Thanks to a colleague of mine, we found the issue. Here was the issue: There was a forward declaration/prototype of a function. void FooBarIsBest(void); Later on in the file the function was defined. static void FooBarIsBest(void) { // do the best } The issue here was that in the prototype the keyword static was left out. So it was like a whole new function was being defined. The CALL16 reference is used by gcc for relocatable code. The assembly code of the file showed that CALL16 was being used on this function... Which is wrong, as this function is local. Interestingly, this code used to compile & link just fine with an older version of gcc (3.2.2). Another lessoned learned. :)
b30ae3073b3feab9210ac2978ec6ee4c4d068caa5c49363b2ed460043c97b43f
['8cdc99a0511c4cb4814f151f83c7e7f4']
Maybe I'm missing the point of you question, but if your method prototypes in your header file are setup properly then that will do it. "Implicitly" the user will know that your given method only accepts a reference to the parameter, or that a given parameter is read-only (const).. etc....
7ca1190805e309af440508bf75c38c6870c74813641f71a5f9373883aa36a7f5
['8cfbf6e9df6b4a6186ca10ec00c65656']
Пишу телеграмм-бота на Python через telebot. Этот бот должен будет интерпретировать код, который пришлет пользователь. Вот так выглядит функция, интерпретирующая код: def interpreter(message): file = open('programmes.py', 'w', encoding='UTF-8') file.write(message.text) file.close() conclusion = os.system('programmes.py') bot.send_message(message.chat.id, conclusion) При запуске в консоль выводится вывод кода ( например: Код: print(5+5) | Вывод: 10 ). А бот высылает пользователю цифру 0. Независимо оттого, какой код. Будь то: a = 5 или print(4-3).
f377c85f8025ad9e4a442cda169fdef57d4abaa3443ecb1497d6c905c71ce3fd
['8cfbf6e9df6b4a6186ca10ec00c65656']
Я новичок в javascript. И столкнулся с такой проблемой. Это мой код: function myFirstApp(name, age) { function showSkills() { let skills = ['Html5', 'Css3', 'JavaScript']; for (let i = 0; skills.length; i++) { return (`Я знаю: ${skills[i]}!`); } } function checkAge() { if (age >= 18) { return ('У тебя отличные шансы стать FrontEnd dev`ом!'); } else if (age < 18) { return ('Неплохо, малой, что ты решил заняться программированием в столь раннем возрасте!'); } } function calcPow(num) { return (`Вот его квадрат: ${num * num}`); } return (`Салам Алейкум, ${name}. Это моя первая программа!`, showSkills(), checkAge(), calcPow(parseInt(prompt('Введи число: ')))); } alert(myFirstApp('Alex', 23)); А при выполнении его, мне на страницу возвращает результат только последней функции. Не знаю, как пофиксить. Помогите пожалуйста) html-code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <script src="script.js"></script> </body> </html>
09d2dd21bf774238883789511563e54bb17e65961a9c50b2fee38db24be2a5a0
['8cfe738210b84110b491e3714d2e572e']
Hey I just found out about typecasts, but I dont understand the concept behind it? Why would you use something like that. I tried to make an example to understand it better: interface Fuel { //Fuel.kt var usingFuel : Boolean var typeFuel : String fun printInfo(){ println("Using this Fuel type: $typeFuel") } } class Airplane(name : String, age : Int, amountFuel: Double) : Vehicle(name, age, amountFuel), Fuel { //Airplane.kt override var usingFuel: Boolean = true override var typeFuel: String = "Kerosin" override fun printInfo() { //Prints name, age etc of object super<Vehicle>.printInfo() super<Fuel>.printInfo() } } //Main.kt var airplane : Airplane = Airplane(args) var otherKerosin : Fuel = airplane otherKerosin.fuelType = "Other Kerosin" otherKerosin.printInfo() airplane.printInfo() And the output of otherKerosin.printInfo() is like the output of airplane.printInfo(), only that the fuel type is different. Now why should I do this, instead of creating a new airplane and changing the fuelType variable?
2970b5260a58b7db79967062705acf33bf3ae8645845cc1f34a5278e724bdb20
['8cfe738210b84110b491e3714d2e572e']
Ok I solved this problem: First install anaconda and open the prompt then type conda install pytorch -c pytorch and pip3 install torchvision. Then go to PyCharm and create an Project and set the Project Interpreter to the Anaconda one (there is in the path: \Anaconda.x.x\python.exe ). Then you go to the Run settings and click Run... and then you go to Edit Configurations and then you select the Project Default interpreter and apply and you should be done! Thanks to the ppl who helped me =)
91f9bca8b0e24f44b6f2f1900deccca2cf1d3e8d5cf6a84b845ce40b00f14be5
['8d000d1528794ae2b71d0abe0416816e']
You should be using PHP PDO library http://php.net/manual/en/book.pdo.php or at least MySQLi http://php.net/manual/en/book.mysqli.php mysql_ function family is deprecated and insecure by itself Here you can read about MySQLi prepared statements and parameter binding http://php.net/manual/en/mysqli.quickstart.prepared-statements.php
f13dea51595004495398a8d90ed8768805b8794ca534fad736530e1ed50d9e80
['8d000d1528794ae2b71d0abe0416816e']
You will need to use 2 separate queries to achieve this result (or some right join magic as advanced option): $post_resource = mysql_query("SELECT post_id, post FROM posts"); while($row = mysql_fetch_assoc($post_resource)) { echo $row['post'] . "\n"; $comments_resource = mysql_query("SELECT comment FROM comments WHERE comment_post=$row[post_id]"); while($comment = mysql_fetch_assoc($comment_resource)) { echo $comment['comment'] ."\n"; } echo "\n\n"; }
dba13c6e6b784dc6fc7960d161986a0fa41fbc593de03e5a0d7c3b56575c3f3b
['8d04717f59d443929c6158af10f3bda9']
Take a look to this: From: http://docs.oracle.com/cd/E26502_01/html/E28987/geyrf.html "An address object that is listed as interface/? indicates that the address was configured on the interface by an application that did not use libipadm APIs. Such applications are not under the control of the ipadm command, which requires that the address object name use the format interface/user-defined-string. For examples of assigning IP addresses, see How to Configure an IP Interface."
96af771ab655e0e5a6d67e62aec9dc6939e37061e3de869eb901de8268f202ac
['8d04717f59d443929c6158af10f3bda9']
The following permissions are OK for the binary file date -bash-3.2# ls -l /usr/bin/date -r-xr-xr-x 1 root bin 11056 Jan 22 2005 /usr/bin/date -bash-3.2# If the permissions are OK check your cron log on /var/cron/log file -bash-3.2# tail /var/cron/log < root 24592 c Fri Oct 20 18:50:21 2017 > CMD: /usr/bin/date > /tmp/non-root.log > user 25192 c Fri Oct 20 18:51:00 2017 < user 25192 c Fri Oct 20 18:51:00 2017 > CMD: /scripts/collectdata.sh > /dev/null 2>&1 > root 25769 c Fri Oct 20 18:52:00 2017 < root 25769 c Fri Oct 20 18:52:00 2017 > CMD: /scripts/collectdata.sh > /dev/null 2>&1 > root 26853 c Fri Oct 20 18:54:00 2017 < root 26853 c Fri Oct 20 18:54:00 2017 -bash-3.2#
30739b90942881081ae7eb3838860c805a05f53cf5b9dd7f410d44292433af6a
['8d069dfeaed44c81a38f6931fcf2a85c']
Not sure if this is the correct way to do this or not, however it does work for me. If there is a better way to do this then I'm all ears! string _connectionString; public MyDbContext(DbContextOptions<MyDbContext> options) : base(options) { string appSettings = String.Concat(Directory.GetCurrentDirectory(), "/appsettings.json"); var configurationSettings = new ConfigurationBuilder().AddJsonFile(appSettings).Build(); _connectionString = configurationSettings["ConnectionStrings:DefaultConnection"]; }
f72645b89811a0c10a60e883e35c449c809dba36c26cd8835ac97e3b8dc5664a
['8d069dfeaed44c81a38f6931fcf2a85c']
I'm trying to figure out the best way to define a one to many relationship table as it pertains to Customers and Addresses. Each Customer can have multiple address (Mailing, Billing, Delivery, etc). The Type of address is stored in a separate table (AddressType). Here's what I have: public class Company { public int Id { get; set; } public string Name { get; set; } public List<Address> Addresses { get; set; } } public class Address { public int Id { get; set; } public int AddressTypeId { get; set; } public AddressType AddressType { get; set; } public string Street1 { get; set; } public string Street2 { get; set; } public string City { get; set; } public int StateId { get; set; } public State State { get; set; } public string PostalCode { get; set; } public int CountryId { get; set; } public Country Country { get; set; } public bool Active { get; set; } public int CompanyId { get; set; } } public class AddressType { public int Id { get; set; } public string Display { get; set; } public bool Active { get; set; } } Couple of questions ... Would what I have above be considered good practice? If not, how would you define it? Assuming that the AddressType table contains Mailing, Billing and Delivery, how would I issue a Linq query where I only want to pull the Mailing Address? Thanks a bunch. --- <PERSON>
dbaa06c8c4851d264ab49db924e13cd5401cb1a000ed7a53c93de4165863c94f
['8d0c41c0e9af477e8a1c654db5d31967']
2.7.1 is not back-compatible. Lock your plugin version to 2.6 in your pom.xml or upgrade your SonarQube Workaround: Adding -Dsonar.host.url=http://my.server:9000 to mvn command works for me Better than disabling the plugin, you may fix the plugin version to 2.6, which works fine, taking into account sonar.host.url. For instance, with Maven in my case: <pluginManagement> </plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>2.6</version> <!-- sonar.host.url not working with version 2.7 --> </plugin> </plugins> </pluginManagement>
feaed783fa28b9d5ab2ff2c79c503c28c12d7d0ea1078e717488c539161b0339
['8d0c41c0e9af477e8a1c654db5d31967']
Our compile SDK version must match the support library's major version. If you are using version 23 of the support library, you need to compile against version 23 of the Android SDK. Alternatively you can continue compiling against version 22 of the Android SDK by switching to the latest support library v22. You can either change it manually in your build.gradle, or you can use the GUI by opening up the project properties and going to the "dependencies" tab. Or Press Ctrl + Shift + Alt + S to get to the project structure page. Go to the properties tab and change version to 23.0.0 or whatever latest in the build tool area and rebuild your project. If that doesn't work, go to gradle:app and then compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' Edit version as shown above and sync gradle.
89939ab04737b00aca85108b9a15e7db138c9a38a30fdce3a427e0c713a0d3cd
['8d0dbd8e48ae49c999bdca59030d1861']
My question is regarding CLion by JetBrains. I come to understand that with visual studio there is an option to set the executable to be "multithreaded" and not "multithreaded dll". In other words this would allow for the .exe to be used on anyones computer after compiling. My question is similar but for CLion. How in the world do I set the same option inside of CLion? At first when not being able to find it I realized I need to edit CMAKE.txt I also found that I can use the -static option but when I typed in: set(CMAKE_EXE_LINKER_FLAGS "-static") When I put that in it didn't work. What else do I need to do to run a .exe on anyones computer with CLion and how should I go about doing this? Sorry for not knowing. As a matter of fact I'm new to C++ and just started learning and picked up the C++ Bible to try to learn. To be honest, I don't see a point in making a program if you can't share it with other people. Even if they installed visual runtime libraries or whatever library they would need it's pretty pointless so that's why I found static is the best way to go. I just don't know how for CLion. Thank you.
9e38e260c43dff2148b54c94f207d4378d01ce0754df1f4a1a7b5b8e13414261
['8d0dbd8e48ae49c999bdca59030d1861']
Okay this is what I have. BODY { font-family: sans-serif; background-image: url(http://www.thexboxcloud.com/images/xboxbackground2.jpg); background-repeat: no-repeat; background-attachment: fixed; background-position: left top; position: absolute; margin: 0; margin-right: 15in; } P { position: relative; padding: 1em 1em 1 em 3em; left: 150px; top: auto; border-left: purple .25cm solid; border-top: purple 1px solid; border-bottom: purple 1px solid; } P.pillow { position: absolute; margin-right: 15in; } Everything works fine until I try to set a class for "pillow". I am typing it in right but it seems that one of the upper 2 overrides it. This is what I put to apply the class: <p class="pillow"> Now that should work. I'm trying to make a youtube video and paypal button for "pillow" not have a border around it at all. But when I type it in, it does not override the first p class. Also, it makes the text margin spread out to the whole page when I make the first p class a specific class as well. Could doctype code have anything to do with it? I'm using "loose". But I can't figure out what I can't get a specific class to work. Any help is appreciated. Thanks.
c081c66a4f607c306013325c3d4f7c3ac337742884f8c24a1a87103ae16a373c
['8d18b57896314207a9fbeee6a5475187']
For those of you folks trying this in 2017 with Windows 10... DESCRIPTION Even with Glass debugging on, ADB does not show Glass in the list of devices. Upon plugging Glass in via USB, Glass will chime and Windows 10 will chime, but neither act like they are connected. Glass will not show up under This PC. FIX I spent several hours trying everything mentioned in the other answers, but nothing worked. Turns out you can't use the Google USB Driver that you download with the Android Studio SDK Manager anymore. Make sure Debug is on in the Glass settings, then hook Glass up to your PC. Go to Device Manager. Glass will show up as LeMobile Android Device > Android ADB Interface (or something like that). Right-click it, choose Update Driver Software. Then select Browse my computer for driver software > Let me pick from a list... Choose the Android Composite ADB Interface (or something like that; whichever one is the Composite option) and click OK. After installing the driver, Windows 10 should notify you that Glass connected. It should show up under This PC now. Glass will ask you to allow the connected PC. After allowing, ADB will show it in the list of devices. I'm recalling this all from memory, so names might not be 100% accurate. The important bit is that I had to select the Composite driver manually.
1ea0fe1fb7c441e3d8cfe6cd15467491e7209573f4e1b4a613fcf6689eec4f59
['8d18b57896314207a9fbeee6a5475187']
If you can modify Utils.cs, you could wrap the Title and Url assignments with HttpUtility.HtmlDecode ... select new Link { Title = HttpUtility.HtmlDecode(item.Element(xName + "title").Value), Url = HttpUtility.HtmlDecode(item.Element(xName + "link").Value), }).ToList<Link>(); ... or you can wrap e.Result with it in your LoadFeed method ... Deployment.Current.Dispatcher.BeginInvoke(() => { LoadingState = LoadingState.COMPLETED; FeedLinks = Utils.GetLinksFromFeed(HttpUtility.HtmlDecode(e.Result)); RaisePropertyChanged("FeedLinks"); RaisePropertyChanged("LoadingState"); });
0c6379d02e05768c9aa8fba1e3cfecc725554e2200047d2dd5a4191c5ffe1214
['8d1f2e0b10b64332b83529eb98f54501']
I got curious and started a larger computational search, which so far has excluded all cubic polynomials in $\mathbb Z[x, y]$ where the sum of the absolute values of the coefficients is at most 22. You need to test for injectivity over a much larger domain, though: for a polynomial like $8x^3 + 15y$, the closest inputs mapping to the same output are $(8, y)$ and $(-7, y + 456)$.
e02e0f518b5f3d72e148b653ba8e40792b793dfec6a0e2a1d057cbdf9992f159
['8d1f2e0b10b64332b83529eb98f54501']
In your python2 answer the last line seems to be incomplete : `print f(3)` gives : `class Tuple1 {public Object _0;}` `class Tuple2 {public Object _0,_1;}` `class Tuple3 {public Object _0,_1,_2;}` `class Tuple4 {public Object _0,_1,_2,_3;}` `class Tuple%d {public Object _0,_1,_2,_3`
349b2eed77d2c7df86866c1563b187d0bd3c70a18d085af67864b7e460842cbb
['8d254a1273464716ac94b0a813698abe']
I've got two tables, Card and User. Card has a reference to user, so that a user can have many cards, but a card can only have one user. I have made this mysql-query that returns the Card.Id and User.LastName: SELECT Card.Id,User.LastName FROM Card left join User on Card.UserId = User.Id where Card.Id = '1'; How can I make that query with servicestack ormlite? I've tried something like this: var cardIdAndUserName = db.Dictionary<int, string>(db.From<Card>() .LeftJoin<Card, User>((c,u) => c.UserId == u.Id) .Select(card => new {card.id, user.Lastname})); I could not get the code above to work because the .Select statement will only let me get columns from the Card table. I guess I could make a db.Select(InfoINeedObject) intead of the db.dictionary call, but then I have to create a new class, InfoINeedObject.
630c66204d431b577c2f04f565fd9b4b9d0b4205c8b31c4f2d491e1b7014c447
['8d254a1273464716ac94b0a813698abe']
The code below will output a html table with the values "Name" and "Age" in the first column. Is it possible to output something else like "Navn" for "Name" and "Alder" for "Age"? If so, how? I've tried adding attributes like [DisplayName] and [DataMember] on the properties of the Person class without any success. using (var context = new TemplateContext().Init()) { context.VirtualFiles.WriteFile("page.html", "{{person | htmldump}}"); var pageResult = new PageResult(context.GetPage("page")) { Args = {["person"] = new Person{Age = "20", Name = "<PERSON>"}} }; var htmlString = await pageResult.RenderToStringAsync(); Console.WriteLine(htmlString); } public class Person { public string Name { get; set; } public string Age { get; set; } }
43c40aa21d3817d808ab4931831271acfd86aef63d3d6938b0ee2d2a60af80bc
['8d3543ec57604e2c83d7c65636afa6b6']
I am implementing a function to read contents in local foo.txt. var fs = require("fs"); var path = require("path"); var realpath = path.resolve("./foo.txt"); fs.open(realpath, "r", function(err, fd){ if ( err ) { throw err; }; var buf = new Buffer(1024), bufOffset = 0, bufLength = buf.length, result = ""; var recursive = function(position) { buf = new Buffer(1024) fs.read(fd, buf, bufOffset, bufLength, position, function(err, bytesRead, buffer) { if ( err ) { throw new Error("Opps!"); }; if (bytesRead > 0) { // Block** result = result.concat( buffer.slice(0, bytesRead).toString() ); recursive(bytesRead + position); } }); }; recursive(0); console.log(result); }); I used recursive method. After executing this program I got nothing. But if I use console.log(result) in the Block** above, it works. Why result gets cleaned after the program went back to the open block? thanks.
c627b6a42bbe4e52ef6e2307c3e49ca0d758a820e9b2e8517c1b570f222f22d7
['8d3543ec57604e2c83d7c65636afa6b6']
I want to write a C/C++ Program having the following functionalities: Run a binary executable C program as a child process. Watch the memory usage of the child process, and be able to terminate the child process when it overuse memory, like over 100MB. When the child process have been running for a given time, like 1 sec, I can terminate it. Keep it away from any linux kernel functions, which means when the child process ask for functions not belongs to standard C Library, I can prevent it and terminate the process. Any idea to how to implements these? Or you can just give me a hint and I can find out by myself! Thanks!
8cead1ebad165d5d98649a9ecf3af9c218690b4a1f05ef6248d0a91ec486fc35
['8d3809991e25421f917e75edf86fac8d']
<PERSON> I tried but it didn't do what I need. It just writes every move I make. And I need to choose pdf files, click on them, and convert to bitmap pdf. Or is it possible to make a folder, and when one moves pdf files to that folder, it automatically convert them to bitmap pdf?
9649928e0cf08756dee6fc240c5ae9a0151a5dd9baec716593562985a346fc77
['8d3809991e25421f917e75edf86fac8d']
I have a lot of pdf files with different type of data in it: text, images, stamps etc. And I need to convert them to look like it's a scanned pdf, i.e. bitmap pdf. I need the same file with the same name in the same folder, but as a bitmap pdf. To do so I: First open pdf file I want to convert in preview. Convert that file as tiff. Then open converted tiff file in preview. Convert it back to pdf. How to automate this process with Automator?
8f38f3e9e3dbbca94d3d33e4e7d02cac1ca306c8f8d4fcf1fcbde99028313893
['8d47373d74d34e3f9d09d6413c455fa3']
Thanks, I read it twice and did not come to this conclusion. The "one line summary" is not grammatically correct, so I am not sure I understand it. But as far as I can tell you give a historical explanation and not an objective or rather time independent one. I asked here on the design site and not in history so I am not so much interested in the "how did this came to be" but rather "Is there a reason to do it today and if so, why?".
c18fca91b6046a13e0a16d1af74847abe6aba395ff7a7f833d2071f45a39bc2f
['8d47373d74d34e3f9d09d6413c455fa3']
Boot from a live cd like on of your ubuntu install cds and open a Terminal. Now mount one of your ubuntu partitions. Assuming /dev/sda7 is your ubuntu 11.10 partition you can accomplish this by issuing the following command as root user: sudo -s mount /dev/sda7 /mnt Now you can use chroot to change in the mounted operating system: chroot /mnt Now it should be easy to use grub-install: grub-install /dev/sda Now change to /etc/grub.d/ where you should find a script called 30-os-prober. This script will scan the hard disks for other operating systems and add them to the boot menu. Therefor as root you should execute this script: sudo /etc/grub.d/30-os-prober And as final step update your grub. update-grub Also i found this helpful site.
a38004501bab402ccf91dfd6aebd62849c331137430fb74f48bca4a2955cb74a
['8d62225bc193454a8c3be29b483013b7']
I am trying to understand how React, Babel and Webpack interact with each other, but I get the following error: Uncaught TypeError: Super expression must either be null or a function. The CSS is rendering just fine but the HTML isn't, though I was able to see it in the console (view image below). Any suggestions? package.json { "name": "react-raw", "version": "1.0.0", "description": "", "main": "index.js", "babel": { "presets": [ "@babel/preset-env", "@babel/preset-react" ] }, "scripts": { "start": "webpack-dev-server --open" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "react": "^<PHONE_NUMBER>", "react-dom": "^<PHONE_NUMBER>" }, "devDependencies": { "@babel/core": "^7.4.0", "@babel/preset-env": "^7.4.1", "@babel/preset-react": "^7.0.0", "babel-loader": "^8.0.5", "css-loader": "^2.1.1", "html-webpack-plugin": "^3.2.0", "style-loader": "^0.23.1", "webpack": "^4.29.6", "webpack-cli": "^3.3.0", "webpack-dev-server": "^3.2.1" } } index.js var React = require("react"); var ReactDOM = require("react-dom"); require("./index.css"); class App extends React.Component() { render() { return <div>Hello Christian!!</div>; } } ReactDOM.render(<App />, document.getElementById("app")); webpack.config.js const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); //installed via npm //const webpack = require("webpack"); //to access built-in plugins module.exports = { entry: "./app/index.js", output: { path: path.resolve(__dirname, "dist"), filename: "index_bundle.js" }, module: { rules: [ { test: /\.(js)$/, use: "babel-loader" }, { test: /\.css$/, use: ["style-loader", "css-loader"] } ] }, mode: "development", plugins: [new HtmlWebpackPlugin({ template: "app/index.html" })] }; index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>React Raw</title> </head> <body> <div id="app"></div> </body> </html>
21bc6dc96074c2836dfcf5b41d2a11daa6c8664199deb4b472c96f637dbc942e
['8d62225bc193454a8c3be29b483013b7']
In reference to my last issue with Hostgator and a Malware site. The site was running OpenCart and I found that the origin of the problem was within the back end of OpenCart, specifically under Settings > Server > Google Analytics Code with a suspicious domain in the text area. `<!-- startgoogle --> <script src="http://nam.su/google2"></script> <!-- endgoogle --></head>` Whoever did this to the site was able to login and manually enter the script in the poorly escaped and sanitize text area. Therefore making a mess. I just hope that I don't get banned from this site for publishing the link above but I think that someone may come across a similar problem and find this 'honest' mistake, useful. I am also interested in what's wrong with OpenCart's textarea.
a9c2f20da9e47c11ff6cb4e61d02ea3a52984042a603afa3a13da171fbc3c997
['8d6731117add4698b82b070ffed0957f']
There is an InvocationsPerInstance metric that shows the average number of invocations per instance when you use the 'Sum' statistic. https://docs.aws.amazon.com/sagemaker/latest/dg/monitoring-cloudwatch.html This blog post details how you would go about load testing your endpoint to find a good target value for InvocationsPerInstance to use in autoscaling: https://aws.amazon.com/blogs/machine-learning/load-test-and-optimize-an-amazon-sagemaker-endpoint-using-automatic-scaling/
5150764d37198eef30d6f7d03c1f036f9996b58c3dcfd8807bce5b708e3cc465
['8d6731117add4698b82b070ffed0957f']
You should ensure that your container can respond to GET /ping requests: https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-algo-ping-requests From the traceback, it looks like the server is failing to start when the container is started within SageMaker. I would look further in the stack trace and see why the server is failing start. You can also try to run your container locally to debug any issues. SageMaker starts your container using the command 'docker run serve', and so you could run the same command and debug your container. https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-code-run-image