pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
19,161,492
0
<p>Using joins would make it easier to follow, and afraid you have not said which field is giving a duplicate.</p> <p>For example the following is a quick hack (untested) at you code to eliminate some of the separate selects:-</p> <pre><code>&lt;?php $SQL = "SELECT ID, ItemID FROM IR_Logs"; $data = $db-&gt;getResults(...
33,102,488
0
Installation's object default ACL and security issue <p>I see on Data Browser that every new Installation's object has default ACL 'Public read and write' permissions. What is a security risk? And, if it is a security risk, how is possible solve it?</p>
18,278,498
0
<p>As it's already mentioned by taocp, the line refers to member initialization list.</p> <p>There are couple of ways to initialize members 1. member initialization list (efficient approach) 2. using assignment e.g. players = 10</p> <p>It might not make any difference for built-in types e.g. int, char but if you are a...
26,531,665
0
<p>Aside from <code>@see</code>, a more general way of refering to another class and possibly method of that class is <code>{@link somepackage.SomeClass#someMethod(paramTypes)}</code>. This has the benefit of being usable in the middle of a javadoc description.</p> <p>From the <a href="http://docs.oracle.com/javase/7/...
28,858,159
0
<p>Could be this bug...</p> <p><a href="http://bugs.python.org/issue11587" rel="nofollow">http://bugs.python.org/issue11587</a></p> <p>Which means it's a python version issue. One fix seems to be to use <code>METH_KEYWORDS | METH_VARARGS</code>.</p>
20,870,518
0
Switch between a headed and headless server when integration testing with capybara <p>Let's say I have web-rat and selenium installed. How do I test my rails app quickly with web-rat (using capybara) , and then, do one final integration test with selenium?</p>
10,831,319
0
<p>The <a href="http://msdn.microsoft.com/en-us/library/wxh6fsc7%28v=vs.100%29.aspx" rel="nofollow">access modifier</a> needs to be at least <a href="http://msdn.microsoft.com/en-us/library/bcd5672a%28v=vs.80%29.aspx" rel="nofollow"><code>protected</code></a>.</p> <pre><code>protected String myString = "Hi SO!"; </cod...
34,274,232
0
<p>This is a bug in Spring XD. See <a href="https://jira.spring.io/browse/INT-3908" rel="nofollow">INT-3908</a> for details.</p> <hr> <p>Following the <a href="http://stackoverflow.com/a/34216534/953327">suggestion</a> by Marius, the following is a suitable workaround:</p> <p>Edit <code>$XD_HOME/modules/processor/aggr...
9,105,042
0
SQL-Server - Stop success message when saving results to file <p>When running a query on <code>SQL Server</code> and using <code>Results to file</code> function, <code>SQL Server</code> automatically adds a success message at the end of the file that looks like this:</p> <pre><code>(2620182 row(s) affected) </code></pr...
3,008,175
0
<p><strike>Check out this tut on <a href="http://wpmututorials.com/how-to/a-reusable-widget/" rel="nofollow noreferrer">reusable WordPress widgets</a> :)</strike></p> <p>Using the <a href="http://codex.wordpress.org/Version_2.8#New_Widgets_API" rel="nofollow noreferrer">2.8 widget API</a>, widgets are natively re-usab...
12,057,266
0
<p>If K &lt;&lt; N, min heap is good enough because creation of heap is O(n), and if K &lt;&lt; N selecting first K items is at most O(N), otherwise you could use <a href="http://en.wikipedia.org/wiki/Selection_algorithm">selection algorithm</a> to find Kth smallest element in <code>O(n)</code> then select numbers whi...
29,900,158
0
<p>You can get min and max per user , then the rest you need to do from the client side - </p> <pre><code>{ "aggs": { "users": { "terms": { "field": "Name" }, "aggs": { "maxAge": { "max": { "field": "age" } }, "minAge": { "min": { "field": "age" } } } } } } </code></pre> <p>Here , you need to make a bucket per name us...
24,945,371
0
<p>The MSDN says in the docs about <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcell.rowindex(v=vs.110).aspx" rel="nofollow">RowIndex property</a></p> <blockquote> <p>When the RowIndex property returns -1, the cell is either a column header, or the cell's row is shared.</p> </block...
16,448,827
0
<p>The easiest way to get a complete working setup on Windows, including ming compiler, is to install a distribution such as <a href="https://code.google.com/p/pythonxy/" rel="nofollow">pythonxy</a> (my favorite) or <a href="https://www.enthought.com/" rel="nofollow">EDP</a>. </p>
16,665,676
0
<p>As far as I know the COL_NAME can't be replaced with "?". Android only takes "?" as "arguments", not as "selection"</p> <pre><code>final String query = "SELECT * FROM " + TBL_NAME + " WHERE COL_NAME=?"; final String[] args = new String[] {Long.toString(id)}; final Cursor c = db.rawQuery(query, args); </code></pre> ...
13,366,086
0
<p>I would like to bring some more precision. At least, for the most recent version of Symfony (2.1), the correct symtax (documented on the API) is:</p> <pre><code>&lt;?php public FormBuilderInterface createNamedBuilder(string $name, string|FormTypeInterface $type = 'form', mixed $data = null, array $options = array()...
12,084,622
0
<p>"Really only useful" is a little subjective, don't you think? If you're asking about whether it's more important to pre-compile templates used server-side as opposed to client-side, it usually is, simply because a server is going to have to render them potentially several thousand times a second so it's wasteful to...
25,815,403
0
<p>Once you have the duration,</p> <p>call this routine (but I am sure there are more elegant ways).</p> <pre><code>public String convertDuration(long duration) { String out = null; long hours=0; try { hours = (duration / 3600000); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); return ...
23,825,728
0
How do I implement timer with activiti bpmn <p>I have a requirement where the a task should wait for a asynchronous request to finish. The process should be verified at regular interval.The activiti workflow should send a request at every 10 min to check if the previous request is being approved. </p> <p>How do I confi...
11,979,266
0
<p>A common approach that works well is to use a work queue like <a href="https://github.com/defunkt/resque/" rel="nofollow">Resque</a>.</p> <p><strong>Managing the code</strong><br/> For ease of management, keep the processing code and the app "in the app". Deploy two app-servers but run resque workers on the process...
13,233,222
0
<p>In the wording in which you've posed the problem, the only correct solution is a double iteration over A and B and filter, as you've suggested. That's because you've stated the problem as to "construct the set C", which lacking other information, generally means to <em>enumerate</em> the set C. The only way to do t...
32,133,158
0
how to add text in svg object inside javascript <p>How can I add a text node inside javascript svg object . I am using this object , but I don't know how to add text into svg . </p> <pre><code> var circlemarker = { path: 'M-5,0a5,5 0 1,0 10,0a5,5 0 1,0 -10,0 z', fillColor:'yellow', //'#f39c13', fillOpacity: 0.8, scale:...
23,668,315
0
<p>Not sure how to do this in WP. However, you could use a little jQuery to figure out how many top-level nav items there are, round that number up (to support odd numbers of nav items) and then add a class to the last element that you want to appear on the left of the logo. Then style on that class to add space betwe...
29,545,552
0
<blockquote> <p>How can Interface be implemented, by which it can be accessible from all the activities, and called from any of the activity to call SDK API...</p> </blockquote> <p>The interface instance can be made a context singleton (lazily instantiated). So you may have a <code>static getInstance(Context)</code> t...
23,685,058
0
<p>It turns out there is H_SAVE_FP which saves files to an opened file pointer.</p> <p>The code then looks like:</p> <pre><code>FILE* fp = fopen("historyfile", "w"); ... cap_enter(); ... history(inhistory, &amp;ev, H_SAVE_FP, fp); </code></pre>
8,374,923
0
<p>They doesn't really reset the <code>wait_timeout</code> value but they do reset the "time since last command" so doing <code>SHOW SESSION VARIABLES</code> often enough would prevent the server to close the connection. So would <code>SELECT 1</code>.</p>
32,674,578
0
Binary operator '!=' cannot be applied to operands of type 'NSError' and 'NilLiteralConvertible' <p>I have the following code :</p> <pre><code>if ((error) != nil) { print(error, terminator: "") } </code></pre> <p>in my Swift program (converted to Swift 2 from Swift 1) </p> <p>But Xcode is complaining</p> <blockquote> <...
4,582,829
0
<p>I did it like this - it works in IE8, Fx3.6, Safari4, Chrome as opposed to the un-edited string which works in Fx but not in several other browsers:</p> <pre><code>new Date('2001-01-01T12:00:00Z'.replace(/\-/g,'\/').replace(/[T|Z]/g,' ')) </code></pre> <p>but I am sure someone will post a REGEX with backreferencing...
9,112,438
0
<p>In asp.net version 4 this 'hack' action of postback does not work because of the extra security checks that version 4 includes. The best way to do this using asp.net controls is to do a dynamic load of the controls. Here is some code that I have just checked and working.</p> <pre><code>protected void Page_Load(obje...
13,031,158
0
Unwanted left margin when using -webkit-transform: scale(...) <p>I am using wkhtmltopdf (which uses the Webkit rendering engine) to convert HTML files to PDF documents. The generated PDFs are A4. In other words, they have fixed dimensions, and thus a limited width.</p> <p>One of the tables in my PDF contains images, wh...
3,377,461
0
<p>Firstly, using Task Manager to determine memory usage is fraught with peril. Have a read of <a href="http://www.itwriting.com/dotnetmem.php" rel="nofollow noreferrer">this article</a> to gain a clearer understanding of it.</p> <ul> <li>What other libraries are you referencing?</li> <li>What files are you loading, i...
26,493,168
0
<p>You want to call <code>$user-&gt;username</code> not <code>$user-&gt;$username</code>.</p> <pre><code>&lt;?php require_once 'core/init.php'; $user = DB::getInstance()-&gt;get('users', array('username', '=', 'alex')); if(!$user-&gt;count()) { echo 'No User'; } else { foreach($user-&gt;results() as $user) { echo $use...
25,258,630
0
Mapping a DFS using NET Use remotely throwing Error 1312.A specified logon session does not exist. It may already have been terminated <p>I am trying to map a distributed file system (DFS) from a remote machine using net use $drive_letter $target $password /user:domain\username</p> <p>If I do this by logging to the mac...
40,826,413
0
Issue about the return value of sengmsg for udp <p>is there a partially-sent data when calling sendmsg for udp non block socket? when i want to data with a length of 5000, is there any possibility the sendmsg api just sent out 3000 or just return -1 with a errno EMSGSIZE? thanks</p>
815,253
0
How to clone StackOverFlow JQuery Interface? <p>Is there any opensource samples of JQuery usages of StackOverFlow-like sites...... </p> <p>Any help in this direction??</p>
12,927,795
0
<p>You cannot auto-start application on TV launch.</p> <p>The only way is to use custom firmware like SamyGo (http://www.samygo.tv/)</p> <p>About the "background process"... as far as we assume that JavaScript's <code>setTimeout</code> or <code>setInterval</code> can be used to execute application's "internal" backgro...
18,698,621
0
<p>I ended up creating this little baby:</p> <p><a href="https://gist.github.com/carstengehling/6495127" rel="nofollow">https://gist.github.com/carstengehling/6495127</a></p> <p>Works quite nice for the purpose. A bit like rollout, though not user-specific and using AR instead of Redis.</p> <p>Anyone else who finds th...
38,672,248
0
<p>Ok, so i found the answer my self. before Triggering the animation event Rebind the Animator.</p> <pre><code> Animator anim = player.GetComponent&lt;Animator&gt;(); anim.Rebind(); </code></pre>
18,089,916
0
<p>As J L said, the easiest way by far is to use jQuery .click() with an appropriate locator. Check out: <a href="http://api.jquery.com/class-selector/" rel="nofollow">http://api.jquery.com/class-selector/</a></p> <p>You might also want to use <a href="http://api.jquery.com/jQuery.contains/" rel="nofollow">contains</a...
5,859,273
0
Domain name registered for client and they want to transfer it to another domain host. OK to charge them for the domain name? <p>I am a freelance programmer and often I will register a domain name for a client under a domain name reseller (and of course under my account). </p> <p>I wanted to know if there is any standa...
3,156,892
0
peer to multi-peer interprocess communication <p>What is the best method for peer to multi-peer interprocess communication in windows. ( One application will send interrupts to many listeners ) One method comes to my mind is to use SendMessage with the HWND_BROADCAST parameter. What else I can do?</p>
1,924,360
0
<p>You might set <code>DoubleBuffered</code> to true on your control / form. Or you could try using your own Image to create a double buffered effect.</p> <p>My <code>DoubleBufferedGraphics</code> class:</p> <pre><code>public class DoubleBufferedGraphics : IDisposable { #region Constructor public DoubleBufferedGraphic...
36,685,976
0
How to retrieve function name from function address using link register (like backtrace_symbol) in linux <p>I want to write c program (like backtrace) I am getting the address of functions but I don't know how to convert those address to symbols (function name ). Please help me </p>
8,716,961
0
<p>Have you verified that <code>tableViewController</code> is not nil? </p> <p>your <code>@property</code> should definitely be strong as the view controller is taking ownership of the entity. A <code>weak</code> reference will definitely nil out.</p> <p>Likewise I would also put a breakpoint in the debugger and <stro...
16,800,534
0
Purposefully exiting process for a dyno restart on heroku <p>I've got a phantomjs app (<a href="http://css.benjaminbenben.com" rel="nofollow">http://css.benjaminbenben.com</a>) running on heroku - it works well for some time but then I have to run <code>heroku restart</code> because it requests start timing out.</p> <p...
17,185,050
0
<p>This sounds like a homework question.... from networking 101.</p> <p>In any case, TCP connections are uniquely identified by the following properties: source IP address, source port, destination address, and destination port.</p> <p>Do an internet search for "TCP 4-tuple" or "TCP 5-tuple" for more details.</p>
28,746,323
0
I have to click twice to activate function using jQuery <p>I am having a lot of trouble with jQuery. I have to click twice on a button to make the page disappear. I have tried importing both versions of jQuery and I tried to use the fadeOut() function on different elements, but nothing has prevailed. It works the secon...
25,809,108
0
<p>This uses the codename as a <em>String</em></p> <pre><code>Sub CodeIt() Dim CodeName As String CodeName = "Sheet1" Dim WS As Worksheet, GetWorksheetFromCodeName As Worksheet For Each WS In ThisWorkbook.Worksheets If StrComp(WS.CodeName, CodeName, vbTextCompare) = 0 Then Set GetWorksheetFromCodeName = WS Exit For En...
27,489,169
0
Dynamic StringGrid C++ Builder <p>I created a program in C++Builder 6 and I have a problem now.</p> <p>I have 6 files: <code>Unit1.cpp</code>, <code>Unit1.h</code>, <code>Unit2.cpp</code>, <code>Unit2.h</code>, <code>Unit3.cpp</code>, <code>Unit3.h</code>.</p> <p><code>Unit1.cpp</code> is file for main form.</p> <p>Pro...
36,030,762
0
<p>Are you looking for mere joins? Put your two queries in your <code>FROM</code> clause and join them on <code>customer_id</code>, then join with the <code>customers</code> table and show the results.</p> <pre><code>select c.id as customer_id, c.first_name, c.last_name, c.preferred, period1.label_cost as period1_labe...
7,093,870
0
GooglePlaces api to get information about stores iphone application <p>In my iPhone application, i want to show nearest stores to given latitude and longitude. </p> <p>I have used googlePlaces api to get nearby stores to given location coordinates. </p> <p>But i want to get other information about stores as well like o...
19,681,566
0
PostgreSQL timestamp select <p>I'm using Posture and I got error message "invalid input syntax for type timestamp with time zone" when using the following select code:</p> <pre><code>SELECT * FROM public."table1" WHERE 'registrationTimestamp' BETWEEN to_timestamp('22-10-2013 00:00', 'DD-MM-YYYY HH24:MI') AND to_timesta...
36,440,387
0
<p>Get rid of your loop. <code>std::find()</code> (and <code>std::find_if()</code>) does the necessary looping for you.</p> <p><code>std::find()</code> (and <code>std::find_if()</code>) returns an iterator to the element if found, or the specified <code>last</code> iterator if not found. If the element is found, pass ...
24,208,746
0
<p>That's a warning your browser gives. When you take the solution live, buy a certificate and associate with your domain(be exact - wildcard or root certificate) and the warning will go away, and a beatiful lock will come to show the world how safe your site is. :-)</p>
30,186,283
0
WebRTC: One to one Audio call not working in different machine <p>I am trying to implement a one to one audio call using webRTC (signalling using websockets) . But it works when i try it in one system using multiple tabs of chrome (localhost). When I try to hit my server from another machine it does initial handshakes ...
25,438,633
0
<p>This happens because you are running in 'this' context. As a result what ever you changing in $(this) will get hoisted to top of the function. A simple example:</p> <pre><code>$('#txt').click(function () { console.log(this); var a = 10; var b = 20; var c = a+b; console.log(c); $(this).text('changed!'); $(this).attr...
12,179,319
0
blending colors ios <p>I want to rectangular crop the eye from one face and paste it on another face, so that in the resulting image skin color of portion of eye blend nicely with the face color of the persons on which we are pasting eyes. I am able to crop and paste, but having problem with blending. Currently, the bo...
6,703,693
0
<p>In the loop, you are going from <code>0</code> to the length of <code>alarmDetailsSeparated</code>. This is fine, but you are then indexing <code>alarmDetailsSeparated</code> using <code>i+1</code> and <code>i+2</code>.</p> <p>This means that when the loop is at <code>alarmDetailsSeparated.Length-2</code> the progr...
14,745,605
0
<p>I tried reproducing this in a simple <a href="http://jsbin.com/abaveh/1/edit" rel="nofollow">jsbin demo</a> to no avail. Drag and drop seems to work without losing the content. The code I've used was this:</p> <pre><code> &lt;textarea class="editor" style="width: 400px"&gt;Editable Content&lt;/textarea&gt; &lt;text...
19,169,086
0
fprintf is not declared in this scope <p>I'm trying to run this code in code blocks 12.11 and keep getting this error:fprintf is not declared in this scope</p> <pre><code># include &lt;GL/glew.h&gt; # include &lt;GL/freeglut.h&gt; using namespace std; //any time the window is resized, this function is called. It set up...
315,300
0
<p><strong>TFOOT Customisation:</strong></p> <p>The footer will always default to creating the same number of cells as the rest of the gridview. You can override this in code by adding:</p> <pre><code>protected void OurGrid_RowCreated(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.Foot...
32,514,840
0
<p>The actual problem was I was not binding them both with another object. (REPL) Additional Info: Because the companion object and the class must be defined in the same source file you cannot create them in the interpreter. source: daily-scala work around: bind both with some object in REPL or as user #shadowlands sa...
32,237,671
0
<p>I thought so (the <strong>32 bit</strong> part). You're running into a problem generated by <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa384253(v=vs.85).aspx" rel="nofollow">Registry redirection</a>.</p> <p>In other words (on 64bit <em>Windows</em>), for some registry keys (this one included)...
40,506,235
0
<p>You can do it like : </p> <pre><code>ResultSet rs = stmt.executeQuery(sql); String result = null; if (rs.next()) { // replace 'if' with 'while' to iterate if multiple records result = rs.getString("result"); } </code></pre> <p>if you have more records, you can replace <code>if</code> with <code>while</code> and can...
12,446,859
0
<p>Since you also have the <code>sql-server</code> tag on your question, unfortunately sql-server doesn't have <code>GROUP_CONCAT</code>, an alternative like <a href="http://stackoverflow.com/questions/451415/simulating-group-concat-mysql-function-in-ms-sql-server-2005">FOR XML / STUFF</a> is needed:</p> <pre><code>SE...
20,729,835
0
<p>You can use the knockout.js context debugger chrome extension to help you debug your issue</p> <p><a href="https://chrome.google.com/webstore/detail/knockoutjs-context-debugg/oddcpmchholgcjgjdnfjmildmlielhof" rel="nofollow">https://chrome.google.com/webstore/detail/knockoutjs-context-debugg/oddcpmchholgcjgjdnfjmild...
4,788,126
0
<pre><code>function handle_form($fields, $POST) { $data = array(); foreach ($fields as $field) { if ($field-&gt;type == "file") do_upload($field-&gt;post); $data[$field-&gt;name] = $POST[$field-&gt;post]; } $this-&gt;db-&gt;insert('table', $data); } </code></pre>
14,553,627
0
<p><strong>edit</strong>: even GCC doesn't let you do this! Corrected.</p> <p>In general, no. You could hack together a macro using <code>__FILE__</code>, <code>__LINE__</code>, and/or <code>__COUNTER__</code> (the latter being another compiler extension, but supported on GCC and MSVC among others) to name the fields ...
4,829,249
0
<p>i think i read somewhere that it is more difficult to add table rows to an existing table. it had something to do with some browsers adding a tbody tag for you and other browsers not liking a tr tag that doesn't have a table tag wrapped around it (ie).</p> <p>if possible, you could convert your table to divs (or po...
19,119,752
0
<p>So after a long profiling session, with XDEBUG, phpmyadmin and friends, I finally narrowed down what the bottleneck was: the mysql queries</p> <p>I enabled </p> <p><code>define('SAVEQUERIES', true);</code></p> <p>to examine the queries in more detail and I output the queries array to my debug.log file</p> <pre><cod...
8,253,649
0
tt_news - where is the register "newsMoreLink" be defined? <p>The extension tt_news is very useful for me but there is this little thingy called "register:newsMoreLink". This register does contain the singlePid of the contentelement (defined a single view page) and the uid of the newsarticle from the news extension. </...
20,279,340
0
<p>Let's start from the beginning. Since <code>fs</code> is a <code>List[Future[T]]</code>, you know <code>x</code> is a <code>Future[T]</code>.</p> <p>You need to register a callback that will fire when the result of <code>x</code> becomes available. The easy way to do this is with <code>onComplete</code>, which take...
36,287,102
0
<p>For Junk values, Try to change the baud rate!<br/><br/> I think you are sending a data from BT device to android device only one time. try running the code continuously in arduino device. </p> <p><code>while(1){ loop(); }</code></p>
7,732,831
0
<p>Assuming you want to use <code>Ada.Text_IO</code> and not just <code>Put_Line</code> specifically, and assuming that <code>Number_Of_Rows</code> is meant to be an integer range like <code>Num_Char</code>, that would be</p> <pre><code>for R in The_Chars'Range (1) loop for C in The_Chars'Range (2) loop Ada.Text_IO.Pu...
6,306,529
0
<p>You can limit your search results, from the <a href="http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/ref-dialog-java-search.htm" rel="nofollow">Java Search</a> tab, if you are employing Java Search in the first place.</p> <p>Searches can be limited to References, Declarations, Imp...
10,704,232
0
<p>Another option is to just use Resharper's To-do Explorer window, which you probably already have and if not, should have. You can dock it right with the other windows. It parses all the files (cs, js, css, etc.).</p>
22,969,828
0
<p>I recommend you use jQuery, this works:</p> <pre><code>$("#city").change(function (e) { e.preventDefault; var city = $("#city option:selected").text(); if ( city == "Berlin" ) { alert("You are in Berlin"); } }); </code></pre>
40,855,257
0
<p>Another nice workaround is to declare a static instance of your view model in App.xaml: <code>&lt;ViewModelTypeName x:Key="ViewModelName" d:IsDataSource="True" /&gt;</code>and bind like this <code>Command="{Binding Source={StaticResource ViewModelName}, Path=MyCommand}"</code> I had the same issue when i needed to ...
5,767,250
0
<p>Upgrade to Xcode 4.0.2. </p> <p>It fixed this issue (crash on launch for ARMv6 but not ARMv7 with optimization turned on) for us.</p>
11,899,486
0
<p>The most efficient seems to be setting the opacity in my tests. Another simple approach is to redraw the visuals that are affected.</p> <pre><code>using (DrawingContext dc = RenderOpen()) {} //Hide this visual </code></pre> <p>And then redraw when they become visible again.</p> <p>Rendering a blank drawingcontext s...
36,824,566
0
Calling a method individually by class selector <p>In my blog I'm using Pico CMS, in the index.twig page I wrote this code that generates HTML with page title, description, and URL:</p> <pre><code>{% for page in pages|sort_by("time") %} {% if page.id starts with "blog/" %} &lt;div class="post"&gt; &lt;h3&gt; &lt;a clas...
39,537,192
0
R plot.xts error bars <p>Trying to put error bars on a time series plot using <code>plot.xts</code></p> <pre><code>&gt; myTS[1:20] [,1] 2013-07-01 29 2013-07-03 24 2013-07-03 16 2013-07-03 16 2013-07-03 12 2013-07-03 12 2013-07-03 16 2013-07-03 21 2013-07-03 21 2013-07-03 16 2013-07-05 12 2013-07-05 12 2013-07-05 12 20...
12,763,310
0
<p>It seems, that your problem has indeed to do with UTF-8. I analyzed your example pages with firebug, and it revealed, that the html pages contain the <strong>UTF-8 BOM-header</strong>, but the untranslated page contains it twice!</p> <p>These 3 characters ( ) at the begin of the file are written by your editor, ...
26,094,832
0
Load https site in iframe on http site <p>We want to load a page of our platform into an iframe on a client site. Our platform contains a SSL certificate and runs always on HTTPS. The client's site runs on HTTP. </p> <p>The URL that get's loaded into the iframe contains URL params for the name of the user. Are these ur...
16,197,555
0
Keeping std::map balanced when using an object as key <p>I am writing some code where I am storing lots of objects that I want to get back based on set criteria. So to me it made sense to use a map with an object as a key. Where the object would contain the "set criteria".</p> <p>Here is a simplified example of the kin...
8,327,569
0
<p>Here:</p> <pre><code>public static bool TryConvertToInt32(decimal val, out int intval) { if (val &gt; int.MaxValue || val &lt; int.MinValue) { intval = 0; // assignment required for out parameter return false; } intval = Decimal.ToInt32(val); return true; } </code></pre>
11,192,505
0
Update MySQL field; condition = string field between two numbers <p>I am trying to update a field's value if a string column is between two numbers.</p> <pre><code>UPDATE SAMPLE.EXAMPLE SET modNum = CONCAT(modNum,"26") WHERE modNum NOT LIKE '%26%' AND (procKey BETWEEN 90000 AND 99123 OR procKey = 77444); </code></pre> ...
5,709,094
0
Raise an event from inside native c function? <p>I am developing an application that does a callback to a native c function after playing a system sound. I would like to raise an event when this happens, so a subscriber on my view may handle it.</p> <pre><code>-(void) completionCallback(SystemSoundID mySSID, void* myse...
36,267,484
0
<p>My guess is that you're experiencing a compiler bug. The <code>format</code> keyword, as any other keyword declared with <code>BOOST_PARAMETER_KEYWORD</code> from <a href="http://www.boost.org/doc/libs/1_60_0/libs/parameter/doc/html/index.html" rel="nofollow">Boost.Parameter</a>, is indeed a constant reference. How...
2,817,383
0
Basic PHP logic problem <pre><code>$this-&gt;totplpremium is 2400 $this-&gt;minpremiumq is 800 </code></pre> <p>So why would this ever return true?!</p> <pre><code>if ($this-&gt;totplpremium &lt; $this-&gt;minpremiumq){ </code></pre> <p>The figures are definitely correct and I am definitely using the 'less than' symbol...
10,217,013
0
<p>You are probably talking of a borderless <code>NSWindow</code> (<code>NSBorderlessWindowMask</code>), with an opaque background view whose alpha is set to zero and an <code>NSProgressIndicator</code> subview to show the progress. You also probably want to use the <code>-[NSWindow center]</code> method to nicely cen...
25,719,276
0
<p>The first useful clue is the result of running both commands in the REPL:</p> <pre><code>&gt;&gt;&gt; f = open("asdf.txt","r") &gt;&gt;&gt; f.close &lt;built-in method close of file object at 0x7f38a1da84b0&gt; &gt;&gt;&gt; f.close() &gt;&gt;&gt; </code></pre> <p>So <code>f.close</code> itself returns a method, tha...
6,761,085
0
<p>Your regex works. There are no spaces left at the end of the line after you run it. </p> <p>What you probably see is the "residual" incremental highlighting that would go away if you used<br> <code>:%s/[ ]\+$//g</code>. — Note the <code>\+</code> instead of the <code>*</code>. the incremental highlighting remains b...
30,311,092
0
<p>Put the DNX version inside the global.json file which lives on the root directory of your solution (like <a href="https://github.com/aspnet/Home/blob/239906e943b576d4ffd80bdaf855376aef737c63/samples/1.0.0-beta4/global.json" rel="nofollow noreferrer">here</a>). </p> <pre><code>{ "sdk": { "version": "1.0.0-beta4" } }...
24,656,965
0
Slow query using < in a table with 4.000.000 rows <p>My purchasedItems table with approx. 4 million rows:</p> <pre><code>itemId | orderQuantity | inStockQuantity | backorderQuantity | backorderOrderedQuantity </code></pre> <p>My query:</p> <pre><code>SELECT * FROM purchasedItems WHERE backorderOrderedQuantity &lt; back...
27,813,520
0
<p>Probably a bit late but I had the same problem and found that this can be avoided if you use a different Connection Mode when connecting to a remote Queue. By default the <code>MQConnectionFactory</code> uses <code>WMQ_CM_BINDINGS</code> as it's connection mode. If you change it to <code>WMQ_CM_CLIENT</code> (or wh...
19,618,222
0
<p>I think you have to put all your functions inside your class file</p> <pre><code> Class resize { private $image; private $width; private $height; private $imageResized; function __construct($fileName) { // *** Open up the file $this-&gt;image = $this-&gt;openImage($fileName); // *** Get width and height $this-&gt;w...
33,090,032
0
How can I transform an image for Apple Watch? <p>This question is mentioned in explaining <a href="http://stackoverflow.com/questions/33089008/how-can-i-get-a-glance-interface-controller-blank-slate-for-apple-watch">How can I get a [Glance] Interface Controller / blank slate for Apple Watch?</a> , but is a separate bas...
32,404,176
0
<p>would something like this work? <a href="http://jsfiddle.net/swm53ran/312/" rel="nofollow">http://jsfiddle.net/swm53ran/312/</a></p> <p>if you want to see how the structure could happen over and over again, you could just add the sectioned off divs like in this fiddle: <a href="http://jsfiddle.net/swm53ran/313/" re...
5,838,508
0
<p>The problem is likely to be at the 2nd <code>cur = cur-&gt;next;</code>, which follows the <code>while</code> loop - at that point the loop has guaranteed that <code>cur == NULL</code>.</p> <p>I'm not sure what you're trying to do in that function (has some code been elided for the example?), so don't really have a...