pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
14,390,056
0
<p>one possibility:</p> <p>open your mysql/bin/my.ini, change </p> <p><code>max_allowed_packet = 1M</code> under both [mysqld] and [mysqldump] </p> <p>to</p> <pre><code>max_allowed_packet = 100M </code></pre>
301,838
0
<p>Not sure if this counts as debugging, but for C and Objective-C code I find the <a href="http://clang.llvm.org/StaticAnalysis.html" rel="nofollow noreferrer">LLVM/Clang Static Analyzer</a> to be invaluable. Helps spot bugs, memory leaks and logical errors even before you see their effects.</p>
10,276,095
0
<p>Yes this is possible, you simply have to specify the transport when initializing the Bus:</p> <pre><code> var config = Configure.With() .SpringBuilder() .AzureConfigurationSource() &lt;--- Don't use this when working on premise. .XmlSerializer() .UnicastBus() .LoadMessageHandlers() .AzureQueuesTransport() &lt;--- C...
17,907,540
0
<p>"upload" here <code>$_FILES['upload']</code> refers to the name of the file field in the form.<br> you are only ckecking if a file from the file field named upload has been uploaded <br> <br> did you maybe name the first upload field in the form differently?</p>
35,537,450
0
Rails: define a method to have advanced data from the db <p>I have a model named <code>Category</code>. I also have a model named <code>Todo</code> (in this model there is <code>boolean</code> column <code>completed</code>).</p> <pre><code>Category has_many :todos Todo belongs_to :category </code></pre> <p>I want to pr...
18,614,756
0
<p>Use the standard vibrate method with patterns parameter</p> <pre><code>public abstract void vibrate (long[] pattern, int repeat) </code></pre> <p>Pass in an array of ints that are the durations for which to turn on or off the vibrator in milliseconds. The first value indicates the number of milliseconds to wait bef...
19,361,910
0
<blockquote> <p>But is this all the settings can do?</p> </blockquote> <p>Yes, all possible <code>settings</code> are mentioned in <a href="http://underscorejs.org/#template">the docs</a>. You can read the <a href="http://underscorejs.org/docs/underscore.html#section-134">annoted source</a> as well.</p> <blockquote> <...
35,666,712
0
Wix like site builder creation project <p>I am building a system like wix where user will able to create site and connect with their domain. But I am confused about apache configurations and domain mapping. Every users build sites files saved in different directory on server. But how can I configure apache to locate ea...
30,959,005
0
<p>In fact, your question can be merely resolved through an underrated characteristic of <code>box-shadow</code>:</p> <blockquote> <p>The ‘box-shadow’ property attaches <strong>one or more</strong> drop-shadows to the box. The property takes a comma-separated list of shadows, <strong>ordered front to back</strong>. Ea...
10,288,364
0
MySQL Find Full Name Across Two Rows <p>I have a MySQL table where I'm trying to find a person by his full name. The problem is that first and last name are stored on two separate rows in the table as shown here:</p> <pre><code>+-----------------+-------------+-------------+--------------+ | submit_time | form_name | f...
3,907,633
0
<p>Simply use "where". For instance, to get all the "PassedStudents":</p> <pre><code>var passedStudents = from student in StudentList where student.StatusResult == ResultsStatus.PassedStudent select student; foreach (var student in passedStudents) { Console.WriteLine("[{0}.] {1} passed.", student.Id, student.Detail.Na...
23,407,693
0
<p>Apache Storm is a distributed realtime computation system (source: project website.</p> <p>CEP is complex event processing concerned with tracking and analyzing (processing) streams of information (data) about things that happen (events) and deriving a conclusion from them. (Source:wiki)</p> <p>They are two differe...
24,144,150
0
<p>My take is that <code>__size</code> and <code>__align</code> fields specify (guess what :-) ) the size and alignment of the structure independently of the <code>__data</code> structure. So, the data can be of a less size and have less alignment requirements, it can be modified freely without breaking these basic as...
21,695,943
0
checkbox list with filtering jquery -Only need to match first letter <p>i am using <code>check-box list</code> with filtering <code>jquery</code> on a page to populate all the customers name. However, when someone types "A", I only want the names that begin with A to show, not all that included the letter A. How to do ...
30,456,195
0
How to pass multiple parameter on dynamic link function jquery function C#? <p>I have one c# web application in which put one link dynamically like,</p> <pre><code>if (oObj.aData[1] == '2') { Id = oObj.aData[7]; Name = oObj.aData[2]; alert(Name); return '&lt;a href=# onClick="Show(' + Id + ',' + Name + ');"&gt; Show &l...
35,230,328
0
<p>If the XML you're trying to parse is what you've posted here, it's invalid since </p> <blockquote> <p>XML documents must contain one root element that is the parent of all other elements:</p> </blockquote> <p><a href="http://www.w3schools.com/xml/xml_syntax.asp" rel="nofollow">http://www.w3schools.com/xml/xml_synta...
356,552
0
<p>Per the <a href="http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx" rel="nofollow noreferrer">MSDN documentation</a> the valid values for mode are:</p> <p><strong>On</strong>: <em>Specifies that custom errors are enabled. If no defaultRedirect attribute is specified, users see a generic error. The custom errors...
8,303,343
0
<p>Just overcame a similar issue. JBoss 5 and 6 are much more strict with DTD validation than earlier versions, especially the 4.x series. Your <code>jboss.xml</code> file is failing DTD validation, either because element order is incorrect, or there are elements which don't validate against the DTD.</p> <p>Take a loo...
10,809,079
0
<p>Ok, here's the scoop. QTimer, for reason only known to the designers of QT, inherits the context of the parent of the thread. Not the context of the thread it's launched from. So when the timer goes off, and you send a message from the slot it called, you're not in the thread's context, you're in the parents contex...
11,731,523
0
<p>The TCP protocol described in <a href="http://www.ietf.org/rfc/rfc793.txt" rel="nofollow">RFC 793</a> describes the terms <em>socket</em> and <em>connection</em>. A <em>socket</em> is an IP address and port number pair. A <em>connection</em> is a pair of <em>sockets</em>. In this sense, the same <em>socket</em> can...
1,973,823
0
<p>The various <a href="http://en.wikipedia.org/wiki/Central_bank" rel="nofollow noreferrer">Central Banks</a>, for example the <a href="http://www.ecb.int/stats/exchange/eurofxref/html/index.en.html" rel="nofollow noreferrer">ECB</a>, provide Forex rates free to the public.</p> <p>There is a <a href="http://pear.php....
8,328,932
0
Eclipse toolbar with multiple rows <p>In my RCP app, I contribute several items to the main toolbar. The easy question now is: How do I make Eclipse lay them out so that they appear in a second row, just under the normal toolbar? Or can I add an additional toolbar that appears just under the main bar? Right now, they j...
6,053,897
1
how to assign an sql value to this python variable <p>ok i got this as simple as i can, everythings working and i need one last thing before I'm done with this issue i am using sqlite3 module in python i also have very limited sql expierance</p> <p>the problem- i need to take the only value out of an sql table; the tab...
35,674,774
0
<p>Yes this is possible. But one class needs to know the other class. Try it like this:</p> <pre><code>Class1 { public ExampleInstance Instance { get; set; } //Create your Class2 object here with Class2 SecondClassObject = new Class2(this) } Class2 { private Class1 MyCreator; public Class2(Class1 Creator) { this.MyCre...
34,066,504
0
how to create a hover dropdown panel for logout and update profile function? <p>I want to create a yahoo like logout function where in whenever I hover over the username it should display a panel containing logout and update profile function. Currently I am using this code but its not working as expected.</p> <pre><cod...
10,097,651
0
<p>What compiler did you use, I'm willing to bet this worked because whatever compiler you used didn't zero out unused stack variables after a return, you didn't get a seg fault because its still your stack. basically md was left on the stack which you are technically still allowed to address. The difference between t...
23,738,860
0
ASP Identity 2.0.0 usermanager calling wrong method? <p>I have implemented a custom UserStore for my ASP MVC project (with Identity 2.0.0, which I use for it allows the use of integer keys).</p> <p>The Usermanager is not custom implemented, but the Microsoft.AspNet.Identity.Usermanager implementation.<br/><br/> When I ...
11,721,376
0
<p>For the benefit of other people with the same problem: make sure to use the Visual Studio x64 command prompt for launching the setup script.</p>
936,296
0
Where do you perform your validation? <p>Hopefully you'll see the problem I'm describing in the scenario below. If it's not clear, please let me know.</p> <p>You've got an application that's broken into three layers, </p> <ul> <li>front end UI layer, could be asp.net webform, or window (used for editing Person data)</l...
23,775,406
0
<p>I'm still not sure if this is doable through the REST endpoint. We've found cases where the SOAP endpoint offers functionality that the REST endpoint does not, and this might be one those cases.</p> <p>What I did was to use the SOAP endpoint instead. There was no built in method for this, so I had to use the genera...
3,675,782
0
<p>Ok, again I found out some of them:</p> <ul> <li><a href="http://boxcar.io/" rel="nofollow noreferrer">http://boxcar.io/</a></li> <li><a href="http://howlapp.com/" rel="nofollow noreferrer">http://howlapp.com/</a></li> <li><a href="http://prowl.weks.net/" rel="nofollow noreferrer">http://prowl.weks.net/</a></li> </...
33,734,349
0
Newline in input filed? <p>I am new to php and never used php. I have one application backend with php. There function for add new text. Its input filed. when I type some text there and if I need some text in new line than its not possible. If I press Enter key for add new line, its saving my data. my code for it like ...
31,685,741
0
<p>You can create function like this:</p> <pre><code>function changeTemplate($state, template) { return { scope: { 'resource': '=', 'template': '=' }, template: '&lt;div ng-include="{{template}}"&gt;&lt;/div&gt;', link: function (scope) {.... // cool code } } } </code></pre> <p>And just change template argument on par...
37,208,039
0
<p>It seems you are putting the custom property on the log4net.ThreadLogicalContext which is of type DateTime . Why not put it in string format instead of the DateTime type. This make the output a lot easier as trying to add a layout into your configuration.</p>
14,440,353
0
No Known Conversion for SFML Vector2i <p>I'm completely burned out on this one, but why am I getting:</p> <pre><code>client.cpp: In member function 'void Client::netRead(int, int)': client.cpp:158:57: error: no matching function for call to 'Client::nextGameUpdate(sf::Vector2i [0], int [0], sf::IpAddress [0], int&amp;)...
11,684,553
0
BUG: Recommendations Bar on same page as Facebook Comments <p>I have just added in the new Facebook Recommendations Bar (using the HTML5 version) to a number of blogs and realised that some of them aren't working. After a little digging I managed to pin it down to when I also have the Facebook Comments plugin on the sa...
17,373,613
0
<p>Is <code>MyKey</code> actually immutable?</p> <p>If a key is changed after it has been used in the <code>Multimap</code> (or a <code>HashMap</code>, for that matters), and the change effects <code>hashCode()</code> and <code>equals()</code>, you won't be able to find the associated values anymore: the modified hash...
15,192,511
0
Why is ngResource modifying saved object to this: g {0: "O", 1: "K", ..} after receiving a response <p>I have a default ngResource defined like this:</p> <pre><code>var Posts = $resource('/posts/'); </code></pre> <p>And after I get one blogpost from my nodejs server like this:</p> <pre><code>$scope.post = Posts.get({_i...
22,250,065
0
The constructor Skin(TextureAtlas) is undefined libgdx <p>I'm coding for android using libgdx but when I try to create a skin using a TextureAtlas, eclipse throws me an error saying to remove argument or change type to FileHandle</p> <pre><code>atlas = new TextureAtlas(Gdx.files.internal("data/packs/button.pack")); ski...
17,807,818
0
Highlight text while playing audio clip in android media player <p>I have a textview in which I have display the lyrics of one audio song &amp; simultaneously i play the audio from raw folder and now I want to highlight the lyrics from textview as per the audio play. So anyone has any idea about this. I have the source...
40,923,376
0
<p>You can use regular expressions to match any of the bad words:</p> <pre><code>is_bad = re.search('|'.join(bad_words), bad_string) != None </code></pre> <p><code>bad_string</code> is the string to test, <code>is_bad</code> is <code>True</code> or <code>False</code>, depending on whether <code>bad_string</code> has b...
12,343,733
0
C++ Simple 0-10 multiplication flashcard using rand() <p>I am having trouble grasping the concept of rand() and srand() in c++. I need to create a program that displays two random numbers, have the user enter a response, then match the response with a message and do this for 5 times. </p> <p>My question is how do I use...
8,727,525
0
<p>Both <a href="http://www.h2database.com" rel="nofollow">H2</a> and <a href="http://hsqldb.org/" rel="nofollow">HyperSQL</a> support embedded mode (running inside your JVM instead of in a separate server) and saving to local file(s); these are still SQL databases, but with Hibernate there's not many other options.</...
31,419,105
0
<p>Java's <code>outputstream</code> can not do what you want either, all it can do is send <code>byte[]</code> which is exactly what C#'s socket classes do.</p> <p>If you want to send complex objects you must use some form of "Serializer" which will let you transform your objects in to a <code>byte[]</code> to be sent...
33,597,483
0
WPF MVVM ScrollIntoView <p>I have a view with two listboxes:</p> <p>Listbox 1 elements: A, B, C. Listbox 2 elements: ..., A, ..., B, ..., C, ... (long list).</p> <p>When the user selects an element in listbox 1, I want to scroll the same element into view (not select) also in listbox 2.</p> <p>In my viewmodel I have a ...
30,441,990
0
ffmpeg recording h264 live stream got error <p>I am trying to record a h.264 live stream using the following code:</p> <pre><code> AVOutputFormat* fmt = av_guess_format(NULL, "test.mpeg", NULL); AVFormatContext* oc = avformat_alloc_context(); oc-&gt;oformat = fmt; avio_open2(&amp;oc-&gt;pb, "test.mpeg", AVIO_FLAG_WRITE...
15,809,129
1
Error while getting details of the particular system through python script <p>I am using a <a href="http://pastebin.com/RXH4b11v" rel="nofollow noreferrer">script</a> for getting system details. its all working fine in almost 1000 systems, but in one system its getting the below error.</p> <pre><code>File "SystemDetail...
18,798,191
0
<p>This is definitely a nasty memory leak. I've <a href="https://code.google.com/p/android/issues/detail?id=60071" rel="nofollow">opened an issue</a> for it since no one else seems to have reported it.</p> <p>Thanks for the "ugly workaround" emmby, that was helpful. A safer approach, although potentially with a perfor...
25,927,937
0
<p>From Xcode 6.0 UIAlertView class:</p> <blockquote> <p>UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead.</p> </blockquote> <p>On swift ( iOS 8 and OS X 10.10 ), you can do this:</p> <pre><code>var alert = UIAlertController(title: "Alert Title", message: "A...
33,876,298
0
Script to be executed in a Div loaded by Ajax <p>I'm using AJAX to load an HTML page inside a <code>div</code>, but this page has scripts that don't work if I load the AJAX code using the click function. The problem is that I need the page to execute the scripts when I click some specific button.</p> <p>The code that w...
28,821,333
0
SQL database relational: performance modeling one to many <p>I have got a doubt modeling a relational database. I wonder which option is best in design and performance.</p> <p>First option:</p> <pre><code> Project Project_task Task -------- ----------- ----- id id_project id id_task </code></pre> <p>Second option (my d...
2,437,421
0
<p>Does your TableAdapter refresh your DataSet? If it does, then you probably have something like a key getting initialized (remember, GUID==good, Int==bad). It's just like when you fill from a TableAdapter you need to call AcceptChanges to reset the state of all of the rows to unchanged.</p>
33,103,263
0
Android MediaPlayer with LocalSocket not working <p>I am trying to play media from LocalSocket using MediaPlayer. The stream is of type MPEG-TS, which is availale in a LocalSocket input stream</p> <p>Following code tries to <code>setDataSource</code> to the <code>FileDescriptor</code> of <code>LocalSocket</code>, but f...
26,155,209
0
<p>This is to demonstrate HA functionality, so that users can try this on their local machine, Do use the appropriate machine host/ips and ports when appropriate. </p> <p>Suho </p>
1,805,871
0
<p>I think that you need to use the order table instead of the order view to do this.</p>
13,340,905
0
<pre><code>var re = /(#{5})/; console.log ("&lt;foo&gt;\n&lt;bar&gt;\n#####&lt;foo&gt;\n#####&lt;bar&gt;".match (re)); console.log ("&lt;foo&gt;\n&lt;bar&gt;\nfoo&gt;\n&lt;bar&gt;".match (re)); </code></pre> <p>output:</p> <pre><code>[ '#####', '#####', index: 12, input: '&lt;foo&gt;\n&lt;bar&gt;\n#####&lt;foo&gt;\n##...
25,867,231
0
<p>Here is solution using transforming string to XML which brings more freedom with result processing:</p> <pre><code>-- Prepare data for solution testing DECLARE @srctable TABLE ( Id INT, SnmpMessage VARCHAR(MAX), SnmpMessageXml XML ) INSERT INTO @srctable SELECT Id, SnmpMessage, SnmpMessageXml FROM ( VALUES (1, 'com...
40,434,977
0
IPSEC is Creating Multiple SAD's at rekeying in phase2 <p>I am trying to create a tunnel between two peers with ipsec.while establishing the tunnel at first time, the number of sad(inbound &amp; outbound) entries are as per number of peers. Once after reaching to soft limit of ipsec timer it is starting the re-negotiat...
18,624,227
0
<p><code>message.getBytes()</code> in your case is trying to convert Chinese Unicode characters to bytes using the default character set on your computer. If its a western charset, its going to be wrong.</p> <p>Notice that <code>String.getBytes()</code> has another form with <code>String.getBytes(String)</code> where ...
11,465,707
0
<p>I ran your code and I got this error: XMLHttpRequest cannot load <a href="http://api.jquery.com/get/" rel="nofollow">http://api.jquery.com/get/</a>. Origin null is not allowed by Access-Control-Allow-Origin.</p> <p>I googled it and I got this: <a href="http://stackoverflow.com/questions/8456538/origin-null-is-not-a...
6,145,644
0
<p>Try this to force correct detection of the charset:</p> <pre><code>$doc = new DOMDocument(); @$doc-&gt;loadHTML('&lt;?xml encoding="UTF-8"&gt;' . $html); $nodes = $doc-&gt;getElementsByTagName('title'); $title = $nodes-&gt;item(0)-&gt;nodeValue; echo $title; </code></pre>
34,364,188
0
<p>Assuming you want to add the result <code>z</code> from each method:</p> <pre><code>static int number1(){ int x, y, z; x=2; y=2; z=x+y; return z; } static int number2(){ int x, y, z; x=3; y=2; z=x+y; return z; } </code></pre> <p>You could simplify this though to a more generic method:</p> <pre><code>static int adde...
6,105,179
0
Generate AST for Java with ANTLR <p>As far as I know, there are two mechanisms in ANTLR for building abstract syntax trees. I want to build a AST for Java source files.</p> <p>Question: There are so many grammar rules in Java.g (java specification), it's a large work if I specify the AST generating rules for every item...
3,641,409
0
<p>Check here: <a href="http://jsfiddle.net/uh2Gn/" rel="nofollow noreferrer">http://jsfiddle.net/uh2Gn/</a></p> <p>HTML:</p> <pre><code>&lt;form method="post" enctype="" onsubmit="return validate()"&gt; &lt;input type="file" id="file" /&gt; &lt;input type="submit" /&gt; &lt;/form&gt; </code></pre> <p>JavaScript:</p> ...
31,561,644
0
Why doesn't this function load after a successful ajax call in jquery? <p>I'm using <a href="http://papermashup.com/parse-xml-with-jquery/" rel="nofollow">the tutorial here</a>, that used to work last month, but now it isn't. I've copied the relevant code below.</p> <pre><code>$(document).ready(function () { $.ajax({ t...
9,040,800
0
<p>You are creating an array that is too small for the loop. Namely: <code>new char[28][31];</code> will only allow for a maximum index of 27 and 30. Your for loops are:</p> <pre><code>for (int i=0; i&lt;=31; i++) for (int y=0; y&lt;=28; y++) </code></pre> <p>Use <code>i&lt;31</code> and <code>y&lt;28</code>, or incre...
21,509,019
0
<p>You're on the right track using dimensions. Make a different <code>values</code> folder for each screen size you'd like to support, ie <code>values-sw320dp</code>, <code>values-sw600dp</code>, etc. Each with its own dimens.xml file. Then, put different values for leftMargin, topMargin, etc in each dimens file. Look...
31,466,863
0
<p>Your mistake is here:</p> <pre><code>while(right-&gt;next != NULL){ right = right-&gt;next; } </code></pre> <p>You are trying to check "right->next" where "right" is NULL.</p>
7,437,766
0
Help me understand this algorithm (simple) <p>I have just made a queue class and I now have to use it to do this.</p> <p>Write a c++ program to generate all strings using A,B,and C as the letters.</p> <p>The strings must be generated in the following order: A B C AA AB AC BA BB BC CA CB CC AAA AAB AAC ABA ABB ABC ACA A...
16,022,969
0
<p>Monocross development has not been halted. It is still under active development, the team that released the Monocross cross-platform framework has been hard at work on <a href="http://ifactr.com" rel="nofollow">iFactr</a>, their enterprise level UI abstraction layer with data cache and queue.</p> <p>They just annou...
15,843,242
0
<p>Easy with do-while:</p> <pre><code>Scanner keyboard = new Scanner(System.in); int startr, endr; boolean good = false; do { System.out.println("Enter the Starting Number of the Range: "); startr = keyboard.nextInt(); if(startr % 10 == 0 &amp;&amp; startr &gt;= 0) good = true; else System.out.println("Numbers is not ...
32,722,441
0
Finding a single, or multiple values from a string of arrays in Javascript <p>I'm trying to search through my array for whatever number I put in, but it doesn't work as intended. </p> <p>In external javascript:</p> <pre><code>window.onload = startup; function startup() { runArraySequence () { writeArray.onclick = findA...
14,812,532
0
<p>The <code>develop</code> command wants to add a <code>.pth</code> entry for your project so that it can be imported as an egg. See the <a href="http://pythonhosted.org/setuptools/setuptools.html#development-mode" rel="nofollow">Development mode documentation</a>, as well as the <a href="http://pythonhosted.org/setu...
21,900,487
0
Acessing activity data from custom button <p>In my Android activity I have created members which I want to access from my custom button created dynamically. Is there a mechanism to do this? Thanks in advance.</p>
13,285,184
0
In Scala, what's the most idiomatic way to name the case class equivalent of an ORM class? <p>I have to work with Lift's Mapper (I know there might be better ORMs for Scala, but this is not something I have the power to change right now). Typically, with Mapper, a table is defined this way:</p> <pre><code>package com.s...
14,715,703
0
<p>you may use something like:</p> <p><code>var list = variants[stringToGetCorrespondingList]</code></p>
30,540,893
0
<p>In that case you should be performing a <code>LEFT JOIN</code> instead like</p> <pre><code>SELECT SH1.[Sticker Price], SH1.[Credit Price], SH1.[Cash Price], SH1.[Credit Price], UG.Description as Value, CASE ROW_NUMBER() OVER(ORDER BY UG.Description) WHEN 1 THEN 1 ELSE 0 END as ISDEFAULT FROM [uStore].[dbo].[ACL_Use...
39,071,641
0
<p>I see you found your solution, but for other's where this continues I had the same problem, until I simply 1. ran</p> <pre><code>adb wait-for-device </code></pre> <ol start="2"> <li>reconnected the device via usb</li> <li>changed "Use USB for" "File Transfers"</li> </ol>
24,646,887
0
convert a MQLONG value to string in c++ <p>How can I print a IBMMQ MQLONG value in c++ code. It gives a segmentation fault when I try to print</p> <pre><code>printf("Queue Persistance-&gt; %s\n ", pMsgDesc -&gt; Persistence ); </code></pre> <p>Thanks</p>
32,784,318
0
Add thread into thread array <p>Take a look at my code.</p> <pre><code>Thread[] connect_thread; public void thread_runned() { connect_thread = new Thread[dataGridView1.SelectedRows.Count]; for (int index = 0; index &lt; dataGridView1.SelectedRows.Count; index++) { connect_thread[index] = new Thread(new ThreadStart(conn...
14,603,704
0
<p>If they are for use in template files you can have a look at extract. <a href="http://php.net/manual/en/function.extract.php" rel="nofollow">PHP Manual extract</a>. It will extract all variables from an array into local variables.</p>
2,198,174
0
<p>XML loves recursion. It's a lot of work to lay out the nodes one-by-one or into some gigantic table grid -- your data format is heirarchical and your processing method should be as well.</p> <blockquote> <p>Yep. Tried it. I'm just having trouble getting my mind around the best way to do it. I could use tables. I co...
34,166,812
0
Hibernate/JPA: only one entry can have specific field value <p>I need something that seems not so specific but anyway I was unable to come up with nice and sophisticated solution.</p> <p>Say I have very simple hibernate/jpa entity:</p> <pre><code>@Entity(name="entity") public class Type { @Id @GeneratedValue(strategy=G...
38,370,714
0
jbehave override scenario failure strategy <p>I have jbehave configured to execute stories via embeddable class that is extended from JUnitStories via maven goal "run-stories-as-embeddables'.</p> <p>I'm trying to achieve the following: I would like not to fail maven goal in case scenario fail was caused by known bug in...
21,475,943
0
Not able to set compression mode to JPEG-LS in JAI <p>I am using JAI 1.1.3 for windows and configured Build path to include jai_codec , jai_core and jai_imageio jars. When i try to write a image with JPEG-LS mode i get the error. Do i need to do any other configuration for JAI.</p> <pre><code> import java.awt.image.ren...
5,792,952
0
how to read and edit .resx file <p>hey guys, i have an asp.net website. which has resource file, which contains a key known as <code>ControlTitle_userarticlemanage.Text</code> whose value is set to create/edit article. now i want to manage this key at runtime, now there is a page which has edit and add button when user...
3,413,805
0
<p>ARM support both big and little endian. This will most probably be set by the OS so it might be worth while checking this out beforehand.</p> <p>There is also the issue of padding to word size in a struct:</p> <pre><code>struct st { char a; int b; }; </code></pre> <p>will have a <code>sizeof</code> 8 and not the ex...
38,652,756
0
R: Removing unwanted `Variables sorted by number of missings:` from Graph <p>I am using the <code>VIM</code> package in R to plot missing values. I want to sort by number of values in the chart but dont want to see the section <code>Variables sorted by number of missings:</code>. The parameter <code>sortVars=TRUE,</cod...
34,615,817
0
<p>I got this problem too. It stuck when I ran: "heroku local web -f Procfile.windows" then I try to do it manually like this: "python manage.py runserver 0.0.0.0:5000" and it worked perfectly.</p>
38,466,293
0
<p>Maybe you could do this:</p> <pre><code>tagFile.Save() if(tagFile.Tag.Title == infoVar1) { MessageBox.Show("Tags saved successfully"); } </code></pre> <p>After saving the tags into a file, you can validate with some attribute like Title, album, etc. :)</p> <p>A simple question, which version(of taglib#) are you usi...
33,109,962
0
<p>You can do something like this:</p> <pre><code> private void AddHourlyTask(string task) { DateTime expiration = DateTime.Now.AddHours(1); expiration = new DateTime(expiration.Year, expiration.Month, expiration.Day, expiration.Hour, expiration.Minute, expiration.Second, expiration.Kind); OnCacheRemove = new CacheIte...
4,808,890
0
<p>Like Felice (+1) said mocking creates a proxy which means you need to either make things virtual (so Moq can work its proxying magic and override the property).</p> <p>As an alternative if you just want to squirt in a value you can manually stub the class you want to test and expose a means to get at the setter:-</...
16,012,521
0
<p>Use this custom Spinner class...</p> <pre><code>/** Spinner extension that calls onItemSelected even when the selection is the same as its previous value */ public class NDSpinner extends Spinner { public NDSpinner(Context context) { super(context); } public NDSpinner(Context context, AttributeSet attrs) { super(co...
12,728,552
0
<p>Try to declare tabhost as static and call in child activity as below..</p> <p>Instead <strong>private TabHost tabHost;</strong></p> <p>try <strong>static TabHost tabHost;</strong></p> <p>And in your Child Activity </p> <pre><code> AccidentTabActivity.tabHost.setCurrentTab(2); </code></pre> <p>Then you can set your ...
19,008,330
0
How can I best display this nested collection? (Can you tell me why my code isn't working?) <p>Can you tell me why this code isn't working?</p> <p>I have a viewmodel with an observablecollection of searchresults which has an observablecollection of resultproperties. I cannot seem to display the nested collection of res...
34,078,274
0
Rstudio freezes when loading some packages <p>When i was loading some packages like"rgl", "aplpack", whenever there's gonna be a red stop sign on the right top corner of console window.</p> <p>My Rstudio just freezes, like </p> <p><a href="https://i.stack.imgur.com/MQOsb.png" rel="nofollow noreferrer"><img src="https:/...
28,960,063
0
<pre><code>timeit.timeit(stmt='pass', setup='pass', timer=&lt;default timer&gt;, number=1000000) </code></pre> <p>Stupid question, the default number of times the statement is executed is one million... I should have read <code>timeit</code> doc before...</p> <pre><code>&gt;&gt;&gt; timeit.timeit('999 in list(xrange(1...
877,247
0
<p>I've spent some time working on this and came up with this to calculate someone's age in years, months and days. I've tested against the Feb 29th problem and leap years and it seems to work, I'd appreciate any feedback:</p> <pre><code>public void LoopAge(DateTime myDOB, DateTime FutureDate) { int years = 0; int mon...
4,895,469
0
<p>Did you try this ?</p> <pre><code>-o-transform: rotate(270deg); </code></pre>
1,917,990
0
<p>You say that the <code>?</code> is supposed to be for a table name, so you need to provide an actual table name before calling <code>Statement.executeUpdate()</code>. At that point the JDBC driver will tell the database to actually run the statement, so obviously all parameters need to be bound.</p> <p>Maybe you me...