title
stringlengths
10
150
body
stringlengths
17
64.2k
label
int64
0
3
How can I dynamically name an array in Javascript?
<p>I am using jQuery and JSON to pull data from a database. Each row of the database is a different product and each product has a number of properties associated with it.</p> <p>What I'm trying to do in js, is create a named array for each product containing all of the products properties. I know how to pull the data from JSON. I know how to construct the Array.</p> <p>What I don't know is how to create an array name dynamically. Can someone help me out?</p> <p>I am trying to name the array based on a field in the database. In the structure of my existing and working script, it's referenced as data.cssid. I'd like to use the value of data.cssid as the name of the array and then populate the array.</p> <pre><code>$.getJSON("products.php",function(data){ $.each(data.products, function(i,data){ var data.cssid = new Array(); data.cssid[0] = data.productid; ... etc }); }); </code></pre> <p>I know the code above is completely wrong, but it illustrates the idea. Where I declare "var data.cssid", I want to use the actual value of data.cssid as the name of the new array.</p> <p>EDIT:</p> <p>I've tried the methods mentioned here (except for eval). The code is below and is not really that different than my original post, except that I'm using a Object constructor.</p> <pre><code>$(document).ready(function(){ $.getJSON("productscript.php",function(data){ $.each(data.products, function(i,data){ var arrayName = data.cssid; obj[arrayName] = new Array(); obj[arrayName][0] = data.productid; obj[arrayName][1] = data.productname; obj[arrayName][2] = data.cssid; obj[arrayName][3] = data.benefits; alert(obj[arrayName]); //WORKS alert(obj.shoe); //WORKS WHEN arrayName = shoe, otherwise undefined }); }); }); </code></pre> <p>The alert for the non-specific obj[arrayName] works and shows the arrays in all their magnificence. But, when I try to access a specific array by name alert(obj.shoe), it works only when the arrayName = shoe. Next iteration it fails and it can't be accessed outside of this function.</p> <p>I hope this helps clarify the problem and how to solve it. I really appreciate all of the input and am trying everything you guys suggest.</p> <p>PROGRESS (THE SOLUTION):</p> <pre><code>$(document).ready(function(){ $.getJSON("productscript.php",function(data){ $.each(data.products, function(i,data){ var arrayName = data.cssid; window[arrayName] = new Array(); var arr = window[data.cssid]; arr[0] = data.productid; arr[1] = data.productname; arr[2] = data.cssid; arr[3] = data.benefits; alert(window[arrayName]); //WORKS alert(arrayName); //WORKS alert(shoe); //WORKS }); }); }); function showAlert() { alert(shoe); //WORKS when activated by button click } </code></pre> <p>Thanks to everybody for your input. </p>
0
How can I find all products without images in Magento?
<p>I have some thousand products and want to find all products without an image. I tried to search for (no image) in the admin products grid, but no result. How can I make an SQL query that disables all these products?</p>
0
How do I fix the 'Out of range value adjusted for column' error?
<p>I went into phpMyAdmin and changed the value for an integer(15)field to a 10-digit number, so everything should work fine. I entered the value '4085628851' and I am receiving the following error:</p> <blockquote> <p>Warning: #1264 Out of range value adjusted for column 'phone' at row 1</p> </blockquote> <p>It then changes the value to '2147483647'.</p> <p>After some googling, I found this article that explains how to fix the problem. <a href="http://webomania.wordpress.com/2006/10/01/out-of-range-value-adjusted-for-column-error/" rel="noreferrer">http://webomania.wordpress.com/2006/10/01/out-of-range-value-adjusted-for-column-error/</a>, but I don't know how to login to the Mysql shell. </p> <p>How do I login to the Mysql shell? How do I fix this error?</p>
0
JQuery add link to text
<p>Is there a way in JQuery to select text from the html document and add a link around it?</p> <p>Many Thanks, Nav</p>
0
Delete button for each table row
<p>I manage to succesfully read and display data from my database with the following code: <a href="http://pastebin.com/rjZfBWZX" rel="nofollow">http://pastebin.com/rjZfBWZX</a> I also generate a delete button for each row of the table :) Clicking the delete button calls "obrisi.php" which is supposed to delete that row but I messed something up :S Here's obrisi.php code: </p> <p><a href="http://pastebin.com/mrFy1i7S" rel="nofollow">http://pastebin.com/mrFy1i7S</a></p> <p>I'm getting a Parse error: syntax error, unexpected 'FROM' (T_STRING) :S</p>
0
AngularJS get formatted date in ng-model
<p>I have following text input filled by model value in timestamp:</p> <pre><code>&lt;input type="datetime" ng-model="workerDetail.dateOfBirth" class="form-control" id="date_of_birth" /&gt; </code></pre> <p>It displays value in input as given timestamp. </p> <p>I would like to convert value which is visible in input into formatted date (YYYY/MM/DD), but in model should be always as timestamp. </p> <p>I tried to do it by this way:</p> <pre><code>{{workerDetail.dateOfBirth | date:'MMM'}} </code></pre> <p>But without luck. </p> <p>Thanks for any advice.</p>
0
Change Toolbar color in Appcompat 21
<p>I am testing out the new Appcompat 21 Material Design features. Therefore I've created a Toolbar like this:</p> <pre><code>&lt;android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/activity_my_toolbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:minHeight="?attr/actionBarSize" android:background="?attr/colorPrimary" app:theme="@style/ThemeOverlay.AppCompat.ActionBar"/&gt; </code></pre> <p>and included it in my main layout file.</p> <p>Then I've set it as supportActionBar like that:</p> <pre><code>Toolbar toolBar = (Toolbar)findViewById(R.id.activity_my_toolbar); setSupportActionBar(toolBar); </code></pre> <p>It's working, but somehow I can't quite figure out how to customize the toolbar. It's grey and the text on it is black. How should I change background and text color?</p> <p>I've gone through this instructions:</p> <p><a href="http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html" rel="noreferrer">http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html</a></p> <p>What have I overseen to change colors?</p> <pre><code> &lt;style name="AppTheme" parent="Theme.AppCompat.Light"&gt; &lt;item name="android:windowActionBar" tools:ignore="NewApi"&gt;false&lt;/item&gt; &lt;item name="windowActionBar"&gt;false&lt;/item&gt; &lt;/style&gt; </code></pre> <p><strong>EDIT</strong>:</p> <p>I was able to change the background color by adding these lines of code to the theme:</p> <pre><code>&lt;item name="colorPrimary"&gt;@color/actionbar&lt;/item&gt; &lt;item name="colorPrimaryDark"&gt;@color/actionbar_dark&lt;/item&gt; </code></pre> <p>But they won't affect the text color. What am I missing? Instead of the black text and black menu button, I'd rather prefer a white text and white menu buttons:</p> <p><img src="https://i.stack.imgur.com/0SD7L.png" alt="enter image description here"></p>
0
How to countercheck a Boost Error Code appropriately?
<p>I have a callback function which is bound to a <code>boost::asio::deadline_timer</code>. Now the function is called when the timer is cancelled or it expires. Since I need to distinguish between this two cases I need to check the passed Error code. The basic code would be like this:</p> <pre><code>void CameraCommand::handleTimeout(const boost::system::error_code&amp; error) { std::cout &lt;&lt; "\nError: " &lt;&lt; error.message() &lt;&lt; "\n"; return; } </code></pre> <p>Now when the Handler is called because the timer expired the error code is <code>Success</code>, when the timer is cancelled the error code is <code>Operation canceled</code>.</p> <p>Now my question would be, how to appropriately check what happened?</p> <p>Suggestion 1:</p> <pre><code>if( error.message() == "Success" ) { // Timer expired } else { // Timer cancelled } </code></pre> <p>Suggestion 2:</p> <pre><code>if( error.value() == 0 ) { // Timer expired } else { // Timer cancelled } </code></pre> <p>Now my question is - is there any way to compare the error byitself and not by value or by string? Something like ( this is made up now )</p> <pre><code>if ( error == boost::system::error::types::success ) </code></pre> <p>Because what I don't like about the first suggestion is that I need to create a string just for check, which is kinda unnecessary in my opinion. The second way has the disadvantge that I need to look up all the error codes if I want to check for something other? So are there any enums or ways to check for the error or do I have one of the two suggested ways?</p>
0
How to instantiate, initialize and populate an array in TypeScript?
<p>I have the following classes in TypeScript:</p> <pre><code>class bar { length: number; } class foo { bars: bar[] = new Array(); } </code></pre> <p>And then I have:</p> <pre><code>var ham = new foo(); ham.bars = [ new bar() { // &lt;-- compiler says Expected "]" and Expected ";" length = 1 } ]; </code></pre> <p>Is there a way to do that in TypeScript?</p> <p><strong>UPDATE</strong></p> <p>I came up with another solution by having a set method to return itself:</p> <pre><code>class bar { length: number; private ht: number; height(h: number): bar { this.ht = h; return this; } constructor(len: number) { this.length = len; } } class foo { bars: bar[] = new Array(); setBars(items: bar[]) { this.bars = items; return this; } } </code></pre> <p>so you can initialize it as below:</p> <pre><code>var ham = new foo(); ham.setBars( [ new bar(1).height(2), new bar(3) ]); </code></pre>
0
Fullscreen video without black borders
<p>The problem I have is that the video always gets black bars on the sides or on the top/bottom depending on the screen size. </p> <p><img src="https://i.stack.imgur.com/umS4u.png" alt="enter image description here"></p> <p><em>Any idea how to get it full screen always without showing that annoying black bars?</em> and without using a plugin.</p> <p>This is my markup:</p> <pre class="lang-html prettyprint-override"><code> &lt;div id="full-bg"&gt; &lt;div class="box iframe-box" width="1280" height="800"&gt; &lt;iframe src="http://player.vimeo.com/video/67794477?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=0fb0d4" width="1280" height="720" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen&gt;&lt;/iframe&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <pre class="lang-css prettyprint-override"><code> #full-bg{ width: 100%; height: 100%; img{ display: none; } .iframe-box{ width: 100%; height: 100%; position: absolute; background: url(../img/fittobox.png); left: 0 !important; top: 0 !important; iframe{ width: 100%; height: 100%; } } } </code></pre>
0
How to use "routerLinkActive" with query params in Angular 6?
<p>I have a problem in Angular: I have three links, one of them has query params (due to using a resolver). If I click the first and the third link, the <code>routerLinkActive</code> is set. If I click the second link <code>routerLinkActive</code> is set too. But if I change the query parameter inside the component <code>routerLinkActive</code> gets unset.</p> <p>So, I need to ignore the query params. But how does it work? Can anyone help me?</p> <p>Here is my simple code:</p> <pre><code>&lt;div class="col-12"&gt; &lt;ul class="nav nav-pills nav-justified"&gt; &lt;li class="nav-item"&gt; &lt;a class="nav-link" routerLink="/einstellungen/allgemein" routerLinkActive="active"&gt; Allgemein &lt;/a&gt; &lt;/li&gt; &lt;li class="nav-item"&gt; &lt;a class="nav-link" [routerLink]="['/einstellungen/kalender']" [queryParams]="{branch: myBranches[0].id}" routerLinkActive="active" [routerLinkActiveOptions]="{exact: false}"&gt; Kalender verwalten &lt;/a&gt; &lt;/li&gt; &lt;li class="nav-item"&gt; &lt;a class="nav-link" *ngIf="user.is_admin" routerLink="/einstellungen/filialen" routerLinkActive="active"&gt; Filialen verwalten &lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; </code></pre>
0
Create .ics file dynamically
<p>I made a website for a client where they can post events. Instead of manually creating .ics files from iCal for every event and uploading it, I though it would be better to pull it out of the database and automatically create a .ics file automatically with PHP.</p> <p>I can pull information from the database (no problem), but when converting it to a time stamp for the calendar file it a tough one. Here's what I store in the database:</p> <pre><code>Month: 05 Day: 02 Year: 2011 Time: 11:30am - 1:30pm </code></pre> <p>Here's the code to create my .ics files:</p> <pre><code>//This is the most important coding. header("Content-Type: text/Calendar"); header("Content-Disposition: inline; filename=adamhouston_$id.ics"); echo "BEGIN:VCALENDAR\n"; echo "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN\n"; echo "VERSION:2.0\n"; echo "METHOD:PUBLISH\n"; echo "X-MS-OLK-FORCEINSPECTOROPEN:TRUE\n"; echo "BEGIN:VEVENT\n"; echo "CLASS:PUBLIC\n"; echo "CREATED:20091109T101015Z\n"; echo "DESCRIPTION:Speaker: $event_query_row[speaker_name]\\n\\nTopic: $event_query_row[speaker_topic]\n"; echo "DTEND:20100208T040000Z\n"; echo "DTSTAMP:20100109T093305Z\n"; echo "DTSTART:20100208T003000Z\n"; echo "LAST-MODIFIED:20091109T101015Z\n"; echo "LOCATION:$event_query_row[location]\n"; echo "PRIORITY:5\n"; echo "SEQUENCE:0\n"; echo "SUMMARY;LANGUAGE=en-us:ADAM-Houston Event\n"; echo "TRANSP:OPAQUE\n"; echo "UID:040000008200E00074C5B7101A82E008000000008062306C6261CA01000000000000000\n"; echo "X-MICROSOFT-CDO-BUSYSTATUS:BUSY\n"; echo "X-MICROSOFT-CDO-IMPORTANCE:1\n"; echo "X-MICROSOFT-DISALLOW-COUNTER:FALSE\n"; echo "X-MS-OLK-ALLOWEXTERNCHECK:TRUE\n"; echo "X-MS-OLK-AUTOFILLLOCATION:FALSE\n"; echo "X-MS-OLK-CONFTYPE:0\n"; //Here is to set the reminder for the event. echo "BEGIN:VALARM\n"; echo "TRIGGER:-PT1440M\n"; echo "ACTION:DISPLAY\n"; echo "DESCRIPTION:Reminder\n"; echo "END:VALARM\n"; echo "END:VEVENT\n"; echo "END:VCALENDAR\n"; </code></pre> <p>Now how do I convert the data in my database to a correct time/date stamp?</p>
0
Can I automatically start a task when a folder is opened?
<p>Does VS code support starting a gulp-watch task on startup? I'd like to start the watcher when I open the editor.</p>
0
Cartesian Product in c++
<p>I have been searching for weeks on how to come up with piece of code which I could applied the cartesian product. Let's say I have two arrays : </p> <pre><code>int M[2]= {1,2}; int J[3] = {0,1,2}; </code></pre> <p>So the code will takes those two arrays in apply the rule M X J therefore we will have the pairs (1,0)(1,1)(1,2)(2,0)(2,1)(2,2) and I want the new result to be saved into a new array where each index in the array contains a pair , for example c[0] = (1,0). Help please :(</p>
0
Why it is impossible to divide Integer number in Haskell?
<p>This code</p> <pre><code>(4 :: Integer) / 2 </code></pre> <p>will lead to error:</p> <pre><code> No instance for (Fractional Integer) arising from a use of ‘/’ In the expression: (4 :: Integer) / 2 In an equation for ‘it’: it = (4 :: Integer) / 2 </code></pre> <p>Why?</p> <p>I need to specify </p> <pre><code>fromIntegral(4 :: Integer) / 2 </code></pre> <p>to get a result. But what if I need a real number and not <code>2.0</code>? </p>
0
JavaFX: what is the best way to display a simple message?
<p>In my application I need to display a warning/info message, but I don't know a simple way to do that because there is no JOptionPane or similar component on JavaFX.</p> <p>There is a Popup class, but you have to set many parameters to get a decent layout/position/background color/etc for a simple message... So I want to know if there is a simple, already implemented component to display messages, maybe in a third party library if JavaFX does not offer anything decent.</p> <p>Thanks in advance for any help/hints.</p>
0
How do I install python_ldap on 64 bit windows 7?
<p>I'm using python 2.7.6 and in my code I have a line:</p> <pre><code> import psycopg2.extensions </code></pre> <p>which I've installed using pip. Next, my editor tells me, that psycopg2 requires python_ldap=2.4.19. However, in the PyPI repository, there's only a 32 bit version, which doesn't work, since my Windows is 64 bit. There's a 64 bit version of python_ldap=2.4.28, avaliable <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#python-ldap" rel="noreferrer">here</a>, however running</p> <pre><code> pip install python_ldap-2.4.28-cp27-cp27m-win_amd64.whl </code></pre> <p>in the windows command line returns</p> <pre><code> python_ldap-2.4.28-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform. </code></pre> <p>in red, which I guess is an error meassage. So, in the end, what should I do to have the package installed on my laptop?</p>
0
Google play developer console crash reports
<p>I am looking for an API to pull my app's crash reports programmatically and I can't seem to find if this exists or not. I read through the google play developer API docs but it seems like it's for publishing your app and managing game related actions. </p> <p>Anyone know if there is an API available for crash reports? </p> <p>Edit: I can't modify the app, as it's supplied by a vendor but published through our Google Play Developer account. I only have access to the play developer console's ANRS &amp; Crash Reports.</p>
0
DataFrame error: "overloaded method value filter with alternatives"
<p>I am trying to create a new data frame by filter out the rows which is null or empty string using the code below:</p> <pre><code>val df1 = df.filter(df("fieldA") != "").cache() </code></pre> <p>Then I got the following error:</p> <pre><code> &lt;console&gt;:32: error: overloaded method value filter with alternatives: (conditionExpr: String)org.apache.spark.sql.DataFrame &lt;and&gt; (condition: org.apache.spark.sql.Column)org.apache.spark.sql.DataFrame cannot be applied to (Boolean) val df1 = df.filter(df("fieldA") != "").cache() ^ </code></pre> <p>Does anyone know what I missed here? Thanks!</p>
0
DataGridViewTextBoxColumn add commas in numeric cell
<p>How can I have my datagrid automatically add commas to a cell to format the numbers. I tried changing the format of the defaultcellstyle to numeric but it didn't help.</p> <p>I'm looking for it to do something like</p> <p>user enters 503412.45</p> <p>The number display changes to 503,412.45</p> <p><strong>UPDATE</strong>: I set the format of the column at design time (through the properties window in VS). It is not databound, users manually add rows. The columns are also created at design time by using the Collections option in the properties window</p>
0
Knockout.js mapping JSON object to Javascript Object
<p>I have a problem mapping a Json object recieved from the server into a predefined Javascript-object which contains all the necessary functions which are used in the bindings</p> <p>Javascript code is the following</p> <pre><code>function Person(FirstName, LastName, Friends) { var self = this; self.FirstName = ko.observable(FirstName); self.LastName = ko.observable(LastName); self.FullName = ko.computed(function () { return self.FirstName() + ' ' + self.LastName(); }) self.Friends = ko.observableArray(Friends); self.AddFriend = function () { self.Friends.push(new Person('new', 'friend')); }; self.DeleteFriend = function (friend) { self.Friends.remove(friend); }; } var viewModel = new Person(); $(document).ready(function () { $.ajax({ url: 'Home/GetPerson', dataType: 'json', type: 'GET', success: function (jsonResult) { viewModel = ko.mapping.fromJS(jsonResult); ko.applyBindings(viewModel); } }); }); </code></pre> <p>HTML:</p> <pre><code>&lt;p&gt;First name: &lt;input data-bind="value: FirstName" /&gt;&lt;/p&gt; &lt;p&gt;Last name: &lt;input data-bind="value: LastName" /&gt;&lt;/p&gt; &lt;p&gt;Full name: &lt;span data-bind="text: FullName" /&gt;&lt;/p&gt; &lt;p&gt;#Friends: &lt;span data-bind="text: Friends().length" /&gt;&lt;/p&gt; @*Allow maximum of 5 friends*@ &lt;p&gt;&lt;button data-bind="click: AddFriend, text:'add new friend', enable:Friends().length &lt; 5" /&gt;&lt;/p&gt; &lt;br&gt; @*define how friends should be rendered*@ &lt;table data-bind="foreach: Friends"&gt; &lt;tr&gt; &lt;td&gt;First name: &lt;input data-bind="value: FirstName" /&gt;&lt;/td&gt; &lt;td&gt;Last name: &lt;input data-bind="value: LastName" /&gt;&lt;/td&gt; &lt;td&gt;Full name: &lt;span data-bind="text: FullName" /&gt;&lt;/td&gt; &lt;td&gt;&lt;button data-bind="click: function(){ $parent.DeleteFriend($data) }, text:'delete'"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p>My ServerSide MVC code for getting initial data looks like:</p> <pre><code> public ActionResult GetPerson() { Person person = new Person{FirstName = "My", LastName="Name", Friends = new List&lt;Person&gt; { new Person{FirstName = "Friend", LastName="Number1"}, new Person{FirstName = "Friend", LastName="Number2"} } }; return Json(person, JsonRequestBehavior.AllowGet); } </code></pre> <p>I am trying to use the mapping plugin to load the Json into my Javascript object so everything is available for the bindings (The add-function and the computed properties on the Friend objects).</p> <p>When I use the mapping plugin it does not seem to work. When using the plugin the AddFriend method is not available during the binding. Is it possible to populate the JavaScript Person object by using the mapping plugin or must everything be done manually?</p>
0
Drawing an object using getGraphics() without extending JFrame
<p>How can I draw an object without a class (which extends <code>JFrame</code>)? I found <code>getGraphics</code> method but it doesnt draw the object.</p> <pre><code>import javax.swing.*; import java.awt.*; public class Main { public static void main(String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); frame.setSize(600, 400); JPanel panel = new JPanel(); frame.add(panel); Graphics g = panel.getGraphics(); g.setColor(Color.BLUE); g.fillRect(0, 0, 100, 100); } } </code></pre>
0
How to send JWT token as authorization header in angular 6
<p>Currently I used this static code in component .ts file but this one is not work. It returns unauthorized(401). But when I pass token as query string it works fine. Please give a working example for component .ts file.</p> <pre><code> import { HttpClient, HttpResponse ,HttpHeaders} from '@angular/common/http'; var t=`eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTUzNzcxNTMyNSwiZXhwIjoxNTM3NzE4OTI1LCJuYmYiOjE1Mzc3MTUzMjUsImp0aSI6IlBKWVhnSkVyblQ0WjdLTDAiLCJzdWIiOjYsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.1vz5lwPlg6orzkBJijsbBNZrnFnUedsGJUs7BUs0tmM`; var headers_object = new HttpHeaders(); headers_object.append('Content-Type', 'application/json'); headers_object.append("Authorization", "Bearer " + t); const httpOptions = { headers: headers_object }; this.http.post( 'http://localhost:8000/api/role/Post', {limit:10}, httpOptions ).subscribe(resp =&gt; { this.roles = console.log(resp) } ); </code></pre>
0
How to set environment variable in React JS..?
<p>I am new to React JS. I am trying to build war file from React App but stuck somewhere below. It gives me below errors.</p> <pre><code>Creating an optimized production build... Treating warnings as errors because process.env.CI = true. Most CI servers set it automatically. Failed to compile. ./src/Home.js Line 2: 'AppNavbar' is defined but never used no-unused-vars Line 3: 'Link' is defined but never used no-unused-vars Line 4: 'Button' is defined but never used no-unused-vars Line 4: 'Container' is defined but never used no-unused-vars ./src/App.js Line 5: 'MenuBar' is defined but never used no-unused-vars Line 6: 'PrivilegeList' is defined but never used no-unused-vars Line 8: 'logo' is defined but never used no-unused-vars npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] build: `react-scripts build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! D:\ReactJS-workspace\my-app\npm\cache\_logs\2018-10-19T07_44_19_233Z-debug.log [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:36 min [INFO] Finished at: 2018-10-19T13:14:19+05:30 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.3.2:exec (npm run build (compile)) on project my-app: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -&gt; [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException </code></pre> <p>Below is my folder structure. </p> <p><a href="https://i.stack.imgur.com/fixJJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fixJJ.png" alt="enter image description here"></a></p> <p>I want to set <code>process.env.CI = false</code> how to set environment variable in React JS?</p>
0
C#: How do you send OK or Cancel return messages of dialogs when not using buttons?
<p>C#: How do you send OK or Cancel return messages of dialogs when not using buttons?</p> <p>How would you return the OK message in the condition of a textbox that will proceed when the user presses Enter, and will send Cancel when the user presses Ctrl+Q? </p> <p>Disregard: solution- this.dialogresult = dialogresult.ok or dialogresult.cancel.</p>
0
How can I iterate through an array of strings using VB?
<p>Here's my code so far:</p> <pre><code>Dim i As Integer Dim stringArray() as String stringArray = split("Hello|there", "|") For i = 0 To stringArray.Length() ' Logic goes here Next </code></pre> <p>VB6 doesn't seem to like me using <code>stringAray.Length()</code> and gives me a compile error message like <code>Invalid Qualifier</code>, but what's the right way to iterate through each element of a string array?</p>
0
How to change fonts in matplotlib (python)?
<p>It sounds as an easy problem but I do not find any effective solution to change the font (not the font size) in a plot made with matplotlib in python.</p> <p>I found a couple of tutorials to change the default font of matplotlib by modifying some files in the folders where matplotlib stores its default font - see <a href="http://blog.olgabotvinnik.com/post/35807476900/how-to-set-helvetica-as-the-default-sans-serif-font-in" rel="noreferrer">this blog post</a> - but I am looking for a less radical solution since I would like to use more than one font in my plot (text, label, axis label, etc).</p>
0
Is there a way to simulate GROUP BY WITH CUBE in MySql?
<p>MySql supports GROUP BY WITH ROLLUP which will return aggregates for the last x of the n columns in the group by but does not support GROUP BY WITH CUBE to take all combinations of the n columns and take aggregates.</p> <p>I can simulate this by doing unions of GROUP BY WITH ROLLUP queries, but MySql is materializing my subquery multiple times. I am using a group by on a large subquery, so this is suboptimal. Is there a way to solve this without temporary tables?</p>
0
TypeScript D3 v4 import not working
<p>I am trying to build a tiny JS library on top of D3 to draw a line chart. I am fairly new to the whole scene, but I thought I'd learn best by jumping in the "deep end".</p> <p>Here is the content of my <code>package.json</code></p> <pre><code>{ "name": "d3play02", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" &amp;&amp; exit 1" }, "keywords": [], "author": "", "license": "ISC", "devDependencies": { "d3-array": "^1.0.1", "d3-axis": "^1.0.3", "d3-request": "^1.0.2", "d3-scale": "^1.0.3", "d3-selection": "^1.0.2", "d3-shape": "^1.0.3", "d3-time-format": "^2.0.2", "rollup": "^0.36.3", "rollup-plugin-node-resolve": "^2.0.0", "uglify-js": "^2.7.4" }, "dependencies": { "@types/d3": "^4.2.37" } } </code></pre> <p>I have a file called <code>LineChart.ts</code> and in there I have:</p> <pre><code>/// &lt;reference path="node_modules/@types/d3/node_modules/@types/d3-request/index.d.ts" /&gt; import csv from 'd3-request'; class LineChart { data(url: string): DsvRequest { // code to go here } } </code></pre> <p>But this is giving me an error saying this</p> <p><a href="https://i.stack.imgur.com/o333a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o333a.png" alt="module error"></a></p> <p>It is complaining that it can't find the <code>d3-request</code> module, but I have that installed and based on the stuff I've read, I am importing correctly!</p>
0
How to implement "make install" in a Makefile?
<p>So here's the repo I'm working with: <a href="https://github.com/Garuda1/unixlib" rel="noreferrer">https://github.com/Garuda1/unixlib</a></p> <p>I'd like to know where my compiled lib (<code>unixlib.a</code>) and where my header (<code>unixlib.h</code>) should be so as to be able to use the lib (under Linux-x86 or Linux-x86_64) simply by compiling with:</p> <pre><code>$ gcc my_source.c -lunixlib </code></pre> <p>and including the header in <code>my_source.c</code>.</p> <p>I suppose I add do this to <code>Makefile</code>:</p> <pre><code>install: mv $(NAME).a $(LIB_PATH) mv unixlib.h $(HEADER_PATH) </code></pre> <p>but I don't know what <code>$(LIB_PATH)</code> and <code>$(HEADER_PATH)</code> are...</p>
0
How to add a new row to c# DataTable in 1 line of code?
<p>Is it possible to add a new row to a datatable in c# with just 1 line of code? I'm just dummying up some data for a test and it seems pretty slow to have to write something like this:</p> <pre><code>DataTable dt= new DataTable("results"); DataRow dr1 = dt.NewRow(); dr1[0] = "Sydney"; dt.Rows.Add(dr1); DataRow dr2 = dt.NewRow(); dr2[0] = "Perth"; dt.Rows.Add(dr2); DataRow dr3 = dt.NewRow(); dr3[0] = "Darwin"; dt.Rows.Add(dr3); </code></pre> <p>I was assuming you could do something like the code below, but I can't find the correct syntax.</p> <pre><code>dt.Rows.Add(dt.NewRow()[0]{"Sydney"}); dt.Rows.Add(dt.NewRow()[0]{"Perth"}); dt.Rows.Add(dt.NewRow()[0]{"Darwin"}); </code></pre> <p>And yes I know in the time I've taken to write this question I could have finished coding it the long way instead of procrastinating about it :)</p> <p>Thanks!</p>
0
How to make cheat sheets in Latex?
<p>I want to make cheat sheets for my personal use. I want to use this opportunity to get a good hand on <a href="http://en.wikipedia.org/wiki/LaTeX" rel="noreferrer">LaTeX</a> too. (I am already comfortable making simple documents math related in LaTeX.)</p> <p>Now I want to try making cheat sheets in LaTeX. But I don't know how to do it. In cheat sheets, usually the page is split into multiple rectangular sections and each one has a few commands or notes inside it. Each rectangular section has a border etc.</p> <p>How can it be done in LaTeX? Are any packages available to do this? Do you think <a href="http://en.wikipedia.org/wiki/PGF/TikZ" rel="noreferrer">TikZ</a> will be a good idea for this?</p>
0
In Python how should I test if a variable is None, True or False
<p>I have a function that can return one of three things:</p> <ul> <li>success (<code>True</code>)</li> <li>failure (<code>False</code>)</li> <li>error reading/parsing stream (<code>None</code>)</li> </ul> <p>My question is, if I'm not supposed to test against <code>True</code> or <code>False</code>, how should I see what the result is. Below is how I'm currently doing it:</p> <pre><code>result = simulate(open("myfile")) if result == None: print "error parsing stream" elif result == True: # shouldn't do this print "result pass" else: print "result fail" </code></pre> <p>is it really as simple as removing the <code>== True</code> part or should I add a tri-bool data-type. I do not want the <code>simulate</code> function to throw an exception as all I want the outer program to do with an error is log it and continue. </p>
0
Where can I find the error logs of nginx, using FastCGI and Django?
<p>I'm using Django with <a href="https://en.wikipedia.org/wiki/FastCGI" rel="noreferrer">FastCGI</a> + nginx. Where are the logs (errors) stored in this case?</p>
0
Disabling field analyzing by default in elastic search
<p>Is it possible to enable indexing of elastic search fields selectively for a type? </p> <p>Through the mapping settings for a specific index, one can set the property </p> <p>{ "index" : "not_analyzed" }</p> <p>For a specific field. Since my document has too many fields and is likely to change structure in the future, I would need a mapping where fields are not analyzed by default unless specified differently.</p> <p>Is this possible? </p>
0
android: Data refresh in listview after deleting from database
<p>I have an application which retrieves data from DB and displays it in a list view. I have a custom adapter for the same. So when I press the "delete" button, a delete button for each row in the list is displayed. If I press that, the particular row gets deleted in the DB and the same should be reflected in the listview also. The problem is, its not reflecting this change, I should close the app and reopen or move into some other activity and get back to see the updated results.</p> <p>So my question is: where do I call the <code>notifyDataSetChanged()</code> method to get it updated instantly?</p> <p>Here is my customadapter view:</p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub MenuListItems menuListItems = menuList.get(position); if (convertView == null) { LayoutInflater inflater = (LayoutInflater) c .getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = inflater.inflate(R.layout.customlist, parent, false); } Button ck = (Button) convertView.findViewById(R.id.delbox); if(i){ ck.setVisibility(View.VISIBLE);} else{ ck.setVisibility(View.GONE); } ck.setTag(menuListItems.getSlno()); ck.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub final Integer Index = Integer.parseInt((String) v.getTag()); final DataHandler enter = new DataHandler(c); DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { switch (which){ case DialogInterface.BUTTON_POSITIVE: //Yes button clicked enter.open(); enter.delet(Index); enter.close(); notifyDataSetChanged(); dialog.dismiss(); break; case DialogInterface.BUTTON_NEGATIVE: //No button clicked dialog.dismiss(); break; } } }; AlertDialog.Builder builder = new AlertDialog.Builder(c); builder.setMessage("Are you sure you want to Delete?").setPositiveButton("Yes", dialogClickListener) .setNegativeButton("No", dialogClickListener).show(); } }); TextView id = (TextView) convertView.findViewById(R.id.tvhide); id.setText(menuListItems.getSlno()); TextView title = (TextView) convertView.findViewById(R.id.tvtitle); title.setText(menuListItems.getTitle()); TextView phone = (TextView) convertView.findViewById(R.id.tvpnumber); phone.setText(menuListItems.getPhone()); // ck.setChecked(menuList.) notifyDataSetChanged(); return convertView; } </code></pre>
0
How to access request query string parameters in javascript?
<p>I've seen numerous solutions that utilize RegEx, and to be quite frank, that seems ridiculously excessive since javascript is so versatile.</p> <p>There must be a simpler way to access request parameters.</p> <p>Could somebody demonstrate for me?</p>
0
import .step file with three.js
<p>I would like to import a file ".step" to use it with Three.js but I don't know how to do it</p> <p>I didn't found any topic, only "first step, second step "</p> <p>Any one could help me please ?</p>
0
Play mp3 file with javascript onClick
<p>I am playing mp3 file just javascript onClick.</p> <p>Bellow is my code:</p> <pre><code>//Music File 1 &lt;audio id="id1" src="01.mp3"&gt;&lt;/audio&gt; &lt;button onClick="document.getElementById("id1").play()"&gt;Play&lt;/button&gt; &lt;button onClick="document.getElementById("id1").pause()"&gt;Stop&lt;/button&gt; //Music File 2 &lt;audio id="id2" src="02.mp3"&gt;&lt;/audio&gt; &lt;button onClick="document.getElementById("id2").play()"&gt;Play&lt;/button&gt; &lt;button onClick="document.getElementById("id2").pause()"&gt;Stop&lt;/button&gt; </code></pre> <p>My question is, I am playing music 01.mp3 and I want it stop play if I press play button at music 02.mp3.</p> <p>Can any one give me a better solution than this? Totally, I want to way to play music like www.mp3skull.com, other stop play if pressed other file to play.</p> <p>Regards, Virak</p>
0
Paperclip::Errors::MissingRequiredValidatorError with Rails 4
<p>I'm getting this error when I try to upload using paperclip with my rails blogging app. Not sure what it is referring to when it says "MissingRequiredValidatorError" I thought that by updating post_params and giving it :image it would be fine, as both create and update use post_params</p> <pre><code>Paperclip::Errors::MissingRequiredValidatorError in PostsController#create Paperclip::Errors::MissingRequiredValidatorError Extracted source (around line #30): def create @post = Post.new(post_params) </code></pre> <p>This is my posts_controller.rb </p> <pre><code>def update @post = Post.find(params[:id]) if @post.update(post_params) redirect_to action: :show, id: @post.id else render 'edit' end end def new @post = Post.new end def create @post = Post.new(post_params) if @post.save redirect_to action: :show, id: @post.id else render 'new' end end #... private def post_params params.require(:post).permit(:title, :text, :image) end </code></pre> <p>and this is my posts helper </p> <pre><code>module PostsHelper def post_params params.require(:post).permit(:title, :body, :tag_list, :image) end end </code></pre> <p>Please let me know if I can supplement extra material to help you help me.</p>
0
How to display data of objects in JSP
<p>I have stored some user details through a register form into db (hibernate and spring). I want to display the user details of all users in a separate JSP page.Could anyone please tell me how to do that? </p> <p>Below is my code of controller</p> <pre><code>@Controller public class RegisterController { @Autowired private UserDao userDao; @RequestMapping(value = "/registerForm.htm", method = RequestMethod.GET) public ModelAndView registerPage(ModelMap map) { User user = new User(); map.addAttribute(user); return new ModelAndView("registerForm", "command", user); } @RequestMapping(value = "/registerProcess.htm", method = RequestMethod.POST) public ModelAndView registerUser(@ModelAttribute("user") User user, Model model) { model.addAttribute("userName", user.getUserName()); model.addAttribute("password", user.getPassword()); model.addAttribute("emailId", user.getEmailId()); System.out.println("user is " + user); System.out.println("userdao is" + userDao); userDao.saveUser(user); return new ModelAndView("registerProcess", "user", user); } } </code></pre> <p>code inside userdao</p> <pre><code>public void saveUser(User user) { Session session=getSessionFactory().openSession(); Transaction tx; tx=session.beginTransaction(); session.persist(user); tx.commit(); } </code></pre>
0
Restricting XML Elements Based on Another Element via XSD
<p>I believe this has to do with <code>keyref</code> but I'm not for sure, and I am really not sure that it can be done at all.</p> <p>For example, say I have myElement1 and myElement2. If there are no myElement2 in the XML file, then myElement1 must exist, otherwise it is optional.</p> <p>Is there any way to force this type of validation in my XSD file?</p>
0
RecyclerView ClassNotFound
<p>I tried to add RecyclerView and CardView into my project</p> <pre><code>dependencies { compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:support-v13:21.0.0' compile 'com.android.support:cardview-v7:21.0.0' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.viewpagerindicator:library:2.4.1@aar' compile project(':facebook') } </code></pre> <p>it compiles, but I got below exception when run it on device</p> <pre><code>Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.RecyclerView" on path: DexPathList[[zip file "/data/app/xxxx.apk"],nativeLibraryDirectories=[/data/app-lib/xxxx, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:497) at java.lang.ClassLoader.loadClass(ClassLoader.java:457) at android.view.LayoutInflater.createView(LayoutInflater.java:559) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:652) </code></pre>
0
Check whether a string is parsable into Long without try-catch?
<p><code>Long.parseLong("string")</code> throws an error if string is not parsable into long. Is there a way to validate the string faster than using <code>try-catch</code>? Thanks</p>
0
What is the point of Redux Promise and Redux Promise Middleware?
<p>I've searched high and low but can't find a clear answer.</p> <p>I've managed to wrap my head around the mechanics of Redux, <em>but</em> when I've come to the point of API calls and async action creators, I'm stuck with middleware in context of Promises.</p> <p>Can you help me get the mess right?</p> <p>Cotradictory pieces of the puzzle giving me headache:</p> <ol> <li><p>One of YT tutorials says that natively Redux dispatch method does not support promises returned from action creators--hence the need for Redux Promise library (I know the project is probably dead now and the continuation is Redux Promise Middleware).</p></li> <li><p>Dan says in "<a href="https://stackoverflow.com/questions/36577510/what-is-the-difference-between-redux-thunk-and-redux-promise">What is the difference between redux-thunk and redux-promise?</a>" I can use promises even without middleware--just manage them in the action creator.</p></li> <li><p>In other answers I found examples of using thunks where the action creator returned a... <strong>promise</strong> (later is was processed in the caller /<em>dispatch(myActionCreator(params).then(...)</em>/ So a promise <strong>can</strong> be returned by a thunk <strong>WITHOUT</strong> any redux-promise lib..?</p></li> <li><p>In "<a href="https://stackoverflow.com/questions/36577510/what-is-the-difference-between-redux-thunk-and-redux-promise?rq=1">What is the difference between redux-thunk and redux-promise?</a>", the accepted answer states Redux Thunk returns functions, whereas Redux Promise returns promises.. what the heck?</p></li> </ol> <p>To wrap it up: what's the point of using Redux Promise or Redux Promise Middleware? Why does Redux alone not natively support promises?</p> <p><strong>Update:</strong></p> <p>I've just realized that in point 3 above I overlooked <code>then()</code> being <strong>attached</strong> to <code>dispatch</code> and not <strong>included</strong> in <code>dispatch()</code> args.</p>
0
Node.js TypeError: Cannot read property 'path' of undefined
<p>I've looked at a lot of answer for this same question, but I haven't found a working solution yet. I am trying to make a web app that you can upload files to using express and multer, and I am having a problem that no files are being uploaded and req.file is always undefined.</p> <p>Express and multer version as: <code>"express": "^4.15.4", "multer": "^1.3.0"</code></p> <p>My configure.js looks this:</p> <pre><code>multer = require('multer'); module.exports = function(app) { app.use(morgan('dev')); app.use(multer({ dest: path.join(__dirname, 'public/upload/temp')}).single('file')); routes(app); app.use('/public/', express.static(path.join(__dirname, '../public'))); </code></pre> <p>Consuming code looks like this:</p> <pre><code> var tempPath = req.file.path, ext = path.extname(req.file.name).toLowerCase(), targetPath = path.resolve('./public/upload/' + imgUrl + ext); if (ext === '.png' || ext === '.jpg' || ext === '.jpeg' || ext === '.gif') { fs.rename(tempPath, targetPath, function(err) { if (err) throw err; res.redirect('/images/' + imgUrl); }); } else { fs.unlink(tempPath, function() { if (err) throw err; res.json(500, {error: 'Only image files are allowed.'}); }); } </code></pre> <p>The form looks like this:</p> <pre><code> &lt;form method="post" action="/images" enctype="multipart/form- data"&gt; &lt;div class="panel-body form-horizontal"&gt; &lt;div class="form-group col-md-12"&gt; &lt;label class="col-sm-2 control-label" for="file"&gt;Browse:&lt;/label&gt; &lt;div class="col-md-10"&gt; &lt;input class="form-control" type="file" name="file" id="file"&gt; &lt;/div&gt; &lt;/div&gt; </code></pre>
0
Assign C array to C++'s std::array? (std::array<T,U> = T[U]) - no suitable constructor exists from "T [U]" to "std::array<T,U>"
<p>I am trying to assign a C array to a C++ std::array.</p> <p>How do I do that, the cleanest way and without making unneeded copies etc?</p> <p>When doing</p> <pre><code>int X[8]; std::array&lt;int,8&gt; Y = X; </code></pre> <p>I get an compiler error: "no suitable constructor exists".</p>
0
jQuery Mobile after page is shown event
<p>I'm new to jquery Mobile (I'm familiar with jquery though) and I cannot find an event that runs after the page is shown. I'm using jStorage to store some data and I want on load to check if there is any data and if there is to show something different in the page (like add elements to a list).</p> <p>But the $(document).ready does not work if I change the page (meaning the hash changes).</p> <p>EDIT: I've already tried the pageshow event</p> <pre><code>$('div').live('pageshow',function(event, ui){ alert('TEST'); }); </code></pre> <p>But it happens before the content is put in the HTML.</p>
0
ORDER BY ASC with Nulls at the Bottom
<p>I'm writing an SQL query that connects a schools table to a districts table. Simple One-To-Many relationship where each school is attached to one district. My query is as follows:</p> <pre><code>SELECT schools.id AS schoolid, schools.name AS school, districts.id AS districtid, districts.name AS district FROM sms_schools AS schools LEFT JOIN sms_districts AS districts ON schools.districtid = districts.id WHERE 1 = 1 ORDER BY districts.name, schools.name </code></pre> <p>The reason I did a left join is because not every school is attached to a district. For example one school may be home schooled that may contain all students that are home schooled. That wouldn't be in a district.</p> <p>So what I would like to do is use the ORDER BY to order as it is by district name and then school name. The only problem is that I want the null district to be at the bottom so that I can then use a group called 'Other' at the end of my output.</p> <p>Is it possible to order by ascending with nulls at the end of the output?</p>
0
Delete data older than 10 days in elasticsearch
<p>I am new to elasticsearch and I want to delete documents in my elasticsearch index which are older than 10 days. I want to keep only last 10 days of data.So is there any way to delete last 11nth day index automatically. What I have tried..</p> <pre><code>DELETE logstash-*/_query { "query": { "range": { "@timestamp": { "lte": "now-10d" } } } } </code></pre> <p>Error I'm getting while running on kibana dev tools</p> <pre><code>{ "error": "Incorrect HTTP method for uri [/logstash-*/_query?pretty] and method [DELETE], allowed: [POST]", "status": 405 } </code></pre> <p>Please help to resolve this issues.</p>
0
Gnuplot , pm3d with contour lines
<p>i am 3d plotting a matrix with some values, and i need to add contour lines to the plot, is there a simple gnuplot command to do this? </p> <p>I tried the command: "set contour base" but only 1 line came up, i think it should be many lines. See matlab picture</p> <p>When i plot it in gnuplot i only get 1 contour line in the top left corner.But everything else is correct.</p> <p>My goal is to get it to look like in matlab like this <a href="http://i.stack.imgur.com/p4ueb.png" rel="nofollow">Matlabplot</a></p> <p>I also found this example: see link in comments (dont have enough rep), but i dont understand where i should put in the data values from test.txt</p> <h1>test.txt</h1> <p><a href="https://drive.google.com/file/d/0B9CEsYCSSZUSOTVwSWdJbVVzdUU/view?usp=sharing" rel="nofollow">test.txt</a></p> <h1>gnuplot commands</h1> <pre><code>set view map set yrange [0:30] set xrange [0:30] set dgrid3d 100,100,4 set contour base splot 'test.txt' u 1:2:3 w pm3d </code></pre>
0
Does Redis persist data?
<p>I understand that Redis serves all data from memory, but does it persist as well across server reboot so that when the server reboots it reads into memory all the data from disk. Or is it always a blank store which is only to store data while apps are running with no persistence?</p>
0
How To Generate TCP, IP And UDP Packets In Python
<p>Can anyone tell me the most basic approach to generate UDP, TCP, and IP Packets with Python?</p>
0
UITableViewController select header for section
<p>I have a <code>UITableView</code> with multiple sections. Each section has a section header (a custom view) is there an easy way to detect when someone selects the section header? (Just like <code>didSelectRowAtIndexPath</code>, but for the header?)</p>
0
How should we test exceptions with nose?
<p>I'm testing exceptions with nose. Here's an example:</p> <pre><code>def testDeleteUserUserNotFound(self): "Test exception is raised when trying to delete non-existent users" try: self.client.deleteUser('10000001-0000-0000-1000-100000000000') # make nose fail here except UserNotFoundException: assert True </code></pre> <p>The assert is executed if the exception is raised, but if no exception is raised, it won't be executed.</p> <p>Is there anything I can put on the commented line above so that if no exception is raised nose will report a failure?</p>
0
text-overflow: ellipsis not working
<p>This is what I tried (see <a href="http://jsfiddle.net/kaJ3L/" rel="noreferrer">here</a>):</p> <pre><code>body { overflow: hidden; } span { border: solid 2px blue; white-space: nowrap; text-overflow: ellipsis; } </code></pre> <p>Essentially, I want the span to shrink with ellipsis when the window is made small. What did I do wrong?</p>
0
iOS 8 - UIPopoverPresentationController moving popover
<p>I am looking for an effective way to re-position a popover using the new uipopoverpresentationcontroller. I have succesfully presented the popover, and now I want to move it without dismissing and presenting again. I am having trouble using the function:</p> <pre><code>(void)popoverPresentationController:(UIPopoverPresentationController *)popoverPresentationController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view </code></pre> <p>I know it's early in the game, but it anyone has an example of how to do this efficiently I would be grateful if you shared it with me. Thanks in advance. </p>
0
XSLT replace double quotes in variable
<p>Just to clarify, I am using XSLT 1.0. Sorry for not specifying that at first.</p> <p>I have an XSLT stylesheet where I'd like to replace double quotes with something safe that's safe to go into a JSON string. I'm trying to do something like the following:</p> <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:output method="text" omit-xml-declaration="yes" /&gt; &lt;xsl:strip-space elements="*" /&gt; &lt;xsl:template match="/message"&gt; &lt;xsl:variable name="body"&gt;&lt;xsl:value-of select="body"/&gt;&lt;/xsl:variable&gt; { "message" : { "body": "&lt;xsl:value-of select="normalize-space($body)"/&gt;" } } &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>If I have XML passed in that looks like the following, this will always work just fine:</p> <pre><code>&lt;message&gt; &lt;body&gt;This is a normal string that will not give you any issues&lt;/body&gt; &lt;/message&gt; </code></pre> <p>However, I'm dealing with a body that has full blown HTML in it, which isn't an issue because <code>normalize-space()</code> will take care of the HTML, but not double quotes. This breaks me:</p> <pre><code>&lt;message&gt; &lt;body&gt;And so he quoted: "I will break him". The end.&lt;/body&gt; &lt;/message&gt; </code></pre> <p>I really don't care if the double quotes are HTML escaped or prefixed with a backslash. I just need to make sure the end result passes a JSON parser.</p> <p>This output passes JSON Lint and would be an appropriate solution (backslashing the quotes):</p> <pre><code>{ "body" : "And so he quoted: \"I will break him\". The end." } </code></pre>
0
Oracle VirtualBox terminated unexpectedly, with exit code -1073741819 (0xc0000005)
<p>My VirtualBox virtual machine suddenly doesn't work, instead producing an error. I don't know what is causing this error; I searched Google for a solution, but failed. I have already reinstalled it, uninstalled, rebooted and reinstalled, but to no avail.</p> <p>What can I do to solve this problem?</p> <h2>Logs:</h2> <pre><code>不能为虚拟电脑 sparkvm 打开一个新任务 The virtual machine 'sparkvm' has terminated unexpectedly during startup with exit code -1073741819(0xc0000005).More details may available in 'C:\......\VBoxStartup.log' ------------------- Environment: windows 7 ,oracle virtualbox VirtualBox-4.3.28-100309-Win VboxStartup.log: 66e8.7afc: Log file opened: 4.3.28r100309 g_hStartupLog=0000000000000054 g_uNtVerCombined=0x611db110 66e8.7afc: \SystemRoot\System32\ntdll.dll: 66e8.7afc: CreationTime: 2013-11-27T08:30:24.422775400Z 66e8.7afc: LastWriteTime: 2013-08-29T02:16:35.515578900Z 66e8.7afc: ChangeTime: 2013-12-08T07:42:09.731669000Z 66e8.7afc: FileAttributes: 0x20 66e8.7afc: Size: 0x1a6dc0 66e8.7afc: NT Headers: 0xe0 66e8.7afc: Timestamp: 0x521eaf24 66e8.7afc: Machine: 0x8664 - amd64 66e8.7afc: Timestamp: 0x521eaf24 66e8.7afc: Image Version: 6.1 66e8.7afc: SizeOfImage: 0x1a9000 (1740800) 66e8.7afc: Resource Dir: 0x151000 LB 0x560d8 66e8.7afc: ProductName: Microsoft® Windows® Operating System 66e8.7afc: ProductVersion: 6.1.7601.18247 66e8.7afc: FileVersion: 6.1.7601.18247 (win7sp1_gdr.130828-1532) 66e8.7afc: FileDescription: NT Layer DLL 66e8.7afc: \SystemRoot\System32\kernel32.dll: 66e8.7afc: CreationTime: 2013-10-08T11:03:54.187132100Z 66e8.7afc: LastWriteTime: 2013-08-02T02:13:34.533000000Z 66e8.7afc: ChangeTime: 2013-10-08T11:11:38.115147500Z 66e8.7afc: FileAttributes: 0x20 66e8.7afc: Size: 0x11b800 66e8.7afc: NT Headers: 0xe8 66e8.7afc: Timestamp: 0x51fb1676 66e8.7afc: Machine: 0x8664 - amd64 66e8.7afc: Timestamp: 0x51fb1676 66e8.7afc: Image Version: 6.1 66e8.7afc: SizeOfImage: 0x11f000 (1175552) 66e8.7afc: Resource Dir: 0x116000 LB 0x528 66e8.7afc: ProductName: Microsoft® Windows® Operating System 66e8.7afc: ProductVersion: 6.1.7601.18229 66e8.7afc: FileVersion: 6.1.7601.18229 (win7sp1_gdr.130801-1533) 66e8.7afc: FileDescription: Windows NT BASE API Client DLL 66e8.7afc: \SystemRoot\System32\KernelBase.dll: 66e8.7afc: CreationTime: 2013-10-08T11:03:54.405532500Z 66e8.7afc: LastWriteTime: 2013-08-02T02:13:34.580000000Z 66e8.7afc: ChangeTime: 2013-10-08T11:11:38.099547500Z 66e8.7afc: FileAttributes: 0x20 66e8.7afc: Size: 0x67a00 66e8.7afc: NT Headers: 0xe8 66e8.7afc: Timestamp: 0x51fb1677 66e8.7afc: Machine: 0x8664 - amd64 66e8.7afc: Timestamp: 0x51fb1677 66e8.7afc: Image Version: 6.1 66e8.7afc: SizeOfImage: 0x6b000 (438272) 66e8.7afc: Resource Dir: 0x69000 LB 0x530 66e8.7afc: ProductName: Microsoft® Windows® Operating System 66e8.7afc: ProductVersion: 6.1.7601.18229 66e8.7afc: FileVersion: 6.1.7601.18229 (win7sp1_gdr.130801-1533) 66e8.7afc: FileDescription: Windows NT BASE API Client DLL 66e8.7afc: \SystemRoot\System32\apisetschema.dll: 66e8.7afc: CreationTime: 2013-10-08T11:03:53.782108900Z 66e8.7afc: LastWriteTime: 2013-08-02T02:12:20.275000000Z 66e8.7afc: ChangeTime: 2013-10-08T11:11:37.459946300Z 66e8.7afc: FileAttributes: 0x20 66e8.7afc: Size: 0x1a00 66e8.7afc: NT Headers: 0xc0 66e8.7afc: Timestamp: 0x51fb15ca 66e8.7afc: Machine: 0x8664 - amd64 66e8.7afc: Timestamp: 0x51fb15ca 66e8.7afc: Image Version: 6.1 66e8.7afc: SizeOfImage: 0x50000 (327680) 66e8.7afc: Resource Dir: 0x30000 LB 0x3f8 66e8.7afc: ProductName: Microsoft® Windows® Operating System 66e8.7afc: ProductVersion: 6.1.7601.18229 66e8.7afc: FileVersion: 6.1.7601.18229 (win7sp1_gdr.130801-1533) 66e8.7afc: FileDescription: ApiSet Schema DLL 66e8.7afc: supR3HardenedWinFindAdversaries: 0x0 66e8.7afc: Calling main() 66e8.7afc: SUPR3HardenedMain: pszProgName=VirtualBox fFlags=0x2 66e8.7afc: SUPR3HardenedMain: Respawn #1 66e8.7afc: System32: \Device\HarddiskVolume2\Windows\System32 66e8.7afc: WinSxS: \Device\HarddiskVolume2\Windows\winsxs 66e8.7afc: KnownDllPath: C:\windows\system32 66e8.7afc: '\Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe' has no imports 66e8.7afc: supHardenedWinVerifyImageByHandle: -&gt; 0 (\Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe) 66e8.7afc: supR3HardNtEnableThreadCreation: 66e8.7afc: supR3HardNtDisableThreadCreation: pvLdrInitThunk=00000000774fc340 pvNtTerminateThread=00000000775217e0 66e8.7afc: supR3HardenedWinDoReSpawn(1): New child 5fcc.7914 [kernel32]. 66e8.7afc: supR3HardNtChildGatherData: PebBaseAddress=000007fffffda000 cbPeb=0x380 66e8.7afc: supR3HardNtPuChFindNtdll: uNtDllParentAddr=00000000774d0000 uNtDllChildAddr=00000000774d0000 66e8.7afc: supR3HardenedWinSetupChildInit: uLdrInitThunk=00000000774fc340 66e8.7afc: supR3HardenedWinSetupChildInit: Start child. 66e8.7afc: supR3HardNtChildWaitFor: Found expected request 0 (PurifyChildAndCloseHandles) after 10 ms. 66e8.7afc: supR3HardNtChildPurify: Startup delay kludge #1/0: 263 ms, 32 sleeps 66e8.7afc: supHardNtVpScanVirtualMemory: enmKind=CHILD_PURIFICATION 66e8.7afc: *0000000000000000-fffffffffffeffff 0x0001/0x0000 0x0000000 66e8.7afc: *0000000000010000-fffffffffffeffff 0x0004/0x0004 0x0020000 66e8.7afc: *0000000000030000-000000000002bfff 0x0002/0x0002 0x0040000 66e8.7afc: 0000000000034000-0000000000027fff 0x0001/0x0000 0x0000000 66e8.7afc: *0000000000040000-000000000003efff 0x0004/0x0004 0x0020000 66e8.7afc: 0000000000041000-0000000000031fff 0x0001/0x0000 0x0000000 66e8.7afc: *0000000000050000-000000000004efff 0x0040/0x0040 0x0020000 !! 66e8.7afc: supHardNtVpFreeOrReplacePrivateExecMemory: Freeing exec mem at 0000000000050000 (LB 0x1000, 0000000000050000 LB 0x1000) 66e8.7afc: supHardNtVpFreeOrReplacePrivateExecMemory: Free attempt #1 succeeded: 0x0 [0000000000050000/0000000000050000 LB 0/0x1000] 66e8.7afc: supHardNtVpFreeOrReplacePrivateExecMemory: QVM after free 0: [0000000000000000]/0000000000050000 LB 0x80000 s=0x10000 ap=0x0 rp=0x00000000000001 66e8.7afc: 0000000000051000-fffffffffffd1fff 0x0001/0x0000 0x0000000 66e8.7afc: *00000000000d0000-fffffffffffd3fff 0x0000/0x0004 0x0020000 66e8.7afc: 00000000001cc000-00000000001c8fff 0x0104/0x0004 0x0020000 66e8.7afc: 00000000001cf000-00000000001cdfff 0x0004/0x0004 0x0020000 66e8.7afc: 00000000001d0000-ffffffff88ecffff 0x0001/0x0000 0x0000000 66e8.7afc: *00000000774d0000-00000000774d0fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 00000000774d1000-00000000775d2fff 0x0020/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 00000000775d3000-0000000077601fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 0000000077602000-0000000077609fff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760a000-000000007760afff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760b000-000000007760dfff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760e000-0000000077678fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 0000000077679000-000000006fd11fff 0x0001/0x0000 0x0000000 66e8.7afc: *000000007efe0000-000000007dfdffff 0x0000/0x0002 0x0020000 66e8.7afc: *000000007ffe0000-000000007ffdefff 0x0002/0x0002 0x0020000 66e8.7afc: 000000007ffe1000-000000007ffd1fff 0x0000/0x0002 0x0020000 66e8.7afc: 000000007fff0000-ffffffffc0d9ffff 0x0001/0x0000 0x0000000 66e8.7afc: *000000013f240000-000000013f240fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f241000-000000013f2c5fff 0x0020/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f2c6000-000000013f2c6fff 0x0080/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f2c7000-000000013f304fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f305000-000000013f305fff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f306000-000000013f306fff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f307000-000000013f308fff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f309000-000000013f309fff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f30a000-000000013f30afff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f30b000-000000013f30efff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f30f000-000000013f347fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f348000-fffff8037ee9ffff 0x0001/0x0000 0x0000000 66e8.7afc: *000007feff7f0000-000007feff7f0fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\apisetschema.dll 66e8.7afc: 000007feff7f1000-000007fdff041fff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffa0000-000007fffff6cfff 0x0002/0x0002 0x0040000 66e8.7afc: 000007fffffd3000-000007fffffcbfff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffda000-000007fffffd8fff 0x0004/0x0004 0x0020000 66e8.7afc: 000007fffffdb000-000007fffffd7fff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffde000-000007fffffdbfff 0x0004/0x0004 0x0020000 66e8.7afc: *000007fffffe0000-000007fffffcffff 0x0001/0x0002 0x0020000 66e8.7afc: apisetschema.dll: timestamp 0x51fb15ca (rc=VINF_SUCCESS) 66e8.7afc: VirtualBox.exe: timestamp 0x555369a5 (rc=VINF_SUCCESS) 66e8.7afc: '\Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe' has no imports 66e8.7afc: '\Device\HarddiskVolume2\Windows\System32\apisetschema.dll' has no imports 66e8.7afc: '\Device\HarddiskVolume2\Windows\System32\ntdll.dll' has no imports 66e8.7afc: supR3HardNtChildPurify: cFixes=1 g_fSupAdversaries=0x80000000 cPatchCount=0 66e8.7afc: supR3HardNtChildPurify: Startup delay kludge #1/1: 514 ms, 63 sleeps 66e8.7afc: supHardNtVpScanVirtualMemory: enmKind=CHILD_PURIFICATION 66e8.7afc: *0000000000000000-fffffffffffeffff 0x0001/0x0000 0x0000000 66e8.7afc: *0000000000010000-fffffffffffeffff 0x0004/0x0004 0x0020000 66e8.7afc: *0000000000030000-000000000002bfff 0x0002/0x0002 0x0040000 66e8.7afc: 0000000000034000-0000000000027fff 0x0001/0x0000 0x0000000 66e8.7afc: *0000000000040000-000000000003efff 0x0004/0x0004 0x0020000 66e8.7afc: 0000000000041000-fffffffffffb1fff 0x0001/0x0000 0x0000000 66e8.7afc: *00000000000d0000-fffffffffffd3fff 0x0000/0x0004 0x0020000 66e8.7afc: 00000000001cc000-00000000001c8fff 0x0104/0x0004 0x0020000 66e8.7afc: 00000000001cf000-00000000001cdfff 0x0004/0x0004 0x0020000 66e8.7afc: 00000000001d0000-ffffffff88ecffff 0x0001/0x0000 0x0000000 66e8.7afc: *00000000774d0000-00000000774d0fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 00000000774d1000-00000000775d2fff 0x0020/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 00000000775d3000-0000000077601fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 0000000077602000-0000000077609fff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760a000-000000007760afff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760b000-000000007760bfff 0x0008/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760c000-000000007760dfff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 000000007760e000-0000000077678fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\ntdll.dll 66e8.7afc: 0000000077679000-000000006fd11fff 0x0001/0x0000 0x0000000 66e8.7afc: *000000007efe0000-000000007dfdffff 0x0000/0x0002 0x0020000 66e8.7afc: *000000007ffe0000-000000007ffdefff 0x0002/0x0002 0x0020000 66e8.7afc: 000000007ffe1000-000000007ffd1fff 0x0000/0x0002 0x0020000 66e8.7afc: 000000007fff0000-ffffffffc0d9ffff 0x0001/0x0000 0x0000000 66e8.7afc: *000000013f240000-000000013f240fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f241000-000000013f2c5fff 0x0020/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f2c6000-000000013f2c6fff 0x0040/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f2c7000-000000013f304fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f305000-000000013f30efff 0x0004/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f30f000-000000013f347fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume6\Program Files\Oracle\VirtualBox\VirtualBox.exe 66e8.7afc: 000000013f348000-fffff8037ee9ffff 0x0001/0x0000 0x0000000 66e8.7afc: *000007feff7f0000-000007feff7f0fff 0x0002/0x0080 0x1000000 \Device\HarddiskVolume2\Windows\System32\apisetschema.dll 66e8.7afc: 000007feff7f1000-000007fdff041fff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffa0000-000007fffff6cfff 0x0002/0x0002 0x0040000 66e8.7afc: 000007fffffd3000-000007fffffcbfff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffda000-000007fffffd8fff 0x0004/0x0004 0x0020000 66e8.7afc: 000007fffffdb000-000007fffffd7fff 0x0001/0x0000 0x0000000 66e8.7afc: *000007fffffde000-000007fffffdbfff 0x0004/0x0004 0x0020000 66e8.7afc: *000007fffffe0000-000007fffffcffff 0x0001/0x0002 0x0020000 66e8.7afc: supR3HardNtChildPurify: Done after 1116 ms and 1 fixes (loop #1). 5fcc.7914: Log file opened: 4.3.28r100309 g_hStartupLog=0000000000000004 g_uNtVerCombined=0x611db110 5fcc.7914: supR3HardenedVmProcessInit: uNtDllAddr=00000000774d0000 5fcc.7914: ntdll.dll: timestamp 0x521eaf24 (rc=VINF_SUCCESS) 5fcc.7914: New simple heap: #1 00000000002d0000 LB 0x400000 (for 1740800 allocation) 5fcc.7914: System32: \Device\HarddiskVolume2\Windows\System32 5fcc.7914: WinSxS: \Device\HarddiskVolume2\Windows\winsxs 5fcc.7914: KnownDllPath: C:\windows\system32 5fcc.7914: supR3HardenedVmProcessInit: Opening vboxdrv stub... 66e8.7afc: supR3HardNtEnableThreadCreation: 5fcc.7914: supR3HardenedVmProcessInit: Restoring LdrInitializeThunk... 5fcc.7914: supR3HardenedVmProcessInit: Returning to LdrInitializeThunk... 5fcc.7914: Registered Dll notification callback with NTDLL. 5fcc.7914: supHardenedWinVerifyImageByHandle: -&gt; 22900 ( \Device\HarddiskVolume2\Windows\System32\kernel32.dll) 5fcc.7914: supR3HardenedWinVerifyCacheInsert: \Device\HarddiskVolume2\Windows\System32\kernel32.dll 5fcc.7914: supR3HardenedMonitor_LdrLoadDll: pName=C:\windows\system32\kernel32.dll (Input=kernel32.dll, rcNtResolve=0xc0150008) *pfFlags=0xffffffff pwszSearchPath=0000000000000000:&lt;flags&gt; [calling] 5fcc.7914: supR3HardenedScreenImage/NtCreateSection: cache hit (Unknown Status 22900 (0x5974)) on \Device\HarddiskVolume2\Windows\System32\kernel32.dll [lacks WinVerifyTrust] 5fcc.7914: supR3HardenedDllNotificationCallback: load 0000000076ef0000 LB 0x0011f000 C:\windows\system32\kernel32.dll [fFlags=0x0] 5fcc.7914: supR3HardenedScreenImage/LdrLoadDll: cache hit (Unknown Status 22900 (0x5974)) on \Device\HarddiskVolume2\Windows\System32\kernel32.dll [lacks WinVerifyTrust] 5fcc.7914: supR3HardenedDllNotificationCallback: load 000007fefdbb0000 LB 0x0006b000 C:\windows\system32\KERNELBASE.dll [fFlags=0x0] 5fcc.7914: supHardenedWinVerifyImageByHandle: -&gt; 22900 (\Device\HarddiskVolume2\Windows\System32\KernelBase.dll) 5fcc.7914: supR3HardenedWinVerifyCacheInsert: \Device\HarddiskVolume2\Windows\System32\KernelBase.dll 5fcc.7914: supR3HardenedMonitor_LdrLoadDll: returns rcNt=0x0 hMod=0000000076ef0000 'C:\windows\system32\kernel32.dll' 66e8.7afc: supR3HardNtChildWaitFor[1]: Quitting: ExitCode=0xc0000005 (rcNtWait=0x0, rcNt1=0x0, rcNt2=0x103, rcNt3=0x103, 10 ms, CloseEvents); </code></pre>
0
Getting the value or index of Combobox item?
<p>I am trying to make my GUI display information depending on the item chosen in the combobox. <code>PySimpleGUI</code> cookbook says that I should be using <code>GetSelectedItemsIndexes()</code> method, but when I try using it:</p> <pre><code>window.Element('_COMBOBOX_').GetSelectedItemsIndexes() </code></pre> <p>I get this:</p> <blockquote> <p>AttributeError: 'Combo' object has no attribute 'GetSelectedItemsIndexes'</p> </blockquote> <p>I tried type this into the console:</p> <pre><code>dir(window.Element('_COMBOBOX_')) </code></pre> <p>and it seems that <code>GetSelectedItemsIndexes</code> is not even there... So how can I get the index of a chosen value from combobox?</p>
0
How to parse http response body to json format in golang?
<p>I get an response body. the format of the body is as below:</p> <pre><code> [ { &quot;id&quot;:1, &quot;name&quot;:&quot;111&quot; }, { &quot;id&quot;:2, &quot;name&quot;:&quot;222&quot; } ] </code></pre> <p>I want to parse the body to json struct, my code is as below:</p> <pre><code>type Info struct { Id uint32 `json:id` Name string `json:name` } type Response struct { infos []Info } v := &amp;Response{} data, err := ioutil.ReadAll(response.Body) if err := json.Unmarshal(data, v); err != nil { log.Fatalf(&quot;Parse response failed, reason: %v \n&quot;, err) } </code></pre> <p>It always give an error:cannot unmarshal array into Go value of type xxx, can someone give a help?</p>
0
Trigger syntax and IF ELSE THEN
<p>I'd like to create a trigger which count the number of rows with a specific id (id_ort). If it found more than 5 rows, I need to increment a variable.</p> <h2>Trigger Syntax</h2> <pre><code>BEGIN DECLARE nb INT; DECLARE nba INT; SET nba =0; SET NEW.`VPLS_ID_NodeB` = CONCAT("21100", LPAD(NEW.`VPLS_ID_NodeB`,4,0)); SET nb = (SELECT COUNT(DISTINCT(`VPLS_ID_aggregation`)) FROM `VPLS_nodeB` WHERE `id_ORT` = NEW.`id_ORT`); IF(nb &gt; 5) THEN SET nba = nb + 1; ELSE SET nba = nb; END IF; SET NEW.`VPLS_ID_aggregation` = CONCAT("21188", LPAD(NEW.`id_ORT`,2,0), LPAD(nba,2,0)); END </code></pre> <p>However, there is a bug... Even if i've less than 5 rows, the var is incremented each time.</p> <p>Any ideas? Maybe it's a syntax problem...</p> <p>Thanks a lot!</p>
0
How to check/uncheck radio button on click?
<p>I want to be able to uncheck a radio button by clicking on it.</p> <p>So, if a radio button is unchecked, I want to check it, if it is checked, I want to uncheck it.</p> <p>This does not work:</p> <pre><code>$('input[type=radio]:checked').click(function(){ $(this).attr('checked', false); }); </code></pre> <p>I am not able to check a radio button now.</p>
0
Get single row in JPA
<p>How to get single row from entity in JPA?</p> <p>Table: Employee</p> <pre><code> @Id private int empId; private String empName; ... </code></pre> <p>JPA by default return List. I`m trying to fetch single row.</p> <p>EmployeeRepository :-</p> <pre><code> public Employee findByEmpName(String empName); </code></pre> <p><strong>Another way is to do it, @Query should be use.</strong> </p> <pre><code> @Query(value="select e from Employee e where empName = ?1 limit 1", nativeQuery=true) public Employee findByEmpName(String empName); </code></pre> <p>How can i ensure that it return single row and correct result. Any help appreciated.. Thanks in advance.</p>
0
Ansible condition when string not matching
<p>I am trying to write an Ansible playbook that only compiles Nginx if it's not already present and at the current version. However it compiles every time which is undesirable.</p> <p>This is what I have: </p> <pre><code>- shell: /usr/local/nginx/sbin/nginx -v 2&gt;&amp;1 register: nginxVersion - debug: var=nginxVersion - name: install nginx shell: /var/local/ansible/nginx/makenginx.sh when: "not nginxVersion == 'nginx version: nginx/1.8.0'" become: yes </code></pre> <p>The script all works apart from the fact that it runs the shell script every time to compile Nginx. The debug output for nginxVersion is:</p> <pre><code>ok: [server] =&gt; { "var": { "nginxVersion": { "changed": true, "cmd": "/usr/local/nginx/sbin/nginx -v 2&gt;&amp;1", "delta": "0:00:00.003752", "end": "2015-09-25 16:45:26.500409", "invocation": { "module_args": "/usr/local/nginx/sbin/nginx -v 2&gt;&amp;1", "module_name": "shell" }, "rc": 0, "start": "2015-09-25 16:45:26.496657", "stderr": "", "stdout": "nginx version: nginx/1.8.0", "stdout_lines": [ "nginx version: nginx/1.8.0" ], "warnings": [] } } } </code></pre> <p>According to the documentation I am on the right lines, what simple trick am I missing?</p>
0
Codeigniter load view in new tab
<p>How to implement a search engine where search results should load in a new tab using code-igniter.I have a search form in my view and i need to load the results in a new tab. Currently am loading view using $this->load->view();</p>
0
Check if arraylist is sorted
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/3047051/how-to-determine-if-a-list-is-sorted-in-java">How to determine if a List is sorted in Java?</a> </p> </blockquote> <p>In java I have array list with names, how do I check if it sorted? I don't want it to be sorted. I just want it to return true if it is and false if it isn't.</p> <p>So far I have this:</p> <pre><code>public boolean isSorted() { boolean check = false; if (Collection.sort(bank, Bank.getOwner()).equals(bank)) { check = true; } else { check = false; } return check; } </code></pre> <p>Where getOwner returns the owner name. Obviously I'm doing it wrong.</p>
0
Using javascript to set value of hidden field then access value from serverside c# code
<p>I am using a nested html unordered list styled as a drop down. When the a tag within the inner lists list item is clicked it trigger some javascript which is supposed to set the value of a hidden field to the text for the link that was clicked.</p> <p>The javascript seems to work - I used an alert to read the value from the hidden field but then when I try to put that value in the querystring in my asp.net c# code behind - it pulls the initial value - not the javascript set value.</p> <p>I guess this is because the javascript is client side not server side but has anyone any idea how i can get this working</p> <p><strong>HTML</strong></p> <pre><code> &lt;div class="dropDown accomodation"&gt; &lt;label for="accomodationList"&gt;Type of accomodation&lt;/label&gt; &lt;ul class="quicklinks" id="accomodationList"&gt; &lt;li&gt;&lt;a href="#" title="Quicklinks" id="accomodationSelectList"&gt;All types &lt;!--[if IE 7]&gt;&lt;!--&gt;&lt;/a&gt;&lt;!--&lt;![endif]--&gt; &lt;!--[if lte IE 6]&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;![endif]--&gt; &lt;ul id="sub" onclick="dropDownSelected(event,'accomodation');"&gt; &lt;li&gt;&lt;a href="#" id="val=-1$#$All types" &gt;All types&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="val=1$#$Villa" &gt;Villa&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="val=2$#$Studio" &gt;Studio&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" id="val=3$#$Apartment" &gt;Apartment&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a class="last" href="#" id="val=4$#$Rustic Properties" &gt;Rustic Properties&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;!--[if lte IE 6]&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/a&gt;&lt;![endif]--&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/div&gt; &lt;input type="hidden" ID="accomodationAnswer" runat="server" /&gt; </code></pre> <p><strong>javascript</strong></p> <pre><code> if(isChildOf(document.getElementById(parentList),document.getElementById(targ.id)) == true) { document.getElementById(parentLi).innerHTML = tname; document.getElementById(hiddenFormFieldName).Value = targ.id; alert('selected id is ' + targ.id + ' value in hidden field is ' + document.getElementById(hiddenFormFieldName).Value); } </code></pre> <p><strong>C# code</strong></p> <pre><code>String qstr = "accom=" + getValFromLiId(accomodationAnswer.Value) + "&amp;sleeps=" + getValFromLiId(sleepsAnswer.Value) + "&amp;nights=" + getValFromLiId(nightsAnswer.Value) + "&amp;region=" + getValFromLiId(regionAnswer.Value) + "&amp;price=" + Utilities.removeCurrencyFormatting(priceAnswer.Value); </code></pre>
0
How to delete table *or* view from PostgreSQL database?
<p>I have a name of table or view in PostgreSQL database and need to delete in in single pgSQL command. How can i afford it?</p> <p>I was able to select form system table to find out if there any table with such a name but stuck with procedural part:</p> <pre><code>SELECT count(*) FROM pg_tables where tablename='user_statistics'; </code></pre>
0
Jquery how to append and remove on a div click event
<p>I am new to using jquery and would like to know how to append and also remove the IDs from divs using the click event and appending to html. In the code below I have been able to append the IDs from clicking on a div, but am not sure how to remove. Whichever divs are highlighted yellow should be the ones that are appended. Clicking again on the div to remove the highlight should also remove the ID from the html. Thanks in advance for any help.</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt; &lt;script type="text/javascript" src="jquery-1.3.2.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $('div.click').click(function() { var bg = $(this).css('backgroundColor'); $(this).css({backgroundColor: bg == 'yellow' || bg == 'rgb(255, 204, 204)' ? 'transparent' : 'yellow'}); }); }); $(function( ){ $('#div1').bind('click', click); $('#div2').bind('click', click); $('#div3').bind('click', click); }); function click(event){ $('#p1').append(event.target.id + ","); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="click" id="div1"&gt;click me&lt;/div&gt; &lt;div class="click" id="div2"&gt;click me&lt;/div&gt; &lt;div class="click" id="div3"&gt;click me&lt;/div&gt; &lt;p id="p1"&gt;&lt;/p&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
0
WCF readerQuotas settings - drawbacks?
<p>If a WCF service returns a byte array in its response message, there's a chance the data will exceed the default length of 16384 bytes. When this happens, the exception will be something like</p> <blockquote> <p>The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader.</p> </blockquote> <p>All the advice I've seen on the web is just to increase the settings in the <code>&lt;readerQuotas&gt;</code> element to their maximum, so something like</p> <pre><code>&lt;readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /&gt; </code></pre> <p>on the server, and similar on the client.</p> <p>I would like to know of any drawbacks with this approach, particularly if the size of the byte array may only occassionally get very large. Do the settings above just make WCF declare a huge array for each request? Do you have to limit the maximum size of the data returned, or can you just specify a reasonably-sized buffer and get WCF to keep going until all the data is read?</p> <p>Thanks!</p>
0
What is a Trusted Connection?
<p>What is a trusted connection in terms of SQL Server 2005 (Trusted vs Windows Auth)?</p>
0
How does getWriter() function in an HttpServletResponse?
<p>In the method <code>service()</code>, we use</p> <pre><code>PrintWriter out = res.getWriter(); </code></pre> <p>Please tell me how it returns the <code>PrintWriter</code> class object, and then makes a connection to the Browser and sends the data to the Browser.</p>
0
Output single character in C
<p>When printing a single character in a C program, must I use "%1s" in the format string? Can I use something like "%c"?</p>
0
How to Disable future dates in Android date picker
<p>How to Disable future dates in Android date picker</p> <p>Java Code :</p> <pre><code>mExpireDate.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { // To show current date in the datepicker final Calendar mcurrentDate = Calendar.getInstance(); int mYear = mcurrentDate.get(Calendar.YEAR); int mMonth = mcurrentDate.get(Calendar.MONTH); int mDay = mcurrentDate.get(Calendar.DAY_OF_MONTH); DatePickerDialog mDatePicker = new DatePickerDialog( EventRegisterActivity.this, new OnDateSetListener() { public void onDateSet(DatePicker datepicker, int selectedyear, int selectedmonth, int selectedday) { mcurrentDate.set(Calendar.YEAR, selectedyear); mcurrentDate.set(Calendar.MONTH, selectedmonth); mcurrentDate.set(Calendar.DAY_OF_MONTH, selectedday); SimpleDateFormat sdf = new SimpleDateFormat( getResources().getString( R.string.date_card_formate), Locale.US); mExpireDate.setText(sdf.format(mcurrentDate .getTime())); } }, mYear, mMonth, mDay); mDatePicker.setTitle(getResources().getString( R.string.alert_date_select)); mDatePicker.show(); } }); </code></pre> <p>How to do it?</p>
0
Can't read an XML file with simplexml_load_string
<p>I have been trying to read the xml file, but it is giving me a strange error. My XML is as follows</p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;response&gt; &lt;url&gt;http://xyz.com&lt;/url&gt; &lt;token&gt;xxxxxxx&lt;token&gt; &lt;/response&gt; </code></pre> <p>To read this I am using </p> <pre><code>simplexml_load_string(variable containing xml goes here) </code></pre> <p>but it is giving me this error</p> <blockquote> <p>Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '&lt;' not found in on line 47</p> <p>Warning: simplexml_load_string() [function.simplexml-load-string]: 1 in on line 47</p> <p>Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in on line 47</p> </blockquote>
0
The multi-part identifier could not be bound
<p>I've seen similar errors on SO, but I don't find a solution for my problem. I have a SQL query like:</p> <pre><code>SELECT DISTINCT a.maxa , b.mahuyen , a.tenxa , b.tenhuyen , ISNULL(dkcd.tong, 0) AS tongdkcd FROM phuongxa a , quanhuyen b LEFT OUTER JOIN ( SELECT maxa , COUNT(*) AS tong FROM khaosat WHERE CONVERT(DATETIME, ngaylap, 103) BETWEEN 'Sep 1 2011' AND 'Sep 5 2011' GROUP BY maxa ) AS dkcd ON dkcd.maxa = a.maxa WHERE a.maxa &lt;&gt; '99' AND LEFT(a.maxa, 2) = b.mahuyen ORDER BY maxa; </code></pre> <p>When I execute this query, the error result is: <strong>The multi-part identifier "a.maxa" could not be bound.</strong> Why? <br> P/s: if i divide the query into 2 individual query, it run ok.</p> <pre><code>SELECT DISTINCT a.maxa , b.mahuyen , a.tenxa , b.tenhuyen FROM phuongxa a , quanhuyen b WHERE a.maxa &lt;&gt; '99' AND LEFT(a.maxa, 2) = b.mahuyen ORDER BY maxa; </code></pre> <p>and</p> <pre><code>SELECT maxa , COUNT(*) AS tong FROM khaosat WHERE CONVERT(DATETIME, ngaylap, 103) BETWEEN 'Sep 1 2011' AND 'Sep 5 2011' GROUP BY maxa; </code></pre>
0
Open downloaded file on Android N using FileProvider
<p>I've got to fix our App for Android N due to the FileProvider changes. I've basically read all about this topic for the last ours, but no solution found did work out for me.</p> <p>Here's our prior code which starts downloads from our app, stores them in the <code>Download</code> folder and calls an <code>ACTION_VIEW</code> intent as soons as the <code>DownloadManager</code> tells he's finished downloading:</p> <pre><code>BroadcastReceiver onComplete = new BroadcastReceiver() { public void onReceive(Context ctxt, Intent intent) { Log.d(TAG, "Download commplete"); // Check for our download long referenceId = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1); if (mDownloadReference == referenceId) { DownloadManager.Query query = new DownloadManager.Query(); query.setFilterById(mDownloadReference); Cursor c = mDownloadManager.query(query); if (c.moveToFirst()) { int columnIndex = c.getColumnIndex(DownloadManager.COLUMN_STATUS); if (DownloadManager.STATUS_SUCCESSFUL == c.getInt(columnIndex)) { String localUri = c.getString(c.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)); String fileExtension = MimeTypeMap.getFileExtensionFromUrl(localUri); String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(fileExtension); if (mimeType != null) { Intent openFileIntent = new Intent(Intent.ACTION_VIEW); openFileIntent.setDataAndTypeAndNormalize(Uri.parse(localUri), mimeType); openFileIntent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY); try { mAcme.startActivity(openFileIntent); } catch (ActivityNotFoundException e) { // Ignore if no activity was found. } } } } } } }; </code></pre> <p>This works on Android M, but breaks on N due to the popular <code>FileUriExposedException</code>. I've now tried to fix this by using the <code>FileProvider</code>, but I cannot get it to work. It's breaking when I try to get the content URI:</p> <p><code>Failed to find configured root that contains /file:/storage/emulated/0/Download/test.pdf</code></p> <p>The <code>localUri</code> returned from the <code>DownloadManager</code> for the file is:</p> <p><code>file:///storage/emulated/0/Download/test.pdf</code></p> <p>The <code>Environment.getExternalStorageDirectory()</code> returns <code>/storage/emulated/0</code> and this is the code for the conversion:</p> <pre><code>File file = new File(localUri); Log.d(TAG, localUri + " - " + Environment.getExternalStorageDirectory()); Uri contentUri = FileProvider.getUriForFile(ctxt, "my.file.provider", file); </code></pre> <p>From <code>AndroidManifest.xml</code></p> <pre><code> &lt;provider android:name="android.support.v4.content.FileProvider" android:authorities="my.file.provider" android:exported="false" android:grantUriPermissions="true"&gt; &lt;meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/&gt; &lt;/provider&gt; </code></pre> <p>The <code>file_paths.xml</code>:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;paths xmlns:android="http://schemas.android.com/apk/res/android"&gt; &lt;external-path name="external_path" path="." /&gt; &lt;/paths&gt; </code></pre> <p>And I've tried all values I could find in that xml file. :(</p>
0
Facebook API - How to get user's address, phone #?
<p>Is anyone able to get facebook user's address, phone # using FQL or Graph api?</p> <p>Have tried the following FQL and was able to get 'Current City' and 'Hometown' which are under 'Basic information' but not the 'Address' or 'Phone' which are under 'Contact Information'.</p> <p><code>SELECT name,first_name,last_name,birthday_date,current_location,hometown_location,pic,profile_url,timezone,username,profile_update_time FROM user WHERE uid IN (xxxx)</code></p>
0
Log4j formatting: Is it possible to truncate stacktraces?
<p>I want to log only the first few lines of Exceptions in my program. I know, I can do something like this to print only the first 5 lines of a stacktrace:</p> <pre><code>Throwable e = ...; StackTraceElement[] stack = e.getStackTrace(); int maxLines = (stack.length &gt; 4) ? 5 : stack.length; for (int n = 0; n &lt; maxLines; n++) { System.err.println(stack[n].toString()); } </code></pre> <p>But I would rather use log4j (or slf4j over log4j to be more precise) for logging. Is there a way to tell log4j that it should only print the first 5 lines of a stacktrace?</p>
0
How do I remove all tinymce instances at startup?
<p>I'm dynamically creating and destroying textareas for this purpose. However, when I create a textarea and then an instance of it in tinymce--then come back to the page again, it doesn't work. I've found that the solution is to simply remove any existing instance of that same name, but I was wondering if it's possible to just do it at startup.</p> <p>Thanks in advance!</p>
0
Flexbox center and bottom right item
<p>I'm trying to achieve the following result using flexbox: <a href="https://i.stack.imgur.com/r4AVy.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/r4AVy.jpg" alt="Flexbox demo"></a></p> <p>I tried the with the following html but I can't get it to work.</p> <pre><code>&lt;div class=" flex-center"&gt; &lt;div class="flex-item-center"&gt; &lt;p&gt; Some text in box A &lt;/p&gt; &lt;/div&gt; &lt;div class="flex-item-bottom"&gt; &lt;p&gt;Some text in box B....&lt;/p&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p><strong>CSS:</strong> </p> <pre><code>.flex-center { display: flex; align-items: center; align-content: center; justify-content: center; } .flex-item-center { align-self: center; } .flex-item-bottom { align-self: flex-end; } </code></pre> <p>How can I make it look like the image?</p>
0
how to handle multiple namespaces with different URI in XSD
<p>I have an XML (first.xml) which looks like ::</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;saw:jobInfo xmlns:saw="com.analytics.web/report/v1.1"&gt; &lt;saw:jobStats&gt;...........&lt;/saw:jobStats&gt; &lt;saw:detailedInfo&gt; .....&lt;/saw:detailedInfo&gt; &lt;saw:fileInfo&gt;..........&lt;/saw:fileInfo&gt; &lt;/saw:jobInfo&gt; </code></pre> <p>The below XML (second.xml) is same as the above but with a different namespace.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;soap:jobInfo xmlns:soap="urn://bi.webservices/v6"&gt; &lt;soap:jobStats&gt;...........&lt;/saw:jobStats&gt; &lt;soap:detailedInfo&gt; .....&lt;/saw:detailedInfo&gt; &lt;soap:fileInfo&gt;..........&lt;/saw:fileInfo&gt; &lt;/soap:jobInfo&gt; </code></pre> <p>As I have the same element and attribute names in both the xml's I am using the same xsd file to validate both.</p> <p>XSD file ::</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;xs:schema targetNamespace="com.analytics.web/report/v1.1" xmlns="com.analytics.web/report/v1.1" xmlns:saw="com.analytics.web/report/v1.1" xmlns:soap="urn://bi.webservices/v6" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt; </code></pre> <p>After including xmlns:soap="urn://bi.webservices/v6" the schema validation failed for second.xml saying unkown element "soap:jobinfo". I poked around and found the targetNamespace value should be same as the namespace URI. Please let me know how to use the same XSD for two different namespaces having different URIs.</p>
0
How to access the folder path in web config using c#
<p>How can i access the folder path from web.config using c# code. here is a sample code.</p> <p>how to place this path in web config <code>C:\\whatever\\Data\\sample.xml</code></p> <p>i have to read this path from web config.</p> <pre><code>string folderpath = ConfigurationSettings.AppSettings["path"].ToString(); using (XmlWriter xw = XmlWriter.Create(folderpath, new XmlWriterSettings { Indent = false })) </code></pre> <p>please help.....</p>
0
JMeter: How to count JSON objects in an Array using jsonpath
<p>In JMeter I want to check the number of objects in a JSON array, which I receive from the server. </p> <p>For example, on a certain request I expect an array with 5 objects.</p> <p>[{...},{...},{...},{...},{...}]</p> <p>After reading this: <a href="https://stackoverflow.com/questions/13745332/count-members-with-jsonpath/20498983#20498983">count members with jsonpath?</a>, I tried using the following JSON Path Assertion:</p> <ul> <li>JSON Path: $</li> <li>Expected value: hasSize(5)</li> <li>Validate against expected value = checked</li> </ul> <p>However, this doesn't seem to work properly. When I actually do receive 5 objects in the array, the response assertion says it doesn't match.</p> <p>What am I doing wrong? Or how else can I do this?</p>
0
What's the right way to reference a parameter in Doxygen?
<p>I have the following Doxygen documentation for a function:</p> <pre><code>/** @brief Does interesting things @param[in] pfirst The first parameter: a barrel full of monkeys @pre "pfirst" must have been previously passed through BarrelFiller() */ </code></pre> <p>Note that <code>pfirst</code> is a parameter, and that it is referenced in the preconditions.</p> <p>I've surrounded it with quotation marks here because I want to stand it off from the rest of the text. But it would be nice to do this in such a way that Doxygen will highlight the command and, preferably, link it to the parameter definition. Is there a way to do this?</p> <p>It would be especially nice if this would happen using only the default configuration (or minor alterations thereof).</p>
0
Reading from the stream has failed - MySqlException
<p>I'm trying to open a connection to a MySql database using the following code piece:</p> <pre><code>string connectionString = "Server=ip_number;Database=database_name;Uid=uid;Password=password"; MySqlConnection connection; connection = new MySqlConnection(connectionString); connection.Open(); </code></pre> <p>And here is the exception I get:</p> <p><img src="https://i.stack.imgur.com/k90Fm.png" alt="enter image description here"></p> <p>I'm using the latest mysql connector (<a href="http://dev.mysql.com/downloads/connector/net/" rel="noreferrer">downloaded from here</a>). What am I missing?</p> <p>Thanks in advance,</p>
0
Blazor - show confirmation dialog before delete/update?
<p>In the following Blazor (server-side) code snips. How to prompt the confirmation dialog?</p> <pre><code>&lt;tbody&gt; @foreach (var r in lists) { var s = r.ID; &lt;tr&gt; &lt;td&gt;@s&lt;/td&gt; &lt;td&gt;&lt;button class="btn btn-primary" @onclick="() =&gt; DeleteSymbol(s)"&gt;Delete&lt;/button&gt;&lt;/td&gt; &lt;/tr&gt; } &lt;/tbody&gt; @code { async Task DeleteSymbol(string id) { // Get confirmation response from user before running deletion? // Delete! } } </code></pre>
0
[Docker]: Connecting PHPMyAdmin to MySQL doesnt work
<p>I'm trying to connect a PHPMyAdmin-Container to a MySQL-Container to view the databases.</p> <p>I have started the MySQL container via <code>$ docker run --name databaseContainer -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql</code> </p> <p>and the PHPMyAdmin-Container via <code>$ docker run --name myadmin -d --link databaseContainer:mysql -p 8080:8080 phpmyadmin/phpmyadmin</code></p> <p>When trying to login on PHPMyAdmin, I get: mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name does not resolve</p> <p>and</p> <p>mysqli_real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name does not resolve</p> <p>By the way, I have also started a wordpress container and also linked it to mysql, there it works...</p>
0
Python: simple list merging based on intersections
<p>Consider there are some lists of integers as:</p> <pre><code>#-------------------------------------- 0 [0,1,3] 1 [1,0,3,4,5,10,...] 2 [2,8] 3 [3,1,0,...] ... n [] #-------------------------------------- </code></pre> <p>The question is to merge lists having at least one common element. So the results only for the given part will be as follows:</p> <pre><code>#-------------------------------------- 0 [0,1,3,4,5,10,...] 2 [2,8] #-------------------------------------- </code></pre> <p><strong>What is the most efficient way to do this on large data (elements are just numbers)?</strong> Is <code>tree</code> structure something to think about? I do the job now by converting lists to <code>sets</code> and iterating for intersections, but it is slow! Furthermore I have a feeling that is so-elementary! In addition, the implementation lacks something (unknown) because some lists remain unmerged sometime! Having said that, if you were proposing self-implementation please be generous and provide a simple sample code [apparently <strong>Python</strong> is my favoriate :)] or pesudo-code.<br> <strong>Update 1:</strong> Here is the code I was using:</p> <pre><code>#-------------------------------------- lsts = [[0,1,3], [1,0,3,4,5,10,11], [2,8], [3,1,0,16]]; #-------------------------------------- </code></pre> <p>The function is (<strong>buggy!!</strong>):</p> <pre><code>#-------------------------------------- def merge(lsts): sts = [set(l) for l in lsts] i = 0 while i &lt; len(sts): j = i+1 while j &lt; len(sts): if len(sts[i].intersection(sts[j])) &gt; 0: sts[i] = sts[i].union(sts[j]) sts.pop(j) else: j += 1 #---corrected i += 1 lst = [list(s) for s in sts] return lst #-------------------------------------- </code></pre> <p>The result is:</p> <pre><code>#-------------------------------------- &gt;&gt;&gt; merge(lsts) &gt;&gt;&gt; [0, 1, 3, 4, 5, 10, 11, 16], [8, 2]] #-------------------------------------- </code></pre> <p><strong>Update 2:</strong> To my experience the code given by <strong>Niklas Baumstark</strong> below showed to be a bit faster for the simple cases. Not tested the method given by "Hooked" yet, since it is completely different approach (by the way it seems interesting). The testing procedure for all of these could be really hard or impossible to be ensured of the results. The real data set I will use is so large and complex, so it is impossible to trace any error just by repeating. That is I need to be 100% satisfied of the reliability of the method before pushing it in its place within a large code as a module. Simply for now <strong>Niklas</strong>'s method is faster and the answer for simple sets is correct of course.<br> <strong>However how can I be sure that it works well for real large data set?</strong> Since I will not be able to trace the errors visually!</p> <p><strong>Update 3:</strong> Note that reliability of the method is much more important than speed for this problem. I will be hopefully able to translate the Python code to Fortran for the maximum performance finally.</p> <p><strong>Update 4:</strong><br> There are many interesting points in this post and generously given answers, constructive comments. I would recommend reading all thoroughly. Please accept my appreciation for the development of the question, amazing answers and constructive comments and discussion.</p>
0
Change background color with a loop onclick
<p>here is my js fiddle : <a href="http://jsfiddle.net/pYM38/16/" rel="nofollow">http://jsfiddle.net/pYM38/16/</a></p> <pre><code> var box = document.getElementById('box'); var colors = ['purple', 'yellow', 'orange', 'brown', 'black']; box.onclick = function () { for (i = 0; i &lt; colors.length; i++) { box.style.backgroundColor = colors[i]; } }; </code></pre> <p>I'm in the process of learning JavaScript. I was trying to get this to loop through each color in the array, but when i click the box (demonstration on jsfiddle) it goes to the last element in the array.</p>
0
Return in foreach showing only 1st value
<p>I have problem. In my function, return shows only first player from server. I wanted to show all players from server, but i cant get this working. Here is my code:</p> <pre><code>function players() { require_once "inc/SampQueryAPI.php"; $query = new SampQueryAPI('uh1.ownserv.pl', 25052); // Zmień dane obok! // if($query-&gt;isOnline()) { $aInformation = $query-&gt;getInfo(); $aServerRules = $query-&gt;getRules(); $aPlayers = $query-&gt;getDetailedPlayers(); if(!is_array($aPlayers) || count($aPlayers) == 0) { return 'Brak graczy online'; } else { foreach($aPlayers as $sValue) { $playerid = $sValue['playerid']; $playername = htmlentities($sValue['nickname']); $playerscore = $sValue['score']; $playerping = $sValue['ping']; return '&lt;li&gt;'.$playername.' (ID: '.$playerid.'), Punkty ('.$playerscore.'), Ping ('.$playerping.')&lt;/li&gt;'; } } } } </code></pre>
0
Prevent redirect to /Account/Login in asp.net core 2.2
<p>I am trying to prevent the app to redirect to <code>/Account/Login</code> in asp.net core 2.2 when the user isn't logged in.</p> <p>Even though i write <code>LoginPath = new PathString(&quot;/api/contests&quot;);</code> any unauthorized requests are still redirected to <code>/Account/Login</code></p> <p>This is my Startup.cs:</p> <pre class="lang-cs prettyprint-override"><code>using System; using System.Reflection; using AutoMapper; using Contest.Models; using Contest.Tokens; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Authorization; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using Swashbuckle.AspNetCore.Swagger; namespace Contest { public class Startup { public IConfiguration Configuration { get; } public Startup(IConfiguration configuration) { Configuration = configuration; } // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { services.AddAutoMapper(); // In production, the React files will be served from this directory services.AddSpaStaticFiles(configuration =&gt; { configuration.RootPath = &quot;clientapp/build&quot;; }); // ===== Add our DbContext ======== string connection = Configuration.GetConnectionString(&quot;DBLocalConnection&quot;); string migrationAssemblyName = typeof(Startup).GetTypeInfo().Assembly.GetName().Name; services.AddDbContext&lt;ContestContext&gt;(options =&gt; options.UseSqlServer(connection, sql =&gt; sql.MigrationsAssembly(migrationAssemblyName))); // ===== Add Identity ======== services.AddIdentity&lt;User, IdentityRole&gt;(o =&gt; { o.User.RequireUniqueEmail = true; o.Tokens.EmailConfirmationTokenProvider = &quot;EMAILCONF&quot;; // I want to be able to resend an `Email` confirmation email // o.SignIn.RequireConfirmedEmail = true; }).AddRoles&lt;IdentityRole&gt;() .AddEntityFrameworkStores&lt;ContestContext&gt;() .AddTokenProvider&lt;EmailConfirmationTokenProvider&lt;User&gt;&gt;(&quot;EMAILCONF&quot;) .AddDefaultTokenProviders(); services.Configure&lt;DataProtectionTokenProviderOptions&gt;(o =&gt; o.TokenLifespan = TimeSpan.FromHours(3) ); services.Configure&lt;EmailConfirmationTokenProviderOptions&gt;(o =&gt; o.TokenLifespan = TimeSpan.FromDays(2) ); // ===== Add Authentication ======== services.AddAuthentication(o =&gt; o.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme) .AddCookie(options =&gt; { options.Cookie.Name = &quot;auth_cookie&quot;; options.Cookie.SameSite = SameSiteMode.None; options.LoginPath = new PathString(&quot;/api/contests&quot;); options.AccessDeniedPath = new PathString(&quot;/api/contests&quot;); options.Events = new CookieAuthenticationEvents { OnRedirectToLogin = context =&gt; { context.Response.StatusCode = StatusCodes.Status401Unauthorized; return Task.CompletedTask; }, }; }); // ===== Add Authorization ======== services.AddAuthorization(o =&gt; { }); services.AddCors(); // ===== Add MVC ======== services.AddMvc(config =&gt; { var policy = new AuthorizationPolicyBuilder() .RequireAuthenticatedUser() .Build(); config.Filters.Add(new AuthorizeFilter(policy)); }) .AddJsonOptions(options =&gt; options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore) .SetCompatibilityVersion(CompatibilityVersion.Version_2_2); // ===== Add Swagger ======== services.AddSwaggerGen(c =&gt; { c.SwaggerDoc(&quot;v1&quot;, new Info { Title = &quot;Core API&quot;, Description = &quot;Documentation&quot;, }); var xmlPath = $&quot;{System.AppDomain.CurrentDomain.BaseDirectory}Contest.xml&quot;; c.IncludeXmlComments(xmlPath); }); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler(&quot;/Error&quot;); app.UseHsts(); } app.UseHttpsRedirection(); app.UseSpaStaticFiles(new StaticFileOptions() { }); app.UseCors(policy =&gt; { policy.AllowAnyHeader(); policy.AllowAnyMethod(); policy.AllowAnyOrigin(); policy.AllowCredentials(); }); app.UseAuthentication(); app.UseMvc(); if (env.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(c =&gt; { c.SwaggerEndpoint(&quot;/swagger/v1/swagger.json&quot;, &quot;Core API&quot;); }); } app.UseSpa(spa =&gt; { spa.Options.SourcePath = &quot;clientapp&quot;; if (env.IsDevelopment()) { // spa.UseReactDevelopmentServer(npmScript: &quot;start&quot;); spa.UseProxyToSpaDevelopmentServer(&quot;http://localhost:3000&quot;); } }); } } } </code></pre> <p>I managed to bypass this by creating a controller to handle this route:</p> <pre class="lang-cs prettyprint-override"><code>[Route(&quot;/&quot;)] [ApiController] public class UnauthorizedController : ControllerBase { public UnauthorizedController() { } [HttpGet(&quot;/Account/Login&quot;)] [AllowAnonymous] public IActionResult Login() { HttpContext.Response.StatusCode = StatusCodes.Status401Unauthorized; return new ObjectResult(new { StatusCode = StatusCodes.Status401Unauthorized, Message = &quot;Unauthorized&quot;, }); } } </code></pre> <p>What is wrong with my setup? Thanks</p>
0
ESLint error - ESLint couldn't find the config "react-app"
<p>Me with my team, start a new React Project using the create-react-app bootstrap command. We add the eslint section on the project but we stuck with annoying error that we never found it before now. When we launch the command </p> <pre><code> yarn run lint </code></pre> <p>Here the error: <a href="https://i.stack.imgur.com/m4M0U.png" rel="noreferrer"><img src="https://i.stack.imgur.com/m4M0U.png" alt="enter image description here"></a></p> <p>Here the package.json:</p> <pre><code>{ "name": "name of the app", "version": "0.1.0", "private": true, "dependencies": { "jwt-decode": "^2.2.0", "react": "^16.12.0", "react-dom": "^16.12.0", "react-intl": "^3.12.0", "react-router": "^5.1.2", "react-router-dom": "^5.1.2", "react-scripts": "3.3.0", "redux": "^4.0.5", "redux-saga": "^1.1.3", "reselect": "^4.0.0", "styled-components": "^5.0.1" }, "scripts": { "analyze": "react-app-rewired build", "build": "react-scripts build", "cypress": "./node_modules/.bin/cypress open", "eject": "react-scripts eject", "lint:write": "eslint --debug src/ --fix", "lint": "eslint --debug src/", "prettier": "prettier --write src/*.tsx src/*.ts src/**/*.tsx src/**/*.ts src/**/**/*.tsx src/**/**/*.ts src/**/**/**/*.tsx src/**/**/**/*.ts src/**/**/**/**/*.tsx src/**/**/**/**/*.ts", "start": "react-scripts start", "storybook": "start-storybook -p 6006 -c .storybook", "test": "react-scripts test", "upgrade:check": "npm-check", "upgrade:interactive": "npm-check --update" }, "eslintConfig": { "extends": "react-app" }, "lint-staged": { "*.(ts|tsx)": [ "yarn run prettier" ] }, "browserslist": { "production": [ "&gt;0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] }, "devDependencies": { "@cypress/webpack-preprocessor": "^4.1.2", "@storybook/addon-actions": "^5.3.12", "@storybook/addon-info": "^5.3.12", "@storybook/addon-knobs": "^5.3.12", "@storybook/addon-links": "^5.3.12", "@storybook/addons": "^5.3.12", "@storybook/preset-create-react-app": "^1.5.2", "@storybook/react": "^5.3.12", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/jwt-decode": "^2.2.1", "@types/node": "^12.0.0", "@types/react": "^16.9.0", "@types/react-dom": "^16.9.0", "@types/react-redux": "^7.1.7", "@types/react-router": "^5.1.4", "@types/react-router-dom": "^5.1.3", "@types/storybook__addon-knobs": "^5.2.1", "@types/styled-components": "^4.4.2", "cypress": "^4.0.1", "eslint": "^6.8.0", "husky": "^4.2.1", "lint-staged": "^10.0.7", "npm-check": "^5.9.0", "prettier": "^1.19.1", "react-app-rewire-webpack-bundle-analyzer": "^1.1.0", "react-app-rewired": "^2.1.5", "react-docgen-typescript-webpack-plugin": "^1.1.0", "redux-devtools-extension": "^2.13.8", "storybook-addon-jsx": "^7.1.14", "ts-loader": "^6.2.1", "typescript": "~3.7.2", "webpack": "^4.41.6", "webpack-bundle-analyzer": "^3.6.0" } } </code></pre> <p>We also tried to add create a .eslintrc file and add </p> <pre><code>{ "extends": "react-app" } </code></pre> <p>But nothing change.</p>
0
How to Auto size Excel ClosedXml cells in c#
<p>I am trying to resize cells so that it fits the maximum length of the text using <code>ClosedXMl.Excel</code> but the cell is giving me this error message:</p> <blockquote> <p>Severity Code Description Project File Line Suppression State Error CS0119 'IXLRangeBase.Cells()' is a method, which is not valid in the given context</p> </blockquote> <p>C#:</p> <pre><code>var workbook = new XLWorkbook(); //creates the workbook var wsDetailedData = workbook.AddWorksheet("data"); //creates the worksheet with sheetname 'data' wsDetailedData.Cell(1, 1).InsertTable(dataList); //inserts the data to cell A1 including default column name wsDetailedData.Cells.SizeToContent = true; workbook.SaveAs(@"C:\data.xlsx"); //saves the workbook </code></pre>
0
My .bashrc file not executed on Git Bash startup (Windows 7)
<p>This is what I did:</p> <pre><code>cd ~ touch .bashrc notepad .bashrc </code></pre> <p>and the content of my .bashrc is (found on the web somewhere):</p> <pre><code>SSH_ENV="$HOME/.ssh/environment" # start the ssh-agent function start_agent { echo "Initializing new SSH agent..." # spawn ssh-agent ssh-agent | sed 's/^echo/#echo/' &gt; "$SSH_ENV" echo succeeded chmod 600 "$SSH_ENV" . "$SSH_ENV" &gt; /dev/null ssh-add } # test for identities function test_identities { # test whether standard identities have been added to the agent already ssh-add -l | grep "The agent has no identities" &gt; /dev/null if [ $? -eq 0 ]; then ssh-add # $SSH_AUTH_SOCK broken so we start a new proper agent if [ $? -eq 2 ];then start_agent fi fi } # check for running ssh-agent with proper $SSH_AGENT_PID if [ -n "$SSH_AGENT_PID" ]; then ps -ef | grep "$SSH_AGENT_PID" | grep ssh-agent &gt; /dev/null if [ $? -eq 0 ]; then test_identities fi # if $SSH_AGENT_PID is not properly set, we might be able to load one from # $SSH_ENV else if [ -f "$SSH_ENV" ]; then . "$SSH_ENV" &gt; /dev/null fi ps -ef | grep "$SSH_AGENT_PID" | grep -v grep | grep ssh-agent &gt; /dev/null if [ $? -eq 0 ]; then test_identities else start_agent fi fi </code></pre> <p>Somehow that script is not executed at all. I don't see any of the strings that should be echoed. I am familiar with Unix commandline in Linux and Mac OS X, but I have no idea how it works under Windows. Any suggestions please?</p> <p>EDIT: Okay, my mistake... this script is executed, but I don't fully understand what it does. I was hoping to prevent being asked for passphrase every time I push to remote repo. As it stands now I'm still asked every time.</p>
0
Reset git settings
<p>When I try downloading <a href="https://git01.codeplex.com/casablanca" rel="noreferrer">this</a> git repo I keep getting <code>error: RPC failed; result=56, HTTP code = 200</code> and I think this is because I messed up some settings (i was playing about with <code>--config</code> and <code>--bare</code> today)</p> <p>Is there a way how I can reset my git configuration to the factory settings?</p> <p>If it helps I am on a Mac.</p>
0
How do I retrieve output from Multiprocessing in Python?
<p>So, I'm trying to speed up one routine by using the Multiprocessing module in Python. I want to be able to read several .csv files by splitting the job among several cores, for that I have:</p> <pre><code>def csvreader(string): from numpy import genfromtxt; time,signal=np.genfromtxt(string, delimiter=',',unpack="true") return time,signal </code></pre> <p>Then I call this function by saying:</p> <pre><code>if __name__ == '__main__': for i in range(0,2): p = multiprocessing.Process(target=CSVReader.csvreader, args=(string_array[i],)) p.start() </code></pre> <p>The thing is that this doesn't store any output. I have read all the forums online and seen that there might be a way with multiprocessing.queue but I don't understand it quite well. Is there any simple and straightforward method?</p>
0
How can I display a dialog above the keyboard
<p>I'm a newbie with android, I write an application which using the Dialog to display data when user select on one thing. This is how the dialog looks:</p> <p><a href="https://docs.google.com/file/d/0B3NUAgD0tB0YOS16azFCWXdSVVE/edit" rel="noreferrer">https://docs.google.com/file/d/0B3NUAgD0tB0YOS16azFCWXdSVVE/edit</a></p> <p>But when I tap on the last EditText to enter some data, the dialog still shows, when I type the first character, the dialog scrolls down. The dialog stays behind the keyboard, with some parts totally obscured.</p> <p>Could anyone tell me how to show the whole dialog above the soft keyboard? This is how I'd like it to look:</p> <p><a href="https://docs.google.com/file/d/0B3NUAgD0tB0YOFVQYUF0U0JvOEk/edit" rel="noreferrer">https://docs.google.com/file/d/0B3NUAgD0tB0YOFVQYUF0U0JvOEk/edit</a></p> <p>Thanks</p> <p>Clark</p>
0
Tool for comparing 2 binary files in Windows
<p>I need a tool to compare 2 binaries. The files are quite large. Some freeware or trial tools I found on the Internet are not convenient to use for large files. Can you recommend me some tools?</p>
0