pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
36,200,028
0
<p>Try <strong>disabling all breakpoints when launching the app</strong> from Xcode. You can enable them afterwards.</p>
7,977,897
0
<p>I am the product manager for the OpenPlug tools.</p> <p>Our tools are not the only ones that allow IPA signing on Windows (you mentioned marmalade, but there is also Adobe CS5/AIR/Flash Builder, and certainly others ...)</p> <p>As far as I know, Apple hasn't banned any app built with those tools on the ground that ...
15,871,394
0
<p>this worked for me :)</p> <blockquote> <p>select * from Common </p> <p>where </p> <p>common_id not in (select <strong>ISNULL(common_id,'dummy-data')</strong> from Table1)</p> <p>and common_id not in (select <strong>ISNULL(common_id,'dummy-data')</strong> from Table2)</p> </blockquote>
22,864,141
0
Importing data to an array from db file in android <p>I have made a db file in sqlitestudio. I have saved the db file in assets folder of my application. Now I want to get data from that db file and store it in an array or list and use it in my app. Please help!</p>
9,378,889
0
sending data to servlet in json and other formats <p>I have my client as an android program. I take the user details from the the user and send it to the server for storing it in the database. I have used a URLConnection object to send data to the servlet. I am sending the user details in using 'writeObject'.</p> <pre>...
9,980,884
0
RijndaelManaged can not decrypt <p>The code can be found at: <a href="http://pastebin.com/3Yg5bHra" rel="nofollow">http://pastebin.com/3Yg5bHra</a></p> <p>My problem is, that when I decrypt then nothing gets returned at all. Nothing gets decrypted.</p> <p>It goes wrong somewhere around line 111-114. The cryptoStream (c...
16,219,227
0
<p>First of all, you want</p> <pre><code>for (int x=0; x&lt;= numOfStudents; x++) </code></pre> <p>or when numOfStudents = 0 you'll never go into the loop.</p> <p>Also, does addButtonActionPerformed have a for loop that contains the code you've given us? Otherwise, it seems like every time you go into that method numO...
38,959,172
0
<p>There is no way to get a set of IDs as a result of a bulk <code>INSERT</code>. </p> <p>One option you have is indeed to run a <code>SELECT</code> query to get the IDs and use them in the second bulk <code>INSERT</code>. But that's a hassle.</p> <p>Another option is to run the 2nd bulk <code>INSERT</code> into a <em...
35,984,966
0
Angular bind to filtered count <p>I have this array:</p> <pre><code>[ { type: "hhh", items: [ { "name": "EGFR", "type": "a", "selected": true } ] }, { type: "aaa", items: [ { "name": "mm", "type": "b", "selected": false } ] }, { type: "ii", items: [ { "name": "pp", "type": "bb", "selected": true } ] } ] </code></pre> <...
14,065,146
0
<h1>Edited</h1> <p>Note that is answer is no longer working because of the updated version of the MaltParser API in NLTK since August 2015. This answer is kept for legacy sake.</p> <p>Please see this answers to get MaltParser working with NLTK:</p> <ul> <li><a href="http://stackoverflow.com/questions/13207394/step-by-...
9,335,384
0
<p>Well, dosen't really solve the problem, but as the container size was full size and the window is full size, i just checked the screen resolution and change the rect accordingly.</p>
21,122,427
0
hover parent change child of child <p>In the next example i want things to happen to my childs divs when i hover over the complete parent div. For example: i want the h2 and span of child1 to underline and the span of child2 to change from color (but not underline!).</p> <p>Is this possible with pure css? Or should i c...
26,152,658
0
Auto-hiding navbar that works in IE <p>I made an auto-hiding navbar and it works great in chrome, but IE11 freaks out. the idea is that when you scroll down it hides, but it reappears if you scroll up. In IE11, I scrolled down and it hid the navbar. And then when I scrolled back up nothing happened for a second... and ...
17,504,037
0
<blockquote> <p>Is there a way to see how much ram the device has so i can use both resultion and memory to determin what size bitmap to use?</p> </blockquote> <p>The device RAM does not matter. The available memory <em>for your process</em> matters.</p> <p>To find out the memory class of your app, call <code>getMemor...
27,428,482
0
getting an instance of a CompiledMethod class <p>As far as I understand CompiledMethod is a class holding the compiled form of a method. An instance of this class is created each time a method is compiled. This instance is saved in the class to which the method belongs. </p> <p>My question is if I have a the name of th...
17,531,186
0
<p>You need to pass it as a parameter or create a "global variable"</p> <p>IE you could do either of the following...</p> <pre><code>public void methodOne(String string){ System.out.println(string); } public void methodTwo(){ String string = "This string will be printed by methodOne"; methodOne(string); } </code></pre...
26,749,587
1
Yammer API wrapper <p>is the Yampy package, yammer-API wrapper for python still maintained? Authorization is easily completed, but I try to get messages from a certain user only.</p> <p>The reccomended way of doing so is using the messages factory (described here: <a href="http://pythonhosted.org/yampy/api.html#yampy.a...
16,703,836
0
<p>Understanding that you're probably talking about a local/desktop machine and would probably like to <em>continue</em> talking about a local/desktop machine, I'll throw an alternative out there for you just in case it might help you or someone else:</p> <p>Set up multiple virtual server instances in the cloud, and s...
30,942,186
0
Need to write a C Program to remove repeated characters adjacent to each other <p>I need to remove only the repeated characters that are adjacent to each other. </p> <p>Example: if the input is <code>"heeellooo wooorllldd"</code>, the output should be <code>"helo world"</code>. The output I am currently getting is <cod...
24,789,791
0
Copy specific Google Form response values into different Google Sheet <p>I have a Google Form that has many questions, but I only want to record some of the responses into a separate, condensed spreadsheet. These are the responses I want to record:</p> <pre><code>First Name Last Name Company Role </code></pre> <p>This ...
15,948,282
0
<p>Look at signature:</p> <pre><code> IEnumerable&lt;SafeModeResult&gt; InsertBatch( Type nominalType, IEnumerable&lt;Object&gt; documents, SafeMode safeMode </code></pre> <p><a href="http://api.mongodb.org/csharp/1.1/html/cac72c74-ae6d-9b2e-a503-303a40104143.htm" rel="nofollow">SafeMode</a> can cause postpone you rea...
14,968,488
0
Perl String Parsing to Hash <p>So lets say I had the string.</p> <pre><code> $my str = "Hello how are you today. Oh thats good I'm glad you are happy. Thats wonderful; thats fantastic." </code></pre> <p>I want to create a hash table where each key is a unique word and the value is the number of times it appears in the ...
23,703,133
0
<p>Your first problem is that <code>-lpthread</code> is a linker option, so it belongs on the linker line (the second command) rather than the compilation line. (Note that the order of the parameters can matter; I got it to work by putting <code>-lpthread</code> on <strong>last</strong>. I also tried using <code>-pthr...
12,893,215
0
Windows languages without framework dependency? <p>I want to develop application which will communicate with my php server. This application will be used by multiple users. Please suggest any language which does not depend upon like c# depends upon dot net framework. I want something simple like gtalk which does not ne...
7,916,802
0
<p>Change your HTML to:</p> <pre><code>&lt;div id="content" style="background-color: #E5E5E5; width:500px; height:500px;"&gt; &lt;div class="demo" style="border-style: dashed; background-color: #CCCCCC"&gt; &lt;div class="closebtn"&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Then change <code>.demo:befo...
23,703,831
0
How to call a method in another class from a generic method? <p>Why doesn't the line marked with <code>//Dont work in the bottom of the code</code> compile?</p> <p>I want to reuse the <code>WriteMessage</code> method with different Classes, I try to use <code>generics</code>, but I'm not sure how to use it.</p> <pre><c...
1,978,267
0
<p>You can also just put { } inside each case: statement<br> without them the whole case stack is evaluated as a single unit, so no variables can be defined within one case:</p> <p>But by putting </p> <pre><code> case blah: { // do stuff } break; </code></pre> <p>You can put anythign you want inside the case statement...
40,400,581
0
Knockout JS: How to subscribe to changes in code similar to how binding handlers work <p>Let's say there is a path in the view-model property which needs to be observed, like this:</p> <pre><code>&lt;div data-bind="myBindingHandler: { data1: prop1().prop2().prop3() }"&gt;&lt;/div&gt; </code></pre> <p>This is easy to do...
19,268,903
0
Restoring buttons back to its position <p>I searched stackoverflow for answers buy am unable to find one so i am posting a question.A helping hand is much appreciated.</p> <p>I am creating a quiz app.The layout contains six textview box and 12 buttons with letters.when user clicks on button textview gets filled with ea...
22,612,337
0
R shiny, load data based on input <p>I have data for each day in server side and want to load data based on date input </p> <p>On server side, I have this:</p> <pre><code> dateInput("date","Enter a date:",value = "2014-01-13")) </code></pre> <p>On UI side, </p> <pre><code>library(shiny) library(googleVis) library(rpart...
12,300,989
0
<p>You can use the <code>start-with</code> in xpath to locate an attribute value that starts with a certain text.</p> <p>For example, assume you have the following link on the page:</p> <pre><code>&lt;a href="mylink_somerandomstuff"&gt;link text&lt;/a&gt; </code></pre> <p>Then you can use the following xpath to find l...
29,457,168
0
<p>The easiest way for executing phantomjs from C# code is using wrapper like <a href="https://www.nuget.org/packages/NReco.PhantomJS/" rel="nofollow">NReco.PhantomJS</a>. The following example illustrates how to use it for rasterize.js:</p> <pre><code>var phantomJS = new PhantomJS(); phantomJS.Run( "rasterize.js", ne...
39,322,893
0
<p>This could be shortened heavily but I don't feel like rewriting your entire program. This should work as expected.</p> <pre><code>total_guess = 0 wins = 0 loss = 0 import random characters = ["rock", "paper", "scissors", "lizard", "spock"] computer = characters[random.randint(0,4)] print(computer) def valid(text, f...
4,211,328
0
<p>This is VBA short-form for setting the value of a range of cells (or in this case, a single cell). So the example you've provided will actually insert the text value "FALSE" into cell AF6.</p> <p>If the colour of the other cell is not being set in code, then I would suggest it was done through conditional formattin...
10,612,421
0
<p>You can do this using the excel concatenate function. Here's a link to a <a href="http://office.microsoft.com/en-us/excel-help/concatenate-HP005209020.aspx" rel="nofollow">good tutorial</a></p> <p>Also, to deal with the duplicates, you can have excel highlight duplicate entries so they can be easily deleted. <a hre...
257,689
0
<p>Note that if you're creating a object that can be mutated after creation, the hash value must <em>not change</em> if the object is inserted into a collection. Practically speaking, this means that the hash value must be fixed from the point of the initial object creation. See <a href="http://developer.apple.com/doc...
9,327,611
0
<p>IMO the best choice for color selection is using system pickers like <code>NSColorWell</code> or (on toolbar) <code>NSToolbarItem</code> with identfier = <code>NSToolbarShowColorsItemIdentfier</code></p>
34,505,799
0
how to pass dynamic table name into mySQL Procedure with this query? <p>I have create procedure and when i pass table name manually then its working fine, but when i pass dynamic table name then it says <strong>dbname.tblname doesn't exist</strong>. </p> <pre><code>DELIMITER $$ CREATE PROCEDURE `lmsonline`.`delProc`(tb...
11,775,989
0
ARC Semantic Issue with simple protocol example? <p>I have just been trying something out with a quick test and I have a question, in the following code:</p> <pre><code>@protocol stuffieProtocol &lt;NSObject&gt; @required -(void)favouiteBiscuit; @end </code></pre> <p>.</p> <pre><code>// DOG &amp; TED ARE IDENTICAL, THE...
24,956,560
0
<p>Use a <code>using</code> block instead.</p> <pre><code>using (var c = new Connection()) using (var u = new UsesConnection(c)) { // Do your work here } </code></pre> <p>But don't <code>return</code> as that will dispose both objects. Don't let <code>UsesConnection</code> to dispose <code>Connection</code>.</p> <p>Yo...
39,861,995
0
<p>You first add the data to the $vendor_data array and then apply it using the following:</p> <pre><code>//Add the data to the array $vendor_data['paypal'] = $email; $vendor_data['profile'] = $description; //Update the term meta with the above values. update_term_meta($return['term_id'], 'vendor_data', $vendor_data);...
22,793,589
0
<p>I'm writing a Google Glass Development book for Apress and just finished the chapter Network and Bluetooth, with some working samples to let Glass communicate with iPhone for data transfer. You're right that Glass as of now (API level 15) doesn't support Bluetooth Low Energy (BLE). I have implemented three ways to ...
38,045,956
0
<p>You have to use <strong>floating property</strong> and some <strong>width to counter part</strong>, then it will work. Why don't you use some <strong>calc()</strong> style property value/attribute there?</p> <p><a href="https://jsfiddle.net/9xr8urz1/5/" rel="nofollow"><strong>Check this fiddle here</strong></a></p>...
11,824,866
0
mp4 that can be played using Quicktime on PC but not on Mac <p>I have couples of .mp4 files, all of them can be opened and played using QuickTime Player 7.7 installed on PC.</p> <p>But some of them cannot be opened using QuickTime Player 10.1 on Lion.</p> <p>It said "The document xxx.mp4 could not be opened. This media...
3,474,417
0
<p>Wikipedia has a long <a href="http://en.wikipedia.org/wiki/C%2B%2B0x" rel="nofollow noreferrer">overview</a>. I would hightlight rvalue references and lambdas. </p>
38,542,153
0
GCE: Both TCP and HTTP load balancers on one IP <p>I'm running a kubernetes application on GKE, which serves HTTP requests on port 80 and websocket on port 8080.</p> <p>Now, HTTP part needs to know client's IP address, so I have to use HTTP load balancer as ingress service. Websocket part then has to use TCP load balan...
13,027,372
0
<pre><code>public partial class Form1 : Form { TextBox[] tb; public Form1() { InitializeComponent(); tb = new TextBox[2]; //... } private void button1_Click(object sender, EventArgs e) { int a = Convert.ToInt32(tb[0].Text); } } </code></pre>
6,115,164
0
jQuery UI autocomplete multiple instances after the field was added <p>I am using jQuery UI autocomplete plugin and I am adding new fields to the form dynamically by append() in jQuery. The problem is that i would like to make the newly added field and autocomplete field, so there would be more than 1 autocomplete fiel...
35,434,488
0
<p>You can do this with plain old html. Put a DIV around where the link should take you: </p> <pre><code>-# &lt;DIV ID="FT001"&gt;&lt;b&gt;FT001:&lt;/b&gt;&lt;/DIV&gt; I, as -# &lt;DIV ID="FT002"&gt;&lt;b&gt;FT002:&lt;/b&gt;&lt;/DIV&gt; I, as </code></pre> <p>I'm not an HTML expert, but <code>&lt;A NAME="anchor" ...</...
23,974,773
0
How can I work around this JRE bug in getNetworkPrefixLength()? <p>There appears to be a known bug in the JRE implementation:</p> <ul> <li><a href="http://bugs.java.com/view_bug.do?bug_id=6707289" rel="nofollow">http://bugs.java.com/view_bug.do?bug_id=6707289</a></li> <li><a href="https://bugs.openjdk.java.net/browse/J...
6,284,656
0
<p>Try explicitly giving Mongoid the class name</p> <pre><code>class Engine::Blog include Mongoid::Document embeds_many :posts, :class_name =&gt; "Engine::Post" end </code></pre>
35,812,234
0
<p>Use library to load images in your application. Like <a href="http://square.github.io/picasso/" rel="nofollow">Picaso</a> or <a href="https://github.com/bumptech/glide" rel="nofollow">Glide</a></p> <p>Also read difference between them <a href="http://inthecheesefactory.com/blog/get-to-know-glide-recommended-by-goog...
28,301,434
0
Dates on xaxis with highcharts <p>I need to have dates on my xaxis on my chart. I collect my data through a range datepicker where the user can enter a range of 14 days. I need the first value on the xaxis to be the start date of the range and the last value to be the end date of the range. i want the the xaxis labels ...
19,971,140
0
<p><code>nginx</code> must be writing that message to standard error, not standard output. If you want to pipe it, you have to redirect stderr to stdout:</p> <pre><code>nginx -v 2&gt;&amp;1 | awk -F/ '{print $2}' </code></pre>
12,592,513
0
Extracting a list of files and creating a new file containing this list <p>I am a researcher and my skill in Unix commands is limited. I am currently dealing with a folder containing about 1000 files and I have to extract some filenames from this folder and create another file (configuration file) containing these file...
13,855,435
0
Windows Phone Emulator 7.1 doesnt open <p>I successfully installed windows phone SDK 7.1 in my pc but when I tried to open the Windows phone emulator it shows an error says "Windows phone emulator is not supported on this computer bcoz this computer does not have the required graphics processing unit configuration. An ...
30,814,037
0
<p>Look at the file you give with the <code>excelFormat</code> item I would guess it is due to the following line in it:</p> <pre><code>&lt;Table ss:ExpandedColumnCount="7" ss:ExpandedRowCount="68" x:FullColumns="1" x:FullRows="1" ss:DefaultRowHeight="15"&gt; </code></pre> <p>You can see that it has a mention of an <c...
18,505,244
0
<p><code>Answer</code> of @Mangesh Parte can be <strong>short</strong> like,</p> <pre><code>&lt;?php function load_external_jQuery() { wp_deregister_script( 'jquery' ); // deregisters the default WordPress jQuery $url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'; // the URL to check against $tes...
14,226,204
0
<p>The Function SaveAs is defined so : .SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local)</p> <p>Thas is, to use the semicolon (if your regional language option are correctly set) </p> <p>ExcelObj...
19,070,016
0
<p>Sure it is.</p> <p>If you use supported libraries: <a href="http://developer.android.com/tools/support-library/index.html" rel="nofollow">http://developer.android.com/tools/support-library/index.html</a></p> <p>And then create your App out of Fragments - then you can make an App for 2.3.3 with it's own Tablet layou...
6,682,011
0
Passing array of strings from c# to c++ - memory management <p>In my code I have c DLL that accepts array of strings: void Helper::ProcessEvent(PEVENT_RECORD pEvent,wchar_t** OutPutFormattedData)</p> <p>I'm invoking it with this code:</p> <pre><code>[DllImport("Helper.dll", EntryPoint = "ProcessEvent")] internal static...
26,101,847
0
<p>Outlook Object Model cannot be used from a service. You can use </p> <ol> <li>Extended MAPI (C++ or Delphi only) </li> <li><a href="http://msdn.microsoft.com/en-us/library/office/dd877045(v=exchg.140).aspx" rel="nofollow">Exchange Web Services</a> if you are dealing with Exchange 2007 (or newer) mailboxes</li> <li>...
29,681,773
0
Run one jQuery function after another one finishes effect <p>I've written the following two functions:</p> <pre><code>&lt;script&gt; $('.tile').on('click', function () { $(".tile").addClass("flipOutX",1000).promise().done(function () { $(".tile-group.six").load("musability-musictherapy-company-overview.html"); }); }); ...
5,303,701
0
<p>They are ASP.NET Expressions.</p> <p>A very common usage is when using a resource file, like so</p> <pre><code>&lt;asp:Label id="label1" runat="server" text="&lt;%$ Resources: Messages, ThankYouLabel %&gt;" /&gt; </code></pre> <p>Read more on them here: <a href="http://msdn.microsoft.com/en-us/library/d5bd1tad.aspx...
37,387,514
0
OpenLayers3 - Animated .fit to a specific extent <p>I have created a map using OpenLayers3. I can succesfully zoom to a layer on the map using the following code: </p> <pre><code>map.getView().fit(extent, map.getSize()); </code></pre> <p>However I woulld like something similiar in an animated way.</p> <p>I know about t...
16,488,658
0
<p>When it comes to extracting data from an HTML document on the server-side, <a href="http://nodejs.org/" rel="nofollow">Node.js</a> is a fantastic option. I have used it successfully with two modules called <a href="https://github.com/mikeal/request" rel="nofollow">request</a> and <a href="https://github.com/Matthew...
38,205,189
0
ionic framework/bower install ng-cordova <p>I am working on ionic project to install ng-cordova, I ran this command</p> <blockquote> <p>bower install ngCordova</p> </blockquote> <p>this shows me</p> <blockquote> <p>bower ionic#1.3.1 ENOGIT git not installed or not in the path. </p> </blockquote> <p>Can anybody pls put ...
21,978,919
0
How can i insert decoded json data using json string in php mysql database <p>I have this JSON string.</p> <pre><code>{"Challenges":[{"phoneNumber":"1234567809","name":"Test2 Test2"},{"phoneNumber":"1234567890","name":"Test1 Test1"},{"phoneNumber":"8733806964*","name":"Dennish Desouzs"}],"Message":[{"message":"testchal...
13,417,781
0
<p>In my case I have these messages when I show the sherlock action bar inderterminate progressbar. Since its not my library, I decided to hide the Choreographer outputs.</p> <p>You can hide the Choreographer outputs onto the Logcat view, using this filter expression :</p> <p><strong>tag:^((?!Choreographer).*)$</stron...
8,887,146
0
<p>What is your desired functionality? I assume: shifting which LED is on every 2 seconds, keeping all the other LEDs off? "Sliding LED"...</p> <p>Also, I am assuming your target is an FPGA-type board.</p> <p>There is no free "wait for X time" in the FPGA world. The key to what you are trying to do it counting clock c...
15,689,640
0
Firewall blocking Android <p>I wrote an application using a lightweight http server in c# called nancyfx. the problem is that i can call the framework from the browser(localhost and from LAN pc) but android (also LAN) gets blocked.</p> <pre><code> String url = "http://192.168.178.35:8080/issue"; HttpClient client = new...
6,415,176
0
<p>This is probably what you want. It creates a 'maximized' window without hiding the taskbar.</p> <pre><code>public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load( object sender, EventArgs e ) { FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; Left = Top = 0...
1,622,186
0
<p>I propose two solutions. The first mimics what NetBeans IDE generates:</p> <pre><code>CC=gcc .PHONY: all clean all: post-build pre-build: @echo PRE post-build: main-build @echo POST main-build: pre-build @$(MAKE) --no-print-directory target target: $(OBJS) $(CC) -o $@ $(OBJS) clean: rm -f $(OBJS) target </code></pr...
37,498,236
0
<p>numpy <strong>vectorized</strong> approach will be <strong>much</strong> faster compared to regular for/list comprehension/etc. especially on big lists:</p> <pre><code>import numpy as np listA = np.array([51, 988, 1336, 2067, 1857, 3160]) listB = np.array([1, 2, 3, 4, 5, 6]) result = listA / np.pi * ((listB*0.1)+1)...
12,512,366
0
Broadcast Receiver and Alarm manager <p>Hello I am building a news application in android, so that every time a new data is entered into database user must receive a notification in the notification bar. So after research I found that I have to use broadcast receiver and alarm manager. But what I am not able to underst...
14,097,522
0
<pre><code>#menu { postion:fixed; top:0; background:#3B5998; same color as fb has width:100%; height:46px; left:0; z-index:2; //give this so, your header or menu will not get under content! } </code></pre>
4,937,427
0
<p>Try setting a specific width on div_timestamp, with JavaScript or CSS, 113px would do it for you.</p>
29,361,160
0
How to handle 'half-open' connections- managing client-side socket crash <p>We have a code of Client-Server written in 'C' underlying TCP protocol. The regular socket operations are being performed on both Client and Server. And <code>select()</code> function is being used to monitor multiple connections 'read/ write' ...
4,373,783
0
<p>I do not completely understand what do you mean by opening two shells ? If you run your silverlight application in two different windows or you have 2 instances of your WPF app then your Shells do not conflict. Even if you have one application with 2 instances of Bootstrapper there is no conflict - your two shells ...
9,941,015
0
<p>There's no built-in way to do that, you'd have to generate the XML yourself. That said, there are two cmdlets in PowerShell that creates an XML-based representation of an object: <code>Export-CliXml</code> and <code>ConvertTo-Xml</code>. Check the help for more information.</p>
25,893,800
0
r: how to remove row numbers coming from a separate list in multiple data frames using lapply <p>I have many data frames organized in a list object. And I have a second list of vectors, that contain row numbers that I want to remove in my data frames. The rows to be removed are different for each data frame. Therefore ...
15,980,707
0
<p>You can create a custom filter that inherits from FilterAttribute and implements IExceptionFilter. Then register it in global.asax.cs. Also you must enable custom errors handling in the web.config: </p> <pre><code>&lt;customErrors mode="On"/&gt; public class HandleErrorAndLogExceptionAttribute : FilterAttribute, IE...
38,297,444
0
<p>Unless you really need them, it's easiest not to store the numbers you generate any longer than you need, as there will be 250640000 of them, taking about a Gb of memory. Instead, you can just call <code>table</code> immediately on them. Using <code>replicate</code> instead of a <code>for</code> loop (you're not us...
1,488,531
0
.Net WinForm System Beep on a 64 Bit OS <p>My application needs to beep when validation fails so the user (who may be several feet away) may hear it. I'd like to use the <code>Console.Beep()</code> but this is <a href="http://msdn.microsoft.com/en-us/library/8hftfeyw.aspx" rel="nofollow noreferrer">unavailable in a x64...
38,611,508
0
getting duplicate values in map for every key <p>I am trying to put all values in map and i have more then 20k values , now I am trying to put values in map by using idea as key 1 contains values from 1(consider i) to 1000 (i.e i*1000) but the output I'm getting contains duplicate values (key 1 &amp; 2 have same values...
26,495,170
0
<p>One could use Where-Object</p> <p><code> if ((Get-Service | Where-Object {$_.Name -eq $serviceName}).length -eq 1) { "Service Exists" } </code></p>
25,614,742
0
<p>There are many ways. Check this out:</p> <pre><code>&lt;img id="theImage" src="" /&gt; &lt;ul&gt; @foreach (var i in Model.Picture) { &lt;li&gt;&lt;a href="#" data-image="@i.picturePath" class="change-image"&gt;@i.picturePath&lt;/a&gt;&lt;/li&gt; } &lt;/ul&gt; &lt;script type="text/javascript"&gt; $(function () { /...
5,104,402
0
Shared Access 2003 database performance <p>I've to create a Access 2003 database and share it among 100 users, users won't be doing any modifications, only viewing several reports that are generated daily (and once) using a scheduled task on the host machine.</p> <p>Would a simultaneous 100 users break the performances...
16,048,022
0
<p>It means your <code>dataArray</code> is used to give a sorted array based on the comparison of the "1" property of each element of the original array. </p> <p>For example if it is an array of strings, the second char is used as the comparator. If it is an array of arrays, the second element of each array is used. <...
39,547,700
0
unexpected title bar behavior in WPF RibbonWindow <p>i am using the Microsoft ribbon control. i need to merge the ribbon title bar and the window title bar but i get very bad results as it is shown in below picture. Also what i need is in the picture.</p> <p>please provide me the solution for these:</p> <ul> <li>the ti...
30,485,991
0
<p>The answer is: You cannot use an alias name in GROUP BY.</p> <p>So:</p> <pre><code>GROUP BY (SELECT customer_address.post_code ...); </code></pre> <p>Or:</p> <pre><code>select postcode, sum(order_no) from ( SELECT (SELECT customer_address.post_code FROM customer_address WHERE customer_address.address_type = 0 AND c...
7,084,812
0
<pre><code>TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); </code></pre>
30,332,291
0
Excel Visual Basic Run-time error '1004' when initializing a variable <p>I am learning visual basic and this script I'm using is coming up with an error when I am initializing the variable <code>i</code>.</p> <p>I'm not sure what the problem is but I am getting the error message:</p> <blockquote> <p>Run-time error '100...
8,779,108
0
How do I make a libGDX Desktop application resizable? <p>libGDX Applications must implement the .resize(int width, int height) method, so I figured that resizing a libGDX app is not a big deal, but I found no way to make the actual application JFrame or whatever that is draggable as with JFrame.setResizable(true). Is t...
32,369,957
0
<p>Maybe your routing can be simplified as follows</p> <pre><code>angular.module("nk.login", [ 'ngRoute', 'ngAnimate' ]). config(['$stateProvider',function($stateProvider){ $stateProvider .state('app.login', { url: '/login', templateUrl: 'src/login/templates/login.html', controller: 'loginController' }) .state('app.fo...
3,615,473
0
<p>Perhaps, one way that I can think of is </p> <ol> <li>Create a wrapper class - say KeyProcessor to queue up items for a key. </li> <li>KeyProcessor.Run() method will be capable of whatever queuing semantics that you need for. Essentially it would look for internal queue for any pending work and then keep doing it s...
4,214,547
0
Windows Mobile - Hide Application <p>I am developing an application for enterprise which can be installed on employee phones to track usage of phones and enforce certain security policies on phone.</p> <p>My application needs to be hidden. It should not be shown in: </p> <ol> <li>Running Programs in Task Manager</li> <...
37,951,439
0
<p>Found my answer in <a href="http://vimcasts.org/episodes/the-file-explorer/" rel="nofollow">this</a> Vimcast. <code>:Explore</code> or <code>:E</code> will open up Netrw in the current file's directory. I got an <code>ambiguous use of user-defined command</code> error at first when I tried to use <code>:E</code>, b...
36,366,818
0
<p>There are well-tested wheels used to tear apart URLs into the component parts so use them. Ruby comes with <a href="http://ruby-doc.org/stdlib-2.3.0/libdoc/uri/rdoc/URI.html" rel="nofollow">URI</a>, which allows us to easily extract the <code>host</code>, <code>path</code> or <code>query</code>:</p> <pre><code>requ...
37,363,011
0
<p>Let try this query instead:</p> <pre><code>uniqBk = Bikehistory.where("JOIN ( SELECT id, DISTINCT bike_numbers FROM bikehistories ) as temp ON temp.id = id") .order(:bike_numbers) </code></pre>