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
9a7c94ef258066d7c542147216be2041009040aeb4f866ab974721607ea02f6c
['463a263b85f54af9887c2ab9f31aef8a']
I've been looking at this problem for a few weeks now, constantly running into the same problem. It's a bit of a complicated setup: I've got a category called "dossiers". I have also got a custom taxonomy "dossiers" which is used to group posts that are about the same news event or story. When someone creates a post, they can assign the post to certain dossier and then put it in the category for "dossiers". That way, all dossier-posts are filed under the same category while still having a way to separate stories from each other. I need the category page for the category "dossiers" to display all the custom taxonomy terms in the taxonomy "dossiers". These, in turn, link to their own listing of that particular dossier. I created the category-dossiers.php file which replaces the default category page, so that's not a problem anymore. Using other forum posts, particular this one, I have gotten the bulk of the problem figured out. The category-page shows all taxonomy terms, with links and everything, and can split them up into pages. (This is a bit hacky because WordPress normally doesn't use terms as the main content blocks, but posts). My only problem right now is to get the second, third, etc. page working. Beyond the first page it just displays the default index.php file of my theme. Here is the full template page. Can anyone figure out what's wrong with it? I've tried and tried but just can't seem to find the problem. <?php get_header(); ?> <?php get_sidebar (); ?> <section class="articles grid main-content category"> <header class="grid-header"> <h2><?php single_cat_title();?></h2> </header> <?php if ( get_query_var( 'paged' ) ) { $paged = get_query_var('paged'); } else if ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); } else { $paged = 1; } $per_page = 20; $number_of_terms = count( get_terms( "dossiers") ); $offset = $per_page * ( $paged - 1) ; // Setup the arguments to pass in $args = array( 'order' => 'ASC', 'orderby' => 'menu_order', 'offset' => $offset, 'number' => $per_page ); // Gather the terms $terms = get_terms("dossiers", $args); $count = count($terms); if ( $count > 0 ){ echo "<ul>"; foreach ( $terms as $term ) {?> <li class="article"> <a href="<?php echo get_term_link( $term ); ?>"> <? if ( get_field('banner', $term->taxonomy._.$term->term_id) ) { // check if the post has a Banner Image assigned to it. $image = get_field('banner', $term->taxonomy._.$term->term_id); echo '<img class="wp-post-image" src="'.$image[sizes]['thumbnail'].'" />'; } else { echo '<img class="wp-post-image" src="' . get_bloginfo( 'stylesheet_directory' ) . '/img/missing-thumbnail.png" />'; } ?> <div class="meta-info" /> <div class="caption" data-category="<?php $category = get_the_category(); echo $category[0]->slug; ?>"><?php echo $term->name; ?> </div> </div> </a> </li> <?} echo "</ul>"; } ?> </section> <nav class="pagination"> <?php if($terms) { $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '/page/%#%', 'current' => $paged, 'total' => ceil( $number_of_terms / $per_page ), // 3 items per page 'type' => 'list', 'mid_size' => 5 ) ); } ?> </nav> <?php get_footer(); ?>
63b67eb1b9452c9f067e03ec573ee220fca94cccdf5277b6fe86daf1889fd96d
['463a263b85f54af9887c2ab9f31aef8a']
I'm working on a website that uses html5's push- and popstate in combination with ajax-calls to create a website that dynamically loads in Wordpress posts and pages, without causing a page refresh. I've got that working fine, but I would love it if the black Wordpress toolbar/adminbar that shows at the top of the site when you're logged in as an admin, also reflected the change of content. Is there any way at all to make this happen? So that when I go from a post to page, for example, the "edit" link in the admin bar updates. I don't think it's as easy as I hope it is, and if it can't be worked out I think I'll just disable the adminbar on the front-end. But it could be that I'm missing something. Thanks in advance!
d251a04761cb127390c5cf2512bebbeab2f555619301a8fde3aaff087766583f
['464dc85fa79b4077be6d6e1bd5ad01a1']
from the login requiered decorator docs it says: By default, the path that the user should be redirected to upon successful authentication is stored in a query string parameter called "next". and usually when the login is done it take to the "next" url Here's what django.contrib.auth.views.login does: If called via GET, it displays a login form that POSTs to the same URL. More on this in a bit. If called via POST, it tries to log the user in. If login is successful, the view redirects to the URL specified in next. If next isn't provided, it redirects to settings.LOGIN_REDIRECT_URL (which defaults to /accounts/profile/). If login isn't successful, it redisplays the login form.
89a7cdac406d4fb02e1bf850d275757239bec78ead599dc5dae606bf7b8a82ba
['464dc85fa79b4077be6d6e1bd5ad01a1']
In fact python has a bug on the ..multiprocessing/forking.py module the reason is this: When the program is running as a Windows service, but is not packaged into a single executable, main_path will become the path to the service executable (typically, pythonservice.exe). When this data makes it to the child process, the prepare() function will treat main_path as a path to a python module, and will try to import it. This causes it to fail. you can find the patch here or download the whole file from here
e31ade80f77211ced8aa884d514ca7ac04fc7c47078fed0fb67936215b0ce666
['465034db281e4bd7b2a17a8bc950ea11']
For Android versions >= Oreo (API Level 26), you will have to create Notification Channel as below: if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { NotificationChannel channel = new NotificationChannel("General", "General notification", NotificationManager.IMPORTANCE_DEFAULT); channel.setVibrationPattern(new long[]{1000, 1000, 1000, 1000, 1000}); AudioAttributes attributes = new AudioAttributes.Builder() .setUsage(AudioAttributes.USAGE_NOTIFICATION) .setContentType(AudioAttributes.CONTENT_TYPE_SPEECH) .build(); channel.setSound(Settings.System.DEFAULT_NOTIFICATION_URI, attributes); mNotificationManager.createNotificationChannel(channel); }
a637645bcd5d46e19b2c700e350979a9c4bdf99bbef906f219432b68a68fefa9
['465034db281e4bd7b2a17a8bc950ea11']
You can use Glide for that which is far better in memory consumption than compared to other libraries. Also, it provides the diskCacheStrategy, imageResizing, centerCropping, placeholder for the image if not available and can set error image or message if error loading image occurs. Below is the latest dependency you can include in you app level build.gradle file: implementation 'com.github.bumptech.glide:glide:4.7.1'
2b39ec0f6c2ea31ebcb992fccc97cf83d9137716e99d38c86733c2284cb11607
['465469098564406bb7da4dc0082b56b1']
0000 is 0, 0001 is 1, 0010 is 2. Depending on the position of the bit from the right side of the binary number, that bit equals to 2^(p - 1) where p is that position. For example 0010 the 1 is the second bit from the right. 2^(2 - 1) = 2^1 = 2. 111 is 2^3 - 1 because 1000 is 2^3 and 111 is one unit less than 1000, therefore being 2^3 - 1. By the way, in python you can use 0b as a token for binary values. x = 0b111 y = 2 ** 3 - 1 print(x == y) >> True And the int() function can be used to convert binary strings x = int("111", 2) # Base 2 y = 7 print(x == y) >> True
e773a2b4938947dc9cf487bfb9098662a680759f9e934067f541527d543805f8
['465469098564406bb7da4dc0082b56b1']
Containers in python, including lists, tuples, dictionaries, sets and strings(which contain characters), are always True when they contain one or more elements and always False when they are empty. Basically, this is used to check if the container has any elements before doing something. Example: food_in_the_plate = [] if food_in_the_plate: eat(food_in_the_plate) else: grab_food()
a4aedc9d3023ce4d7795a9e15ca6fc93c25254c6fbf4cdd8b79d4ff2595d6e10
['46549bd9c6b94bf3a245c3df60acc4fb']
create table parent(...); create table child1(...) inherits parent; create table child2(...) inherits parent; create table child3(...) inherits parent; I want create a trigger for 'parent' and when I insert on child1 or child2 or child3 this trigger must automatically executed. but seems didn't work, I must create a trigger for each child. any solution for postgresql 9 ?
53238b6903a15459bad7f9afb6fb2fb11c515a5e7796da9c31a51c007e1b6649
['46549bd9c6b94bf3a245c3df60acc4fb']
I open MySQL connection in the beginning of script.php, there is a lot of code like opening files and query database, I close connection in the end of script Conn<IP_ADDRESS>disconnect(); I want call this function if an error is raising (fatal error for example) during the execution of script, and I can't handle all errors manually by try catch.
4444c945f346d6764039c23510a883707d81788bc99924fa5c987f0a9ef1c5b2
['4656a68eeeb14e9fb12d4068807b56ec']
I am using Flutter's CustomPaint to draw a scatter plot the user can add points to by tapping. Since the whole chart cannot fit on a mobile screen, I want the user to be able to pan. How can I enable this? Currently, the chart is not panning, so I can only see a section of it. Here is my code: import 'dart:io'; import 'dart:ui'; import 'package:flutter/material.dart'; class Draw extends StatefulWidget { String eventName; Draw({this.eventName}); @override _DrawState createState() => _DrawState(); } class _DrawState extends State<Draw> { List<Offset> points = List(); @override Widget build(BuildContext context) { return Scaffold( body: GestureDetector( child: CustomPaint( size: Size.infinite, painter: DrawingPainter(), ), ), ); } } class DrawingPainter extends CustomPainter { DrawingPainter(); Paint tickSettings = Paint() ..strokeCap = (Platform.isAndroid) ? StrokeCap.butt : StrokeCap.round ..isAntiAlias = true ..color = Colors.grey ..strokeWidth = 5.0; static double axisXCoord = 60; static double axisHt = 1000; var ticks = List<Offset>.generate(10, (i) => Offset(axisXCoord, i * (axisHt / 10) + 30)); @override void paint(Canvas canvas, Size size) { canvas.drawPoints(PointMode.points, ticks, tickSettings); } @override bool shouldRepaint(DrawingPainter oldDelegate) => true; } (Note, I also saw Google's Flutter Charts library, but my understanding is that interactivity is limited to a few things like selecting existing points on the chart.)
09118abc0fca31d69df8a1c85204893bf4518f16f9a3279d2b73891eb1ce06e3
['4656a68eeeb14e9fb12d4068807b56ec']
If I use the online Try Flow tool and simply write document; I get the error "Cannot resolve name document." How can I get it to recognize DOM objects like document, window, and other objects that are present in the browser? Is there a libdef I need to import? I clearly see that Flow has a dom.js but how would I reference that?
57c66970706598ad0cfc5a957d5cb614ebdf0225a1cc7d1bc7893dce85f8781b
['465a6ae865a44062a21c3ad33ff849e0']
I have a table where the table has a category field is array value LIKE : |-----------------------------------| |post_id | name | category_id | ------------------------------------- |1 | test1 | 1,2,45 | |2 | test2 | 2,7 | |3 | test3 | 7,13,56 | |-----------------------------------| From drop down select box if i select CATEGORY ID 2. i should get the result of TWO ROWS. because post_id 1 and 2 have 2 in category_id. i don't know how to do query for it. i struggled a lot. please help me out. Thanks in advance.
da2442398837018b90ba792eedaa58b68c416eca525a841b1bbbcd0c2d2695a7
['465a6ae865a44062a21c3ad33ff849e0']
I am using PHP Mailer for sending mail. It works perfectly sending plain email(default) but the mail should have some sort of HTML & CSS in it. so I would like to design a template on which the mail has to send. now it is not working for me and i don't know where to change or add a email template for mailing. Kindly give your ideas. Thanks in advance...
b0e478a23e42bf0df3967f9a178d89ec59287038a683a656c320a0a9f6970400
['465b8232ac164ffba496008cc5b36d91']
Your code isn't committing the change to quantity to the database. You need add something like: @line_item.save So then your code would look like: def destroy @cart = @line_item.cart if @line_item.quantity > 1 @line_item.quantity-=1 @line_item.save else @line_item.destroy end respond_to do |format| format.html { redirect_to @cart } format.json { head :no_content } end end
6a33928dd4f6952924d3e1f513bc6048da883735a33aa4a019087202b2495105
['465b8232ac164ffba496008cc5b36d91']
Are you trying to use foo as a constant? If so, you can set it and then reference it as: class ModelName FOO = {'one' => 'ONE', 'two' => 'TWO'} end ModelName<IP_ADDRESS>FOO['one'] An alternative to keep the reference as you have it: class ModelName def self.foo {'one' => 'ONE', 'two' => 'TWO'} end end
e598c3ac894fcc07e0b1f71e7a237a7e1db5cf61bb1b9d1c0ab1e0c2906e0d1e
['467d217da99f49eda1aa56c250e6c36d']
Highcharts demos have an example of Stacked and Grouped column chart.Refer following fiddle: https://jsfiddle.net/amrutaJgtp/aqpp99uq/ plotOptions: { column: { stacking: 'normal' } } I would like to group the series in a column chart having multiple series and show space between the groups. In reference to above example, <PERSON> & <PERSON> series should be grouped together and <PERSON> & <PERSON> should be grouped together, with spacing between the 2 groups for distinction of the groups. I have tried one solution by adding dummy series with empty data between the series to be grouped and not showing it in legend. Refer following JS fiddle : https://jsfiddle.net/amrutaJgtp/aqpp99uq/2/ { //Dummy series with empty data defined to show the gap between 2 groups name: 'Temp', data: [], stack: 'male', showInLegend: false } Is there any way to achieve this result of grouping series in column chart and add space between the groups, without creating the dummy series with empty data? Or can highcharts provide any attribute to achieve the same?
56d719862998f43ded8fcf0e990f9b7fa31ec63f3eef54e947fb783f3a4ff801
['467d217da99f49eda1aa56c250e6c36d']
Currently, on enabling the legend of sunburst chart in Highcharts, single series label is seen in legend. Refer following JSFiddle: http://jsfiddle.net/amrutaJgtp/7r8eb5ms/6/ Highcharts pie chart legend shows the all the category labels in the legend. Refer following Pie chart legend: http://jsfiddle.net/amrutaJgtp/wgaak302/ series: [{ name: 'Sales', colorByPoint: true, showInLegend: true, data: [{ name: 'Consumer', y: 2455 }, { name: 'Corporate', y: 6802 },{ name: 'Home office', y: 9031 }, { name: 'Small Business', y: 5551 }] }] Is it possible to show all the data points of the sunburst series or atleast the categories - Consumer, Corporate, Home Office, Small Business in legend?
d87e2c6350e3e899c3642b567d10ac8ee0ec0f03922dd5a718034ac1dca146a9
['46acb4513a95445c9139f31bbab11d4c']
I was looking at the Python Manual and found this snippet for a Fibonacci-Number generator: def fib(n): # write Fibonacci series up to n a, b = 0, 1 while b < n: print(b, end=' ') a, b = b, a+b print() The output is dependent on n and returns a valid Fibonacci sequence. If you remodel this to use the variables "a" and "b" seperately like so: def fib(n): # write Fibonacci series up to n a = 0 b = 1 while b < n: print(b, end=' ') a = b b = a+b print() then it will print a number sequence that increments by the power of 2 (e.g. 1, 2, 4, 8, 16 and so on). So I was wondering why that happens? What is the actual difference between the two uses of variables?
1f06808d67ab6a20448918fd8141310983532863380ff70826b64855717c26c6
['46acb4513a95445c9139f31bbab11d4c']
I'm not sure if you are already using the VueJS devtool extension, but you should definitely use that in your overall workflow as well. Available for Chrome and Firefox. The reason I'm advising to use this is simply that sometimes your code might be correct, but as it is written in your error example "Cannot read property 'poll' of undefined" it looks like the prop poll is not being filled correctly by the parent component, or whatever is pushing data to the PollHeading.vue file. With the Vue devtools you can inspect data, props and computed properties of a single component, watch events as they unfold and visually follow data streams throughout your application. Escpecially with complex transfers of data this can get a little out of hand and a good tool to visualize this is a real life saver. That said, getting explicit line numbers of an error in Vue2 is kind of a hit or miss situation; with Vue 2.5 and onward you're able to place an errorHandler() hook inside your component that will give you a detailed stacktrace. Try placing one in the PollHeading.vue file and see what output it'll give you. Should be much more detailed than the default output you got.
4f21e1ef3e0694ac547a19bd93677abed666d3ff32f71a734ef77ebb50234b14
['46b93552e23c486fa996f1207238eef7']
Can anyone spot why the ShowVideo click event won't fire to make the JQueryUI dialog show? I'm sure it's something relatively simple that i'm overlooking. Here is my page's relevant code: <!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 runat="server"> <title>Test</title> <link rel="Stylesheet" type="text/css" href="Styles/Site.css" /> <link href='http://fonts.googleapis.com/css?family=Raleway:400,600,900' rel='stylesheet' type='text/css' /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <script type="text/javascript"> $(document).ready(function () { $(function () { $("#dialog").dialog({ autoOpen: false }); //Hide the modal on page load. }); $("#ShowVideo").click(function () { $("#dialog").dialog("option", "show", "slow"); // Should show the MF'ing dialog but never gets hit! }); }); </script> </head> <body> <h2Links</h2> <ul class="SidebarMenu"> <li id="ShowVideo">Test Popup</li> </ul> <div id="dialog" title="Test"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> </div> </body> </html> Quick JS fiddle to demonstrate: http://jsfiddle.net/Lnp9v/
1b9643a69cf214363b6034f1229137ecc46e677e1568b80d73731f2d379341ed
['46b93552e23c486fa996f1207238eef7']
System.windows.forms.Button is the same as declaring Button. You just already have the System.windows.forms namespace imported. This is unless you have created your own button class in a different namespace, but I doubt you have. The brackets after the name of the class will create an array of undefined size of that class. No brackets is creating one instance of that class. The new keyword is required when creating new instances of a control. Without it, the variable you created will need to be assigned to an existing object of the same type. Seeing as you are wanting to create buttons programmatically, you should use the new keyword. Have a look at these tutorials for a basic introduction to creating classes http://www.homeandlearn.co.uk/net/nets11p2.html http://visualbasic.about.com/od/quicktips/qt/shared_member.htm
978c4c3429e34c57e72ca07e129ba8686a27e382c4f2e23709c3c22cd91597e1
['46e79801e0c2447cbf5ee1f0f49a471c']
Basically you will start from the parent directory which contain all of the sub-directories, read all of the sub directories no need to go at child level, which you read first sub-directory than unlink() that directory, it should automatically delete all of the child directories. one by one it will delete all of the main sub-directory, you have use some recursive way for this.
ead795aae225b510dc83eca4c728a43060e2b75fe84a184283a91d1b56254339
['46e79801e0c2447cbf5ee1f0f49a471c']
So, I was able to track the actual issue, code was not the real issue, main was environment variable were not set, after setting these things starting running smoothly, you can set the environment variable in Window 10 as following, ;C:\Program Files\PostgreSQL\10\bin ;C:\Program Files\PostgreSQL\10\lib Please note: On windows 10, if you follow this: computer => properties => advanced system settings=> Environment Variables => System Variables> select PATH, you actually get the option to add new row. Click Edit, add the /bin and /lib folder locations and save changes. After that you will face the issue of "invalid password" "password prompt", to avoid this just use SET PGPASSWORD=P0stgres& like below, <?php print_r(exec('SET PGPASSWORD=yourpassword pg_dump -U postgres -h localhost -d mydb -f "C:\\backup\\backUp.sql" 2>&1'));?> if above didn't work than put & after yourpassword. <?php print_r(exec('SET PGPASSWORD=yourpassword& pg_dump -U postgres -h localhost -d mydb -f "C:\\backup\\backUp.sql" 2>&1'));?> Many thanks to below questions to over come the issue finally :) Postgres "psql not recognized as an internal or external command" Setting PGPASSWORD environment variable for Postgres (psql) process executed by Inno Setup
5e6943d78657367b766922e53d78b8e7e18f8460890952cd282421a5b9bbe4dc
['46ea0c57a3c34a99aaecd12fe6de2315']
Good news: Your algorithm works fine. In Java, arrays are passed by reference, not by value. What this means is that when you set int[] arr2 = doInsertionSort(arr1);, the array arr2 is being set to the result of your doInsertionSort method, which returns its input parameter after sorting it. Basically, arr1, arr2, arr3, input and input2 are all pointing to the very same array. You have two easy options to fix the fact that you're printing: Restructure main() so that you use one array: print its contents, sort it lowest to highest, print its contents again, sort it highest to lowest, then print its contents again. (This is probably what your instructor intends for you to do, if this is coursework.) Make a copy of the input parameter to operate on. You can do this with System.arraycopy() like so: int[] myArray; System.arraycopy(input, 0, myArray, 0, input.length ); Then, for option 2, you would need to edit your method to use myArray instead of input for every other time you use input. As a note, you don't need to call your variables input2, temp2, etc. Just like i, j and k go out of scope and are forgotten after the end of a for loop, your variables input and temp mean nothing outside of the block you declared them in. Hope this helps!
e4127740d73a9de3858e5f2c709561f61d752d26a4bac5988ad7aa082b608ceb
['46ea0c57a3c34a99aaecd12fe6de2315']
The error is on this line: if ((i/(num_tasks-1)) % 5): Because ((i/(num_tasks-1)) % 5) is not a boolean value, your if statement will not behave properly. Here is some more information about the truth values of different primitive types in Python. Try this instead: if i/(num_tasks-1) % 5 == 0:
178390369d3cf7322c84d63821ad08e3fa4d4e62891f583dcf604ee5bced4d46
['46f8ccb780f846cab949f55965ec51ca']
I was looking at a notebook someone posted for a Kaggle competition. They use lightgbm with the number of leaves set to 40. If I understand right, that's setting a limit on the size of the weak learners (decision trees) that are used in the boosting; the trees can't have more than 40 leaves. However, after training, we see that the feature with the greatest feature importance is a categorical variable with 1000+ categories! If a branch were ever used in a decision tree for that variable, wouldn't it necessarily have at least 1000+ leaves? How is this situation handled? When the number of leaves on the weak learners is smaller than the number of categories within one of the variables?
c0d7cadaef973fa27a12cd031c0ca13b705128ae25d359ee1bbbef9467bfe8b3
['46f8ccb780f846cab949f55965ec51ca']
If it helps for context I came up with this question while working on a system where you have multiple ways to produce sets of n items at a time to return within a rest API, I'd hope though that this isn't too important to the question here
843306609f52315fa3c06f17781a5a6806f123e4aa2d851e7ae24c5c47b889b8
['4703457ae6e2496e8bf393e221580e16']
why would they add this feature when they suck at adding features... i was happily editing my page until i realized there was no save button, then i restored it to find out the page wasn't even editable because someone else had it checked out the whole time... when are they going to add the feature that makes SharePoint blow me D:
d9174db3a5763ce3d09ceb6b468c62074b8d0c4548fb01f8c8d111b24a7b493e
['4703457ae6e2496e8bf393e221580e16']
I am solving a problem in the Kaggle learn section : https://www.kaggle.com/c/facial-keypoints-detection The problem involves detecting facial keypoints in a 96x96 image, some 30 features are detected. It is a supervised dataset. I am using a convolutional neural network with max pooling, 2 convolutional layers and 2 max pooled layers, and one fully connected layer. The problem uses the rmse metric for scoring. So i used an ADAM optimizer to minimize the rms loss. CASE 1: I just simply trained the model, i got an average training rms error of 11.2, and finally when the output is generated I clamp the values which are greater than 96 (It's a 96x96 image) to 96, i get a test rms error of 9.1. CASE 2: I train the model itself with the clamped output values, i.e any output of greater than 96 gets clamped to 96 while training. I thought CASE 2 would lead to faster and better convergence. I used the same hyper-parameters for CASE 2 and found that it is converging more slowly and gives a very high rms error of around 180. Can anyone explain what is happening?
004f699f48f1fd8f3432289500b2f4f13bb565240b060ab62b16d96e2c149243
['4703653248724665a207d6dd2e44e7a3']
I am creating a module for redirect login/register success to checkout if customer has some items on quote but that's not working. If I stop the event with that die; on Observer/Redirect.php above that redirect works, but I need continue for merge quotes. events.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="customer_login"> <observer name="lima_customer_login_redirect" instance="Lima\CustomerLoginRedirect\Observer\Redirect" /> </event> </config> /Observer/Redirect.php <?php namespace Lima\CustomerLoginRedirect\Observer; use \Magento\Framework\Event\Observer; use \Magento\Framework\Event\ObserverInterface; use \Magento\Quote\Model\QuoteFactory; use \Magento\Framework\Controller\ResultFactory; use \Magento\Framework\View\Element\Context; class Redirect implements ObserverInterface { protected $_objectManager; protected $_quote; protected $_responseFactory; protected $_url; protected $_scopeConfig; public function __construct( Context $context, QuoteFactory $quoteFactory, \Magento\Framework\App\ResponseFactory $responseFactory, \Magento\Framework\UrlInterface $url ) { $this->_quote= $quoteFactory; $this->_objectManager = \Magento\Framework\App\ObjectManager<IP_ADDRESS>getInstance(); $this->_responseFactory = $responseFactory; $this->_url = $url; $this->_scopeConfig = $context->getScopeConfig(); } public function execute(Observer $observer) { $module_status = $this->_scopeConfig->getValue('customer_login_redirect/redirect/status', \Magento\Store\Model\ScopeInterface<IP_ADDRESS>SCOPE_STORE); if($module_status){ $cart = $this->_objectManager->get('\Magento\Checkout\Model\Cart'); $quote = $cart->getQuote(); $totalItems = count($quote->getAllItems()); if($totalItems > 0){ $redirectionUrl = $this->_url->getUrl('onepagecheckout'); }else{ $redirectionUrl = $this->_url->getUrl('/'); } $this->_responseFactory->create()->setRedirect($redirectionUrl)->sendResponse(); // die; return $this; } } } Thanks.
3d3b45f5b9f3b7d108c76c2036fcab6459b7fd22908b7017ee8823e1dc3a942f
['4703653248724665a207d6dd2e44e7a3']
a small note (that wasn't obvious to me before, but was suggested by another person): the IP isn't kept on-site in the db to match against (as i thought), apparently the following is hashed - uid + stored passwd hash + ip salt and made into 1 'pass' field cookie
7e366bc9cc77e82214de7761a17186718bb807ede9011fa5c9539deada5d2f32
['4707468ae88142f89dec6dcdade30bdd']
laravel 4 application with many forms, In the below example, how to make function validate load the $register rules if the value of $form is register class Validation { private $register = array( "nick" => "required|min:2", "name" => "required|min:2", "surname" => "required|min:2", "day" => "required", "month" => "required", "year" => "required", "country" => "required", "address" => "required", "city" => "required", "postalCode" => "required", "email" => "Required|Between:3,64|Email", 'password' =>'Required|AlphaNum|Between:6,32|Confirmed', 'password_confirmation'=>'Required|AlphaNum', "currency" => "required", "language" => "required" ); private $support = array( "text"=>"required", "subject"=>"required" ); public static function validate($input,$form) { return Validator<IP_ADDRESS>make($input, $form); }
a4f472ac191b1a86d0fa5e44d95c92959da03ac3a7c381efb0dc7e00fe6e3897
['4707468ae88142f89dec6dcdade30bdd']
I'm sure this is very simple - I just need two columns from a country database to populate a <select> Looking at this URL I came up with the code below, but this seems to return an object for each record http://laravel.com/api/class-Illuminate.Database.Eloquent.Model.html#_all class countries extends Eloquent { } public static function getCountrySelect() { return countries<IP_ADDRESS>all(array("name","iso_3166_2")); }
6459703fe19cb7579d20ea92177a46e38e2efa7cb5a76ae2e4d8bda7ab9acfeb
['47096dac13fb4ea6a56fce19f4333e68']
I would like to create a sales order with reference to a sales contract using the S/4HANA Cloud SDK. I do not see a get/set method for ReferenceSDDocument at the header- or item-level in the com.sap.cloud.sdk.s4hana.datamodel.odata.namespaces.salesorder.SalesOrder class, even though it is shown in the sample JSON-body in the POST of /A_SalesOrder in the API Hub. Not sure if I should be somehow using the SalesOrderField class, or something else ... or should be switching to the SOAP API.
633e6cb5331786f58897fc2996326a191c7f6ba18eb55229c505faddf6a99506
['47096dac13fb4ea6a56fce19f4333e68']
I used HANA XS on SAP Cloud Platform Neo to create a HANA DB and expose it via OData - unable to POST using Postman. I get a 400 - Bad Request - "Syntax error at position 0." Here is the .xsodata file contents: service{ "com.******.jereclass<IP_ADDRESS>JeReclassHistory"; } Here is the .xsaccess file contents: { "exposed": true, "authentication": [{ "method": "Form" }], "mime_mapping": [{ "extension": "jpg", "mimetype": "image/jpeg" }], "force_ssl": false, "enable_etags": true, "prevent_xsrf": false, "anonymous_connection": null, "cors": [{ "enabled": true, "allowMethods":["GET","POST"] }], "cache_control": "no-cache, no-store", "default_file": "index.html" } Here is the .hdbschema file contents: schema_name = "JE_Reclass"; Here is the .hdbtable file contents: table.schemaName = "JE_Reclass"; table.tableType = COLUMNSTORE; table.columns = [ { name = "Department"; sqlType = VARCHAR; nullable = false; length = 20; }, { name = "MapName"; sqlType = VARCHAR; nullable = false; length = 30; }, { name = "FiscalYear"; sqlType = VARCHAR; nullable = false; length = 4; }, { name = "Period"; sqlType = VARCHAR; nullable = false; length = 3; }, { name = "RunID"; sqlType = VARCHAR; nullable = false; length = 30; }, { name = "PostingDate"; sqlType = DATE; nullable = false; }, { name = "FromDate"; sqlType = DATE; nullable = false; }, { name = "FromTime"; sqlType = TIME; nullable = false; }, { name = "ToDate"; sqlType = DATE; nullable = false; }, { name = "ToTime"; sqlType = TIME; nullable = false; }, { name = "CreateBy"; sqlType = VARCHAR; nullable = false; length = 12; }, { name = "CreateDate"; sqlType = DATE; nullable = false; }, { name = "CreateTime"; sqlType = TIME; nullable = false; } ]; table.primaryKey.pkcolumns = ["Department", "MapName", "FiscalYear", "Period", "RunID"]; ****Postman:**** POST /com/*******/jereclass/JeReclassHistorySvc.xsodata/JeReclassHistory HTTP/1.1 Host: jereclass******.us3.hana.ondemand.com Content-Type: application/json Authorization: Basic ************** User-Agent: PostmanRuntime/7.18.0 Accept: */* Cache-Control: no-cache Postman-Token: *********************** Host: jereclass******.us3.hana.ondemand.com Accept-Encoding: gzip, deflate Content-Length: 456 Cookie: ***************************** Connection: keep-alive cache-control: no-cache { "Department": "Payroll", "MapName": "TEST JE RECLASS", "FiscalYear": "2013", "Period": "01", "RunID": "20130112134231-SCURRY", "PostingDate": "2013-01-12T00:00:00.0000000", "FromDate": "2013-01-01T00:00:00.0000000", "FromTime": "PT1H10M54S", "ToDate": "2013-01-12T00:00:00.0000000", "ToTime": "PT13H42M30S", "CreateBy": "SCURRY", "CreateDate": "2013-01-12T00:00:00.0000000", "CreateTime": "PT14H5M7S" }
a196c62e3a062d35f2803ef2fd95e1cde71a08ff9c173faece0c6364a1cfb37e
['470a254469644a9e9289ba09e3e01e34']
I was trying to make my cpu fan less noisy, at first pwmconfig didn't showed my anything after following a small guide it worked but I still don't know how to decrease the RPM. Now I notice that sensors shows me following: it8728-isa-0a30 Adapter: ISA adapter in0: +2.22 V (min = +0.84 V, max = +2.32 V) in1: +2.22 V (min = +2.71 V, max = +0.48 V) ALARM in2: +2.02 V (min = +0.65 V, max = +2.52 V) +3.3V: +3.36 V (min = +6.00 V, max = +4.13 V) ALARM in4: +3.06 V (min = +2.74 V, max = +0.95 V) ALARM in5: +3.06 V (min = +2.29 V, max = +2.24 V) ALARM in6: +2.22 V (min = +2.50 V, max = +1.45 V) ALARM 3VSB: +3.29 V (min = +0.17 V, max = +2.16 V) ALARM Vbat: +3.22 V fan1: 2647 RPM (min = 631 RPM) fan2: 0 RPM (min = 85 RPM) ALARM fan3: 0 RPM (min = 28 RPM) ALARM temp1: -68.0°C (low = +22.0°C, high = +5.0°C) sensor = thermal diode temp2: +23.0°C (low = -87.0°C, high = -73.0°C) ALARM sensor = thermal diode temp3: -77.0°C (low = -11.0°C, high = +37.0°C) sensor = Intel PECI intrusion0: ALARM I'm worried about that -68°C and -77°C Have I messed with some configuration? How can I fix it? In Windows the fan has always been way quieter.. I was searching the internet but only found how to fix sensors by runing sensors-detect which I already did. Sorry for my bad english and I hope you can help me :)
f5309e3276dc847a2e8ee52218e02bdef9b3b98f6fbdd0c9682c1d9fa82fb48b
['470a254469644a9e9289ba09e3e01e34']
SSD is connectes via SATA. He tried to only clone windows C:\ but not D:\ as the SSD is smaller than his HDD. I'm not sure which partitions exactly he tried to clone. Furthermore I don't care for now weather it gets re-partitioned as UEFI or Legacy drive, I just need it to get to a state where I can advance on my own, so just give me any.
025495269534fad4ab390d79d58be98441c014674f1e3c216d481c1c211decfb
['470a7a29acf743ec96aec1f638a7e4a6']
thanks guys! but I also got a working solution on this: http://codepen.io/kevkev/full/meebpQ/ $(document).ready(function () { $("#art").click(function () { $("#art_pop").fadeIn(300); }); $(".pop > span, .pop").click(function () { $(".pop").fadeOut(600); }); }); ;(function($) { $.fn.unveil = function(threshold, callback) { var $w = $(window), th = threshold || 0, retina = window.devicePixelRatio > 1, attrib = retina? "data-src-retina" : "data-src", images = this, loaded; this.one("unveil", function() { var source = this.getAttribute(attrib); source = source || this.getAttribute("data-src"); if (source) { this.setAttribute("src", source); if (typeof callback === "function") callback.call(this); } }); function unveil() { var inview = images.filter(function() { var $e = $(this); if ($e.is(":hidden")) return; var wt = $w.scrollTop(), wb = wt + $w.height(), et = $e.offset().top, eb = et + $e.height(); return eb >= wt - th && et <= wb + th; }); loaded = inview.trigger("unveil"); images = images.not(loaded); } $w.on("scroll.unveil resize.unveil lookup.unveil", unveil); unveil(); return this; }; })(window.jQuery || window.Zepto); /* OWN JAVASCRIPT */ $(document).ready(function() { $("img").unveil(200, function() { $(this).load(function() { this.style.opacity = 1; }); }); });
117b827dd510371100effbbd74293160344bca61d99acb87ce5dad29f9328f37
['470a7a29acf743ec96aec1f638a7e4a6']
I want to use OnePage Scroll like this: http://alvarotrigo.com/fullPage/ or http://schliflo.github.io/OnePageR/ the thing is: i just want that the first page scroll like this. after that it has to scroll normal. i want to put much content on the second section. so it need to scroll normally. how could i do this? if i put "overflow:scoll" on second section it scrolls normaly down but not up. need help, thanks
b16da0de4b7d0774fde732d91183d83dfc1427979e0c09a3e326f0f3f496e009
['471246e541b7495a84f17ab8506a6dd9']
Похожий вопрос уже имеет ответ вот [здесь](http://ru.stackoverflow.com/questions/418501/%D0%9F%D1%80%D0%B0%D0%B2%D0%B8%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9-%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80-ajax-%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0-%D0%B4%D0%BB%D1%8F-%D0%BE%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B8-%D1%84%D0%BE%D1%80%D0%BC%D1%8B-c-%D0%BF%D0%BE%D0%BC%D0%BE%D1%89%D1%8C%D1%8E-jquery-%D0%B8-javascript), тоже без перезагрузки
4300a406e38d29874369f90dd8fea3f79094d753985a421165e4ef8fe8174f6f
['471246e541b7495a84f17ab8506a6dd9']
I've had the same question, but from the other point of view. I wasn't aware of ifconfig (kinda new to this stuff). I think I got it working by doing it the other way round. I first had OS X share my internet over wifi (via sharing preferences) Then with ifconfig, you'll see that OS X creates a bridge100 (or something) I set the IP manually like you did on that bridge and then I add my network connection supplying the internet access. Not entirely sure whether it works perfectly, at first glance, everything works OK, but who knows....
3a1684044288c69e14688675383966f1111a23007a13968c8962344327b9e47d
['4712ae7085ba430d8017f86f2d197007']
import java.util.ArrayList; import org.apache.commons.lang3.RandomUtils; public class ArrayListToArray { public static Integer[] IncreaseArraySizeByOneElement(Integer[] oldArray){ int sizeOfOldArray=oldArray.length; int newSizeOfArray=sizeOfOldArray+1; Integer[] newArray=new Integer[newSizeOfArray]; for(int x=0;x<sizeOfOldArray;x++){ newArray[x]=oldArray[x]; } return newArray; } public static void main(String[] args) { ArrayList<ArrayList<Integer>> ListOfIntArray = new ArrayList<ArrayList<Integer>>(); for (int x = 0; x < 10; x++) { ArrayList<Integer> ListOfInts = new ArrayList<Integer>(); for (int y = 0; y < 5; y++) { ListOfInts.add(RandomUtils.nextInt(4800, 7000)); } ListOfIntArray.add(ListOfInts); } System.out.println("There are 10 ArrayList containing each ArrayList 5 elements "+ListOfIntArray); System.out.println("Let's put now above ArrayList of ArrayList into a single Integer[]"); Integer[] arrayOfMyInts = null; for (ArrayList<Integer> ListOfInts : ListOfIntArray) { for (int y = 0; y < 5; y++) { if(arrayOfMyInts==null){ arrayOfMyInts = new Integer[0]; } arrayOfMyInts=ArrayListToArray.IncreaseArraySizeByOneElement(arrayOfMyInts); arrayOfMyInts[arrayOfMyInts.length-1]=new Integer(ListOfInts.get(y)); } } System.out.println("Printing all elements Integer[]"); for(int x=0;x<arrayOfMyInts.length;x++) System.out.println(arrayOfMyInts[x]); } }
e45ec6a5c6e268e5cc213c2150e56bfb641589c5e5f82a97110be6b8f5969039
['4712ae7085ba430d8017f86f2d197007']
Following code works well for me: package com.test.api.api; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.Entity; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Response; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; public class GitHub { public static void main(String[] args) { ClientConfig clientConfig = new ClientConfig(); HttpAuthenticationFeature feature = HttpAuthenticationFeature.basic( "Your Email ID here", "Your Password"); clientConfig.register(feature); Client client = ClientBuilder.newClient(clientConfig); WebTarget webTarget = client.target("https://api.github.com").path( "authorizations"); String input = "{\"scopes\":[\"public_repo\"],\"note\":\"Ramanuj\"}"; Response response = webTarget.request("application/json").post( Entity.json(input)); System.out.println(response.readEntity(String.class)); } } You need to have following dependency in your pom.xml <dependency> <groupId>org.glassfish.jersey.core</groupId> <artifactId>jersey-client</artifactId> <version>2.22.2</version> </dependency> This code will print token in your console so you can use it in follow-on requests to github.com This is equivalent to OAuth 2 Authorization.
1da5555175ed90b79cb720ae40eae53b3f47818ea03eaedbb2ed08f6dbeffee0
['4714274397474d2ebec24f41ef1c89e0']
Googling this question is not giving me relevant searches so i'm asking here. I recently upgraded my laptop by switching the 1TB sshd with an 240 GB SSD , i got an hard drive enclosure and now i'm using the 1TB to store all my data like iTunes , few games , files etc . For some reason all my shortcuts(They get deleted automatically) and steam forgets that this drive is removable and i have to re add the steam library. What i want is for the external drive to permanently be visible in my pc but whenever i remove it , it should just become offline and not disappear(The drive should be visible even if its not connected. lenovo Y50 with latest stable build of win 10 External hard drive enclosure is a transcend
10d5868efe202b82217f00582bd2df2c42b55558a890a7408c2dfa0c9db12862
['4714274397474d2ebec24f41ef1c89e0']
I installed Ubuntu MATE 14.04 around a weak ago, and have had some problems. When I suspend the computer, it still drains battery faster than I think is correct. The battery is supposed to last around 8,5 hours, and after around 7 hours of suspending with almost full battery, it still turns of. I just checked for updates and installed them.
da61dbc94fb71a8c344e3e19716e819debdc182d0499f3230db05279cea81c65
['4716bb0fe12b452ab00c250b39f0f488']
Как я поняла проблема была в следующем: Вызывается функция tick() Вызывается функция color() из функции tick() Не попадая ни в одно из условий, вызывается функция color() из функции color() и возвращает какой-то результат в функцию color(), из которой была вызвана. Функция color(), которая была вызвана из функции tick(), дальнейших инструкций не имеет и возвращает undefined.
c7b6a28da6c5e8e87a4dc3520f0f4a57d13b773070f4eedc11bc94cc9bcfbb9b
['4716bb0fe12b452ab00c250b39f0f488']
Здравствуйте. Есть вот такая табличка, сверстанная на дивах: .table{ display:table; width:100%; } .row{ display:table-row; } .col{ display:table-cell; } .col:hover { border-bottom:2px solid #22a1c4; } <div class="table"> <div class="row"> <div class="col">Сезонность</div> <div class="col">Летние</div> </div> <div class="row"> <div class="col">Диаметр</div> <div class="col">13</div> </div> <div class="row"> <div class="col">Профиль</div> <div class="col">60</div> </div> </div> И мне необходимо сделать так, чтобы при наведении мыши подчеркивался весь ряд, а не только один столбец. Пыталась давать стиль классу row, но тогда border совсем пропадал.
97027b8082b3cf92a01c11f68e009ab947696a7c04412fc4c0d8cab19ba7e5ac
['4723169ea9584bf5900240589b5a6eb2']
Its important to define the problem correctly and then you can model it. I am bit confused reading the problem. If you are trying to predict value of Response variable SALES using Prediction variables like Price, Promo and / or Ad Placement then use Multiple Regression Model. Then you can try to fit it. On other-hand if you are developing a Forecasting Model for SALES for future then use Exp (Double) Smoothing, Winter Method and Arima model etc. If you are doing later and the results are not good then use esemble methods.
b6a6c51bc0271815b2d829c6e5c37d191649bab5e764e89dda7f8294ca7e8b5d
['4723169ea9584bf5900240589b5a6eb2']
How can I extrude edges inwards and keep same distance for all exuded edges? When I try to extrude (see pic 1) and press "s" all extruded edges have different offset from original (see pic 2) and I need extruded edges to have same offset distance from original. How can I do so?
b9f692831b2bdec6101c98ba6ddc9b2daccee6dad10581e38e3c5679643b83d2
['472326a0da4f43d092e05b30c212ea97']
The problem was that I wasn't specifying the app. Adding the attribute ng-app="WebApp" before the ng-controller attribute fixed the problem: <form ng-app="WebApp" ng-controller="AgentLoginCtrl" name="userForm" style="width: 300px; background-color: white; border: 2px solid rgb(142, 169, 222); padding: 0px 5px 5px 5px">
80db22acf3272f08e8bd4f7b0f8ccef0becb47ca6e49eca9b8c79c80e4e7ca10
['472326a0da4f43d092e05b30c212ea97']
I am using the AngularJS Eclipse plugin, and creating HTML templates for use in my project. It has a master Javascript which loads AngularJS and is included in the main page. However when I create the other template files (which are HTML fragments loaded via the AngularJS Routing directives) the HTML/AngularJS validator fails to resolve the controller name and generates an error in the Problems Tab. The code still works when run, but I want to ensure the validator doesn't throw these errors. Is there a way I can configure the AngularJS plugin to resolve these correctly, or can I somehow link them another way? In the project properties, the main JS file (home.js) is included in the JavaScript Include Path and in the Tern Script Paths. E.g., The ng-controller AgentLoginCtrl is not found in the below HTML (which is in its own file). It is defined in the global JavaScript file. How do I link these files together so that the name is resolved properly? <div ng-cloak layout="row" layout-align="center center"> <form ng-controller="AgentLoginCtrl" name="userForm" style="width: 300px; background-color: white; border: 2px solid rgb(142, 169, 222); padding: 0px 5px 5px 5px"> <div layout="column" layout-align="top left"> <h2 flex>Agent Login</h2> <md-input-container flex class="md-block" style="margin: 5px 0px 0px 0px"> <label>User Login</label> <input name="login" ng-model="user.login" autocomplete="username" required/> <div ng-messages="userForm.login.$error"> <div ng-message="required">User Login is required.</div> </div> </md-input-container> <md-input-container flex class="md-block" style="margin: 10px 0px 0px 0px"> <label>Password</label> <input name="password" type="password" ng-model="user.password" autocomplete="current-password" required/> <div ng-messages="userForm.password.$error"> <div ng-message="required">Password is required.</div> </div> </md-input-container> <md-button class="md-primary" ng-click="login(user)">LOG IN</md-button> <div class="ng-hide errorMessage" ng-show="loginFailed">Login Failed - Please try again</div> <div class="ng-hide errorMessage" ng-show="validationFailed">Input Invalid - Please correct and resubmit</div> </div> </form>
f7d8c5fd150469b6d23eea4753c96bea6b75e639198d6612caa71463626c5c98
['47301f02b25e4e07a4df0e35963b105b']
I am trying to solve a quadratic inequality with a parameter. I feel dumb as I don't know how to proceed. The inequality is as follows: $(a + c_1)^2 \le c_2$, where $c_1$, $c_2$ are constants and $c_2$ is negative and $a$ is a parameter of choice. Is there an analytical solution?
06ef1b0bae25e1170d11508387b7e2cc842db5f6ba0bd7baf046115e31e33493
['47301f02b25e4e07a4df0e35963b105b']
I've searched for this but I'm having some trouble following the answers from other threads. It's probably quite simple. I'm looking for an upper bound on the eucledian norm of a square,real, n x n matrix, A. The matrix is time varying, with the variables in this matrix are all bounded. How do I go about this? I am very mathematically rusty. Best Regards MC
9bee18e2be45751b850e3bd7ce334b19910f483f54323f2e146b67b47e3329be
['47392a637974413db51a1503bae72cce']
Point #2 is good - so, in this case, I should have just told that I wasn't aware without any further discussions. I need to work on point#4 more. Could you suggest on what steps I could take to make it clear to my boss that I will do what it takes to take care of stuff (except actually doing it?)
2c5742afc09ddab70c1c5a6fff67b3c65cd535a8dd2821447217c8a8ad586c99
['47392a637974413db51a1503bae72cce']
I have a web application running in an EC2 instance, served from example.com. Our home page, company info, etc. are currently part of the application, but we would like to move those things to a separately managed service — in particular, a WordPress site hosted by a third party. I'm looking for an AWS-managed solution to reverse-proxy the internal application and the external site on example.com, with requests directed to one or the other based on the URL path. I would use an ELB Application Load Balancer, but as far as I can tell it can't use an external domain or IP as a target (without setting up a direct connect, which isn't relevant here). It looks like CloudFront would do the trick with separate origins for the internal application and WordPress site, but this doesn't really seem like the right tool for the job. Is there an easy answer?
66f2d1fae5553470a93a728c0c756dce4aac530dd55aa183125a4eb8f7b71855
['474292934d464a5f89726bb10464b523']
I am designing a flashcard website for learning languages, right now I have a table for user login info, and a table for vocabulary. I have an area to test your knowledge for conjugation of verbs/adjectives/etc so I need to check for multiple readings, I can do this, but I need to save this data So I can have it that once you learn certain words to proficient level, you unlock more. Unfortunately, my knowledge of MySQL is limited so I'm unsure of how to do this without create an astronomical amount of entry. Basically for each item (vocab word) I need to save right/wrong percent for anywhere from 1 to 4 readings, and also a date for when the next review is due, and this is for EACH user, for EACH item. I'm not asking for anyone to just do all my work for me, but if someone could point me towards some information on how to go about storing such a large amount of data (fairly efficiently) that'd be great. Realistically it doesn't have to be enterprise efficientcy, as it'll just be me and maybe some friends using it (maybe like 100 users tops?) but it can't be horrible either :/
f3642f3da2dd6bf12425d40012438b2ce3be0a29834c751cb2c748d58c41749d
['474292934d464a5f89726bb10464b523']
I don't know if you're still working this out as you posted this over a month ago, but if you are, here's one option: If the document you're showing yours? If you have the ability to change the html code slightly this can be done fairly simply: First put this right above your class declaration: [System.Runtime.InteropServices.ComVisibleAttribute(true)] So that the browser can see your class. You also need to set your class as the scripting object for the document. ie: (only needs to set once) webBrowser1.ObjectForScripting = this; For the html you'd do something like: <input type=submit onClick="window.external.doSomething()"> And finally you'll need a public method in your class to call (obv): public void doSomething() { string whatever = webBrowser1.Document.GetElementById("inputA").InnerText; } I'm not that well versed with the webbrowser control, so if you are not making the web document yourself I'm afraid this won't work. Good luck
0b05dfb46363c2c17c41641344f94dfc5395106b4838ec5aaa9ee209f8437873
['47497180cef3468488bc8e80f3a7e856']
We have a build server VM which previously had 4GB of RAM allocated but that has now been reduced to 2GB, partially as an experiment to see if it runs just as well with less memory. I've been watching the memory usage in the Task Manager during a build to monitor how much memory is "In use" and it has not risen above 90%...which makes me suspect it's running just fine. But this started me thinking: What are they key metrics that would tell me a server has/has not got enough memory or would benefit from more? Is it as simple as looking at "In Use" memory over time? Or should I look at "Available"? Or look at the amount of paging? Should I setup alerts and what on? I suppose I'm looking for some insights into analysing server memory usage.
cc0afb999d26c7821d307900bea769476c4c6cbd236ab854fe3f6dd8108132d8
['47497180cef3468488bc8e80f3a7e856']
I thought about iSCSI although doesnt appear to be many target software packages to choose from. Once you export the disks as iSCSI are they locked down into exclusive mode? (this would be fine for me, just curious how it works, stopping disk being modified by a user on physical server etc)
d2b33f67efcbec61d8263f79b200e5d12acdebcb4b2026ee8e1a937af2715463
['474e959c68cb4e60b68d680a562a62b7']
I'm looking for a way of comparing two systems. We have an issue with one of them that appears to be identical to the other. Looking for a way to scan any tiny differences between them to help us track down the cause of the issue. We have looked at SysCompare which looks ideal, but for the odd use isn't a financially viable option. We've tried the free version and everything matches. Are there any windows tools for this sort of thing ? Is there an industry standard method for this sort of thing ?
522cdb4a229524900e5eb565f3bc079334341b30e1a590420493fd582cfee721
['474e959c68cb4e60b68d680a562a62b7']
@Rob In a local inertial frame you do not "feel" gravity. In fact a free falling body equation of motion can be mapped into another of the kind x'' = 0 i.e. no gravity force acting. If you live in a LIF you perceive a flat space so a null Riemann tensor but if you are from a curved space then you are able to define a LIF in which the derivative of connections are relevant (see eqs (3) and (4)). The point is "how do you match these two facts?". In my opinion, in order to test a non zero R. tensor you have to "use" a **scale distance** greater than LIF scale i.e. an infinitesimal scale.
e55996c1b6d5bc71f28e26339ff7b2cc7e934c4ad81b814426e0ae5f155a754e
['47543f5b25184dd0b0e7adb44ec51858']
#include <stdio.h> int main() { int array[8] = {4, 1, 5, 4, 2, 7, 4, 2}; int i, j, k; int len = 8; for(i = 0; i < len; i++) { for(j = i + 1; j < len;) { if(array[j] == array[i]) { for(k = j; k < len - 1; k++) { array[k] = array[k + 1]; } len--; } else { j++; } } for(i = 0; i < len; i++) { printf("%d ", array[i]); } printf("\n"); } return 0; } Hi, Above is the code to remove duplicated numbers in an array, but when compiles and executes, I get 4 1 5 2 7 2--which isn't right because I'm supposed to get 4 1 5 2 7. It seems that I have a problem with len but couldn't figure out where and what in the code specifically needs to be fixed.
64021a761235ed16af04c25e82f17ccbd5d30b67bc05122522bc674901c1425e
['47543f5b25184dd0b0e7adb44ec51858']
#include <stdio.h> #include <math.h> int main() { int i; int result; float f; while((result = scanf("%d", &i)) != EOF) { scanf("%f", &f); printf("%.0f %.0f %.0f\n", floor(f), round(f), ceil(f)); } printf("Done.\n"); return 0; } Hi, I just began with C and I'm having a problem solving a question. The problem is that with the user input, I need to get three sets of numbers that are floored, rounded, and ceiled. This process must be ongoing until the user stops by EOF command (Ctrl-D). When I run my code above, input a value 3.1415, I get 0 0 1 as an output, which is wrong because it's supposed to be 3 3 4. Any suggestions or help on how to fix the problem would be appreciated.
5ffe1711fd8c993dc7f47c55c8e96fbed32857b22cdd0e8003c8d2df77994775
['475f3a6ddaac4d859dca89ebb250b88a']
I've searched and tried a few things like DOM and a couple API methods. I can't find any clear documentation on the API either that relates to PHP. And I've never used DOM before till now, so I'm not experienced with it. So basicly, I need a method to get a YouTube channel's avatar and display it using PHP from the channel's URL. Any ideas?
59e5c7d1c6689348298e371b550dffc9bce1968edf27c93da85b323f6d7b4302
['475f3a6ddaac4d859dca89ebb250b88a']
I'm trying to get a YouTube channel's video views and it works perfect on localhost but I'm getting this error on my public web server: Warning: file_get_contents(https://www.googleapis.com/youtube/v3/channels?part=statistics&id={MY YOUTUBE USER ID}&fields=items%2Fstatistics&key={MY API KEY}): failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /var/www/*****.net/public_html/dashboard/inc/youtube-api.php on line 9 Notice: Trying to get property of non-object in /var/www/*****.net/public_html/dashboard/inc/youtube-api.php on line 10 Notice: Trying to get property of non-object in /var/www/*****.net/public_html/dashboard/inc/youtube-api.php on line 10 Notice: Trying to get property of non-object in /var/www/*****./public_html/dashboard/inc/youtube-api.php on line 10 Here's the code I'm using: <?php error_reporting(E_ALL); ini_set('display_errors', 1); function getYouTubeStats($stat) { $channel = json_decode(file_get_contents("https://www.googleapis.com/youtube/v3/channels?part=statistics&id={my youtube user id}&fields=items%2Fstatistics&key={MY API KEY}")); return $channel->items[0]->statistics->videoCount; } echo getYouTubeStats($stat = null); ?>
abe8866526ba3a00bbacff88ed9873e6960501a7b9bb80ea10c52e068dda7651
['4765109c3500457b88b8a83c8af6364c']
Following the docs on line_profiler, I am able to profile my code just fine, but when I view the output with python -m line_profiler script_to_profile.py.lprof, I only see 27 lines of code. I expect to see about 250, because that's the length of the function that I added the @profile decorator to. My output looks like this: Timer unit: 1e-06 s Total time: 831.023 s File: /Users/will/Repos/Beyond12/src/student_table.py Function: aggregate_student_data at line 191 Line # Hits Time Per Hit % Time Line Contents ============================================================== 191 # load files 192 files = os.listdir(datadir) 193 194 tabs = ['Contact', 'Costs_Contributions', 'Course', 'EducationalHistory', 'Events', 'FinancialAidScholarship', 195 1 764 764.0 0.0 'PreCollegiateExam', 'QualitativeInformation', 'Student_Performance', 'Task', 'Term'] 196 special_contact_id = {'Contact': 'Id', 197 1 7 7.0 0.0 'Events': 'WhoId', 198 1 6 6.0 0.0 'QualitativeInformation': 'Alumni', 199 1 6 6.0 0.0 'Student_Performance': 'Contact', 200 1 6 6.0 0.0 'PreCollegiateExam': 'Contact ID'} 201 1 6 6.0 0.0 202 1 5 5.0 0.0 # todo: make dictionary of the columns that we'll be using, along with their types? 203 204 df = {} 205 for tab in tabs: 206 1 6 6.0 0.0 # match tab titles to files by matching first 5 non-underscore characters 207 12 115 9.6 0.0 filename = filter(lambda x: tab.replace('_', '')[:5] in x.replace('_', '')[:5], files)[0] It's cut off in the middle of a for loop.
bd739550036ac76b03bcc1b484ee22da323def87c24c48ca06e02d15e3f6e875
['4765109c3500457b88b8a83c8af6364c']
I've got a simple FullCalendar setup, and I'd like to use a list view similar to Google's Agenda view, which is a list starting on the current date like so: My current FullCalendar setup uses the listYear view, which starts at the beginning of the year and only shows the current year: How can I make a list view that: only shows upcoming events shows events for the next N months FullCalendar code: <script type='text/javascript'> $(document).ready(function() { $('#calendar').fullCalendar({ defaultView: 'listYear', googleCalendarApiKey: 'xxxxxxxx', events: { googleCalendarId: '<EMAIL_ADDRESS>' } }); }); </script>
9423b7478f977e8ccc0af5735fc1221d4b493cc3d8947106d69b1d3fa6637dd4
['4767e2bfc9e443cf93ad4e090c5d9ea9']
I am looking to change a variable name from an object within a foreach loop var days = ['monday','tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday']; days.forEach(function(day, index){ // agency.openingHours.monday.opening; // replace monday to day // here I want instead of monday to have the day, agency.openingHours.day.opening })
beb564e15d9a5efba75a93811d84c2fe6659904efa72c06ddfa56c00d0b4a26b
['4767e2bfc9e443cf93ad4e090c5d9ea9']
I am using mongoose and I want to sort an array of objects by a key "position". In my array the objects "position" is: 0, 1 , 3, 2. I want to sort them by the "position". "images": [ { "_id": { "$oid": "5bcf24f8b639a936d5471b04" }, "position": 0, "name": "1540302062678adidas-fashion-feet-1225136.jpg", "created_at": { "$date": "2018-10-23T13:41:13.000Z" } }, { "_id": { "$oid": "5bcf24f8b639a936d5471b05" }, "position": 1, "name": "1540302064570adult-agency-business-380769.jpg", "created_at": { "$date": "2018-10-23T13:41:13.000Z" } }, { "_id": { "$oid": "5bcf24f8b639a936d5471b07" }, "position": 3, "name": "1540302067059adult-body-businessman-652347.jpg", "created_at": { "$date": "2018-10-23T13:41:13.000Z" } }, { "_id": { "$oid": "5bcf24f8b639a936d5471b06" }, "position": 2, "name": "1540302066875adult-beard-blurred-background-936072.jpg", "created_at": { "$date": "2018-10-23T13:41:12.000Z" } } ]
f82c4b5b1d3a1fe2289d4b3ccce4c673a1d654fdedc3f84540eac449aea93029
['476940b3acbd4dd0af9073a30adf73b4']
Doing int score[numPlayers]; and later scanf("%d", &numPlayers); will not do what you think it does. it is not standard C++ to have a static array size which is not a constant,if you want that behavior you should use std<IP_ADDRESS>vector. Even if this is working for you, then you should first ask for the number of players and then create the array. i.e scanf("%d", &numPlayers);//first .... int score[numPlayers];//then
7c4565ef04385495fd28f0631492fe290cbabfc4a048d1e728e2c6da8ccf8c89
['476940b3acbd4dd0af9073a30adf73b4']
In your index_of_minimal function, you need to reset the current smallest value(first) for the next comparison along with saving its index, otherwise another number, in your iteration, less that the original first value may still be larger than the ones you've already processed. So it should be like this: for (i; i < n; i++) { if (data[i] < first) { index = i; first=data[i];//also save the new minimum value } }
d83cf3036b2e6d371539b7a3e1fa0768686c85ba5a2172d85571673b1c27089c
['478b4bb9d22c4d789684f631a5c3f24d']
You could use media queries which hide/display separate 'sidebars' That way you can keep all of your original content together and just have two separate link lists (one for mobile another for non-mobile) and have them do separate things. You want to reduce the amount of duplicate code. If it is more thank just the actions of the links then you may want to consider a whole new template.
bd49cf0af85f7092ede2199502e9a675be5cab963be5dae848ac8f0107be9843
['478b4bb9d22c4d789684f631a5c3f24d']
Thank you for your explanation. Hard for me to understand this phrase "_An insulating dielectric material at the "low Z" point should affect antenna impedance the least, as compared to any other point along its length_." Will you please elaborate this? Are you saying that the best design is to put the gap as small as possible?
8cdcbc1116d61c08f0174371498ff8c67d810bdb82351012e62b8e0f5b77dbf9
['47aa78144cc44a55882f2be265ce78ba']
var existingDriver = (from data in db.Drivers where data.DriverID == DVM.DriverID select data).FirstOrDefault(); This line will return "null" if there is no driver with that ID in the DataBase. Which will result in null reference exception later on when you do: existingDriver.DriverID = DVM.DriverID; existingDriver.DriverLastName = DVM.DriverLastName; existingDriver.DriverFirstName = DVM.DriverFirstName; existingDriver.DriverLicense = DVM.DriverLicense; existingDriver.LicenseExpiry = DVM.LicenseExpiry; existingDriver.MobileNumber = DVM.MobileNumber; existingDriver.BusinessUnit = DVM.BusinessUnit;
cb2438a352cd2af41a22375d82be76dd4bd16cc76793794b4a7b697b94f803d0
['47aa78144cc44a55882f2be265ce78ba']
I was wondering if in the specific case like this one, where we have bool flag that indicates if some service is available: private bool isAvailable; private void foo() { if(isAvailable) { isAvailable = false; DoSomething(); isAvailable = true; } } Is it sufficient to set bool field to be volatile in a multithreaded environment or is it better to use locks or even Monitor. In this specific case, if the service is not available at the moment, it is not needed to wait for it to get available again.
8076c6d8299f89416f63b3c6bc55a3df8d76d696454381303f2665a8fb467d62
['47b155bbbfc040c4b503a47aae8fa5cd']
How would i go about turning this code into an element to reuse across my web application? <div class="row"> <?php foreach ($mobiles as $mobile): ?> <ul class="product-listing unstyled"> <li> <a href="<?php echo $this->webroot . 'mobiles/view/'.$mobile['Mobile']['id']; ?>"> <img src="<?php echo $this->webroot; echo 'files/files'.$mobile['Mobile']['filename']; ?>" alt="<?php echo $mobile['Mobile']['productname']; ?>" /> <div class="pricing pull-right">&euro;<?php echo $mobile['Mobile']['price']; ?> </div> <h3><?php echo $mobile['Mobile']['productname']; ?></h3> </a> </li> </ul> <?php endforeach; ?> </div>
082e8363c3df719223d23608ad4e0552b391e6b5685d4a7e655fb8d1fb7197b3
['47b155bbbfc040c4b503a47aae8fa5cd']
I've got a list of 40 rows in a table, they are nested within a div that displays 18 and hide's the rest using overflow-x:scroll. I have created a javascript code that will allow me to select a row and navigate the rows using 'up' and 'down' arrow keys on the keyboard. Two problems i'd like to solve are: I want to start the scrolling of the table when the last of the first 18 rows is set to active. If i'm on the first record and on the last record and i key in 'up' or 'down' i loose the active state of the row. Here's a jsfiddle i'm using to try and solve the problem http://jsfiddle.net/kmcbride/cJjRH/ and below is the code. Here's my code: HTML: <div class="table"> <table> <thead> <tr> <th> <span>End User</span> </th> <th> <span>Reseller</span> </th> <th> <span>Distributor</span> </th> <th> <span>Product Instance</span> </th> <th> <span>Created On</span> </th> <th> <span>Created By</span> </th> </tr> </thead> <tbody> <tr class="openPane" id="1"> <td>Melita 1</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="2"> <td>Melita 2</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="3"> <td>Melita 3</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="4"> <td>Melita 4</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="5"> <td>Melita 5</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="6"> <td>Melita 6</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="7"> <td>Melita 7</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="8"> <td>Melita 8</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="9"> <td>Melita 9</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="10"> <td>Melita 10</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="11"> <td>Melita 11</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="12"> <td>Melita 12</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="13"> <td>Melita 13</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="14"> <td>Melita 14</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="15"> <td>Melita 15</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="16"> <td>Melita 16</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="17"> <td>Melita 17</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="18"> <td>Melita 18</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="19"> <td>Melita 19</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="20"> <td>Melita 20</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="21"> <td>Melita 21</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="22"> <td>Melita 22</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="23"> <td>Melita 23</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="24"> <td><PERSON> 24</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="25"> <td><PERSON> 25</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="26"> <td><PERSON> 26</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="27"> <td><PERSON> 27</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="28"> <td>Melita 28</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="29"> <td>Melita 29</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="30"> <td>Melita 30</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="31"> <td>Melita 31</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="32"> <td>Melita 32</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="33"> <td>Melita 33</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="34"> <td>Melita 34</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="35"> <td>Melita 35</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="36"> <td>Melita 36</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="37"> <td>Melita 37</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="38"> <td>Melita 38</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="39"> <td>Melita 39</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="40"> <td>Melita 40</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> <tr class="openPane" id="41"> <td>Melita 41</td> <td></td> <td></td> <td>WiSe00004</td> <td>Enabled</td> <td>7/11/2013 12:56:00PM</td> </tr> </tbody> </table> <div class="load-more-btn">Load More</div> </div> Js: $(".openPane").click(function() { if ($(".pane").hasClass('pane-open')) { $(".openPane").removeClass('rowActive'); $(this).addClass('rowActive'); }else{ $(".pane").slideToggle(250).addClass('pane-open'); $(".openPane").removeClass('rowActive'); $(this).addClass('rowActive'); }; }); $(document).keydown(function (e) { var currentRow = $(".rowActive").get(0); switch(event.keyCode) { //arrow down case 40: $(currentRow).next().addClass("rowActive"); $(currentRow).removeClass("rowActive"); break; //arrow up case 38: $(currentRow).prev().addClass("rowActive"); $(currentRow).removeClass("rowActive"); break; //esc case 27: if ($(".pane").hasClass('pane-open') && !$(".pane").hasClass('pane-pinned')){ $(".pane").slideToggle(250).removeClass('pane-open'); }; break; } }); CSS: .table { width: 100%; height: 400px; overflow-x: scroll; } .table table { width: 100%; } .table table th { text-align: left; } .rowActive { background-color: #EDF4F9!important; }
6f3ecce858a4d47c4174ed93821dda35d10856c0b2d0106393cc2c35ad334aa6
['47bbd991cca640af85c0fcbbafbf40ef']
I'm very inexperienced with Illustrator as I have always primarily used Photoshop. I have a eps file which I bought and have made changes to (ie deleting the bits I don't want). At this point I usually export it as a png file, open it in Photoshop and add the text or images I want. Frankly it's easier than figuring out how to do it in Illustrator. Ordinarily at this point I can increase the file in Photoshop and use it as either a poster or flyer. But the file I'm working on atm is very small and although there is no pixelation in AI, it's horrendous in Photoshop. I don't know how to save it in AI in a larger size so I don't have this problem in Photoshop. Any advice/help appreciated. thanks.
afbe4015965d6f4a36e413e6d14746c8038a4d0a7e25085429190924f5df8579
['47bbd991cca640af85c0fcbbafbf40ef']
- Yes, my idea was that the non-pure function, this coroutine, should call as much as possible, pure functions. - Yes, I agree with you. I could use Invoke, but then I am testing private code, some people say that I should only test the public interface, others test private code, so you consider that it's ok to test private code? So, in your version, how would you test those functions, like Display? Would you make them public or use Invoke? Btw, I like your naming convention; I am using your "From" naming for some constructors.
ac183f144bc843b08f26864ccaea99c71cf8db6129220833ed85147ff96b1b02
['47d69027337b45c0ba9fa01d40bb1919']
The following script should do the trick too #!/usr/bin/expect -f # # Install RSA SSH KEY with no passphrase # set user [lindex $argv 0] set host [lindex $argv 1] set password [lindex $argv 2] spawn ssh-copy-id -i /path/to/your/.ssh/id_rsa.pub $user@$host expect { "continue" { send "yes\n"; exp_continue } "assword:" { send "$password\n"; } } You need to make it executable, and call it as follow: ./ssh-copy-id.exp <user> <host> <password> In your case: ./ssh-copy-id.exp root <IP_ADDRESS> thepassword
c4cffb9bafd88b2239fd35f1c8da8c3049b21d3a53d57916cb3ffbb77079eea1
['47d69027337b45c0ba9fa01d40bb1919']
The following script should do what you want : #!/bin/bash name=$1 matchingStarted=$(docker ps --filter="name=$name" -q | xargs) [[ -n $matchingStarted ]] && docker stop $matchingStarted matching=$(docker ps -a --filter="name=$name" -q | xargs) [[ -n $matching ]] && docker rm $matching Basically, it checks if there is a running container with the provided name, and stop it if it find one. Then, it remove any container with the provided name. Note: You may want to add some argument validation, as if used without argument, this script will stop all running containers and delete all stopped containers. I did not add it here to keep it simple and easily readable.
4ce281416a4e0ea1c436436baf30d4d432196857514a37499eca33f71a54da82
['47d80bee5a8d4f45a787f7d99cc50e78']
I have a <PERSON> equation in 2D space like this: Here is my attempt to solve it: import sympy as sp x, y = sp.symbols('x, y') f = sp.Function('f') u = f(x, y) eq = sp.Eq(u.diff(x, 2) + u.diff(y, 2), u) print(sp.pdsolve(eq)) It gives an error: psolve: Cannot solve -f(x, y) + Derivative(f(x, y), x, x) + Derivative(f(x, y), y, y) Is it possible to use sympy for such equations? Please help me with an example if possible.
4df030a92e7043cadb3a529efbba34ecbcd4b336d86395e80807a8b8085f44dd
['47d80bee5a8d4f45a787f7d99cc50e78']
Here is my solution. def jitter_x(grp): if len(grp) > 1: min_x = grp['x'].min() # X coordinates are evenly spaced starting from their minimum jittered_x = np.linspace(0, len(grp) * 0.1, num=len(grp), endpoint=False) + min_x grp.loc[:, 'x'] = jittered_x return grp # group by rounded coordinates def by_coords(idx): return '{:0.1f},{:0.1f}'.format(df.loc[idx, 'x'], df.loc[idx, 'y']) df = df.groupby(by_coords).apply(jitter_x)
076840491492d7397f0591cbdc3dea6d9ee92ca01e595644b4e54fbe622ea968
['47d8696170cf455fa88ceea28bd7a62c']
File directory = new File(directoryName); // get all the files from a directory File[] fList = directory.listFiles(); So you get the directory listing (list of all files in the directory), loop through the resulting fList and send them one by one as you would with a single file: for(File file : fList) { //file sending stuff }
03e5b2891daa2dd41ddff08582abe4e8c761a4bcd3e5237e2449f10eab1a6f45
['47d8696170cf455fa88ceea28bd7a62c']
Have a method that accepts two parameters: your array and the int/entry entry you are looking for multiple occurrences of. Loop through the array and simply keep track of whether the current array index's element == the one you are looking for (your second parameter). If so, increment a counter. If the counter ever exceeds the value you want, return true. Otherwise return false after the loop. That should help you write the code yourself!
458e86a346b1cfad1c1d65cd6a8657c2a7cf57f078d178a8f51f5ea693619af0
['47f7eabdcbf24f328404d3790be46a7d']
I'm having problems understanding why enum taken into consideration while resolving dependencies. The situation is as follows: I have two feature folders. Let's call them FeatureA and FeatureB. FeatureA in this doesn't do much. The minimal working example for this feature is: feature-a.module.ts: import { Module } from '@nestjs/common'; import { FeatureAService } from './feature-a.service'; @Module({ providers: [FeatureAService], }) export class FeatureAModule {} feature-a.service.ts: import { Injectable } from '@nestjs/common'; import { STUFF_B_ONLY } from '../FeatureB/feature-b.service'; @Injectable() export class FeatureAService { public doSomeStuff(): string { return 'Doing stuff: ' + STUFF_B_ONLY.A; // <--- Problems with this line, enum } } FeatureB uses some functionality from FeatureA. As a result, I added needed dependencies to access them. feature-b.module.ts: import { Module } from '@nestjs/common'; import { FeatureAService } from '../FeatureA/feature-a.service'; import { FeatureBService } from './feature-b.service'; @Module({ providers: [FeatureAService, FeatureBService], }) export class FeatureBModule {} feature-b.service.ts: import { Injectable } from '@nestjs/common'; import { FeatureAService } from '../FeatureA/feature-a.service'; export enum STUFF_B_ONLY { A = 'a', B = 'b', } @Injectable() export class FeatureBService { constructor(private readonly featureAService: FeatureAService) {} public do(): void { this.featureAService.doSomeStuff(); } } In feature-b.service.ts I just call doSomeStuff() from featureAService. But the problem is: I use an enum from feature-b.service.ts in feature-a.service.ts and for some reason NestJs tries to resolve all dependencies even though enum is outside of @Injectable provider and class in general. This enum is not part of featureB and shouldn't throw any errors. Error message: Error: Nest can't resolve dependencies of the FeatureBService (?). Please make sure that the argument dependency at index [0] is available in the FeatureBModule context. Potential solutions: If dependency is a provider, is it part of the current FeatureBModule? If dependency is exported from a separate @Module, is that module imported within FeatureBModule? @Module({ imports: [ /* the Module containing dependency */ ] }) 2 solutions found were: Move enum to a generic .ts file, not even in a module, but this approach is not always the best, it could be crowded if tons of different enums will be added Replace enum value (STUFF_B_ONLY.A) with a basic string, but this approach is not valid for me So, WHY NestJs tries to resolve dependencies on enum and is there something I missed (provide/inject/import)? Or moving to a generic .ts file is the only option here? In case needed, the main module file: import { Module } from '@nestjs/common'; import { FeatureAModule } from './FeatureA/feature-a.module'; import { FeatureBModule } from './FeatureB/feature-b.module'; @Module({ imports: [ FeatureAModule, FeatureBModule, ], }) export class AppModule {}
564148b7db675e8d2ffe67c17eda540a0e78106a499589924b69a153bbf2c256
['47f7eabdcbf24f328404d3790be46a7d']
As I have said in comments, IDs must be unique. In your case, when you create new row, IDs are the same and only the first value is taken (even if you write in second, third, etc. row). To solve, you need to: 1) create input with unique ID; 2) retrieve and return data to correct inputs (not just the first ones). Complete and rewritten code: HTML side: <table class="table table-bordered" id="stock" > <thead> <tr> <td>Sr no.</td> <td>Product Name</td> <td>Description</td> <td>Qty</td> <td>Unit</td> <td>Rate</td> <td>Tax</td> <td>Dis</td> <td>Total</td> <td><input type="button" name="add" id="add" value="+" class="btn btn-warning" /></td> </tr> </thead> <tbody class="details"> <tr> <td class="no">1</td> <td><input type="text" name="items[]" id="items_1" class="form-control items" autocomplete="off" /></td> <td><textarea name="size[]" id="size_1" class="form-control size" autocomplete="off"></textarea></td> <td><input type="text" name="qty[]" id="qty_1" class="form-control qty" autocomplete="off"/></td> <td><input type="text" name="unit[]" id="unit_1" class="form-control unit" autocomplete="off"/></td> <td><input type="text" name="price[]" id="price_1" class="form-control price" autocomplete="off"/></td> <td><input type="text" name="tax[]" id="tax_1" class="form-control tax" autocomplete="off" /></td> <td><input type="text" name="dis[]" id="dis_1" class="form-control dis" autocomplete="off" /></td> <td><input type="text" name="stkamt[]" id="amt" class="form-control amt" autocomplete="off" /></td> <td><button class="btn btn-danger remove">X</button></td> </tr> </tbody> <tfoot></tfoot> </table> JavaScript side: $(function(){ $('#add').click(function(){ addnewrow(); }); }); function addnewrow() { var n = ($('.details tr').length - 0) + 1; var tr = '<tr>'+ '<td class="no">' + n + '</td>' + '<td><input type="text" name="items[]" id="items_' + n + '" class="form-control items" autocomplete="off" /></td>' + '<td><textarea name="size[]" id="size_' + n + '" class="form-control size" autocomplete="off"></textarea></td>' + '<td><input type="text" name="qty[]" id="qty_' + n + '" class="form-control qty" autocomplete="off"/></td>' + '<td><input type="text" name="unit[]" id="unit_' + n + '" class="form-control unit" autocomplete="off"/></td>' + '<td><input type="text" name="price[]" id="price_' + n + '" class="form-control price" autocomplete="off"/></td>' + '<td><input type="text" name="tax[]" id="tax_' + n + '" class="form-control tax" autocomplete="off" /></td>' + '<td><input type="text" name="dis[]" id="dis_' + n + '" class="form-control dis" autocomplete="off" /></td>' + '<td><input type="text" name="stkamt[]" id="amt_' + n + '" class="form-control amt" autocomplete="off" /></td>' + '<td><button class="btn btn-danger remove">X</button></td>' + '</tr>'; $('.details').append(tr); }; $('body').delegate('.items', 'blur', function(e) { checkitems(e.currentTarget.id.split('_')[1]); // e.currentTarget.id.split('_')[1] - Target element ID }); function checkitems(targetID) { var items = $('#items_' + targetID).val(); if (items != "") { $.ajax({ type: 'post', url: 'itemcheck.php', data: {key: items}, dataType: 'json', success: function(data) { if (data) { var tr = $(this).closest('tr'); // here is the code for retrieving the values. i think here i need to make some changes $('#price_' + targetID).val(data.rate); $('#size_' + targetID).val(data.des); $('#qty_' + targetID).val(data.qty); $('#unit_' + targetID).val(data.unit); } else { $('#myitemmodal').modal("show"); } } }); } }; In this case I rewritten code so that each input has unique property attached to its ID (in this case, the number of rows in table, for example, unit_1 instead of unit).
86ad6557dde9ad751f505858a006e89d82e97649c35db2806076efdec0aad4fa
['47fc88aae1f44fc9bfd91c09ce467253']
My Linux box will be automatically shut down by the attached UPS if it is running and the AC power fails. If I have the Linux box suspended and the AC power fails, I assume the UPS can not shut it down. What are the consequences of AC power failure on a suspended Linux system?
1827b36ce46d7799989d9d42b69f85e934765e193460e374facc26cd73fad47c
['47fc88aae1f44fc9bfd91c09ce467253']
As usual, posting a question provided the spur to figure out the answer for myself. Posting the answer just in case any other Asus users come here. It turns out this is a two pass process, which is what had me stumped. First Pass (disable Secure Boot) Do not plug in the USB yet. Restart the PC. Hold F2 for UEFI. In the UEFI hit F7 or select Advanced Mode. Select the Boot Menu. Select Secure Boot. Change the OS Type from Windows UE... to Other (the only other choice). Exit, saving changes, and allow the boot to proceed. It will boot to Windows. Second Pass (boot to USB) Plug in the USB. Select Restart from Windows power menu. Hold F2 for UEFI. On the initial UEFI screen, drag the USB to the leftmost position. Drag the 2 Ubuntu entries to the left. (Ensure Windows is last). Exit the UEFI. It will say you didn't make any changes, but it will boot to the USB.
36ea167026c359c4bef3c880bff2d89cb72eec8091455b581e6cee175bbfae06
['480a873758d94728b8f1509236285d1c']
Here is a sample of the data that I have after pushing two JSON objects into an array. Accessing the data is simple. If I wanted to access say the logo, I could use example[0].channels.logo. However, when attempting to access the same array from a JSONP call, the result is undefined. let example = [ { "channels": { "mature": false, "status": "Some GoLang Today #go #golang #youtube", "broadcaster_language": "en", "display_name": "FreeCodeCamp", "game": "Creative", "language": "en", "_id": 79776140, "name": "freecodecamp", "created_at": "2015-01-14T03:36:47Z", "updated_at": "2018-04-11T22:33:06Z", "partner": false, "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-profile_image-d9514f2df0962329-300x300.png", "video_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-channel_offline_image-b8e133c78cd51cb0-1920x1080.png", "profile_banner": "https://static-cdn.jtvnw.net/jtv_user_pictures/freecodecamp-profile_banner-6f5e3445ff474aec-480.png", "profile_banner_background_color": null, "url": "https://www.twitch.tv/freecodecamp", "views": 210806, "followers": 11582, "_links": { "self": "https://api.twitch.tv/kraken/channels/freecodecamp", "follows": "https://api.twitch.tv/kraken/channels/freecodecamp/follows", "commercial": "https://api.twitch.tv/kraken/channels/freecodecamp/commercial", "stream_key": "https://api.twitch.tv/kraken/channels/freecodecamp/stream_key", "chat": "https://api.twitch.tv/kraken/chat/freecodecamp", "features": "https://api.twitch.tv/kraken/channels/freecodecamp/features", "subscriptions": "https://api.twitch.tv/kraken/channels/freecodecamp/subscriptions", "editors": "https://api.twitch.tv/kraken/channels/freecodecamp/editors", "teams": "https://api.twitch.tv/kraken/channels/freecodecamp/teams", "videos": "https://api.twitch.tv/kraken/channels/freecodecamp/videos" }, "delay": null, "banner": null, "background": null } }, { "streams": { "stream": null, "_links": { "self": "https://api.twitch.tv/kraken/streams/freecodecamp", "channel": "https://api.twitch.tv/kraken/channels/freecodecamp" } } } ] // all of these work console.log(example); console.log(example[0]); console.log(example[0].channels); console.log(example[0].channels); Here is the function that handles each JSONP request - each response is stored in an object with property name of the defined route argument. const jsonpCall = (route, channel) => { let result = {}; $.ajax({ url: `https://wind-bow.gomix.me/twitch-api/${route}/${channel}?callback=?`, dataType: 'jsonp', success: function(data){ result[route] = data; }, }); return result; }; This is the function call that groups two returned objects into one array, and then hands off that array for another function to sort through/reduce to an object. const channelsToSearch = ["freecodecamp","nba","shroud"]; channelsToSearch.forEach(channel => { const channelData = []; channelData.push(jsonpCall("channels",channel)); channelData.push(jsonpCall("streams",channel)); console.log(sortData(channelData)); }); This is where the problem begins. This function takes the array of two objects, and begins working on creating a new object to return. It can't access the object. const sortData = arr => { console.log(arr); // okay! console.log(arr[0]); // okay! console.log(arr[0].channels); // undefined? const obj = {}; obj.logo = arr[0].channels.logo; obj.displayName = arr[0].channels["display_name"]; arr[1].streams.stream === null ? obj.status = "Offline" : obj.status = arr[1].streams.stream.channel.status; return obj; }; I'm not sure what to discern from the differences in the logs. The first three logs are from the example logs. The last three logs are from the sortData function. The final error is from the obj.logo = arr[0].channels.logo; line in the sortData function.
ee3ebfe70d285d832ce3bcfd740d178a5570d2f92398b2a85e64a6b4af4e8fc9
['480a873758d94728b8f1509236285d1c']
Solution I found. The factorization function now returns an object instead with prime key exponent value pairs. Through for in loops, and the reduce method, the LCM is outputted. function smallestCommons(arr) { // factorize a number function function factorization(num) { let primesObj = {}; // i is what we will divide the number with for (let i = 2; i <= Math.sqrt(num); i++) { // if number is divisible by i (with no remainder) if (num % i === 0) { let exponent = 0; // begin while loop that lasts as long as num is divisible by i while (num % i === 0) { // change the value of num to be it divided by i num = num / i; exponent++; // create key value pair where exponent is the value primesObj[i] = exponent; } } } // if num is not the number 1 after the for loop // push num to the array because it is also a prime number if (num != 1) { primesObj[num] = 1; } return primesObj; } // sort from lowest to highest arr.sort((a,b) => a - b); let range = []; let primeFacts = []; // push range of numbers to fullArr for (let i = arr[0]; i <= arr[1]; i++) { range.push(i); } console.log(range); // [2,3,4,5,6,7,8,9,10] // loop for iterating through range numbers for (let i = 0; i < range.length; i++) { // push the prime factors of each range number primeFacts.push(factorization(range[i])); } console.log(primeFacts); // create a filtered object with only the largest key value pairs let primeExponents = primeFacts.reduce((newObj,currObj)=> { for (let prime in currObj) { // create new key value pair when key value pair does not exist if (newObj[prime] === undefined) { newObj[prime] = currObj[prime]; } // overwrite key value pair when current Object value is larger else if (newObj[prime] < currObj[prime]) { newObj[prime] = currObj[prime]; } } return newObj; },{}); let finalArr = []; // push appropriate amount of primes to arr according to exponent for (let prime in primeExponents) { for (let i = 1; i <= primeExponents[prime]; i++) { finalArr.push(parseInt([prime])); } } return finalArr.reduce((product, num) => product *= num); }; console.log(smallestCommons([2,10]));
ccd2b4fffe1f12f0d37066e7dbe986e47089c02a9254093014b7f3153f980611
['48100d488ad94259b3c99aee126c0fbf']
i have a find() query to my database, which i want to be able return a list of all my questions in that table. The serivce async findAll() : Promise<Question[] >{ return await this.questionRepository.find(); } The controller @Get('/all') async returnAllQuestions(): Promise<Question[] > { return await this.questionsService.findAll(); } The question entity import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm'; @Entity({name: 'Questions'}) export class Question { @PrimaryGeneratedColumn() questionID: number; @Column() question: string; } There are records inside my table and the types are set as follows However when i call the /all endpoint i get a 404 not found error. I have no clue what is wrong, I can call an findById endpoint, using uestionRepository.findOneOrFail(id); which is working fine, but the all method keeps failing' Thanks in advance!
5a097730fa71fb5c7a541d44a4b8d567d3a050b38682795b7a69ee5b29dd1be5
['48100d488ad94259b3c99aee126c0fbf']
I'm writing a mapreduce alogirthm. In my code the reduce(Text key, Iterable<String> values, Context context) method is not called. above it I have the @Override giving an error : Method does not override method from its superclass. Here is my code: package WordCountP; import java.io.FileReader; import java.io.IOException; import java.util.Iterator; import org.apache.hadoop.conf.Configured; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat; import org.apache.hadoop.util.Tool; import org.apache.hadoop.util.ToolRunner; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; public class popularity extends Configured implements Tool{ public class PopularityMapper extends Mapper<Text, Text, Text, Text> { @Override protected void map(Text key, Text value, Context context) throws IOException, InterruptedException { JSONParser jsonParser = new JSONParser(); try { JSONObject jsonobject = (JSONObject) jsonParser.parse(new FileReader("src\\testinput.json")); JSONArray jsonArray = (JSONArray) jsonobject.get("votes"); Iterator<JSONObject> iterator = jsonArray.iterator(); while(iterator.hasNext()) { JSONObject obj = iterator.next(); String song_id_rave_id = (String) obj.get("song_ID") + "|" + (String) obj.get("rave_ID"); String preference = (String) obj.get("preference"); System.out.println(song_id_rave_id + "||" + preference); context.write(new Text(song_id_rave_id), new Text(preference)); } }catch(ParseException e) { e.printStackTrace(); } } } public class PopularityReducer extends Reducer<Text, Iterable<String>, Text, Text> { @Override protected void reduce(Text key, Iterable<String> values, Context context) throws IOException, InterruptedException { int sum = 0; for ( String val: values){ if (val == "true"){ sum +=1; } else if (val == "false"){ sum -=1; } } String result = Integer.toString(sum); context.write(new Text(key), new Text(result)); } } public static void main(String[] args) throws Exception{ int exitCode = ToolRunner.run(new popularity(), args); System.exit(exitCode); } public int run(String[] args) throws Exception { if (args.length != 2) { System.err.printf("Usage: %s [generic options] <input> <output>\n", getClass().getSimpleName()); ToolRunner.printGenericCommandUsage(System.err); return -1; } Job job = new org.apache.hadoop.mapreduce.Job(); job.setJarByClass(popularity.class); job.setJobName("PopularityCounter"); FileInputFormat.addInputPath(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); job.setOutputKeyClass(Text.class); job.setOutputValueClass(IntWritable.class); job.setOutputFormatClass(TextOutputFormat.class); job.setMapperClass(PopularityMapper.class); job.setReducerClass(PopularityReducer.class); int returnValue = job.waitForCompletion(true) ? 0:1; System.out.println("job.isSuccessful " + job.isSuccessful()); return returnValue; } } I've tried naming it with R caps, (Reduce()) but it didn,t work either. I assume there is a mistake in the arguments given to the method, but i don't see any problems there... Any ideas? Secondly, is there any way that I can set the output format te be a .txt file? FYI, my input JSON code is {"votes":[{ "song_ID": "Piece of your heart", "mbr_ID": "001", "preference": "true", "timestamp": "11:22:33", "rave_ID": "rave001", }, { "song_ID": "Piece of your heart", "mbr_ID": "002", "preference": "true", "timestamp": "11:22:33", "rave_ID": "rave001", }, { "song_ID": "Atje voor de sfeer", "mbr_ID": "001", "preference": "false", "timestamp": "11:44:33", "rave_ID": "rave001", }, { "song_ID": "Atje voor de sfeer", "mbr_ID": "002", "preference": "false", "timestamp": "11:44:33", "rave_ID": "rave001", }, { "song_ID": "Atje voor de sfeer", "mbr_ID": "003", "preference": "true", "timestamp": "11:44:33", "rave_ID": "rave001", }] } Thanks in advance!
46738dbd65933cb229c1f17e9d5fc062a12e99a79a91fe10d0b7dadf42ac9412
['483844c5fa0a4e7b9d4ac174440c641c']
I want to allow the user to edit forms in an application, e.g. set the label of a field, but I want the user to enjoy to power of Angular's interpolation to create dynamic forms. When it comes to labels this is easy, with a costume directive But when it comes to attributes, this is more difficult. Suppose I want to let the user set a relevance equation for a question, e.g. movieRating.relevant='{{seenMovie===true}}'. I currently solve this by calling interpolate on the interpolated variable. Template: <div class="control-group" ng-show="interpolate('{{ movieRating.relevant }}')"> <!-- field html --> </div> Directive/Controller: scope.interpolate = function(text, mustHaveExpression, trustedContext) { $interpolate(text, mustHaveExpression, trustedContext)(scope) } I'm looking for a more Angular way to do it (something that would use $compile for instance).
d9eb34c1c5017571d828ebe1f557f1675f84899cde292762478b1895a75b28ce
['483844c5fa0a4e7b9d4ac174440c641c']
Set optimization.nodeEnv to false From: https://webpack.js.org/configuration/optimization/#optimizationnodeenv optimization.nodeEnv boolean = false string Tells webpack to set process.env.NODE_ENV to a given string value. optimization.nodeEnv > uses DefinePlugin unless set to false. optimization.nodeEnv defaults to mode if set, > else falls back to 'production'.
1eb1c354e503b7e76c5fd572fae0da0f50b41b70ac26b2223ce7ed2a6fbd99d2
['484e426527c542c58026cb7489defa98']
<ImageView android:id="@+id/ivdpfirst" android:layout_width="100dp" android:layout_height="100dp" android:background="@drawable/sidebutton" android:src="@drawable/ic_me1" /> sidebutton.xml in drawable folder: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item><shape> <gradient android:angle="270" android:endColor="#000000" android:startColor="#396AA1" /> <stroke android:width="1dp" android:color="#000000" /> <corners android:radius="5dp" /> <padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" /> </shape></item> </selector>
7cf053dacf1378274b353737dc24f03a4a28ad159bc70d25f5af82372f18ec85
['484e426527c542c58026cb7489defa98']
<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_marginTop="15dp"> <Button android:id="@+id/signin_button" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:padding="5dp" android:layout_marginLeft="7dp" android:background="@layout/bordersignin" android:textColor="#ffffff" android:text="@string/signin" /> <CheckBox android:id="@+id/staysignedin" android:layout_width="0dp" android:layout_weight="1" android:layout_height="wrap_content" android:text="@string/staysignedin" /> <TextView android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="Stay signed in" /> </LinearLayout>
3c87d9de5073b225883c21fc6540419d39e6bd31be59a0c6640ecbe4c121b70a
['4850c3a940f64b8ca338578f40fbc338']
In order to re-enable the add button, add $('#add').prop('disabled', false); to the remove click event handler. Also, for the MAX display, I would recommend putting <p>Max</p> in the html, and setting the #MAX div to style="display:none;", then using $('#MAX').show() and $('#MAX').hide() to display the MAX indicator. If you follow my instructions and add the above code to re-enable the add button, you'll see why: The MAX indicator remains on the page after the button is re-enabled Once you re-enable the add button, and then click it again until you reach the max number of fields for a second time, an additional <p>MAX</p> gets added to the div, creating duplicate indicators.
99f5768d4103cb4619645287562bff2ed91857b0317e485d81b994b16828b63a
['4850c3a940f64b8ca338578f40fbc338']
You should change the if statement at the end to if (count > images.length - 1). Length is not zero-based, so images.length is 4. However, the index of the last image is 3, so after the last image displays count increments to 4, but since 4 is not greater than 4, so the loop runs one more time. Once the count gets to 5, then the if statement passes and count is reset to 0. Using (count >= images.length) works as well.
ae5ecb4651285e40b76f7c15f0f0b4f748f2ff914da2350d2e8372aa69a25189
['485c417f4f8f4abba91d87e925ffb386']
I have a Dell XPS 9550 on Ubuntu 18.04 with Gnome (on Xorg). I have it configured with the nvidia drivers v390 as below: OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 960M/PCIe/SSE2 OpenGL core profile version string: 4.6.0 NVIDIA 390.87 OpenGL core profile shading language version string: 4.60 NVIDIA OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6.0 NVIDIA 390.87 OpenGL shading language version string: 4.60 NVIDIA OpenGL context flags: (none) OpenGL profile mask: (none) OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 390.87 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions: It "works" but the issue is that the main screen on this laptop is 4K and I have connected 2 external monitors to it which have a max resolution of 1920x1080. If I zoom 200% on the 4K screen, the display is very comfortable but the zooming is also applying to the 2 other monitors making it far too big to do anything on them. If I set the zoom at 100%, the 2 external monitors display very well but then the 4K monitor font size and icons are far too small to even read. I read a lot of material where people us xrandr but then it doesn't seem to apply with nvidia-drivers in the way... Has anyone managed to configure something similar where I can use 2 or 3 monitors with an NVidia card on Xorg where one is 4K and the rest is normal resolution? Of course there is another solution to use Wayland and this one does a very good scaling, but it doesn't work with the NVidia drivers (so falls back on the Intel card of the laptop) and a lot of applications do not work on Wayland. Any help is appreciated ;o) Thanks
326d48337c61ca94e978c63ead71c88595ed85ca56dfd6186709e2bb0069e87e
['485c417f4f8f4abba91d87e925ffb386']
I am building a rest API with Web API2, Owin 3 and NInject Owinhost for my DI. Using the example provided by NInject, by which I create an "HttpConfiguration" object and call the NInject extension methods in startup.cs, I get an error: Error activating HttpConfiguration More than one matching bindings are available. Matching bindings: 1) binding from HttpConfiguration to method 2) self-binding of HttpConfiguration 3) binding from HttpConfiguration to constant value Activation path: 1) Request for HttpConfiguration Suggestions: 1) Ensure that you have defined a binding for HttpConfiguration only once. My code is as follow in Startup.cs: public void Configuration(IAppBuilder app) { Logger.Info("Entering Startup"); config = new HttpConfiguration(); ConfigureOAuth(app); // Web API configuration and services config.SuppressDefaultHostAuthentication(); config.Filters.Add(new HostAuthenticationFilter("Bearer")); // Web API routes config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new {id = RouteParameter.Optional} ); var appXmlType = config.Formatters.XmlFormatter.SupportedMediaTypes.FirstOrDefault( t => t.MediaType == "application/xml"); config.Formatters.XmlFormatter.SupportedMediaTypes.Remove(appXmlType); app.UseNinjectMiddleware(CreateKernel); app.UseNinjectWebApi(config); app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll); Logger.Info("Exiting Startup"); } public static StandardKernel CreateKernel() { kernel = new StandardKernel(); kernel.Load(Assembly.GetExecutingAssembly()); kernel.Bind<HttpConfiguration>().ToSelf().Named("TestHttpConfiguration"); return kernel; } The strange thing is when I refresh the page in the browser, the error goes, which leads me to believe that this happens at application startup only. So I'm confused with this. Has anyone faced the same issue with it? Thanks <PERSON>
e303a6c13a98117698dcb0b3dfe56dacc6e2d82a0f33e92c5a981e6249272070
['486371e220f949bfb04fca9d6e0c39e7']
А как сделать обратное действие не подскажете? То есть выбрать товары у которых только одно совпадение например по полю `option_value_id`='49' Если сделать такой запрос SELECT `product_id`, COUNT(DISTINCT(`option_value_id`)) AS `variants` FROM `oc_product_option_value` WHERE `option_value_id`='49' OR `option_value_id`='50' GROUP BY `product_id` HAVING `variants`='1' то выведет все записи у которых совпадение по одному из столбцов
1b94b1a8e180c568df35747829a899af47754636ead7489d67b1290f96901cc0
['486371e220f949bfb04fca9d6e0c39e7']
Found your question on Engineering.SE and followed it this way because this is a more appropriate fit. Think of ways you could subdivide the shape into something you could easier describe using a formula (i.e. your shape could be broken into pie shaped prisms with their slide side determined by the radius from the center of your dome)
caec7e771f2459bfc5d67f4bcc28a095bb0f16d46f4527363a9eccad0cc4c2a4
['487ee1b78320408086ee698e971f295c']
When you use the exec() method who is use to run an external program. You are on windows apparently, grep is only for unix system (Linux ...). <?php function find($filePath, $stringToLookFor){ $handle = fopen($filePath, 'r'); $stringFound = false; // Init false while (($buffer = fgets($handle)) !== false) { // Loop through each file line if (strpos($buffer, $stringToLookFor) !== false) { // Check if in $buffer $stringFound = true; // String found } } fclose($handle); return $stringFound; } ?>
f52bb78cc16176551b8e615cded7fe539427c65fbe81ca8e35fed7b420b7a49b
['487ee1b78320408086ee698e971f295c']
Im looking to create a map that can be interactive. The best option that I found is leaflet, the thing is I don't find any resource explaining how to create my own map. Im looking to create a mall map where user can see all the stores, fountain ... How could I achieve that ?
03f2ca10d60b19eb2fe13f8bc453017f5f95d65c31a8cce20846d26ebe2347bd
['48881bed882041acaaaad936170059b2']
There are plenty of guides on how to get the members of specific groups from a text file and output them to a CSV, and I am now well versed in those, however, they don't quite meet my criteria and my knowledge doesn't quite let me get past this boundary. I have the following $Filename = "C:\Users\Username\Desktop\AD Groups.txt" $GroupName = Get-Content $Filename Get-ADGroupMember -identity $GroupName | select name, $GroupName | Export- csv -path C:\Temp\Groupmembers.csv -NoTypeInformation What I want to do though, is have something that gets the users in the groups specified in the text file and outputs them to a CSV file that looks like this GroupName MemberName Group 1 All the members of that group ... Group 2 All the members of that group ... All the current versions I have found do this Group Name MemberName Group 1 Name1 Group 1 Name 2 Group 2 Name 1 Group 2 Name 2 Group 3 Name 1 etc.
78507486e3ee312709c0915e5d3ea05df2681c0f99403a4b18f763014d1ad3aa
['48881bed882041acaaaad936170059b2']
I have no idea where to even start with this, so I am not necessarily looking for an exact answer, but any tips or assistance is appreciated! I would like to compare the name of the PC I am running the Powershell script from against a group in AD. If the PC name matches the name of a PC in the group, I want it to write a specific file to a folder. I know how to do parts individually such as write files to folders and lookup which PC I am on. I can get Powershell to return results against that group, for example, GetProcess $ComputerName = Hostname $ADGroup = Get-ADGroupMember -Identity TagTest foreach ($Computer in $ADGroup) { Get-Process } But can't work out how to only do that if the PC I am on matches one in the group.
1d973dd812c5ec673973bf57da58a4e5f1b37245dcc917366e4d72ae5e5e4d9e
['4890696a3bac44d790cea61a48f8da37']
I'm trying to create a script that will auto-downloads the Bing wallpaper of the day so it can be my desktop background, and so far I found out that the url for it is hidden in the g_img tag. So what I've done so far is find the position of g_img={url: " and then for the next ". from os.path import expanduser import urllib import os HOME = expanduser("~") os.system("wget https://www.bing.com") str="g_img={url: \"" file="index.html" pos=open(file, 'r').read().find(str) pos2=open(file, 'r').read().find("\"", pos) # function to get the url string # function to get PicName BingBackUrl= "https://www.bing.com%s" % url urllib.urlretrieve(BingBackUrl, PicName) os.system("gsettings set org.gnome.desktop.background picture-uri file://%s/%s" % (HOME, PicName))
09ec6e2dceb49ad85e0684c2b1e432f867db2656c37a7b49d59ba0782d01e0b4
['4890696a3bac44d790cea61a48f8da37']
So here's the thing -- I'm trying to install CMake (and the installation was almost complete too) but then it showed this message: CMake Error at cmake_install.cmake:36 (file): file cannot create directory: /usr/local/doc/cmake-3.7. Maybe need administrative privileges. Screen shot: since stack overflow won't let me post images, here's a link: https://s13.postimg.org/8vygwqiwn/Screenshot_from_2016_11_04_17_39_11.png But the thing is, I am the admin. Does anyone know what that problem is?
3c5fb92acdc0525f6e3e9757184898d6205a686c8e950af4fe9509c02e2f2ae1
['48a40547cf944f9189667fddc9f53577']
I remember there's a cave in the North of Skyrim on a small island if I am not mistaken and there are two frost atronachs that are not summoned by anyone and you must fight them. I think it's part of a quest. What's the name of the cave and how do you teleport to it through console command?
15fd231b8ae3d40d27c84426125179f5665d1a01ce7242a719cae241f0c09ea4
['48a40547cf944f9189667fddc9f53577']
Is there a way to trigger a random event in Skyrim using console commands? I want to trigger the random encounter "The Drunken Dare". https://elderscrolls.fandom.com/wiki/Random_Encounters_(Skyrim) An Argonian will approach the Dragonborn and claim that he had been met during "A Night to Remember" during the drunken night with <PERSON>, claiming that he was offered 10,000 gold to break into a bandit camp and steal a hat from the chief. If the Dragonborn does not give him the gold, he will become hostile and attack. He can also be persuaded into only paying 750 gold. Is there a way to do this through console command?
d00d630ef7d8dba22c98db6e610016330fcdaef23ca13badffa51c06703375fb
['48b417a668a5409cb650ade55b862cb7']
I want to make a python package with numpy, pandas, scipy and sklearn, so I can take it to any linux without install python, but i came across this: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/__init__.py", line 180, in <module> from . import add_newdocs File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module> from numpy.lib import add_newdoc File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module> from .type_check import * File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module> import numpy.core.numeric as _nx File "/data1/sigmoidguo/TOOLS/python27/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module> from . import multiarray ImportError: libblas.so.3: cannot open shared object file: No such file or directory How can I fix it without root permission? PS: I don't have root permission, so I can't install python site-packages to python...
e4dfc36bc4dea97e8cc8ad3a5d198b980cdb094c130a63f22ad2b5358853d611
['48b417a668a5409cb650ade55b862cb7']
you need a java map not a scala map! according to the function below: /** * Sets categoricalFeaturesInfo using a Java Map. */ @Since("1.2.0") def setCategoricalFeaturesInfo( categoricalFeaturesInfo: java.util.Map[java.lang.Integer, java.lang.Integer]): Unit = { this.categoricalFeaturesInfo = categoricalFeaturesInfo.asInstanceOf[java.util.Map[Int, Int]].asScala.toMap } the code source
b8823ebf75e935efb8e6c20af6201391d346627b8aab62b5eded4bf146f97029
['48b942cfac45433bad5409035c4f0315']
finally here is the solution I had found last week, I want to thank you server.js var express = require('express'), multer = require('multer'), swig = require('swig'), path = require('path'), mongoose = require('mongoose'), app = express(); //app.use(express.logger()); app.use(express.urlencoded()); app.use(express.static(path.join(__dirname, 'public'))); app.engine('html', swig.renderFile); app.set('view engine', 'html'); app.set('views', __dirname+'/views'); mongoose.connect('mongodb://*:*@ds145438.mlab.com:45438/blog'); var Article = mongoose.model('Article', {title: String,img: String, content: String, updated: Date}); app.get('/', function(req, res){ Article.find({}).sort({updated: -1}).exec(function(err, articles){ if(err){throw err;} data = {title: 'Mon super blog', articles: articles}; res.render('index', data); }) }); app.get('/article/:id', function(req, res){ var article = Article.findById(req.params.id, function(err, article){ if(err){throw err} var data = {article: article, title: article.title}; res.render('article', data); }); }); app.post('/update/:id', function(req, res){ Article.update({ _id : req.params.id}, { title: req.body.titre, img: '/uploads/' + req.file.filename, content: req.body.contenu, updated: new Date(), }, function(err){ if(err){throw err;} res.redirect('/'); }); }); var upload = multer({dest: __dirname + '/public/uploads'}); app.post('/create',upload.single('img'), function(req,res) { console.log('req : ', req.file) var article = new Article({ title: req.body.titre, img: '/uploads/' + req.file.filename, content: req.body.contenu, updated: new Date(), }); article.save(function(err, article){ if(err){throw err;} res.render('created'); }); }); app.get('/edit/:id', function(req, res){ var article = Article.findById(req.params.id, function(err, article){ if(err){throw err} var data = {article: article, title: 'Modifier ' + article.title}; res.render('edit', data); }) }) app.get('/destroy/:id', function(req, res){ Article.remove({ _id : req.params.id}, function(err){ if(err){throw err;} res.redirect('/'); }); }); app.get('/create', function(req, res){ var data = {title: 'Ajouter un article'}; res.render('create', data); }); app.post('/store', upload.single('img'), function(req, res){ console.log('req.body : ', req.body) console.log('req.file : ', req.file) var article = new Article({ title: req.body.titre, img: '/uploads/' + req.file.filename, content: req.body.contenu, updated: new Date(), }); article.save(function(err, article){ if(err){throw err;} res.render('created'); }); }); app.listen(3000); console.log('App running http://localhost:3000'); article.html {% extends 'layout.html' %} {% block content %} <span class="pull-right"><a class="btn btn-danger remove" href="/destroy/{{article.id}}">Le bouton magique</a></span> <h1>{{article.title}}</h1> <img src="{{article.img}}" alt="img"> <p>{{article.content}}</p> <span class="date"> Mis à jour {{article.updated.getDate()}} / {{article.updated.getMonth() +1}} / {{article.updated.getFullYear()}} </span> <div class="pull-right"> <a href="/edit/{{article.id}}" class="btn btn-default">Modifier</a> </div> {% endblock %}
335e5f3a3d889c1302c42e052b8c669727d2695f6a71eb6f7fe9ea9e38a1fe86
['48b942cfac45433bad5409035c4f0315']
I am creating a small blog with node.js, my blog works perfectly locally, but I would like to add images to my article, I already use bootstrap to display my input but at the node. i can not save my image can you help me please? I use Mongoose as an online server (I work under linux) server.js var express = require('express'), swig = require('swig'), path = require('path'), mongoose = require('mongoose'), app = express(); app.use(express.logger()); app.use(express.bodyParser()); app.use(express.static(path.join(__dirname, 'public'))); app.engine('html', swig.renderFile); app.set('view engine', 'html'); app.set('views', __dirname+'/views'); mongoose.connect('mongodb://**:**@**.mlab.com:**/blog'); var Article = mongoose.model('Article', {title: String, content: String, updated: Date}); app.get('/', function(req, res){ Article.find({}).sort({updated: -1}).exec(function(err, articles){ if(err){throw err;} data = {title: 'Mon super blog', articles: articles}; res.render('index', data); }) }); app.get('/article/:id', function(req, res){ var article = Article.findById(req.params.id, function(err, article){ if(err){throw err} var data = {article: article, title: article.title}; res.render('article', data); }); }); app.post('/update/:id', function(req, res){ Article.update({ _id : req.params.id}, { title: req.body.titre, content: req.body.contenu, updated: new Date() }, function(err){ if(err){throw err;} res.redirect('/'); }); }); app.get('/edit/:id', function(req, res){ var article = Article.findById(req.params.id, function(err, article){ if(err){throw err} var data = {article: article, title: 'Modifier ' +article.title}; res.render('edit', data); }) }) app.get('/destroy/:id', function(req, res){ Article.remove({ _id : req.params.id}, function(err){ if(err){throw err;} res.redirect('/'); }); }); app.get('/create', function(req, res){ var data = {title: 'Ajouter un article'}; res.render('create', data); }); app.post('/store', function(req, res){ var article = new Article({ title: req.body.titre, content: req.body.contenu, updated: new Date() }); article.save(function(err, article){ if(err){throw err;} res.render('created'); }); }); app.listen(3000); console.log('App running http://localhost:3000'); create.html {% extends 'layout.html' %} {% block content %} <form role="form" action="/store" method="post"> <div class="form-group"> <label for="titre">Titre</label> <input type="text" name="titre" class="form-control" placeholder="titre de l'article" required> </div> <div class="form-group"> <label for="titre">Titre</label> <label for="contenu">Contenu de l'article</label> <textarea name="contenu" class="form-control" placeholder="Contenu de l'article" rows="3" required></textarea> </div> <form> <div class="form-group"> <label>Telecharger une image</label> <input type="file" class="form-control-file" name="img"> </div> </form> <button type="submit" class="btn btn-default">Ajouter </button> </form> {% endblock %} article.html {% extends 'layout.html' %} {% block content %} <span class="pull-right"><a class="btn btn-danger remove" href="/destroy/{{article.id}}">Le bouton magique</a></span> <h1>{{article.title}}</h1> <p>{{article.content}}</p> <span class="date"> Mis à jour {{article.updated.getDate()}} / {{article.updated.getMonth() +1}} / {{article.updated.getFullYear()}} </span> <div class="pull-right"> <a href="/edit/{{article.id}}" class="btn btn-default">Modifier</a> </div> {% endblock %}
bc053287775ecd441ff59a09ba1e45b54f2ba924c011a29f2932e39e8e6059ae
['48be6c77cc0f4fb580f5575bbee42e11']
I'm looking for a way to test some network connectivity scenarios using UIAutomation (e.g. making sure the right messages are shown to the user for various connectivity scenarios). Has anyone come across a way to turn off the network on an iOS device (e.g. enable Airplane mode) in a scriptable way? Thanks,
620cb1ad499b4bf1beb52c6b9381c0fcd063b7a4cc8a8ef635dcf12f681ddbbe
['48be6c77cc0f4fb580f5575bbee42e11']
I need some help understanding the use of the contentStretch property on a UIView. I'd appreciate 1) some guidance on how to achieve the effect I'm going for and 2) a reference to any comprehensive documentation that exists on how to use this property. While I thought I understood the Apple documentation, I now see that I don't. Here is what I'm trying to do. I have a custom UIView that renders a view that looks like figure a. below. The drawRect method of this UIView paints the inner box on the left (with the rounded corners and white background) with a different color and affect than is used for the rest of the view. Also, the 4 corners of the UIView are not stretchable (this would result in distortion) so I need to stretch only the center of the UIView background. I want to grow this view to a shape similar to that pictured in figure b. below. In doing so I want only the portion of the view outside the white box (or to the right of the white box) to be stretched/repeated as I increase the UIView's height. In all of my attempts I have only been able to produce a strecth that affects the entire width of the view and results in a view similar to figure c. Is it possible for me to achieve the effect that I want (figure b.) using contentStretch? Is there some other technique I should be using short of re-drawing the entire view, or is re-drawing the only (or best) way to go about this? Thanks,
9e99a4af54878a2133bda4fa60c9b5ff539fedfd6929acd4468b05ebc9fabbbc
['48c094a6ebdb4e1b89f5163fbb424345']
I have a following list of checkboxes: <input type="checkbox" name="day_of_week" value="1">Monday <input type="checkbox" name="day_of_week" value="2">Tuesday <input type="checkbox" name="day_of_week" value="3">Wednessday <input type="checkbox" name="day_of_week" value="4">Thursday <input type="checkbox" name="day_of_week" value="5">Friday <input type="checkbox" name="day_of_week" value="6">Saturday <input type="checkbox" name="day_of_week" value="7">Sunday After user submits the full form, I receive it in another file: $week_days = mysqli_real_escape_string($this->db->conn_id, $_POST['day_of_week']) But then $week_days only contains the value of the last checked checkbox, not all of them. How can I receive all the values?
0d23920f6c452397a49593e50f9a08fc62d9ecd4073db0e611cde14e575416c3
['48c094a6ebdb4e1b89f5163fbb424345']
I have a program that I'm currently writing in English. In future, I would like to make the program multilingual, therefore I'm wondering what's the best option to do so. I thought about this two option for now: Enable users to change language in settings; Select the appropriate language while downloading; With each option comes a problem: A ton of code dedicated to displaying one message in different languages; I will have to make many versions just to change the language of the displayed text; Now my question is, which one of these options is more memory efficient and user friendly? Maybe neither of them are? Do you have any other option that is better than given two?
c3757de419cc50b5542efde178d34e8892bdfc98dda295f751ed1b5ade5f11f0
['48ce93ac12e241e0856829d3c66e0438']
My main intention is to pass a pointer to a structure, to a function, which will allocate memory and fill all its values. After returning back i will print it on screen. Structure looks like this. struct isolock{ char *name; unsigned int state;}; typedef struct isolock lock; Please note i can not change declaration of this structure. My main function is very simple like this. int main(){ int i = 0; isolock *lock = NULL; fillArray(&lock); //print struct contents for(i=0;(lock+i)->name;i++){ printf("name = %s status = %u \n", (lock+i)->name,(lock+i)->state); } } fillArray function is suppose to allocate n + 1 memory blocks for my structure where n is the actual number of locks present. whereas last (n+1)th block will be filled with zero. So that while printing from main, i can just check for this condition, without need of worrying about length of structures which i have allocated. My problem is in fillArray function. static const char *array[] = {"SWMGMT_LOCK","OTHER_LOCK"}; void fillArray(isolock **dlock){ int i = 0; if (*dlock == NULL){ *dlock = (isolock *)malloc((sizeof (*dlock)) * 3); //allocate space for holding 3 struct values for(i=0;i<2;i++){ (*(dlock) + i)->name = strdup(array[i]); (*(dlock) + i)->state = (unsigned int)(i+1); } (*(dlock) + i)->name = 0; //LINE100 (*(dlock) + i)->state = 0; } } o/p: name = status = 1 name = OTHER_FP_LOCK status = 2 Actually this LINE100 causes problem. It actually replaces already filled structure entry i.e., this line makes dlock[0]->name to be filled with 0. whereas dlock[1] remains unchanged. My gdb log shows something like this. All these are logs are taken after allocation and filling values. (gdb) p (*(dlock)+0) $10 = (isolock *) 0x804b008 (gdb) p (*(dlock)+1) $11 = (isolock *) 0x804b010 (gdb) p (*(dlock)+2) <== Note here 1 $12 = (isolock *) 0x804b018 (gdb) p *(*(dlock)+0) $13 = {name = 0x804b018 "SWMGMT_LOCK", state = 1} <== Note here 2 (gdb) p *(*(dlock)+1) $14 = {name = 0x804b028 "OTHER_FP_LOCK", state = 2} (gdb) n 33 (*(dlock) + i)->state = 0; (gdb) 35 } (gdb) p *(*(dlock)+2) $15 = {name = 0x0, state = 0} (gdb) p (*(dlock)+2) $16 = (isolock *) 0x804b018 From note 1 and note 2 its very clear that, strdup has returned already allocated memory location by malloc i.e., first call to strdup has returned the address of dlock[2]. how could this happen. because of this, (*dlock+2)->name = 0 has caused dlock[0]->name to be filled with 0. To easily explain this problem, Malloc has returned me three addresses. for easy understanding lets say, {1000,1008,1010} Two times i ve called strdup which has returned {1010,1018} this 1010 and 1018 are stored in char *name of lock[0] and lock[1] respectively. Can someone tell me, am i doing something wrong in this code or is this problem of strdup ( allocating a already allocated block of memory) NOTE: When i have changed char *name to char name[20] and instead of strdup, i used strcpy and it worked perfectly.
6957c8806da9fcc43fcea738241695a55e6d1b300f74121bebecf2d025481f77
['48ce93ac12e241e0856829d3c66e0438']
Answering my own question. "context" value can be filled with value returned by "snmpv3_get_engineID" NULL As long as, configurations are proper in terms of v3 i.e., trapsess -v3 specified in the host and on the target, engineid of net-snmp is specified, then everything works fine. Only unclear part still is, if someone is able to send v3 traps without specifying "context", in which scenario would it be useful really !
0915ae9ae6b70c980ba687da5475502cac87e98dff62f143f2b42b2085ed2c11
['48d3dd8882b54650b3d72561f602cd6b']
You can exclude files from Mercurial's tracking. This would have the desired effect but if you're using Mercurial for deployment (e.g. pulling changes down to the live server) the images/libraries would not get included. However, I see no reason why you'd want to avoid the versioning for images/libraries. I can't imagine a use case where including images/libraries would cause enough trouble to require workarounds. Unless you have a very good reason, include the images/libraries in Mercurial and be done with it.
5deb0360092252023345422febcd031a7b04875665aba0ee2c5c9544918779a0
['48d3dd8882b54650b3d72561f602cd6b']
You are not executing page1.php as a PHP script. Without a shebang line (e.g. #!/usr/bin/env bash) a script cannot be interpreted properly. Those errors you're receiving are appearing because bash is trying to interpret your file, not PHP. You have two options: Put a shebang line at the beginning of your scripts: #!/usr/bin/env php Execute the files with the PHP cli: php ./page1.php I suggest #2 if you're also going to use the scripts through apache, nginx, etc. Otherwise #1 makes more sense.
562ba7c224f8b885a40a64b3a1ad607643543b9bf0db0a578b8fe325de545c81
['48d887d125164ae4b8251b398fa6c76a']
I'm trying to assign a newly created phone number to an existing Messaging Service from the Twilio API. Here's my code so far: Creating the Messaging Service $createService = $twilio->messaging->v1->services ->create([ "friendlyName" => "Service", "inboundRequestUrl" => "https://example.com/folder/file.php" ] ); $messagingServiceId = $createService->sid; Creating the phone number and assigning to the Messaging Service $smsNumber = $_POST["smsNumber"]; $addPhoneNumber = $twilio->incomingPhoneNumbers ->create([ "phoneNumber" => $smsNumber, "smsApplicationSid" => $messagingServiceId ] ); With the previous code, I'm able Messaging Service is created, the phone number is added to the account but it is not assigned to the Messaging Service. What am I missing here? Thanks for your help.
d1eedd421d64a6a00668cb4b6b49380f8caa3018476d59e12b5c8ce1830f7eed
['48d887d125164ae4b8251b398fa6c76a']
I'm trying to achieve the following task in php: Setting dynamic arrays in session variables. Adding a prefix named order_ to these session variables. Looping through the session variables that starts with the prefix order_. Here's the code I have so far: foreach($array as $subarray) { foreach($subarray as $subset) { $nomInput = $subset['Nom']; $inputArray=[ 1=>[ ['Nom'=>$input->get($nomInput, null, 'string'), 'LabelFr'=>$subset['LabelFr'], 'LabelEn'=>$subset['LabelEn']] ] ]; $session->set('order_'.$nomInput, $inputArray); } } With this code, I'm able to set the variables correctly with the prefix. However, I can't find a way to loop through the results with a foreach loop. Can somebody give me some pointers on how to manipulate only the session variables that have the prefix order_ with a foreach loop? Thanks a bunch!
bee9679ca455738c68d283b1d8c687056a818dc6ff7a20250ff707f2c89b632a
['48df1caad5ed4dc0949ca5b4cf9584d7']
Full task: Consider the subgradient method with constant step size a,uesd to minimize the quadratic function f(x)=1/2(x(trasposed)Px+q(transposed)x,P is positive semidefinite matrix.For which values of a do we have convergence? What values of a give the fastest asymptotic convergence?
deea5c24cfab230244a72194abbe4f95feb3973769f43776a04f6264d0c631b2
['48df1caad5ed4dc0949ca5b4cf9584d7']
Calculate subgradient of the function $f(x)=|x-3|+|x+1|$ at point $x=-1$ and $x=3$. At $x=-1$ for all $y\in R$ following should be satisfied: $|y-3|+|y+1|\ge4+k(y+1)$, where $k$ is subgradient. But how do I solve that? How to find $k$? Same for $x=3$ I get $|y-3|+|y+1|\ge4+k(y-3)$.
934c9d338f39a9d7ca977bf6a3c4665f123814a4ff3ae9079ce65102c0a81f70
['48e2e747d1d840c4bad47344763f04c8']
Are you wanting to upload a picture to your website. Or are you looking for a form that lets a user upload an image?. I would recommend checking out this link - https://www.w3schools.com/html/html_images.asp. W3schools have lots of good tutorials for beginners when it comes to HTML and CSS. How to make a simple image upload using Javascript/HTML. If you want a user to do it then it has already been answered on here see link. FYI. When asking questions on here try to be as specific as possible. Include snippets of your code etc. General questions can be difficult to answer :)
4fdeb14292603308148383300d2837dd3cc7838c771d7504392c76ab3e3a8ccb
['48e2e747d1d840c4bad47344763f04c8']
Your program should look like this <!DOCTYPE html> <html> <head> <link rel="stylesheet" href="styles.css"> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html> you should add the head tag yourself to the top of the document if you do not have one already. for the href change that to the name of your css file. <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html> <HTML amp='amp' lang='en'> <head> <meta charset='utf-8'/> <meta content='width=device-width, initial-scale=1, minimum-scale=1' name='viewport'/> <!--[if ie]><meta content='IE=9; IE=8; IE=7; IE=EDGE; chrome=1' http-equiv='X-UA-Compatible'/> <![endif]--> <meta content='blogger' name='generator'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <link href='https://justpaste.it/redirect/3qnyk/http://www.blogger.com/openid-server.g' rel='nofollow'/> <link expr:href='' rel='nofollow'/> <link expr:href='' rel='nofollow'/> </head>
0e783ca3f043f0b564b375068e9d9db479890486d988e6dbf14aa9e2e2688ce2
['490eb1e4c4b6416eb6443671bd1283a8']
I am developing a xamarin.forms application(Android, iOS and UWP) with Xamarin 4.4. In which I am using a Listview to populate data in it. I tested the app in android and the scrolling is working perfectly in it. While testing the UWP in Windows 10(version 1909)[Point of Sale Machine], the scrolling is not working like in android. I have to use the Scroll Bars for scrolling. Is there any extra settings, I have to do to accomplish the same in UWP? or It is not possible to achieve the same in UWP. this is the code, I am using <ListView x:Name="lstPOSItems" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" ItemsSource="{Binding AddedItems}" SeparatorVisibility="None" Visual="Material" ItemTapped="lstPOSItems_ItemTapped"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <Frame HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" BackgroundColor="Transparent" Padding="0"> <Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Margin="3"> <Label Text="{Binding OrderDetails, Mode=TwoWay}" IsVisible="{Binding OrderDetails,Converter={StaticResource StringToBoolConverter}}" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/> </Frame> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>
60a555b4a54d49f06531e15e895733987bf6ecd0075dee65cac3fdebd72161e9
['490eb1e4c4b6416eb6443671bd1283a8']
I am developing a Xamarin.Android App to read the incoming call phone number, and I was able to get the same in Android Oreo. But once we upgraded to Android Pie string telephone = intent.GetStringExtra(TelephonyManager.ExtraIncomingNumber); always returns 'null'. While Searching, I find out that by adding 'READ_CALL_LOG' permission it will work in Android Pie. I already tried by adding 'READ_CALL_LOG' to AndroidManifest.xml, Also given the run time permission for 'READ_CALL_LOG' and 'READ_PHONE_STATE' in my MainActivity.cs But Nothing worked for me. Please tell me if I am missing anything? ```in AndroidManifest.xml <uses-permission android:name="android.permission.READ_CALL_LOG" /> ```in MainActivity.cs if (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadPhoneState) != Android.Content.PM.Permission.Granted || Manifest.Permission.ReadCallLog) != Android.Content.PM.Permission.Granted) { ActivityCompat.RequestPermissions(this, new string[] { Manifest.Permission.ReadCallLog, Manifest.Permission.ReadPhoneState },2); }
6451513e1b66c03d5561886b22a13e0b60903dbbee129661a19fef6b88b3930f
['490f4c3cdbda43e5bf15c16d26cac0d1']
Which driver did you installed?? If you have installed a proprietary driver, then you might want to remove it from recovery console (option is on the boot screen) and install the open source graphics driver. To remove the driver you have to sudo apt-get purge fglrx* and you can google to find out how to install.
d7545fe7c9ed44e2c7b30fed1e809d832853b41beee34cc5cc6016076e27ff68
['490f4c3cdbda43e5bf15c16d26cac0d1']
I believe this is clearly on-topic, despite the opinion of "<PERSON>", "<PERSON>", "<PERSON>", "<PERSON>" and "<PERSON>". I have noted the rationale behind my belief extensively in an edit above. I don't know how to mark this question not to be *on hold* anymore.
fc121f4f2f39b8f2383824c7629893dd95664fd65f89b64c1748a5c5fc95feda
['4913ad92220e471882bdc02314541d1a']
I'm working on a WPF application running on a multi-touch tablet that currently uses an InkCanvas to capture ink. Unfortunatelly, the InkCanvas not only captures ink when a user uses a Stylus, but also when a user draws strokes with his fingers. As I am not interested in these finger-generated strokes, I am looking for a way to detect the type of the currently present Stylus device such that I can just ignore strokes generated by a finger completely. Under normal conditions, I would use Stylus.CurrentStylusDevice.TabletDevice.Type. However, things get a bit complicated because of the InkCanvas. Regardless of the currently present Stylus device, Stylus.CurrentStylusDevice always returns null when called from a custom DynamicRenderer (which is responsible for rendering ink dynamically while the user is writing on the tablet/InkCanvas). I think the reason for this is the fact that a StylusPlugIn (like a DynamicRenderer) runs in its own thread before the normal WPF UI thread responds to the input... So my question is: How can I detect the type of the currently present Stylus device from within a StylusPlugin like the DynamicRenderer?
ed1d9ace91d6cac192f4554c963a28bcd984de2abb286126b6233266bb123dfe
['4913ad92220e471882bdc02314541d1a']
<PERSON> To your 2nd question is a 'home' I guess // To your 3rd question I got `server:--, address:--` and below this `Non-authoritative answer: Name: -- and Address: -- ` Notice the address are different on both sections // To your 4th question, it's the same, it hangs on the ...STARTING... for `MacBook-3` and `-2`
9da0933b68e6fbb69a225791b70d0b151d66ce5e6362ce33214fa3da73f60c97
['4923b5b4f9d24c38983aaec0ae74a55f']
I have done some digging and found the solution. The cause of the problem was that for some reason the FAN service was implicitly enabled in the server configuration. I made it work by adding the below line to the JAVA_OPTIONS in setDomainEnv.sh file. -Doracle.jdbc.fanEnabled=false Now everything works like a charm.
619f987c12da726d22f25d6ab908ea89e1bd7d700da452850ad9fc9a706e4c0b
['4923b5b4f9d24c38983aaec0ae74a55f']
I have just completed a fresh new installation of Oracle Fusion Middleware 12c. This one came with a new version of Weblogic <IP_ADDRESS>.0. Whenever I try to create a new JDBC connection I receive the below error. <BEA-240003> <Administration Console encountered the following error: java.sql.SQLException: Could not establish a connection because of java.lang.IllegalArgumentException: ONS configuration failed at weblogic.jdbc.common.internal.DataSourceUtil.testConnection0(DataSourceUtil.java:423) at weblogic.jdbc.common.internal.DataSourceUtil.access$000(DataSourceUtil.java:24) at weblogic.jdbc.common.internal.DataSourceUtil$1.run(DataSourceUtil.java:285) at java.security.AccessController.doPrivileged(Native Method) at weblogic.jdbc.common.internal.DataSourceUtil.testConnection(DataSourceUtil.java:282) at com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:937) at com.bea.console.actions.jdbc.datasources.creategridlinkdatasource.CreateGridLinkDataSource.testJDBCConnection(CreateGridLinkDataSource.java:615) at com.bea.console.actions.jdbc.datasources.creategridlinkdatasource.CreateGridLinkDataSource.testRACConnectionConfiguration(CreateGridLinkDataSource.java:437) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870) at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809) at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478) at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306) at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336) at org.apache.beehive.netui.pageflow.internal.FlowControllerAction.execute(FlowControllerAction.java:52) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044) at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:64) at org.apache.beehive.netui.pageflow.interceptor.action.ActionInterceptor.wrapAction(ActionInterceptor.java:184) at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.invoke(ActionInterceptors.java:50) at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors$WrapActionInterceptorChain.continueChain(ActionInterceptors.java:58) at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:87) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116) at com.bea.console.internal.ConsolePageFlowRequestProcessor.processActionPerform(ConsolePageFlowRequestProcessor.java:265) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556) at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853) at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631) at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158) at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:262) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:134) at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199) at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129) at com.bea.portlet.adapter.scopedcontent.framework.internal.PageFlowUtilsBeehiveDelegate.strutsLookupInternal(PageFlowUtilsBeehiveDelegate.java:43) at com.bea.portlet.adapter.scopedcontent.framework.PageFlowUtils.strutsLookup(PageFlowUtils.java:108) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:707) at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:141) at com.bea.portlet.adapter.scopedcontent.PageFlowStubImpl.processAction(PageFlowStubImpl.java:108) at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111) at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181) at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167) at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225) at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334) at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361) at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352) at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184) at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:465) at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:291) at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:219) at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:275) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:64) at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:125) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at com.bea.console.internal.ParamFilter.doFilter(ParamFilter.java:38) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:32) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:78) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3701) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3667) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326) at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197) at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203) at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71) at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269) at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1703) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1663) at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272) at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352) at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337) at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57) at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41) at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:644) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:415) at weblogic.work.ExecuteThread.run(ExecuteThread.java:355) I have banging my head into it for some time now and Google wasn't much help. Any help will be really appreciated. Thanks
c4f5d384145344668a2449172035b72b8ced9c789837842daf3ef1a7e7d0925c
['49254ad44ca54b7f877e0cdf03b50e9e']
the SISO line? you mean the MISO line? I don't have a Slave Select line. There is a Handshake line, but it can be pulled low by either side as well. If I'm missing something obvious here on how to determine the direction without splitting, please elaborate :D
7ec266c4f6c4a93787a39cd82f898eddf59190644e6e41c5e7b60f6d740ab4d8
['49254ad44ca54b7f877e0cdf03b50e9e']
I abandoned the original circuit and got it working with a different one. The keyword to look for here is I2C isolation. Because isolation is by definition unidirectional, bidirectional channels like I2C have to be separated before they can be isolated. Texas Instruments has a nice document describing two different methods for isolation. One of them (ISO154x Method) requires different voltage levels on both sides of the isolator, so that was not feasable for me. So I went for the other (ISOW7842) method. There is a separate document that explains this circuit in detail. I also found an Electronic Design article on the same topic using the same circuit. It includes a detailed calculation of the fine tuned resistor values. By simply omitting the isolator and grabbing the signals from the separated lines, I was able to achieve what I want. For me only one of the directions was actually separated, but by substracting the signals, one can get both directions indivudually quite easily.
ba46bbc6e54f33c1ed76c662ed7bf4047597b63b0f1ef80b4753c3ae43e5313e
['493a66c98e614f1cbc415b314839c970']
I sent a httpPost request in android to php page (In php page I used a php code to insert data into the table.) In android app is working fine but there are no activity in php page. Here is the full code private class MyAsyncTask extends AsyncTask<String, Integer, Double>{ @Override protected Double doInBackground(String... params) { // TODO Auto-generated method stub postData(params[0]); return null; } protected void onPostExecute(Double result){ pb.setVisibility(View.GONE); Toast.makeText(getApplicationContext(), "command sent", Toast.LENGTH_LONG).show(); } protected void onProgressUpdate(Integer... progress){ pb.setProgress(progress[0]); } public void postData(String valueIWantToSend) { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://<IP_ADDRESS>/android_connect/create_product.php"); try { // Add your data List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("myHttpData", valueIWantToSend)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request HttpResponse response = httpclient.execute(httppost); } catch (ClientProtocolException e) { // TODO Auto-generated catch block } catch (IOException e) { // TODO Auto-generated catch block } }
55f3202b54bcd05e2b371aaead862261f4863fe0d061eea9d797fa79f1d79c0c
['493a66c98e614f1cbc415b314839c970']
I am beginner in android and i created a list view with check box, it is working but now i want to view some items as checked when it loaded. so please help me here is my code adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_multiple_choice, list); OnClickListener listener = new OnClickListener() { @Override public void onClick(View v) { for(int a=0;a<5;a++) { // I want to view item no 2 and 4 checked when it loaded list.add("item"+a); } adapter.notifyDataSetChanged(); } };
aaa84e8bd267af2a5cca130d8336b2fabbd26cf43a0f0931b2342e2e6f220d18
['494082277605454592c86f7ee6708996']
I have a stored Procedure that do some operation and return 1 or 0 as below CREATE PROCEDURE dbo.UserCheckUsername11 ( @Username nvarchar(50) ) AS BEGIN SET NOCOUNT ON; IF Exists(SELECT UserID FROM User WHERE username =@Username) return 1 ELSE return 0 END and in C# i want to get this returned value i try ExcuteScalar but it didn't return any value ( i know if i replace return 0 with Select 0 ExcuteScalar will catach it .. but is it any way that allow me to get returned value with replace return with select ? NOTE : I don't want to user stored procedure output parameter also
864efd4d7aa5fcd5714982d3c4e9f57b145fae4c5f04209dc43ee3574ce84dd2
['494082277605454592c86f7ee6708996']
I have asp.net web page that have the following : <form id="WebCaptureForm" name="WebCaptureForm" onsubmit="return checkform(this);" enctype="multipart/form-data" method=post action="http://site/page.aspx?idn=1&tr=100d1165&action=savenew"> I want to make new page with master page that contain the same code but how can i make the above code in a web page that have a master page
4d446473fd0039fd0ba601a40c4d7deec36142eb2e46e5e8d67eb621dc0f8430
['494b971d71464c59b99d2682b4406828']
I have used to extract text data from PDF using Apache PDFBox API, but below code is not returned data sequentially (line by line) Code: try { RandomAccess scratchFile = null; pdDoc = PDDocument.loadNonSeq(new File(fileName), scratchFile); pdfStripper = new PDFTextStripper(); parsedText = pdfStripper.getText(pdDoc); system.out.println(parsedText); } catch (IOException e) { System.err.println("Unable to open PDF Parser. " + e.getMessage()); return null; }
85c48bea6ec0e7553ae5c7bfa3200edd3c707d8b6748b9eb1654e1344eb03ca7
['494b971d71464c59b99d2682b4406828']
I have a requirement like, Trigger an event when the idle well count maximum of last 12 months window. For Example: Well_date Count 1986-01-01 00:00:00 17 1986-02-01 00:00:00 16 1986-03-01 00:00:00 23 1986-04-01 00:00:00 33 1986-05-01 00:00:00 31 1986-06-01 00:00:00 42 1986-07-01 00:00:00 43 1986-08-01 00:00:00 43 1986-09-01 00:00:00 41 1986-10-01 00:00:00 42 1986-11-01 00:00:00 46 1986-12-01 00:00:00 52 Output: 1986-12-01 00:00:00 52 Suppose, if the event count is minimum of last 11 months then it will be ignored. Thanks in advance
60452139060ecbc58d9f2e5d2e8231e332300062509fe20526bbf53e6c927af8
['4978ce4452c247d98abf607be57cec0c']
I haven't seen anyone do this, but have wanted it myself. You might have to write it yourself, but it shouldn't be too bad - assuming the object to serialize is simple; all you'd have to do is loop through the fields and have a map from python types to avro types. Nested fields will require something like recursion to dig into each object.
dd0d2c046a4f0bc007165ab3c3d87353fffa9a25bbc14252d2d5e11801b8e3c8
['4978ce4452c247d98abf607be57cec0c']
The 'problem' is that you are doing "include('characters.urls')" as far as I can find, rest_framework_swagger has a hard time finding any urls that aren't explicitly in your root urlpatterns - if you want to guarantee that swagger will find them you'll have to expand them into your urlpatterns instead of including them from another file, i.e.: urlpatterns = patterns('', # Examples: # url(r'^$', 'nwod_characters.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^api/root$', api_root), url(r'^api/mages$', mage_list, name='mage-list'), url(r'^api/mages/(?P<pk>[0-9]+)$', mage_detail, name='mage-detail'), url(r'^api/users$', user_list, name='user-list'), url(r'^api/users/(?P<pk>[0-9]+)$', user_detail, name='user-detail'), .... I'd be happy to know if anyone has a way to configure swagger to avoid having to lump all of the urls.
f23678bfab6911a3905acbab59a6c9af3ea492acc69ad5500eed019bdc45e3ca
['4986cac555ed4e75809bfc1699fb9552']
How about presage? presage: (noun) A feeling or intuition of what is going to occur. (The Free Dictionary) (verb) To give an indication of something in advance. (The Free Dictionary) (verb) Be a sign or warning of (an imminent event, typically an unwelcome one) (Oxford Dictionary) or portend: (verb) To give an indication of something in advance. portent: (noun) An indication of something important or calamitous about to occur.
11fbe82e9a5670b86a0074b9cd783e1993a63fccf5ec454ebb3ec0507e676516
['4986cac555ed4e75809bfc1699fb9552']
The Oxford Dictionary defines a completist as "One who wishes to have or collect complete set of some particular items". I didn't mean someone who actually wishes to have complete set of something, but someone who gets soon bored with something he already has and thinks it is not what he wants and tries and wishes to have or experience something else in the hope that next one satisfies him.
d3dfe8ec664f2224ed12e1d96600c00007e7b36115e4c325cacc2e69a8132864
['498f2326fcbd4801bf05c22b8e31bee3']
I've got a Hazelcast cluster running in docker containers using the discovery api with zookeeper. This all works fine and the cluster starts up and works as expected. My issue is connecting a client to the cluster from another server. The cluster is returning 127.0.0.1 and 172.17.0.1 to zookeeper as it's cluster addresses, which means the client works fine running on the same machine but won't connect from a remote machine even with 172.17.0.1 mapped in the client's host file to the Hz cluster's server ip. I've tried starting the containers with net=host and -h to get it to return an address I can map in the client's hosts file but nothing seems to work. Am I missing something? Below is the log and stack trace from the client /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/datagrid/target/classes:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/domain/target/classes:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-client/1.2.3/hbase-client-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-annotations/1.2.3/hbase-annotations-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-common/1.2.3/hbase-common-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-protocol/1.2.3/hbase-protocol-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-auth/2.5.1/hadoop-auth-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpcore/4.2.4/httpcore-4.2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-common/2.5.1/hadoop-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-annotations/2.5.1/hadoop-annotations-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/oliverbuckley-salmon/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.5.1/hadoop-mapreduce-client-core-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.5.1/hadoop-yarn-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.5.1/hadoop-yarn-api-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-all/3.7.2/hazelcast-all-3.7.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-framework/2.10.0/curator-framework-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-client/2.10.0/curator-client-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-x-discovery/2.10.0/curator-x-discovery-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-recipes/2.10.0/curator-recipes-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-test/2.10.0/curator-test-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-zookeeper/3.6.1/hazelcast-zookeeper-3.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.example.datagrid.cachewarmer.CacheReader 2016-11-28 20:51:35 INFO TradeMapStore:64 - Trying to connect to HBase 2016-11-28 20:51:35 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 2016-11-28 20:51:37.473 java[25412:2402206] Unable to load realm info from SCDynamicStore 2016-11-28 20:51:38 INFO RecoverableZooKeeper:120 - Process identifier=hconnection-0x53443251 connecting to ZooKeeper ensemble=138.68.147.208:2181 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:host.name=172.20.10.2 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.version=1.7.0_45 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.vendor=Oracle Corporation 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.class.path=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/datagrid/target/classes:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/domain/target/classes:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-client/1.2.3/hbase-client-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-annotations/1.2.3/hbase-annotations-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-common/1.2.3/hbase-common-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-protocol/1.2.3/hbase-protocol-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-auth/2.5.1/hadoop-auth-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpcore/4.2.4/httpcore-4.2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-common/2.5.1/hadoop-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-annotations/2.5.1/hadoop-annotations-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/oliverbuckley-salmon/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.5.1/hadoop-mapreduce-client-core-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.5.1/hadoop-yarn-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.5.1/hadoop-yarn-api-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-all/3.7.2/hazelcast-all-3.7.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-framework/2.10.0/curator-framework-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-client/2.10.0/curator-client-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-x-discovery/2.10.0/curator-x-discovery-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-recipes/2.10.0/curator-recipes-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-test/2.10.0/curator-test-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-zookeeper/3.6.1/hazelcast-zookeeper-3.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.library.path=/Users/oliverbuckley-salmon/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/var/folders/sx/g9vbcw9d3j54gtj89n57g1fw0000gn/T/ 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.compiler=<NA> 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.name=Mac OS X 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.arch=x86_64 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.version=10.11.6 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.name=oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.home=/Users/oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.dir=/Users/oliverbuckley-salmon/IdeaProjects/sandpit 2016-11-28 20:51:38 INFO ZooKeeper:438 - Initiating client connection, connectString=138.68.147.208:2181 sessionTimeout=90000 watcher=hconnection-0x534432510x0, quorum=138.68.147.208:2181, baseZNode=/hbase 2016-11-28 20:51:38 INFO ClientCnxn:975 - Opening socket connection to server 138.68.147.208/138.68.147.208:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:38 INFO ClientCnxn:852 - Socket connection established to 138.68.147.208/138.68.147.208:2181, initiating session 2016-11-28 20:51:38 INFO ClientCnxn:1235 - Session establishment complete on server 138.68.147.208/138.68.147.208:2181, sessionid = 0x1583b2a4dbb0183, negotiated timeout = 90000 2016-11-28 20:51:38 INFO TradeMapStore:68 - Connected to HBase 2016-11-28 20:51:38 INFO CacheReader:32 - Connecting to Hz cluster Nov 28, 2016 8:51:38 PM com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the hazelcast schema location incorrect using default Nov 28, 2016 8:51:39 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTING 2016-11-28 20:51:39 INFO CuratorFrameworkImpl:235 - Starting 2016-11-28 20:51:39 INFO ZooKeeper:438 - Initiating client connection, connectString=138.68.172.212:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@644fa139 2016-11-28 20:51:39 INFO ClientCnxn:975 - Opening socket connection to server 138.68.172.212/138.68.172.212:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:39 INFO ClientCnxn:852 - Socket connection established to 138.68.172.212/138.68.172.212:2181, initiating session 2016-11-28 20:51:39 INFO ClientCnxn:1235 - Session establishment complete on server 138.68.172.212/138.68.172.212:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:51:39 INFO ConnectionStateManager:228 - State change: CONNECTED Nov 28, 2016 8:51:40 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTED Nov 28, 2016 8:51:56 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 1 of 2. 2016-11-28 20:52:07 INFO ClientCnxn:1096 - Client session timed out, have not heard from server in 26671ms for sessionid 0x15830869abd0077, closing socket connection and attempting reconnect 2016-11-28 20:52:07 INFO ConnectionStateManager:228 - State change: SUSPENDED 2016-11-28 20:52:09 INFO ClientCnxn:975 - Opening socket connection to server 138.68.172.212/138.68.172.212:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:52:09 INFO ClientCnxn:852 - Socket connection established to 138.68.172.212/138.68.172.212:2181, initiating session 2016-11-28 20:52:09 INFO ClientCnxn:1235 - Session establishment complete on server 138.68.172.212/138.68.172.212:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:52:09 INFO ConnectionStateManager:228 - State change: RECONNECTED Nov 28, 2016 8:52:25 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 2 of 2. Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTTING_DOWN 2016-11-28 20:52:25 INFO CuratorFrameworkImpl:821 - backgroundOperationsLoop exiting 2016-11-28 20:52:25 INFO ZooKeeper:684 - Session: 0x15830869abd0077 closed 2016-11-28 20:52:25 INFO ClientCnxn:512 - EventThread shut down Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTDOWN Exception in thread "main" java.lang.IllegalStateException: Unable to connect to any address in the config! The following addresses were tried:[localhost/127.0.0.1:5703, /172.17.0.1:5701, /172.17.0.1:5702, /172.17.0.1:5703, localhost/127.0.0.1:5702, localhost/127.0.0.1:5701] at com.hazelcast.client.spi.impl.ClusterListenerSupport.connectToCluster(ClusterListenerSupport.java:175) at com.hazelcast.client.spi.impl.ClientClusterServiceImpl.start(ClientClusterServiceImpl.java:191) at com.hazelcast.client.impl.HazelcastClientInstanceImpl.start(HazelcastClientInstanceImpl.java:379) at com.hazelcast.client.HazelcastClientManager.newHazelcastClient(HazelcastClientManager.java:78) at com.hazelcast.client.HazelcastClient.newHazelcastClient(HazelcastClient.java:72) at com.example.datagrid.cachewarmer.CacheReader.main(CacheReader.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Process finished with exit code 1 and the following is the command I'm using to launch the container docker run -p 5701:5701 -ti --add-host=a826d5422c4d:138.68.147.208 --net=host -h muhz1 --name muhz1 -d olibs/kappahz:v0.1 The add host is to map the Zookeeper for Hbase which I'm using as an underlying database for Hz, this works fine. Thanks in advance for your help, any hints or tips gratefully received. <PERSON><IP_ADDRESS> and <IP_ADDRESS> to zookeeper as it's cluster addresses, which means the client works fine running on the same machine but won't connect from a remote machine even with <IP_ADDRESS> mapped in the client's host file to the Hz cluster's server ip. I've tried starting the containers with net=host and -h to get it to return an address I can map in the client's hosts file but nothing seems to work. Am I missing something? Below is the log and stack trace from the client /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/bin/java -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/datagrid/target/classes:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/domain/target/classes:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-client/1.2.3/hbase-client-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-annotations/1.2.3/hbase-annotations-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-common/1.2.3/hbase-common-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-protocol/1.2.3/hbase-protocol-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-auth/2.5.1/hadoop-auth-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpcore/4.2.4/httpcore-4.2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-common/2.5.1/hadoop-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-annotations/2.5.1/hadoop-annotations-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/oliverbuckley-salmon/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/xerial/snappy/snappy-java/<IP_ADDRESS>/snappy-java-<IP_ADDRESS>.jar:/Users/oliverbuckley-salmon/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.5.1/hadoop-mapreduce-client-core-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.5.1/hadoop-yarn-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.5.1/hadoop-yarn-api-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-all/3.7.2/hazelcast-all-3.7.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-framework/2.10.0/curator-framework-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-client/2.10.0/curator-client-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-x-discovery/2.10.0/curator-x-discovery-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-recipes/2.10.0/curator-recipes-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-test/2.10.0/curator-test-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-zookeeper/3.6.1/hazelcast-zookeeper-3.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain com.example.datagrid.cachewarmer.CacheReader 2016-11-28 20:51:35 INFO TradeMapStore:64 - Trying to connect to HBase 2016-11-28 20:51:35 WARN NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 2016-11-28 20:51:37.473 java[25412:2402206] Unable to load realm info from SCDynamicStore 2016-11-28 20:51:38 INFO RecoverableZooKeeper:120 - Process identifier=hconnection-0x53443251 connecting to ZooKeeper ensemble=<IP_ADDRESS>:2181 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:zookeeper.version=3.4.6-1569965, built on 02/20/2014 09:09 GMT 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:host.name=<IP_ADDRESS> 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.version=1.7.0_45 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.vendor=Oracle Corporation 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.class.path=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/datagrid/target/classes:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/domain/target/classes:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-client/1.2.3/hbase-client-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-annotations/1.2.3/hbase-annotations-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-common/1.2.3/hbase-common-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-protocol/1.2.3/hbase-protocol-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-auth/2.5.1/hadoop-auth-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpcore/4.2.4/httpcore-4.2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-common/2.5.1/hadoop-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-annotations/2.5.1/hadoop-annotations-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/oliverbuckley-salmon/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/xerial/snappy/snappy-java/<IP_ADDRESS>/snappy-java-<IP_ADDRESS>.jar:/Users/oliverbuckley-salmon/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.5.1/hadoop-mapreduce-client-core-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.5.1/hadoop-yarn-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.5.1/hadoop-yarn-api-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-all/3.7.2/hazelcast-all-3.7.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-framework/2.10.0/curator-framework-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-client/2.10.0/curator-client-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-x-discovery/2.10.0/curator-x-discovery-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-recipes/2.10.0/curator-recipes-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-test/2.10.0/curator-test-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-zookeeper/3.6.1/hazelcast-zookeeper-3.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.library.path=/Users/oliverbuckley-salmon/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/var/folders/sx/g9vbcw9d3j54gtj89n57g1fw0000gn/T/ 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.compiler=<NA> 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.name=Mac OS X 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.arch=x86_64 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.version=10.11.6 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.name=oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.home=/Users/oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.dir=/Users/oliverbuckley-salmon/IdeaProjects/sandpit 2016-11-28 20:51:38 INFO ZooKeeper:438 - Initiating client connection, connectString=<IP_ADDRESS>:2181 sessionTimeout=90000 watcher=hconnection-0x534432510x0, quorum=<IP_ADDRESS>:2181, baseZNode=/hbase 2016-11-28 20:51:38 INFO ClientCnxn:975 - Opening socket connection to server <IP_ADDRESS>/<IP_ADDRESS>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:38 INFO ClientCnxn:852 - Socket connection established to <IP_ADDRESS>/<IP_ADDRESS>:2181, initiating session 2016-11-28 20:51:38 INFO ClientCnxn:1235 - Session establishment complete on server <IP_ADDRESS>/<IP_ADDRESS>:2181, sessionid = 0x1583b2a4dbb0183, negotiated timeout = 90000 2016-11-28 20:51:38 INFO TradeMapStore:68 - Connected to HBase 2016-11-28 20:51:38 INFO CacheReader:32 - Connecting to Hz cluster Nov 28, 2016 8:51:38 PM com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the hazelcast schema location incorrect using default Nov 28, 2016 8:51:39 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTING 2016-11-28 20:51:39 INFO CuratorFrameworkImpl:235 - Starting 2016-11-28 20:51:39 INFO ZooKeeper:438 - Initiating client connection, connectString=<IP_ADDRESS>:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@644fa139 2016-11-28 20:51:39 INFO ClientCnxn:975 - Opening socket connection to server <IP_ADDRESS>/<IP_ADDRESS>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:39 INFO ClientCnxn:852 - Socket connection established to <IP_ADDRESS>/<IP_ADDRESS>:2181, initiating session 2016-11-28 20:51:39 INFO ClientCnxn:1235 - Session establishment complete on server <IP_ADDRESS>/<IP_ADDRESS>:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:51:39 INFO ConnectionStateManager:228 - State change: CONNECTED Nov 28, 2016 8:51:40 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTED Nov 28, 2016 8:51:56 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 1 of 2. 2016-11-28 20:52:07 INFO ClientCnxn:1096 - Client session timed out, have not heard from server in 26671ms for sessionid 0x15830869abd0077, closing socket connection and attempting reconnect 2016-11-28 20:52:07 INFO ConnectionStateManager:228 - State change: SUSPENDED 2016-11-28 20:52:09 INFO ClientCnxn:975 - Opening socket connection to server <IP_ADDRESS>/<IP_ADDRESS>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:52:09 INFO ClientCnxn:852 - Socket connection established to <IP_ADDRESS>/<IP_ADDRESS>:2181, initiating session 2016-11-28 20:52:09 INFO ClientCnxn:1235 - Session establishment complete on server <IP_ADDRESS>/<IP_ADDRESS>:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:52:09 INFO ConnectionStateManager:228 - State change: RECONNECTED Nov 28, 2016 8:52:25 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 2 of 2. Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTTING_DOWN 2016-11-28 20:52:25 INFO CuratorFrameworkImpl:821 - backgroundOperationsLoop exiting 2016-11-28 20:52:25 INFO ZooKeeper:684 - Session: 0x15830869abd0077 closed 2016-11-28 20:52:25 INFO ClientCnxn:512 - EventThread shut down Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTDOWN Exception in thread "main" java.lang.IllegalStateException: Unable to connect to any address in the config! The following addresses were tried:[localhost/<IP_ADDRESS>:5703, /<IP_ADDRESS>:5701, /<IP_ADDRESS>:5702, /<IP_ADDRESS>:5703, localhost/<IP_ADDRESS>:5702, localhost/<IP_ADDRESS>:5701] at com.hazelcast.client.spi.impl.ClusterListenerSupport.connectToCluster(ClusterListenerSupport.java:175) at com.hazelcast.client.spi.impl.ClientClusterServiceImpl.start(ClientClusterServiceImpl.java:191) at com.hazelcast.client.impl.HazelcastClientInstanceImpl.start(HazelcastClientInstanceImpl.java:379) at com.hazelcast.client.HazelcastClientManager.newHazelcastClient(HazelcastClientManager.java:78) at com.hazelcast.client.HazelcastClient.newHazelcastClient(HazelcastClient.java:72) at com.example.datagrid.cachewarmer.CacheReader.main(CacheReader.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Process finished with exit code 1 and the following is the command I'm using to launch the container docker run -p 5701:5701 -ti --add-host=a826d5422c4d:<IP_ADDRESS><PHONE_NUMBER>:2181 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:zookeeper.version=<PHONE_NUMBER>, built on 02/20/2014 09:09 GMT 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:host.name=172.20.10.2 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.version=1.7.0_45 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.vendor=Oracle Corporation 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.class.path=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/JObjC.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/htmlconverter.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-doclet.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/lib/tools.jar:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/datagrid/target/classes:/Users/oliverbuckley-salmon/IdeaProjects/sandpit/domain/target/classes:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-client/1.2.3/hbase-client-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-annotations/1.2.3/hbase-annotations-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/com/github/stephenc/findbugs/findbugs-annotations/1.3.9-1/findbugs-annotations-1.3.9-1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-common/1.2.3/hbase-common-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-collections/commons-collections/3.2.2/commons-collections-3.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hbase/hbase-protocol/1.2.3/hbase-protocol-1.2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/guava/guava/12.0.1/guava-12.0.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/htrace/htrace-core/3.1.0-incubating/htrace-core-3.1.0-incubating.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.13/jackson-mapper-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.13/jackson-core-asl-1.9.13.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/jcodings/jcodings/1.0.8/jcodings-1.0.8.jar:/Users/oliverbuckley-salmon/.m2/repository/org/jruby/joni/joni/2.1.2/joni-2.1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-auth/2.5.1/hadoop-auth-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpclient/4.2.5/httpclient-4.2.5.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/httpcomponents/httpcore/4.2.4/httpcore-4.2.4.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-kerberos-codec/2.0.0-M15/apacheds-kerberos-codec-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/server/apacheds-i18n/2.0.0-M15/apacheds-i18n-2.0.0-M15.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-asn1-api/1.0.0-M20/api-asn1-api-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/directory/api/api-util/1.0.0-M20/api-util-1.0.0-M20.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-common/2.5.1/hadoop-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-annotations/2.5.1/hadoop-annotations-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math3/3.1.1/commons-math3-3.1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-net/commons-net/3.1/commons-net-3.1.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-el/commons-el/1.0/commons-el-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-configuration/commons-configuration/1.6/commons-configuration-1.6.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-digester/commons-digester/1.8/commons-digester-1.8.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils/1.7.0/commons-beanutils-1.7.0.jar:/Users/oliverbuckley-salmon/.m2/repository/commons-beanutils/commons-beanutils-core/1.8.0/commons-beanutils-core-1.8.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/avro/avro/1.7.4/avro-1.7.4.jar:/Users/oliverbuckley-salmon/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/oliverbuckley-salmon/.m2/repository/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/com/jcraft/jsch/0.1.42/jsch-0.1.42.jar:/Users/oliverbuckley-salmon/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.5.1/hadoop-mapreduce-client-core-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.5.1/hadoop-yarn-common-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.5.1/hadoop-yarn-api-2.5.1.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/Users/oliverbuckley-salmon/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/oliverbuckley-salmon/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/Users/oliverbuckley-salmon/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-all/3.7.2/hazelcast-all-3.7.2.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-framework/2.10.0/curator-framework-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-client/2.10.0/curator-client-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-x-discovery/2.10.0/curator-x-discovery-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-recipes/2.10.0/curator-recipes-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/curator/curator-test/2.10.0/curator-test-2.10.0.jar:/Users/oliverbuckley-salmon/.m2/repository/org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar:/Users/oliverbuckley-salmon/.m2/repository/org/apache/commons/commons-math/2.2/commons-math-2.2.jar:/Users/oliverbuckley-salmon/.m2/repository/com/hazelcast/hazelcast-zookeeper/3.6.1/hazelcast-zookeeper-3.6.1.jar:/Users/oliverbuckley-salmon/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.library.path=/Users/oliverbuckley-salmon/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:. 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/var/folders/sx/g9vbcw9d3j54gtj89n57g1fw0000gn/T/ 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:java.compiler=<NA> 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.name=Mac OS X 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.arch=x86_64 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:os.version=10.11.6 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.name=oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.home=/Users/oliverbuckley-salmon 2016-11-28 20:51:38 INFO ZooKeeper:100 - Client environment:user.dir=/Users/oliverbuckley-salmon/IdeaProjects/sandpit 2016-11-28 20:51:38 INFO ZooKeeper:438 - Initiating client connection, connectString=<PHONE_NUMBER>:2181 sessionTimeout=90000 watcher=hconnection-0x534432510x0, quorum=<PHONE_NUMBER>:2181, baseZNode=/hbase 2016-11-28 20:51:38 INFO ClientCnxn:975 - Opening socket connection to server <PHONE_NUMBER>/<PHONE_NUMBER>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:38 INFO ClientCnxn:852 - Socket connection established to <PHONE_NUMBER>/<PHONE_NUMBER>:2181, initiating session 2016-11-28 20:51:38 INFO ClientCnxn:1235 - Session establishment complete on server <PHONE_NUMBER>/<PHONE_NUMBER>:2181, sessionid = 0x1583b2a4dbb0183, negotiated timeout = 90000 2016-11-28 20:51:38 INFO TradeMapStore:68 - Connected to HBase 2016-11-28 20:51:38 INFO CacheReader:32 - Connecting to Hz cluster Nov 28, 2016 8:51:38 PM com.hazelcast.config.AbstractXmlConfigHelper WARNING: Name of the hazelcast schema location incorrect using default Nov 28, 2016 8:51:39 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTING 2016-11-28 20:51:39 INFO CuratorFrameworkImpl:235 - Starting 2016-11-28 20:51:39 INFO ZooKeeper:438 - Initiating client connection, connectString=<PHONE_NUMBER>:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@644fa139 2016-11-28 20:51:39 INFO ClientCnxn:975 - Opening socket connection to server <PHONE_NUMBER>/<PHONE_NUMBER>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:51:39 INFO ClientCnxn:852 - Socket connection established to <PHONE_NUMBER>/<PHONE_NUMBER>:2181, initiating session 2016-11-28 20:51:39 INFO ClientCnxn:1235 - Session establishment complete on server <PHONE_NUMBER>/<PHONE_NUMBER>:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:51:39 INFO ConnectionStateManager:228 - State change: CONNECTED Nov 28, 2016 8:51:40 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is STARTED Nov 28, 2016 8:51:56 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 1 of 2. 2016-11-28 20:52:07 INFO ClientCnxn:1096 - Client session timed out, have not heard from server in 26671ms for sessionid 0x15830869abd0077, closing socket connection and attempting reconnect 2016-11-28 20:52:07 INFO ConnectionStateManager:228 - State change: SUSPENDED 2016-11-28 20:52:09 INFO ClientCnxn:975 - Opening socket connection to server <PHONE_NUMBER>/<PHONE_NUMBER>:2181. Will not attempt to authenticate using SASL (unknown error) 2016-11-28 20:52:09 INFO ClientCnxn:852 - Socket connection established to <PHONE_NUMBER>/<PHONE_NUMBER>:2181, initiating session 2016-11-28 20:52:09 INFO ClientCnxn:1235 - Session establishment complete on server <PHONE_NUMBER>/<PHONE_NUMBER>:2181, sessionid = 0x15830869abd0077, negotiated timeout = 40000 2016-11-28 20:52:09 INFO ConnectionStateManager:228 - State change: RECONNECTED Nov 28, 2016 8:52:25 PM com.hazelcast.client.spi.impl.ClusterListenerSupport WARNING: hz.client_0 [kappa-serving-layer] [3.7.2] Unable to get alive cluster connection, try in 0 ms later, attempt 2 of 2. Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTTING_DOWN 2016-11-28 20:52:25 INFO CuratorFrameworkImpl:821 - backgroundOperationsLoop exiting 2016-11-28 20:52:25 INFO ZooKeeper:684 - Session: 0x15830869abd0077 closed 2016-11-28 20:52:25 INFO ClientCnxn:512 - EventThread shut down Nov 28, 2016 8:52:25 PM com.hazelcast.core.LifecycleService INFO: hz.client_0 [kappa-serving-layer] [3.7.2] HazelcastClient 3.7.2 (20161004 - 540b01c) is SHUTDOWN Exception in thread "main" java.lang.IllegalStateException: Unable to connect to any address in the config! The following addresses were tried:[localhost/127.0.0.1:5703, /172.17.0.1:5701, /172.17.0.1:5702, /172.17.0.1:5703, localhost/127.0.0.1:5702, localhost/127.0.0.1:5701] at com.hazelcast.client.spi.impl.ClusterListenerSupport.connectToCluster(ClusterListenerSupport.java:175) at com.hazelcast.client.spi.impl.ClientClusterServiceImpl.start(ClientClusterServiceImpl.java:191) at com.hazelcast.client.impl.HazelcastClientInstanceImpl.start(HazelcastClientInstanceImpl.java:379) at com.hazelcast.client.HazelcastClientManager.newHazelcastClient(HazelcastClientManager.java:78) at com.hazelcast.client.HazelcastClient.newHazelcastClient(HazelcastClient.java:72) at com.example.datagrid.cachewarmer.CacheReader.main(CacheReader.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Process finished with exit code 1 and the following is the command I'm using to launch the container docker run -p 5701:5701 -ti --add-host=a826d5422c4d:<PHONE_NUMBER> --net=host -h muhz1 --name muhz1 -d olibs/kappahz:v0.1 The add host is to map the Zookeeper for Hbase which I'm using as an underlying database for Hz, this works fine. Thanks in advance for your help, any hints or tips gratefully received. Oliver
e44757deabd1d7b04aaffaa8b113d1098d05248297f0c98c16a51095ec1cdf13
['498f2326fcbd4801bf05c22b8e31bee3']
The issue was the region servers address being returned to the client as the docker container id rather than the server IP address. That's why I could connect to the master but not perform any operations like creating tables. Mapping the container id to the server IP address in the client etc/hosts file fixed the problem.
4c519da198e2ff45a16a5ab9eea1f55bc827cbcaf629105c84eb6289d55da9d2
['49a45d0fda8a44e7841bd7773ffdd294']
In java project it's very easy,there are two instances in gradle's sample folder. But when I try to do it in android project,there're a lot of problems. I can't add {apply plugin: 'java'} and test { jacoco{ excludes = ['org/bla/**'] includes = ['com/bla/**'] append = false } } There are some conflicts with android plugin,test is belong to java plugin,so I don't konw how to do. I can do build,checkstyle,pmd,findbugs and test,but jacoco report. My gradle file is below: //Import android test dependencies import com.android.build.gradle.api.TestVariant //Load classpath and define the repository. buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } //Sub project,we can add a lot of sub project here. project('TVEAndroid') { //Load plugins apply plugin: 'android' apply plugin: 'jacoco' apply plugin: 'checkstyle' apply plugin: 'findbugs' apply plugin: 'pmd' //This is different with the one above,the previous one is just for load classpath,this one is for the real build. repositories { mavenCentral() } //Load dependencies,We will use nesux to hold the repositories in the future,so it will be changed. dependencies { compile fileTree(dir: 'libs', include: '*.jar') } //Jacoco plugin information declaration,but jacoco didn't work here,but it works in the java project with the same configuration. jacoco { toolVersion = "0.6.2.201302030002" reportsDir = file("$buildDir/customJacocoReportDir") } //Define android build information android { compileSdkVersion 18 buildToolsVersion "18.1.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } //Set the build path,the root folder instrumentTest.setRoot('../TVEAndroidTest') //Set the code and resuource path for build instrumentTest { java { srcDirs = [ '../TVEAndroidTest/src/' ] } res.srcDirs = ['res'] assets.srcDirs = [ '../TVEAndroidTest/assets' ] resources.srcDirs = [ '../TVEAndroidTest/src' ] } //Define the package name for build defaultConfig { testPackageName "com.accedo.android.tve.test" testInstrumentationRunner "android.test.InstrumentationTestRunner" } // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } <PERSON><PHONE_NUMBER>" reportsDir = file("$buildDir/customJacocoReportDir") } //Define android build information android { compileSdkVersion 18 buildToolsVersion "18.1.1" sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } //Set the build path,the root folder instrumentTest.setRoot('../TVEAndroidTest') //Set the code and resuource path for build instrumentTest { java { srcDirs = [ '../TVEAndroidTest/src/' ] } res.srcDirs = ['res'] assets.srcDirs = [ '../TVEAndroidTest/assets' ] resources.srcDirs = [ '../TVEAndroidTest/src' ] } //Define the package name for build defaultConfig { testPackageName "com.accedo.android.tve.test" testInstrumentationRunner "android.test.InstrumentationTestRunner" } // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } jacoco { append = false destinationFile = file("$buildDir/jacoco/jacocoTest.exec") classDumpFile = file("$buildDir/jacoco/classpathdumps") } //PMD task task pmd(type: Pmd) { ruleSetFiles = files('../config/quality/pmd/pmd-ruleset.xml') ruleSets = ["basic", "braces", "strings"] source = android.sourceSets.main.java.srcDirs } //CheckStyle task task checkstyle(type: Checkstyle) { configFile file('../config/quality/checkstyle/checkstyle.xml') source android.sourceSets.main.java.srcDirs include '**/*.java' exclude '**/gen/**' classpath = files( project.configurations.compile.asPath ) } //Findbugs task task findbugs(type: FindBugs) { excludeFilter file('../config/quality/findbugs/findbugs-filter.xml') classes = fileTree('build/classes/debug') source = android.sourceSets.main.java.srcDirs classpath = files( project.configurations.compile.asPath ) reports { xml { destination "build/reports/findbugs/findbugs.xml" } } effort = 'max' } jacocoTestReport { reports { xml.enabled false csv.enabled false html.destination "${buildDir}/jacocoHtml" } } } The current problem is "Could not find method jacocoTestReport() ...balabala" Any advice will be greatly appriciated!
2bd497f59d99067860b213f66273b60b8b5797f1f5d8ef2307fccd33f408bd83
['49a45d0fda8a44e7841bd7773ffdd294']
I put a webview into a LinearLayout and outermost is a RelativeLayout.I want the webview react the touch event(for example some javascript effect),and then pass the event to RelativeLayout. RelativeLayout is the consumer.But even if the webView's OnTouchEvent return false,it's parent LinearLayout can't get the event,let alone RelativeLayout.But if i change the webview to textview it works,I'm so confused? Any Help would be greatly appreciated. Thanks!
997284c79d88482d9e76b205b555a995dd6e3fd2e73d25817dd9981ef1f296af
['49ab59cac071486882bc293696e08c41']
Linux is offering much less copying speed compared to windows.To copy 1GB data in linux it takes much more time compared to windows.So please suggest me to copy directory as effective as windows.I tried using cp,rsync and also changed the file system to ntfs but i did not find any of the above method as good as windows copying speed.
0322d45a37aef692ad449a4df0af8d601dd37761e1f5b40a9238866333f436b4
['49ab59cac071486882bc293696e08c41']
I think If you install php module for apache and php 5 with above apt-get command will enable the php support for apache but still this also depends on the linux version you are using on,because there seems to be some bugs in php.ini file on apache integration in ubuntu(v10.04) but ubuntu(v12.04)seems fine
917702b787efd83e8e537bcf277230b6214de8a1a17ea389d5ce88f349977c76
['49afef998291428d93600ccccd455afd']
Looking at portal.azure.com as of 3/28/2016 it looks like the options have changed from some of the previous responses... Go to portal.azure.com and log in Click on "Resource Groups" Click on "All Settings" Click on "Deployments" Click on the particular resource/deployment for which you want to create a template Click on "Export Template" near the top of the tile/page. Note: Some of the deployments may not give access to the "Export Template" button. For these, you will most likely see a "Template Link" in the resource summary which gives access to the generic template for that resource deployment.
fc915d3a941c0a143fea1b2e06f15d1d261daef6e2c64ce43e165004981ddb99
['49afef998291428d93600ccccd455afd']
Here is what I did: Created export (.bacpac saved to storage account) of "my-db" Azure SQL Database using (new) management portal. Deleted the database "my-db" (using new Azure Portal) from "my-v12-azure-db-server". Again from the new Azure portal, attempted to import the .bacpac file from step one into "my-v12-azure-db-server". Result: The database with the correct name is created, but it is empty. There are no errors returned through the UI. It contains none of the tables from the original database. Other Things Tried: I was able to successfully import the same .bacpac file into other v12 db servers on the same Azure subscription. I also tried deleting the database server and re-creating it, but the same thing happens when I bring it back. In addition, I attempted deleting the db server using powershell, but after recreating it I had the same result. Ideally I'd like to keep the same db server name and database name so that I do not have to change connection strings in source. Am I missing something?
04e150babfe6f3ea3c27083855e7329adfd455412b0f38664d0fb60279830dd8
['49b129316c404b3dba32d821896444c5']
C# I searched but couldn't find the specific situation I find myself in. How do I call a method in one class from another class? public class Box { public double length; // Length of a box public double breadth; // Breadth of a box public double height; // Height of a box public double Volume(double len, double bre, double hei) { double totvolume; totvolume = len * bre * hei; return totvolume; } } public class Boxtester { static void Main(string[] args) { Box Box1 = new Box(); //create new class called Box1 Box Box2 = new Box(); //create new class called Box2 double returnvolume; //create variable to hold the returned data from method // box 1 specification Box1.length = 6.0; Box1.breadth = 7.0; Box1.height = 5.0; // box 2 specification Box2.length = 11.0; Box2.breadth = 16.0; Box2.height = 12.0; //Calculate and display volume of Box1 Box.Volume volumebox1 = new Box.Volume(); //creating new instance of Volume method called volumebox1 returnvolume = volumebox1.Volume(Box1.length, Box1.breadth, Box1.height); //giving variables to method Console.WriteLine("Volume of Box1 : {0}", volumebox1); //write return value //Calculate and display volume of Box2 Box.Volume volumebox2 = new Box.Volume(); //creating new instance of Volume method called volumebox2 returnvolume = volumebox2.Volume(Box2.length, Box2.breadth, Box2.height); //giving variables to method Console.WriteLine("Volume of Box1 : {0}", volumebox2); //write return value Console.ReadKey(); } This gives the error "The type name 'Volume' does not exist in the type 'Box'
86892d21fdd030591a512e5599507641b1b031b9cb54fe23837ea330b6366ea5
['49b129316c404b3dba32d821896444c5']
C# TL;DR: I want the user to be able to input text, which is then written to an external file, which then can be called later based on position in the file. What's the easiest way and form to read and write a list of strings to? Very amateur question, but I can't seem to find an easy anwer on the internet. If I'm missing something obvious, please redirect me. I am writing a very simple program in which the user can input a string which is then written (added) to an external file, from which later a string can be called based on the position in the file. I found things like JSON, Resource file, SQL DB... Problem is that due to my lack of programming experience I have no idea what's the best option to look into. Example of what I want to achieve: User inputs strings 'Dog', 'Cat', and 'Horse' into the textbox. Each of these strings are added to the external file. Lateron, the user calls the 2nd number on the list, to which the program returns 'Cat'. Thanks!
480a948851da693d8582517b32e30ac790727d32d3b43f2155e15fe5b5f2e7dd
['49b9a0fae24448bfb64ea9e2f99db45e']
I am using AWS S3 to access a file in my HTML5 application. Following code works fine on my laptop but it fails on the mobile device (iphone). Any help is greatly appreciated. AWS.config.region = 'us-west-2'; var bucket = new AWS.S3({params: {Bucket: 'mybucket'}}); bucket.getObject({Key: myfile}, function (error, data) { if (error != null) { alert("Failed to retrieve " + myfile + " :" + error); } else { //alert("Loaded " + data.ContentLength + " bytes"); localStorage[myfile] = data.Body.toString(); // do something with data.body }}); The error I get is: "http //local host Failed to retrieve foo.json :NetworkingError: Network Failure" I have the followings CORS configuration for this bucket <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> </CORSRule>
ebef0272bfeb4807c63f077e0e9e459bb64a12c6c0c4630075aa0b1f985f4a2f
['49b9a0fae24448bfb64ea9e2f99db45e']
I was able to get this resolved by aws tech support. Issue got resolved with the following CORSconfig: <?xml version="1.0" encoding="UTF-8"?> <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <CORSRule> <AllowedOrigin>*</AllowedOrigin> <AllowedMethod>PUT</AllowedMethod> <AllowedMethod>POST</AllowedMethod> <AllowedMethod>GET</AllowedMethod> <MaxAgeSeconds>3000</MaxAgeSeconds> <AllowedHeader>*</AllowedHeader> </CORSRule> </CORSConfiguration>
b443478fe105b34d84320a3df6132620be8d31f67cb3d7321865f4141806f348
['49bc5f2dc7b7487d89a7885b969d01f2']
Perhaps rather than being a banner on the site, relevant messages could be used on users first actions? "Before asking this question, are you sure that it is A, B and C. Off-topic and repeat questions can lead to a loss of reputation". "You are making your first comment - please make sure it is X, Y and Z". I'm also seeing a rise in the idiot questions that have plagued other forums (the ones that could be summed as less 'Help' than 'Can you do the job for me?').
8527dd2ce9434ca5ead50868bfcfb8faccc87258bf2416778a44945bc6b02416
['49bc5f2dc7b7487d89a7885b969d01f2']
Whenever i try to either install the @kde-desktop or update fedora 23 OS i get this error, any guidance would be appreciated. You can remove cached packages by executing 'dnf clean packages'. Error: Error downloading packages: Cannot download gcc49-4.9.3-1.fc23.x86_64.rpm: All mirrors were tried
0d6f3fcd047df439231ad5f094fb36aed4de804e7b5198fc0cf23958b18c50cd
['49bedffb3d7147e18f0d93876989d945']
@user157860 The metric $ds^2 = dt^2 - dx^2 - dy^2 - dz^2$ is a way of measuring miniscule distances on spacetime and can be generalised to $ds^2 = \sum\limits_{\mu,\nu}g_{\mu\nu}dx^{\mu}dx^{\nu}$. Here, $g_{\mu\nu}$ is called the metric tensor and basically describes the spacetime surface. Now, what <PERSON> is saying is that even when gravity is present, you can always perform a coordinate transform so that the metric tensor looks the same as it would in special relativity with no gravity. As such, the velocities will always add as $w = \frac{u+v}{1+uv/c^2}$.
9501577ab8ed9fff08b7558592e123a4a46c1420f5dcfedb0b272d6beab95cb8
['49bedffb3d7147e18f0d93876989d945']
Thank you for the solid commentary. Summarizing, if there are only well defined players then the comments support capitalizing. However, in the case where the author refers to "the _ith_ player", "player _i_" should not be capitalized as it is equivalent to the aforementioned case of stating "the first player". More generally, capitalize if the players are well-defined entities, such as _White_ and _Black_ in chess or in a scenario with a set number of players such as a two player game, and do not capitalize if the players are abstract enumerated entities.
ff254f017819fcf065a366d1e551f7f9f75aeea25945a2d3506193deb8a435dc
['49c1fd53aa414de2b458fb1106413153']
The reason this behavior changed from 2.x to 3.0.0 was due to a code commit on NHibernate.Driver.SqlClientDriver, which effectively turned on some of the behavior of enabling the prepare_sql configuration in order to resolve an issue with the caching of query plans. A C# string property mapped to a column that has no other type specified in its mapping will get treated as a NHibernate.SqlTypes.StringSqlType and given a 4000 character limit by the driver: From NHibernate.SqlTypes.StringSqlType: /// <remarks> /// This can store the length of the string that the <see cref="IDbDataParameter"/> can hold. /// If no value is provided for the length then the <c>Driver</c> is responsible for /// setting the properties on the <see cref="IDbDataParameter"/> correctly. /// </remarks> So, you can see that the code below from the driver (NHibernate.Driver.SqlClientDriver), maps a default string property to a length of 4000 characters. /* SNIP */ private const int MaxAnsiStringSize = 8000; private const int MaxBinarySize = MaxAnsiStringSize; private const int MaxStringSize = MaxAnsiStringSize / 2; private const int MaxBinaryBlobSize = int.MaxValue; private const int MaxStringClobSize = MaxBinaryBlobSize / 2; /* SNIP */ private static void SetDefaultParameterSize(IDbDataParameter dbParam, SqlType sqlType) { switch (dbParam.DbType) { /* SNIP */ case DbType.String: case DbType.StringFixedLength: dbParam.Size = IsText(dbParam, sqlType) ? MaxStringClobSize : MaxStringSize; break; /* SNIP */ } } For configurations with prepare_sql set to false, NH 3.0.0 now brings the SetDefaultParameterSize method into play where it was not before As you noted, you can use NH-3.0.0-native support for the SQL Server XML datatype (thanks to NH-866), like so: <property name="Data" type="xml" not-null="true" /> or more explicitly, but equivalently: <property name="Data" type="XmlDoc" not-null="true"> <column name="DATA" sql-type="XmlSql" /> </property> But using NHibernate.Type.XmlDocType expects the property type to be of C# type XmlDocument - leading to a cast exception. You could do the XmlDocument.InnerXml fix like you mentioned, but that's a lot of unnecessary transformation from string to doc and back. I've used the following mapping to keep the domain property a string: <property name="Data" type="StringClob" not-null="true"> <column name="DATA" sql-type="XmlSql" /> </property> Using NHibernate.Type.StringClobType will return true for the IsText(dbParam, sqlType) call in the driver snippet above, giving a max character length of int.MaxValue / 2 - something like 2GB of string data.
40454e16b5eb6d17c174466ea7e8893acc73e05c9fa30e59035083c0607683fb
['49c1fd53aa414de2b458fb1106413153']
As alluded to earlier, you could explicitly set the boolean values on the System.Messaging.MessagePropertyFilter object that is accessible on your messageQueue object via the MessageReadPropertyFilter property. If you want all data to be extracted from a message when received or peaked, use: this.messageQueue.MessageReadPropertyFilter.SetAll(); // add this line Message[] allMessagesOnQueue = this.messageQueue.GetAllMessages(); // ... That may hurt performance of reading many messages, so if you want just a few additional properties, create a new MessagePropertyFilter with custom flags: // Specify to retrieve selected properties. MessagePropertyFilter filter= new MessagePropertyFilter(); filter.ClearAll(); filter.Body = true; filter.Priority = true; this.messageQueue.MessageReadPropertyFilter = filter; Message[] allMessagesOnQueue = this.messageQueue.GetAllMessages(); // ... You can also set it back to default using: this.messageQueue.MessageReadPropertyFilter.SetDefaults(); More info here: http://msdn.microsoft.com/en-us/library/system.messaging.messagequeue.messagereadpropertyfilter.aspx
90c697a6760cbfb39542482894fe926ef6e1df40c29f956599f3368d087666bc
['49da8b4c9f0e475493dfe0471c7ed0e3']
I am using mvn and appengine-maven-plugin to stage and deploy my app engine standard project for java 8. This works locally, but the deployed project stopped working, and if I look at target/appengine-staging/app.yaml there are some mystery non-working routes in there, and the standard /.* route is gone. Where can I find some information about what is generating app.yaml and what it is referencing to build these handlers? They look similar to some real routes, but don't exactly match. mvn appengine:stage -DskipTests -Dspring.profiles.active=development # ./target/appengine-staging/app.yaml contains bad handlers My apppengine-web.xml <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <threadsafe>true</threadsafe> <sessions-enabled>true</sessions-enabled> <runtime>java8</runtime> <instance-class>B1</instance-class> <basic-scaling> <max-instances>1</max-instances> <idle-timeout>10m</idle-timeout> </basic-scaling> <env-variables> <env-var name="SPRING_PROFILES_ACTIVE" value="development" /> </env-variables> </appengine-web-app> My web.xml <web-app xmlns="http://java.sun.com/xml/ns/javaee" version="2.5"> <security-constraint> <web-resource-collection> <web-resource-name>tasks</web-resource-name> <url-pattern>/**/delete_handler</url-pattern> </web-resource-collection> <auth-constraint> <role-name>admin</role-name> </auth-constraint> </security-constraint> </web-app> WebSecurityConfigurerAdapter @Configuration @EnableWebSecurity public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter { @Override public void configure(WebSecurity web) throws Exception { web .ignoring() .antMatchers("/**/health") .antMatchers("/**/delete_handler") ; } @Override protected void configure(HttpSecurity http) throws Exception { http.csrf().disable() .authorizeRequests() .antMatchers("/**/health").permitAll() .antMatchers("/**/delete_handler").permitAll() .antMatchers("/_ah/*").permitAll() .anyRequest().authenticated() .and().httpBasic(); } @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { // snip } } Generated non-working app.yaml runtime: java8 instance_class: B1 basic_scaling: max_instances: 1 idle_timeout: 10m inbound_services: - warmup derived_file_type: - java_precompiled threadsafe: True auto_id_policy: default env_variables: 'SPRING_PROFILES_ACTIVE': 'development' api_version: '1.0' handlers: - url: / script: unused login: optional secure: optional - url: /_ah/.*.*.*/delete_handler script: unused login: admin secure: optional - url: /.*/ script: unused login: optional secure: optional - url: /_ah/.* script: unused login: optional secure: optional skip_files: app.yaml
973fa5dc938017614ae95d360f7872255695c70c1d78e1a5dd7b6ae504b844eb
['49da8b4c9f0e475493dfe0471c7ed0e3']
I appear to have a memory leak related to receiving large files and sending them to GCS. Trying to use pprof to profile memory usage for my appengine code. My tests use appengine/aetest and I can output the memory profile, but the results don't seem to show me anything useful. First I made a benchmark. It is a very slow operation, so it only runs once. $ goapp test ./cloudstore -run=none -bench=. -memprofile=cloud.prof BenchmarkLargeFile 1 54124706398 ns/op $ go tool pprof --text cloudstore.test cloud.prof Adjusting heap profiles for 1-in-524288 sampling rate Total: 0.5 MB 0.5 100.0% 100.0% 0.5 100.0% runtime.newG 0.0 0.0% 100.0% 0.5 100.0% allocg 0.0 0.0% 100.0% 0.5 100.0% mcommoninit 0.0 0.0% 100.0% 0.5 100.0% runtime.malg 0.0 0.0% 100.0% 0.5 100.0% runtime.mpreinit 0.0 0.0% 100.0% 0.5 100.0% runtime.rt0_go 0.0 0.0% 100.0% 0.5 100.0% runtime.schedinit None of my function calls appear and this 0.5 MB figure is obviously incorrect (I am opening a 12 MB file and uploading it). How do I get the real memory profile? $ go version go version go1.3.1 linux/386 $ goapp version go version go1.4.2 (appengine-1.9.25) linux/386
516e22bb478e449d8652a7bf256052c5b17a58211e6300c7186da381602ea342
['49e2a095a51641329d36ba2d9f87b124']
I'd change the init method to take the member values, like so: class Data: def __init__(self, A, B, C): self.A = A self.B = B self.C = C Then, you can use the match.groupdict method like so: match = re.search(pattern, hex_stream, re.I) if match: # pmatch is a dict (grp_name -> grp_value) pmatch = match.groupdict() # we create a new dict by converting the grp_value to an int: params={name: int(value,16) for (name,value) in pmatch.items()} # then we just create D from those values. D = Data(**params) So why should you do it that way? The implementation you posted inspects the object D in order to determine the attributes that need to be set. What happens if you add a non-callable member to your class later on? It will get very messy. It's also difficult to understand. Since your regex match tells you which attributes it knows, you should only set those.
d163bccd4b5bc42d11396b613cf508cab317c70b9c9ebc29fcd42563dd6a64d8
['49e2a095a51641329d36ba2d9f87b124']
I've been using the following approach. It's almost identical to the one suggested by <PERSON>, but it has the advantage that you don't need to call the decorator like a function. import functools class SwitchedDecorator: def __init__(self, enabled_func): self._enabled = False self._enabled_func = enabled_func @property def enabled(self): return self._enabled @enabled.setter def enabled(self, new_value): if not isinstance(new_value, bool): raise ValueError("enabled can only be set to a boolean value") self._enabled = new_value def __call__(self, target): if self._enabled: return self._enabled_func(target) return target def deco_func(target): """This is the actual decorator function. It's written just like any other decorator.""" def g(*args,**kwargs): print("your function has been wrapped") return target(*args,**kwargs) functools.update_wrapper(g, target) return g # This is where we wrap our decorator in the SwitchedDecorator class. my_decorator = SwitchedDecorator(deco_func) # Now my_decorator functions just like the deco_func decorator, # EXCEPT that we can turn it on and off. my_decorator.enabled=True @my_decorator def example1(): print("example1 function") # we'll now disable my_decorator. Any subsequent uses will not # actually decorate the target function. my_decorator.enabled=False @my_decorator def example2(): print("example2 function") In the above, example1 will be decorated, and example2 will NOT be decorated. When I have to enable or disable decorators by module, I just have a function that makes a new SwitchedDecorator whenever I need a different copy.
a3bbe16c6a7b41c64afbec9e9e9ad9154f306510bf3333c4bc26820d24e9b716
['49ecdf02adba4d63ae94172dbed85064']
The only way you can do this, without changing your markup, is with lettering.js. It's an jquery plugin, which automatically adds the needed markup which can be styled with CSS. Take a look in their wiki, there are the needed examples for line by line styling. More information also here: http://letteringjs.com/
8e9b14c8a487ddcd4fe298ed51ccf986ebc7c1827cbd84b5564ba3eb1395b125
['49ecdf02adba4d63ae94172dbed85064']
i have a form with an input field and I'm adding another input field with a button. I have a function call on a 'keyup' event for every input field, but this function call is only working for the first input field, the dynamically added input fields are not triggering the function. How can I get it to work with all input fields? I made a jsfiddle to see my example. Here is my HTML Code: <form method="POST" onsubmit="return false;"> <div id="serials"> <div id="serial_0"> Serial 0: <input type="text" name="serial_0" id="serial_0" /> </div> </div> <button id="addSerial">add another field</button> </form> Here is my JS Code: $(document).ready(function(){ $('input[id^=serial]').on("keyup", validateSerial); $("#addSerial").click(function () { $("#serials").append('' + '<div id="serial_' + $("#serials > div").size() + '">' + 'Serial '+ $("#serials > div").size() +': <input type="text"' + 'name="serial_' + $("#serials > div").size() + '"' + 'id="serial_' + $("#serials > div").size() + '"' + '</div>' + ''); }); }); function validateSerial(){ var inputFieldNumber = $(this).attr('id').match(/\d+$/); alert(inputFieldNumber); }
750d945933d039b0e65e87f6ed316a8cdf3632984f35ec96a84bc824a373cd03
['49f81b52560a4e6ba72962ca00958bec']
So I did something really stupid, forgot the admin password to my server running MS Server 2012. I so rarely shut down and have to log in because my server is running 24/7 that when I lost power and had to log back in, I couldn't remember my password. I'm trying to avoid having to reinstall the entire the OS because of a rookie mistake, mostly because of all the services running on this server. I've downloaded quite a few trial "recovery tools" but these seem to do everything except reset a password. If anyone could guarantee that a particular application works and is worth paying for, I'd be happy to pay for something to save myself the days and days of reinstalling and reconfiguring all the different services. So my question is, what is the path of least resistance to getting full access to my server again?
2074c33b4c17ab76352a4d6121514c824cb0fdf29d0379663356b142bf941a38
['49f81b52560a4e6ba72962ca00958bec']
I modified a tag's description, and I can see the new result of my version, but others can see the original version. the page told me the message: Thanks for your edit! This edit will be visible only to you until it is peer reviewed. I noticed that this peer review function is not similar as peer review of suggest edit. How does it works? and the peer review of tag wiki will also appear in suggest edit queue?
6ec1f22abd51297301a87267ebdb7684a789cf86b8843da088eecf3b372649a7
['4a00077aa85f4b6fa255b73e18ed8290']
i want to read Sms from a Symbian Mobile and send the Sms to a server. am not conversant with symbian programming languages so i want to use J2ME and interface with API_BRIDGE. my problem is i cant find any examples on how to use API_BRIDGE with J2ME. kindly assist with articles or examples of using api_bridge.
14817a48c635a3bdef78d0e6e09f01018815da21646bfae767d5836ac0556847
['4a00077aa85f4b6fa255b73e18ed8290']
a j2me application i created using both POST and GET can read any length of data from the ServerSide(php).the mobile waits in a thread until all the data is sent from the Server. however when i send the data from Mobile to ServerSide the Server cant wait for the mobile to send all its contents. am receiving an empty String at the serverSide, when the data sent from the Mobile is too long. am expecting that the serverSide should either contain all or half of the String sent by mobile. how can i make Server to wait for all the content to arrive?
75e864807128dcefc13931d2df0f1b5b6c7bcd23be70ef8c41413d90ee4e8814
['4a092cf8884544bcb9e82696ef18003c']
for those who are using spring boot 2.2.x you need to put this in configuration file logging.file.name='/var/log/app.log' or use this logging.file.path='/var/log' note that if you use logging.file.path it will writes spring.log to the specified directory. Names can be an exact location or relative to the current directory
c664d6aa7f849cf765c2e045e5c31a46716a5f75805a6d54b95aed1a0dbda37a
['4a092cf8884544bcb9e82696ef18003c']
I was able to do that and if someone is looking for the solution that's what i did This what i did: * i’m using NetBeans 7.3.1 * I added the following lines in Tomee\conf\system.properties –>com.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager= true * I added jersey libraries from NetBeans that’s all * Note that the libraries are in WEB-INF\lib of my apps * Additional information i was even able to use Mojarra for JSF if someone is interested i can tell you how
2c4145864911495c39a9fec9a4c145e06499360d87bc35d52f4d13a3dd65c4d4
['4a1dcb899f674758bcd904925e754fac']
A straightforward way to consider the usage of down you referenced is by considering a log book. Each event that happens is recorded on the next line, creating a linear relationship through time. So down is essentially a term used to refer to an item or event that is farther down some linear progression. For example: "Down there" could be interpreted as, "continue moving down the list of counters until you get to that one." "Down the line" could be restated as, "continue moving from person to person in the line until you get to that one."
ec86809d3483ab7aa0b16e31a62f6ca33aafed465823f21f4c66e59f457b5dc1
['4a1dcb899f674758bcd904925e754fac']
The difference between clip gain and volume automation is basically INPUT volume and OUTPUT volume. Clip gain is the input volume. This data is read and taken into account before insert effects, sends, volume automation, eft. Here are two examples : if you crank up the clip gain you could potentially clip your audio. If it Wasn't clipping while you were recording, it might be now that u cranked the clip gain. You don't have this effect with volume Automation because volume automation is post Fader. The 2nd example is : say You have a compressor on a track, and you have all the settings where you want them. 3 to 1 ratio and you're getting 2 DB of again reduction. If you raise the clip gain you are raising the input to that compressor. This means that it might throw off your settings. For example you may now be getting four or five Db of compression. However if you adjust your volume automation or volume, you are adjusting the volume after the compressor. Therefore you do not mess with how the compressor is working.
9a11f10bcaec1f5df13072408f2cc8cbeba15aac3dd25f72f4d27cefc64959f2
['4a27eefa098e447694ce445d5d34bbb4']
<PERSON>, Sorry for not documenting the code. If that condition evaluates to false it means that the line is syntactically incorrect (for example it contains one or three words, or no word at all; the line may be empty I think and I should have checked it at the beginning of a function). Handling that condition is another thread. The simplest way is just doing nothing so the function returns "empty" `ConfigUnit`. Then I do not process empty units.
738867b4fa0d1a8180ae9502021497180b3937878bb01436db89d7541a0a2952
['4a27eefa098e447694ce445d5d34bbb4']
Preliminaries I have OWON oscilloscope that is able to record waveform in file in three formats: Text format .txt: the first lines are some general information such as peak-to-peak value, period, frequency etc. Remaining lines are waveform points that is space-separated values. Comma-separated-values format .csv: the first lines are some general information such as peak-to-peak value, period, frequency etc. Remaining lines are waveform points that is comma-separated values. Binary format .bin: binary file with unknown (for now) with the following structure: Prefix. Several bytes of some information such as header and setup information. Unknown for now. Data bytes. 8-bit signed integers that represent ordinates of waveform points. New line character 0x0a. I am not interested in the first two options (at least for know) so I will concentrate on dealing with binary data only. Another fact is you are able to choose how to record the data. There are two options: Using a software. Using an oscilloscope itself. The structure of a binary file is different depending on what option was used. For example the size of the prefix is 78 and 278 bits respectively. My purpose is to provide user-friendly interface to parse data from oscilloscope. Result I chose to place all stuff in the namespace which I named owon. 1. owon namespace structure The following is just a short description of the owon namespace. namespace owon { /*Wafeform point*/ struct Point; /*Storage of useful information such as position in a file where data *starts from or where it ends*/ struct FilePosition; /*Binary data is being produced either by the OWON software *or directly by pushing the button on an oscilloscope*/ enum FileCreator { Software, Device }; /*Abstract class to parse file*/ class Parser; /*Concrete parser *that parses only binary files *though depending on source of the file (software or device) *it uses different parse algorithm*/ template<FileCreator creator> class BinaryParser : public Parser; /*Iterator class *that iterates through points in the waveform *Does not depend on concrete parser (format) or source of the file (file creator)*/ class PointIterator; 2. owoh.h 2.1 Preamble //owon.h #ifndef OWON_H #define OWON_H #include <iostream> #include <fstream> #include <string> #include <stdexcept>//for std<IP_ADDRESS>runtime_error #include <stdint.h>//for int8_t #include <stddef.h>//for NULL #define MY_WARNING(msg) std<IP_ADDRESS>cout << "WARNING: " << msg << std<IP_ADDRESS>endl namespace owon { //continued below... 2.2 struct Point This structure represents a data point. //owoh.h continued struct Point { float x; float y; }; //continued below... 2.3 struct FilePosition This structure is to store some useful info about bytes in a file. //owon.h continued struct FilePosition { size_t dataPosition;//position in file where data begins from size_t lastPosition;//position in file where data ends }; //continued below... 2.4 enum FileCreator This enumearation represents two possible option how to record data: through the software or from the oscilloscope. //owon.h continued /*Binary data is being produced either by the OWON software *or directly by pushing the button on an oscilloscope*/ enum FileCreator { Software, Device }; //continued below... 2.5 class Parser Abstract class that provides a protocol for all parsers (there is only one for now). It //owon.h continued class Parser { protected : /*CTORS (objects of this class are not copiable and assignable)*/ Parser( std<IP_ADDRESS>string fileName ) : _fileName( fileName ), _isParsed( false ) { } Parser( const Parser& ); Parser& operator=( const Parser& ); //DTOR ~Parser() { if( _fStream.is_open() ) { _fStream.close(); } } /*Member data: */ std<IP_ADDRESS>string _fileName;//name of file to be parsed FilePosition _filePosition;//storage of useful info about data position in file std<IP_ADDRESS>ifstream _fStream;//file stream /*Flags*/ bool _isParsed; /*This method should not be accessible from the outside*/ virtual Point ConstructPoint( size_t index ) = 0; public : inline std<IP_ADDRESS>string GetFileName() { return _fileName; } PointIterator* CreatePointIterator(); /*Main method that parse file *used for determine data positions in file *depending on in what format (bin, csv or txt) *and from what source (software or device) file is*/ virtual void Parse() = 0; friend class PointIterator; };//Parser //continued below... 2.6 template class BinaryParser This is concrete parser - binary data parser. //owon.h continued /*Concrete parser *that parses only binary files *though depending on source of the file (software or device) *it uses different parse algorithm*/ template<FileCreator creator> class BinaryParser : public Parser { protected : FileCreator _creator; Point ConstructPoint( size_t index ); public : BinaryParser( std<IP_ADDRESS>string fileName ) : Parser( fileName ), _creator( creator ) { /*Check if fileName contains an extension suffix*/ if( fileName.rfind( ".bin" ) == std<IP_ADDRESS>string<IP_ADDRESS>npos ) { MY_WARNING( "Binary file without '.bin' extension was specified." ); } } void Parse(); };//BinaryParser //continued below... 2.7 class PointIterator This class is developed in order to provide user-friendly iteration over the data points e.g. inside a for loop. //owon.h continued /*Iterator class *that iterates through points in the waveform *Does not depend on concrete parser (format) or source of the file (file creator)*/ class PointIterator { protected : Parser* _parser; size_t _index; public : PointIterator( Parser* parser ) : _parser( parser ) { } void First() { _index = _parser->_filePosition.dataPosition; } void Next() { _index++; } bool Last() { return ( _index == _parser->_filePosition.lastPosition ); } Point CurrentPoint() { return _parser->ConstructPoint( _index ); } };//PointIterator };//owon 3. owon.cpp 3.1 BinaryParser<IP_ADDRESS>Parse method Parsing algorithm for binary data //owon.cpp #include "owon.h" namespace owon { /*Main method that parses the file*/ template<FileCreator creator> void BinaryParser<creator>::Parse() { _isParsed = true; /*Try to open file in binary mod*/ _fStream.open( _fileName.c_str(), std<IP_ADDRESS>ios<IP_ADDRESS>out | std<IP_ADDRESS>ios<IP_ADDRESS>binary ); if( !_fStream ) { _isParsed = false; throw std<IP_ADDRESS>runtime_error( "Could not open file.\n" ); } else { /*Set the start position depending on the source of the file*/ if ( creator == Software ) { _filePosition.dataPosition = 278; } else if( creator == Device ) { _filePosition.dataPosition = 78; } /*Determine the end of the data *NOTE: the very last byte is omitted*/ _fStream.seekg(-1, _fStream.end ); _filePosition.lastPosition = _fStream.tellg(); if( _filePosition.lastPosition < _filePosition.dataPosition ) { _isParsed = false; throw std<IP_ADDRESS>runtime_error( "No data in the file.\n" ); } /*Place cursor at the start of the data*/ _fStream.seekg( _filePosition.dataPosition, _fStream.beg ); } } //continued below... 3.2 BinaryParser<IP_ADDRESS>ConstructPoint method This method constructs Point object from binary data //owon.cpp continued /*Method that returns current point of parsed waveform*/ template<FileCreator creator> Point BinaryParser<creator>::ConstructPoint( size_t index ) { Point a = { 0., 0. }; /*check if index is out of range*/ if( index < _filePosition.dataPosition || index > _filePosition.lastPosition ) { MY_WARNING( "Requesting position is out of range. Returned (0,0)" ); return a; } else if( _fStream.is_open() ) { /*Read a byte from file*/ int8_t intY; _fStream.read( reinterpret_cast< char* >(&intY), sizeof(intY) ); /*Assign coordinates *using a strange conversion rule :D*/ a.x = (float)index - _filePosition.dataPosition;//User does not care about position of data, let it start from zero a.y = 0.4 * intY + 53.2;//No comments for a while } else { MY_WARNING( "File is not open." ); } return a; } //continued below... 3.3 Parser<IP_ADDRESS>CreatePointIterator method This method creates a PointIterator object. PointIterator* Parser<IP_ADDRESS>CreatePointIterator() { if( _isParsed ) { return new PointIterator( this ); } else { MY_WARNING( "Bad parsing occured." ); return NULL; } } };//owon 4. Using This is how I use it. //Test.cpp #include <iostream> #include "owon_parser.cpp" using namespace owon; int main() { BinaryParser<Software> bps( "wf_from_software.bin" ); try { bps.Parse(); } catch (const std<IP_ADDRESS>runtime_error& e ) { std<IP_ADDRESS>cout << e.what(); } PointIterator* it = bps.CreatePointIterator(); for( it->First(); !it->Last(); it->Next() ) { Point a = it->CurrentPoint(); std<IP_ADDRESS>cout << a.x << " " << a.y << std<IP_ADDRESS><IP_ADDRESS>Parse() { _isParsed = true; /*Try to open file in binary mod*/ _fStream.open( _fileName.c_str(), std::ios::out | std::ios::binary ); if( !_fStream ) { _isParsed = false; throw std::runtime_error( "Could not open file.\n" ); } else { /*Set the start position depending on the source of the file*/ if ( creator == Software ) { _filePosition.dataPosition = 278; } else if( creator == Device ) { _filePosition.dataPosition = 78; } /*Determine the end of the data *NOTE: the very last byte is omitted*/ _fStream.seekg(-1, _fStream.end ); _filePosition.lastPosition = _fStream.tellg(); if( _filePosition.lastPosition < _filePosition.dataPosition ) { _isParsed = false; throw std::runtime_error( "No data in the file.\n" ); } /*Place cursor at the start of the data*/ _fStream.seekg( _filePosition.dataPosition, _fStream.beg ); } } //continued below... 3.2 BinaryParser::ConstructPoint method This method constructs Point object from binary data //owon.cpp continued /*Method that returns current point of parsed waveform*/ template<FileCreator creator> Point BinaryParser<creator><IP_ADDRESS>ConstructPoint( size_t index ) { Point a = { 0., 0. }; /*check if index is out of range*/ if( index < _filePosition.dataPosition || index > _filePosition.lastPosition ) { MY_WARNING( "Requesting position is out of range. Returned (0,0)" ); return a; } else if( _fStream.is_open() ) { /*Read a byte from file*/ int8_t intY; _fStream.read( reinterpret_cast< char* >(&intY), sizeof(intY) ); /*Assign coordinates *using a strange conversion rule :D*/ a.x = (float)index - _filePosition.dataPosition;//User does not care about position of data, let it start from zero a.y = 0.4 * intY + 53.2;//No comments for a while } else { MY_WARNING( "File is not open." ); } return a; } //continued below... 3.3 Parser::CreatePointIterator method This method creates a PointIterator object. PointIterator* Parser::CreatePointIterator() { if( _isParsed ) { return new PointIterator( this ); } else { MY_WARNING( "Bad parsing occured." ); return NULL; } } };//owon 4. Using This is how I use it. //Test.cpp #include <iostream> #include "owon_parser.cpp" using namespace owon; int main() { BinaryParser<Software> bps( "wf_from_software.bin" ); try { bps.Parse(); } catch (const std::runtime_error& e ) { std::cout << e.what(); } PointIterator* it = bps.CreatePointIterator(); for( it->First(); !it->Last(); it->Next() ) { Point a = it->CurrentPoint(); std::cout << a.x << " " << a.y << std::endl; } return 0; } Problem The problem that I can see is that PointIterator class has access to all stuff of class Parser. I cannot specify const pointer to Parser class inside PointIterator class because of method ConstructPoint (sec. 3.2) that reads from a file and therefore cannot be declared as const. Sorry for a lot of code and what is your advice to me?
e233b82b75e3a1272813c108cd19f2e4c50497d53bc169b0427187b4cc03b6b0
['4a3d9d71562c40c4ba99f62c80f58415']
You may have to send the modem a serial command and wait for it to reply. Looking around the web I found this: AT commands are issued to the modem to control the modems operation and software configuration. The basic command syntax is as follows: <command><parameter> The <command> is a combination of the attention prefix (AT) followed by the AT command. And then these specific commands (that seem to need that "AT" thing): I10, I11 Displays connection information. If the modem has not connected with a remote DCE the ATI 11 commands returns - No Previous Call. So it seems if you send the modem "ATI10" or "ATI11" it'll tell you it's status, which may include the phone number it's connected to. There's also these commands which might enable printing the incoming number to the serial port: +VCID=<value> Caller ID Use this command to enable or disable caller ID. +VCID=0 Disable caller ID. +VCID=1 Enable caller ID with formatted presentation. +VCID=2 Enable caller ID with out formatting. Again, I think it needs the AT prefix. I have no way to test any of these, but this guide seems to give a good description of a lot of the serial commands and is where I pull my info from: http://www.airlinkplus.com/manuals/m-aml001.pdf
3a2ad98c3a06e05f96f6c3ac4e22678e43e62d8aa6b490506b35ceb88487792f
['4a3d9d71562c40c4ba99f62c80f58415']
`Likely just delete and re-ask` doesn't that solve the issue? The downvotes are removed, and they get a chance to fix the post and start fresh. Of course, that requires them to actually improve it between postings, but if one close wasn't enough, I don't think they'll fix the question either way
d61e876835a7f26351050545ca150bcb81b642d459054b908f1cce276ab238c0
['4a5660443e7845aba624cc034bee0a94']
I'm using Jaxb unmarshaller to map some part of response from xmpp server to java object. Test.java public class Test { public static void main(String[] args) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(MucUser.class); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); ByteArrayInputStream bais = new ByteArrayInputStream(( "<x xmlns='http://jabber.org/prot" + "ocol/muc#user'><item role='moderator'" + " affiliation='owner'/></x>").getBytes()); MucUser mucUser = (MucUser) unmarshaller.unmarshal(bais); System.out.println(mucUser.getItem()); } } MucUser.java @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(namespace = "http://jabber.org/protocol/muc#user", name = "x") public class MucUser { @XmlElement(name = "item") private Item item; // getter and setter without annotations } Item.java @XmlAccessorType(XmlAccessType.FIELD) public class Item { @XmlAttribute(name = "role") private String role; @XmlAttribute(name = "affiliation") private String affiliation; // getters and setters without annotations } I don't use ObjectFactory.java and package-info.java. Field item is not getting unmarshalled, and mucUser.getItem() returns null. But when I explicitly add namespace tst to element <item> in Test.java and modify MucUser.java to use annotation @XmlElement(name = "item", namespace="tst") it works fine! However, I can not modify that string by my will, it's a part of protocol. How should I properly map item in my MucUser class?
29ffa75cff88d6618105b9ae99c156a0afc8b29f1b718902d32b4b3cf4b4a8b7
['4a5660443e7845aba624cc034bee0a94']
I'm trying to validate large xml file using xsd-schema. Here is my code: void Validate() { var settings = new XmlReaderSettings(); settings.Schemas.Add(null, selectedXsd); settings.ValidationType = ValidationType.Schema; settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessInlineSchema; settings.ValidationFlags |= XmlSchemaValidationFlags.ProcessSchemaLocation; settings.ValidationFlags |= XmlSchemaValidationFlags.ReportValidationWarnings; settings.ValidationEventHandler += ValidationCallBack; var reader = XmlReader.Create(selectedXml, settings); while (reader.Read()) {} } public void ValidationCallBack(object sender, ValidationEventArgs args) { Console.WriteLine(args.Message); } Here is my example xml file: <root> <a> <b>1</b> <c>two</c> </a> <a> <b>1</b> </a> <a> <b>1</b> <c>2</c> <d>3</d> </a> </root> There are defined strong shema rules. Element a can only contain sub-elements b and c, both required and both integer. My program have written next errors to me: The 'c' element is invalid - The value 'two' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:int' - The string 'two' is not a valid Integer value. The element 'a' has incomplete content. List of possible elements expected: 'b, c'. The element 'a' has invalid child element 'd'. List of possible elements expected: 'b, c' Looks fine, but problem is that file have large size (> 2gb) and there may be thousands of errors. When value of specific element is invalid, it should "group" these errors despite their values. When element is missing, it should group appropriate errors, and maybe even count times they missing. Whenever different element is missing in different node, it should report another error. And so on for all possible errors. But only Information it have is string args.Message and sender which is actually XmlReader element. My question: is there best way to do validation in my way, without parsing args.Message string and excluding out-of-memory exceptions considering huge file size? Maybe I should use another library?
d9f8dfa5ae608d2584806223722e62c2e5e5841ca88815fa34765106773382f4
['4a75a30ad5844074968cd19312dbc68e']
<PERSON> - Checked access at Read & Write locations in script. Appropriate access (Read & Execute) is granted to UserId : SVC_DASH_SQLDevAGT, still the job gets executed successfully but without performing desired activities. Log mentions below message : - Message Executed as user: PMCI\SVC_DASH_SQLDevAGT. The step did not generate any output. Process Exit Code 0. The step succeeded.
5e91521ad5653477a1bf67bedfcaf25fb6632946db3684dddcacc18186930347
['4a75a30ad5844074968cd19312dbc68e']
Can't you use a onClick function when clicking on the edit button, this function should be the same as onClick in the label. If javascript is making that automaticly, you can check the code and see wich function is applied to the clicked text and use that one to your edit button
8dd96e3952b7f83e92c4003dd927a95fca3887e36c699099f3ad6f81200ce7d9
['4a89d8b7c8594ea0a3ec65895b61731c']
You can write that a couple different ways in Jade. Here are two different methods. The first takes advantage of Jade's automatic escaping while the second uses HTML entities instead. Automatic escaping: pre code= '<p>Hello</p><span>Hello Again</span>' HTML entities: pre code &lt;p&gt;Hello&lt;/p&gt;&lt;span&gt;Hello Again&lt;/span&gt;
7f8ea572147dc62234055dabc57cfa8b03000c45f669a41d876d5f7bc6ca81a8
['4a89d8b7c8594ea0a3ec65895b61731c']
Your code is correct. It appears the error is elsewhere, most likely where you specify your stylesheets. Here's a working fiddle using your exact code: JSFiddle <div class="row"> <div class="span12 pagination-centered"> <div class="btn-group"> <a href="who.html" class="btn btn-primary btn-xlarge" data-toggle="tooltip" data-placement="bottom" title="stuff?">WHO</a> <a href="what.html" class="btn btn-primary btn-xlarge" data-toggle="tooltip" data-placement="bottom" title="more stuff?">WHAT</a> </div> </div> </div> Are you sure you're including the Bootstrap stylesheet?
435ab8375217731aa174fd4f0ed8630d830d420e0edb202a8a8b076bc5fdd418
['4a8b6d8e6dc74715a89a315b91ae79dc']
Giving you some links which have worked: deploying-keras-deep-learning-models-with-java : this uses DeepLearning4J, ND4J which supposedly you have tried already. tensorflow-keras-java And same question is asked here - converting-keras-in-python-to-java . It uses KerasModelImport.importKerasSequentialModelAndWeight You should give HDF5 file operation java examples: hdf-java . It would be helpful if you want to change the weights yourself Please comment if you have already tried all these already.
a3f033a0e58ffdab735cb0a54a44fa432fa2df9b57448d8ea9a6960fd4977f3a
['4a8b6d8e6dc74715a89a315b91ae79dc']
What I did is quite similar but does not need a trigger, so maybe it helps you or others reading this question. In my case, the users should never use the status field in the layout and always use flows, because there is complex business logic running in the background based on the status field. So I created a custom text field Last_Status_change__c which I use in every Process, Flow and Apex code to write the current DateTime in. This field is not on the Case Layout. The validation rule to prevent the manual changes looks like this: ISCHANGED(Status) && NOT(ISCHANGED(Last_Status_change__c)) && NOT($User.Bypass_Validation_Rules__c) In this scenario we have a custom field on the User to define, who is allowed to bypass any validation rule, but of course you can replace this with $Profile.Name != "System Administrator" Note: Pay attention to always use a formula that creates a time with seconds like 2020-06-17 16:34:26, otherwise you write something like 17/06/2020 17:29 into the field and the status field would be blocked for up to a minute. Hope this helps. If you find an issue in this solution, of course let me know.
8dfa969c3c6b37cd5be1e74f2e6d1c64c00117b9722cbc6efba9a30c7043f583
['4a8f1c592d39429c9c19d989ae9100c8']
Working with an unbound control (ie I manage the content programmatically), without the EndEdit() it only called the CurrentCellDirtyStateChanged once and then never again; but I found that with the EndEdit() CurrentCellDirtyStateChanged was called twice (the second probably caused by the EndEdit() but I didn't check), so I did the following, which worked best for me: bool myGridView_DoCheck = false; private void myGridView_CurrentCellDirtyStateChanged(object sender, EventArgs e) { if (!myGridView_DoCheck) { myGridView_DoCheck = true; myGridView.EndEdit(); // do something here } else myGridView_DoCheck = false; }
b164ccafd57506e2910b66d553afbe1cb9405343319eea97b75d7db8a3e3b457
['4a8f1c592d39429c9c19d989ae9100c8']
One long trawl through the appropriate messages, and the answer is... private void listView1_BeforeLabelEdit(object sender, LabelEditEventArgs e) { IntPtr editWnd = IntPtr.Zero; editWnd = SendMessage(listView1.Handle, LVM_GETEDITCONTROL, 0, IntPtr.Zero); int textLen = Path.GetFileNameWithoutExtension(listView1.Items[e.Item].Text).Length; SendMessage(editWnd, EM_SETSEL, 0, (IntPtr) textLen); } public const int EM_SETSEL = 0xB1; public const int LVM_FIRST = 0x1000; public const int LVM_GETEDITCONTROL = (LVM_FIRST + 24); [DllImport("user32.dll", CharSet = CharSet.Ansi)] public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int len, IntPtr order); That does exactly what I was after. Thanks for the other responders taking the time to answer.
bb8a00c0cb96cc55ba4cbe9ced0a304f7eb0de583d1b16d4abd7b31f90e20041
['4a96e2f5ca6e4a6ab8f790a05f5cd0f8']
I created labels in XAML that are multiline and all lines are centered, tested and working perfectly fine. Now I want to create these labels dynamically but unfortunately I don't know how to do this. tried setting LineStackingStrategy on MaxHeight, Fontfamily tried creating new Textblock on fontfamily XAML Code to reproduce in C# code: <Label HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="btn_02" Height="70" Width="160" BorderBrush="#F0F2A4" BorderThickness="2" Background="Transparent" Foreground="#F0F2A4" FontFamily="Arial" FontSize="13" TextBlock.LineStackingStrategy="BlockLineHeight" TextBlock.LineHeight="17" Content="ORGEL&#xa;LADEN" TextBlock.TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,200,0,0" MouseLeftButtonDown="Btn_02_MouseLeftButtonDown"/> C# code to create label dynamically: Label label = new Label() { HorizontalAlignment = HorizontalAlignment.Center, HorizontalContentAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Top, VerticalContentAlignment = VerticalAlignment.Center, Name = "orgel" + i.ToString(), Height = 70, Width = 160, BorderBrush = (SolidColorBrush)(new BrushConverter().ConvertFrom("#F0F2A4")), BorderThickness = new Thickness(2), Background = Brushes.Transparent, Foreground = (SolidColorBrush)(new BrushConverter().ConvertFrom("#F0F2A4")), FontFamily = new FontFamily("Arial"), FontSize = 13, Content = orgel, Margin = new Thickness((columncount * 100), (rowcount * 100), 0, 0) }; I want to add TextBlock.LineStackingStrategy="BlockLineHeight" TextBlock.LineHeight="17" Content="ORGEL&#xa;LADEN" TextBlock.TextAlignment="Center" from XAML to this C# code.
da0ca5802b3d80cb28da32fca18f269fe1f9f810546d50374199a33a49c24f9f
['4a96e2f5ca6e4a6ab8f790a05f5cd0f8']
Use recursion with a Merge Sort algorithm: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Merge_sort { class Program { static void Main(string[] args) { List<int> unsorted = new List<int>(); List<int> sorted; Random random = new Random(); Console.WriteLine("Original array elements:" ); for(int i = 0; i< 10;i++){ unsorted.Add(random.Next(0,100)); Console.Write(unsorted[i]+" "); } Console.WriteLine(); sorted = MergeSort(unsorted); Console.WriteLine("Sorted array elements: "); foreach (int x in sorted) { Console.Write(x+" "); } Console.Write("\n"); } private static List<int> MergeSort(List<int> unsorted) { if (unsorted.Count <= 1) return unsorted; List<int> left = new List<int>(); List<int> right = new List<int>(); int middle = unsorted.Count / 2; for (int i = 0; i < middle;i++) //Dividing the unsorted list { left.Add(unsorted[i]); } for (int i = middle; i < unsorted.Count; i++) { right.Add(unsorted[i]); } left = MergeSort(left); right = MergeSort(right); return Merge(left, right); } private static List<int> Merge(List<int> left, List<int> right) { List<int> result = new List<int>(); while(left.Count > 0 || right.Count>0) { if (left.Count > 0 && right.Count > 0) { if (left.First() <= right.First()) //Comparing First two elements to see which is smaller { result.Add(left.First()); left.Remove(left.First()); //Rest of the list minus the first element } else { result.Add(right.First()); right.Remove(right.First()); } } else if(left.Count>0) { result.Add(left.First()); left.Remove(left.First()); } else if (right.Count > 0) { result.Add(right.First()); right.Remove(right.First()); } } return result; } } } source: https://www.w3resource.com/csharp-exercises/searching-and-sorting-algorithm/searching-and-sorting-algorithm-exercise-7.php
3472c8f1856fd197241902730796f49dc0eb6b7ab8d1d4e8ebe168b931c9c978
['4aa430053e0c4c269f2c7a7d2201d7b0']
This is a bit late, but if you want to center the pop up window with showAsDropDown(), you can do this: target.post(() -> { popupWindow.showAsDropDown(anchor, (anchor.getWidth() / 2), yOffset, Gravity.CENTER); }); It is inside target.post() to ensure that the anchor is drawn when we call getWidth(), otherwise it returns 0.
24e1d5e9ec9262ecd076c85d5180dfd0d70e5a817b3265ac3e0618592a988e74
['4aa430053e0c4c269f2c7a7d2201d7b0']
Add this line to your activity inside the manifest.xml: android:launchMode=”singleTop” So, your manifest should look something like this: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.package.example" android:versionCode="1" android:versionName="1.0" > <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <!-- This is the activity for which you want this behaviour--> <activity android:name=".MainActivity" android:label="@string/title_activity_main" android:launchMode=”singleTop”> </activity> </application>