pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
26,294,033
0
.htaccess RewriteCond %{REQUEST_FILENAME} !-d not working <p><code>.htaccess</code> code is,</p> <pre><code>RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^p/([A-Za-z0-9-_]+)/?$ redirect.php?url=$1 [NC,L] # RewriteRule ^[A-Za-z0-9-_]+/([A-Za-z0-9-_]+)/...
28,157,816
0
<p>See <a href="http://stackoverflow.com/questions/20495302/transparent-background-with-three-js">Transparent background with three.js</a> for transparent background rendering and then you can apply CSS gradients <a href="http://www.w3schools.com/Css/css3_gradients.asp" rel="nofollow">http://www.w3schools.com/Css/css3...
35,626,058
0
<p>There's no built-in way to get INSERTs for all the rows in a result set using SQL Assistant. </p> <p>There's an ugly workaround using the <code>CSV</code>-UDF like:</p> <pre><code>WITH cte AS ( -- put your select here SELECT * FROM dbc.tablesV ) SELECT * FROM TABLE (CSV(NEW VARIANT_TYPE( -- you need to list each co...
9,135,181
0
<p>an activity is not finished / destroyed on back pressed.</p> <p>Use </p> <pre><code> @Override public void onBackPressed() { finish(); } </code></pre>
21,386,882
0
<p>I think you must ask google about the way they get their results, but I don't think that maps.google.com is a simple implementation of the Maps-API/Services.</p> <p>However, <a href="https://developers.google.com/places/documentation/search#TextSearchRequests" rel="nofollow">textSearch</a> will give you the result:...
23,519,427
0
<p>I finally found a solution.</p> <p>the command <strong><code>vdir -lib $lib -prop dpnd $entity</code></strong> returns you something like this:</p> <pre><code> data: ENTITY E1 # Depends on: P ieee std_logic_unsigned RYmj:=TK`k=k&gt;D@Cz`zoB3 # Depends on: P ieee std_logic_arith 4`Y?g_lldn;7UL9IiJck01 # Depends on: ...
13,888,765
0
Liking my page on Facebook shows the wrong image <p>I've just updated my site to include og: tags and add Facebook like buttons, twitter buttons, etc. However, when I click the Like button and then go look at my Facebook profile, the image used is wrong.</p> <p>This is the page on my site I'm referring to: <a href="htt...
33,397,365
0
android duplicate provider authority on apps that don't have provider <p>I have 7 apps on store, but when I try to install 3 of them I get duplicate provider authority error on the second of these 3 that I try to install.</p> <p>none of my apps have provider in manifest...</p> <p>any idea?</p>
9,521,567
0
convert a Matlab code into C code <p>I'm trying to understand and learn the C language, and since I used to work in Matlab, I'm interested in knowing how this code would be converted into C. </p> <pre><code>for j=1:n v=A(:,j); for i=1:j-1 R(i,j)=Q(:,i)'*A(:,j); v=v-R(i,j)*Q(:,i); end R(j,j)=norm(v); Q(:,j)=v/R(j,j); en...
35,908,551
0
<p>The answer was increadibly simple, thanks for the reference to <code>ICollectionViewLiveShaping.IsLiveSortin</code> from @KornMuffin. </p> <p><a href="https://msdn.microsoft.com/en-us/library/system.componentmodel.icollectionviewliveshaping.islivesorting(v=vs.110).aspx" rel="nofollow">https://msdn.microsoft.com/en-...
5,800,039
0
<p>It's so easy, just call <a href="http://msdn.microsoft.com/en-us/library/system.data.datatable.readxml.aspx" rel="nofollow">DataTable.ReadXml</a></p>
2,576,426
0
<p>On the irony side, I am currently updating the SCSF documentation for ClickOnce deployment for .NET 4.0, and now I know exactly what the problem it. </p> <p>First, you want to publish to a disk location, not directly to the webserver. So do that, and then copy the dll's you want to add to the deployment into the ve...
15,785,214
0
<p>I found a compatibility <a href="https://github.com/BoD/android-switch-backport" rel="nofollow">solution</a> that you could try.</p>
7,528,341
0
xsel for windows equivalent API or command line? <p>Is there an API or command line utility that returns the currently selected text from either active window or even globally, like the linux utility "xsel" ?</p> <ul> <li>I don't mind getting less than 100% success.</li> <li>i know that each window can have its own tex...
8,961,558
0
unable to get the value of the text field with the help of respective checkboxes. please help <p>I've a doubt. I've 3 textboxes and each is having checkboxes next to it. I want to display the values of only those textboxes whose respective checkboxes are clicked. Following is the attached HTML and PHP codes:</p> <pre><...
28,138,577
0
<p>If I understand correctly, you can do this with conditional aggregation. Just find the minimum and maximum prices in a subquery, and then pull the data out for those:</p> <pre><code> SELECT b.brand_name, minmax.price_max, max(case when m.price = minmax.price_max then m.product_id end) as max_product_id, max(case wh...
22,931,813
0
<p>I guess you need this one,</p> <pre><code>UPDATE [Table] SET Active = 1, Subscribed = 1, RenewDate = GETDATE(), EndDate = DATEADD(mm,1,getdate()) OUTPUT INSERTED.TABLE_PrimaryKeyID WHERE SC = @SC AND Service = @Ser </code></pre> <p>Main source: <a href="http://stackoverflow.com/questions/1610509/getting-the-id-of-a...
40,189,478
0
Training Time for Eigenfaces using Opencv c++ <p>I'm currently training a database of Eigenfaces using Opencv. I have 50 persons in my database with 250 pictures each, and I use all Eigenfaces and its been 2 days since I started training and it still is not finished. How long should I still wait? and is 250 for each pe...
37,923,173
0
<p>I came across the same issue when I did all the setup and run for django with Python3 but ran the following command:</p> <pre><code>$ python manage.py migrate </code></pre> <p>fixed the issue by using a consistent version of Python:</p> <pre><code>$ python3 manage.py migrate Operations to perform: Apply all migrati...
4,548,504
0
<p>You can use this function to get query string value:</p> <pre><code>function getParameterByName( name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&amp;]"+name+"=([^&amp;#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null...
32,541,629
0
<p>You could do it either inside the controller itself:</p> <pre><code>public function update(Request $request) { // Get the current users IP address and add it to the request $request-&gt;merge(['ip_address' =&gt; $_SERVER['REMOTE_ADDR']]); // Validate the IP address contained inside the request $this-&gt;validate($r...
20,131,248
0
How to edit header.tpl in CMS Made Simple <p>I am new in CMS Made Simple and I need to edit header.tpl file. I found the file location here tmp/templates/header.tpl but when I do any change in this file, it does not affect anything at frontend.</p> <p>I need the help to edit header.tpl file. </p>
8,367,728
0
iphone : How to keep 3G/GPRS preferred network in presence of Wifi? <p>I am developing an application that communicates (UDP communication) with our server remotely through 3G/GPRS. As we have to establish serial communication with a digital device and our application through Wifi.</p> <p>Now the problem is that when a...
39,120,995
0
Some problems with android listview <p>I am trying to make some practice about android <code>ListView</code>. Code bellow is in a<br> <code>listfragment</code>:</p> <pre><code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ View view= inflater.inflate(R.layout.frag_get...
38,693,408
0
<p>Just make the average of the percentages:</p> <pre><code>=AVERAGE(B1:B7) </code></pre>
32,834,646
0
<p>You can use <code>NOT EXISTS</code> to exclude holidays:</p> <pre><code>SELECT * FROM time_dimension ti WHERE NOT EXISTS(SELECT 1 FROM tbl_holidays WHERE startdate = ti.db_date) AND day_name IN ('Monday','Tuesday','Wednesday','Thursday','Friday'); </code></pre>
33,270,235
0
<p>Let me try a few suggestions in hopes that you can let us know what you are experiencing...</p> <blockquote> <p>On the template are you using an inline macro (i.e. - calling the content using <code>@Model.bodyContent</code>) or,</p> <p>Are you calling the umbraco field with <code>&lt;umbraco:Item field="bodyContent...
974,644
0
<p>I haven't tried it yet, but <a href="http://www.svnmonitor.com/" rel="nofollow noreferrer">SVN-Monitor</a> might be useful. You will need ToirtoiseSVN client mentioned above to work with it.</p>
2,059,665
0
Why can't I forward-declare a class in a namespace like this? <pre><code>class Namespace::Class; </code></pre> <p>Why do I have to do this?:</p> <pre><code>namespace Namespace { class Class; } </code></pre> <p>Using VC++ 8.0, the compiler issues:</p> <blockquote> <p>error C2653: 'Namespace' : is not a class or namespac...
6,064,943
0
Nuget package not adding reference on custom package <p>I created a nuspec file:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"&gt; &lt;metadata&gt; &lt;id&gt;MyPackage.dll&lt;/id&gt; &lt;version&gt;3.5&lt;/version&gt; &lt;authors&gt;Me&lt;/autho...
32,911,844
0
<p>I made some assumptions on your UI. Rather than placing the items as radio buttons in a <code>ComboBox</code>, I placed all of the doughnuts and coffees into a respective <code>GroupBox</code>. The concepts of this answer will still apply, however you'll just have to be mindful that this is not directly drop-in and...
17,673,912
0
<p>Use can u create service using broadcast reciever on device boot up</p> <pre><code> &lt;receiver android:enabled="true" android:name=".YourReceiver" &lt;intent-filter&gt; &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt; &lt;category android:name="android.intent.category.DEFAULT" /&gt; &lt;/inten...
17,021,394
0
<p>You can use a span element inside parapragh elements so it would look like this:</p> <pre><code>&lt;p class="top_dr_profle"&gt; &lt;span class="my_doc_pic"&gt; &lt;img src="images/profile_img.png" /&gt; &lt;/span&gt; &lt;/p&gt; </code></pre>
10,230,062
0
Hibernate flush method <p>I have the following piece of code that inserts or updates a bean in the database. I have a static function in the <code>HibernateUtil</code> that returns a singleton instance from the Hibernate session.</p> <pre><code>hibSession = HibernateUtil.currentSession(); hibSession.saveOrUpdate(bean);...
10,317,784
0
<p>Yes, you are doing this correct. Ignore the singleton comment, singletons are a good thing to avoid.</p> <p>Although I do want to make a suggestion:</p> <p>I'm going to assume BD is some kind of database. The power of OOP is the ability to subclass things, and replace objects without changing behaviour.</p> <p>So i...
31,329,158
1
Manipulating validated data in Colander SchemaNode <p>I have a set of Colander SchemaNodes used with Pyramid/Cornice in an API. For some querystring args, a range is passed (ie <code>time=X-Y</code> means a time range from X to Y where X and Y are integers representing epochs). I currently validate this with a <code>Re...
32,384,750
0
Function not printing after running <pre><code>*EDITED* </code></pre> <p>I fixed some issues but i'm still calling it wrong. Somehow when i don't declare with int the GetRand function more than once i get more error messages.</p> <p>What i want as a final result is to print the array i created and also print the maximu...
18,460,919
0
SQL Order By not working properly <p>I have a table like this</p> <pre><code> CREATE TABLE [dbo].[tbl_LandRigs]( [ID] [int] IDENTITY(700000,1) NOT NULL, [Company] [nvarchar](500) NULL, [Rig] [nvarchar](500) NULL, [RigType] [nvarchar](200) NULL, [DrawWorks] [nvarchar](500) NULL, [TopDrive] [nvarchar](200) NULL, [RotaryT...
20,713,604
0
<p>First of all, for capabilities, if it's a fixed list of capabilities you're working with, you're probably better off with having a number of booleans on the roles table, e.g. <code>can_create_projects</code>, <code>can_create_users</code>, etc., which encode the abilities of each role.</p> <p>Then your CanCan Abili...
34,416,942
0
<p>You can handle PreviewMouseDown Event of the ScrollViewer. In your xaml:</p> <pre><code>&lt;Grid&gt; &lt;!--Button is removed as it will be not used--&gt; &lt;ScrollViewer Background="{x:Null}" Margin="20" PreviewMouseDown="ScrollViewer_MouseDown"&gt; &lt;StackPanel Orientation="Horizontal" Background="{x:Null}"&gt...
13,268,023
0
<p>Apart from rectForRowAtIndexPath you need to consider the scrolling.</p> <p>Try this code:</p> <pre><code> // Get the cell rect and adjust it to consider scroll offset CGRect cellRect = [tableView rectForRowAtIndexPath:indexPath]; cellRect = CGRectOffset(cellRect, -tableView.contentOffset.x, -tableView.contentOffse...
26,453,980
0
<p>The generic method would be to use <code>left join</code> and aggregation:</p> <pre><code>select count(distinct d1.user) as NumEvent1, count(distinct d2.user) as NumEvent2, count(distinct d3.user) as NumEvent3 from data d1 left join data d2 on d2.user = d1.user and d2.time &gt; d1.time and d2.event = 'event2' left ...
4,643,006
0
<p>I have a method that adds model state to temp data. I then have a method in my base controller that checks temp data for any errors. If it has them, it adds them back to ModelState.</p>
23,659,154
0
<pre><code>def transcript_search(search_parameter,files): for line in files: if search_parameter in line: return line else: print('Invalid entry') files = open('/Users/labadmin/Desktop/example.gtf', 'r') gene_id = input("Enter the gene_id:") transcript_search(gene_id,files) </code></pre> <p>Don't use file. As that is ...
29,631,795
0
TSQL: Prevent Nulls update over existing data <p>I have 2 tables:</p> <ol> <li><p>Orders (Table I update and want keep existing data, and prevent overwriting with nulls)</p></li> <li><p>WRK_Table (This table is identical to <em>Orders</em> but can not guarantee all columns will have data when running update)</p></li> <...
28,646,766
0
<p>In my case what solved the problem was the folowing:</p> <pre><code>USE [master] GO CREATE DATABASE [AdventureWorks2008R2] ON ( FILENAME = 'C:\Program Files\Microsfot SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA\AdventureWors2008R2_Data.mdf') FOR ATTACH_REBUILD_LOG </code></pre>
2,323,639
0
<p><strong>C++</strong></p> <p>This would work in C++ because the function signature for <code>get()</code> is probably this:</p> <pre><code>void get(char&amp; a); // pass-by-reference </code></pre> <p>The <code>&amp;</code> symbol after <code>char</code> denotes to the compiler than when you pass in a <code>char</cod...
11,146,235
0
<p>Well, your migration obviously did not complete successfully, based on the traceback. So I would focus on figuring out why it failed, rather than working around things like the broken RAMCache which are likely a result of the migration not having run.</p> <p>The traceback indicates that it broke while trying to <em...
38,087,735
0
<p>You have to define <code>obj</code>.<br> Write something like:<br> <code>var obj = document.getElementById(pCent);</code><br> At the top of <code>load_Sim</code></p>
11,562,165
0
MYSQL PHP - get float LIKE $float <p>I want to get rows with floats like my <code>$float</code>.</p> <p>I used this code:</p> <pre><code>$float = $_GET['float']; $requst = mysql_fetch_array(mysql_query("SELECT * FROM floats WHERE float LIKE'$float.%%%%%%%'")); </code></pre> <p>then I echoed all the rows with while:</p>...
23,583,912
0
Android facebook sdk import error <p>i had download facebook skd import it in my eclipse add v4 jar file and change complier to 1.6 but yet it give me error in class FacebookAppLinkResolver </p> <p><code>import bolts.AppLink; import bolts.AppLinkResolver; import bolts.Continuation; import bolts.Task;</code></p> <p><img...
30,871,275
0
stored procedure cannot loop an array of string <pre><code>$StupidArray = "Boys, are, not, smiling, at, all,"; if (!$db-&gt;query(" SET @msg = ''; SET @Stringarray = '\' $StupidArray '\'; " ) || !$db-&gt;query(" CALL StupidProcedure (@Stringarray, @msg)") ) { echo "CALL to StupidProcedure failed:".print_r($db-&gt;error...
2,288,353
0
<p>What about this one:</p> <p><a href="http://rads.stackoverflow.com/amzn/click/0321166094" rel="nofollow noreferrer">The Rational Unified Process Made Easy: A Practitioner's Guide to the RUP</a></p> <p>Hope that helps</p>
35,725,923
0
Is there a disadvantage if I keep completed tasks in a job while using Azure Batch <p>I am planning to use Azure Batch Service. I will add several permanent jobs (in a permanent pool), and add new tasks to job now and then. Therefore number of completed (and incomplete) tasks will be increased over time. Should I delet...
12,393,457
0
How can I check if dll is .net library "The module was expected to contain an assembly manifest." <p>How can I verify if dll was wrote in .net? I'm using code as below:</p> <pre><code>Assembly assembly = null; try { foreach (string fileName in Directory.GetFiles(Environment.CurrentDirectory.ToString(), "*.dll", SearchO...
15,946,762
0
<p>From C++03, 14.2.4</p> <blockquote> <p>When the name of a member template specialization appears after <code>.</code> or <code>-&gt;</code> in a <em>postfix-expression</em>, or after <em>nested-name-specifier</em> in a <em>qualified-id</em>, and the postfix-expression or qualified-id explicitly depends on a templat...
2,848,783
0
<p>In the first edition of "XP explained", there was twelve practices. </p> <p>In the second edition, the practices have been reorganized: some have been renamed or merged, some have been removed (Metaphor), and there now are: thirteen primary and eleven corollary practices.</p> <p>Under the "First Edition Practices" ...
15,219,799
0
Saved State progressbar status and button click event in android listview <p>i have <code>listview</code>.in row item <code>progressbar</code> ,2 button and one image view when i click download button then downloading process start but when i scroll up down then application crash and how to save state in <code>listview...
39,168,946
0
How to improve performance on static HTML, UIWebView content <p>I have <code>UIWebViews</code> as cells for my <code>UITableView</code>. However, it lags while scrolling due to nature of <code>UIWebView</code> being really slow. However, I only use static HTML string as content of <code>UIWebView</code>, so it shouldn'...
38,810,345
0
<p>Keep in mind that the format of neo4j query output is designed for rows with columns, not your desired output format, so this makes things a little tricky.</p> <p>I would highly recommend just outputting your food items on each row, with boolean columns for membership in each distinct simple trait, then in your app...
9,126,857
0
<p>I corrected this by doing what Roman said, with the code:</p> <pre><code> Camera.Parameters parameters = camera.getParameters(); List&lt;Camera.Size&gt; sizes = parameters.getSupportedPreviewSizes(); Camera.Size cs = sizes.get(0); parameters.setPreviewSize(cs.width, cs.height); camera.setParameters(parameters); </c...
30,371,033
0
<p>Store the tile in the array and print it - </p> <pre><code>&lt;?php $video_array = array( array('url' =&gt; 'http://www.youtube.com/embed/rMNNDINCFHg', 'title' =&gt; 'ABC'), array('url' =&gt; 'http://www.youtube.com/embed/bDF6DVzKFFg', 'title' =&gt; 'DSF'), array('url' =&gt; 'http://www.youtube.com/embed/bDF6DVzKFF...
4,537,217
0
<p>Rather than having the user refresh the entire page, you might consider using <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29" rel="nofollow">AJAX</a> and provide your own refresh button. It likely will make refreshing quicker as well because the entire page does not have to be reloaded.</p>
25,475,590
0
<p>The tricky bit is getting both related records at one time:</p> <pre><code>delete a1 from a a1 where ( a1.pub_cde = 'RTF' and exists ( select 'x' from a a2 where a2.ctm_nbr = a1.ctm_nbr and a2.pub_cde = 'CTR' and a2.itg = 2 * a1.itg ) ) or ( a1.pub_cde = 'CTR' and exists ( select 'x' from a a2 where a2.ctm_nbr = a1...
8,148,629
0
Intent filter to download attachment from gmail apps on Android <p>I have android application with intent filter (ACTION_VIEW) to open file and import it into my application. I wish to download file attachment from gmail app into my application. Some of file type (i.e. jpg, png, txt) are saved correctly, but some are n...
12,012,058
0
<p>Yes, the question sets used for both exams are identical and the Sierra/Bates book is good preparation material. In order to prepare even better, I would advise to take some mock tests first. There is a large number of free ones on the net.</p> <p>EDIT: as to the naming ambiguities - the certificate was issued by S...
5,698,592
0
<p>You're probably getting that error because you are calling the theme file directly </p> <p>OR</p> <p>because you aren't incuding the header and footer of the page.</p> <p>Easy Solve:</p> <p>Make sure the page loads as wanted. If you dont want to include the header and all that junk, you can load a fragment with jQu...
23,793,046
0
Pixelate images when hovering over parent div using javascript <p>Searching around for ways to do this, I found a couple good explanations out there, and ended up combining them. I had everything working fine when I was just doing the hover effect when mousing over the image itself, but when trying to make it work when...
14,568,430
0
<p>Caching large objects in NoSQL stores is generally not a good idea, because it is expensive in term of memory and network bandwidth. I don't think NoSQL solutions shine when it comes to storing large objects. Redis, memcached, and most other key/value stores are clearly not designed for this.</p> <p>If you want to ...
40,428,530
0
<p>Sorry, no built-in support for volumes. Feel free to raise an issue here: <a href="https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/issues" rel="nofollow noreferrer">https://github.com/spring-cloud/spring-cloud-deployer-kubernetes/issues</a></p>
14,252,678
0
Backbone.js per attribute rendering (multiple small views vs multiple templates per view ) <p>I have a model and a view. The view displays attributes of a model and allows the user to manipulate these attributes. The problem is that when an attribute is modified it re-renders the whole view which causes a lot of proble...
7,863,384
0
<p>It means just what it says. The value being passed to the <code>text</code> method is the result of the expression <code>350 - ta.va().length</code>. The variable <code>ta</code> has not been defined at the point this code is being run.</p> <p>A few things to note before my proposed solution.</p> <ol> <li>You are c...
21,674,245
0
<p>You can store a reference to the previously opened paragraph and hide it before displaying a new one. This has the advantage of being quicker if you have lots of paragraphs.</p> <pre class="lang-js prettyprint-override"><code>// My function to open and close the p tag var para = null var evtDelegation = function(ev...
29,311,392
0
<p>Here is the list of valid timezones:</p> <p><a href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">http://en.wikipedia.org/wiki/List_of_tz_database_time_zones</a></p> <p>You can use</p> <pre><code>TIME_ZONE = 'Europe/Istanbul' </code></pre> <p>for UTC+02:00</p>
35,278,266
0
<p>I would use a regular expression on that, that looks like this:</p> <pre><code>(\d+) ([\d.:]+) (\d+) (\d+)\([^)]+\) (.*) </code></pre> <p>combined with <a href="http://php.net/manual/de/function.preg-match-all.php" rel="nofollow"><code>preg_match_all</code></a> in PHP like that:</p> <pre><code>preg_match_all('#(\d+...
2,544,548
0
<p>Is it fair to assume that you control the types which have "CustomPropertyOfControl"? If so, make them all implement an interface, and cast to that interface.</p> <p>The point of a cast is to tell the compiler something you know that it doesn't - <em>at compile time</em>. Here you don't know the type at compile tim...
27,750,633
0
Edit read-only file in java <p>I have a protect, read-only, text file on my Linux operating system that I have to make edits to. Of course I can goto the terminal and type:</p> <pre><code>sudo gedit /etc/ppp/options </code></pre> <p>I would then have to type my sudo password. My question is how do I give my java progra...
8,956,942
0
<p>I would suggest you to use CRON if you need to start a process on a time basis.</p>
36,652,205
0
Take let variable out of temporal dead zone <p>See this code:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script&gt; let {foo} = null; // TypeError &lt;/script&gt; &lt;script&gt; // Here I want to assign...
38,585,109
0
<p>As the <code>rle</code> is a <code>list</code> object with <code>lengths</code> and <code>values</code> as elements of the <code>list</code>, we can extract the <code>lengths</code> and <code>sum</code></p> <pre><code>sum(b$lengths) #[1] 10 </code></pre>
20,380,699
0
<p>Can you try using,</p> <p><code>$delete = "DELETE from $table_name where $key = '".$value."' ";</code></p> <p>instead of </p> <p><code>$delete = "DELETE from $table_name where $key = $value";</code></p>
27,186,994
0
<p>You would need the parameter pass to <code>Destruir</code> to be a <code>var</code> parameter so that the modification you make to the passed argument to modify the passed variable, rather than a local copy of it.</p> <pre><code>procedure TForm1.Destruir(var aForm: TForm); begin FreeAndNil(aForm); end; </code></pre...
22,422,615
0
<p>The best practice here would be to use two different stages.</p> <p>Using two stages will simplify design in sense that the viewport management for 2d animation will simplify by a considerable amount. Also the event handling has to be completely different style. Your information panel won't have much relative layou...
27,819,078
0
<p>Thanks all for trying to help me! However, the solution is to do so in the code:</p> <pre><code>System.setProperty("com.siebel.management.jmxapi.cfgFileName", "C:\\siebelmonitor\\1srvr.xml"); </code></pre>
34,876,614
0
<p>First of all you need to tell where are you writing this code. Don't mind but your code looks like not as it should be: 1- Which version are you using (Yii1 | Yii2)? I guess Yii1</p> <p>if you are using yii1 and you want to perform this stuff under profile update Action. </p> <p>so lets consider "profile/update" Ac...
3,479,298
0
<p>Not sure if this is the same 'MIRTH', but here is an entire community around it</p> <p><a href="http://www.mirthcorp.com/community/forums/index.php?s=b6990e9fe7bf68731f7075bd1412f336" rel="nofollow noreferrer">http://www.mirthcorp.com/community/forums/index.php?s=b6990e9fe7bf68731f7075bd1412f336</a></p> <p>I have n...
5,095,992
0
<p>The follows will give you the amount in <code>$matches[2]</code>, and the currency symbol or alpha representation will always be in <code>$matches[1]</code> or <code>$matches[3]</code></p> <pre><code>$values = array("$5.00", "€1.23", "£1,323.45", "1.23USD"); foreach($values as $val) { preg_match("/([^0-9.,]*)([0-9....
30,875,815
0
Resize HDF5 dataset in Julia <p>Is there a way to resize a chunked dataset in HDF5 using Julia's HDF5.jl? I didn't see anything in the documentation. Looking through the source, all I found was <code>set_dims!()</code>, but that cannot extend a dataset (only shrink it). Does HDF5.jl have the ability to enlarge an exist...
40,166,634
0
leaflet - how to add a handler with cycle behavior? <p>I've followed handler tutorial on <a href="http://leafletjs.com/examples/extending/extending-3-controls.html" rel="nofollow">http://leafletjs.com/examples/extending/extending-3-controls.html</a>.</p> <p>I can do handler that do something on event ('mouseover', etc....
909,600
0
<p>Is'nt this the sort of this that RemObjects is good at? Bri</p>
10,955,497
0
<p>Adding my solution as answer, per halfer's advice: Solved this one, because I was passing the content to Zend_Pdf as a string, i should have been using Zend_Pdf::parse($new_pdf);, as it very likely says in the manual. (oops)</p> <p>Further; I solved pretty much ALL of my problems with digitally signing PDFs of vari...
13,791,014
0
Some Fibonacci FUN in Java <p>I'm having a little trouble with a problem in my intro to java book. Here is the situation: A user must input a Number, after that I must find the Fibonacci of that number. I am given this equitation for listing the numbers(see code). While yes i got that working i am wondering how i go ab...
3,316,261
0
prevent long running averaging from overflow? <p>suppose I want to calculate average value of a data-set such as</p> <pre><code>class Averager { float total; size_t count; float addData (float value) { this-&gt;total += value; return this-&gt;total / ++this-&gt;count; } } </code></pre> <p>sooner or later the <code>tota...
36,764,398
0
<p>It turns out this issue didn't have anything to do with the APIs or how they were being used. It looks like the encoder used to create the video segments were creating errors in the resulting files.</p> <p>The errors reported by ffprobe are like:</p> <pre><code>[h264 @ 00000249a4348980] decode_slice_header error [h...
24,575,977
0
Flow 3 machines 2 manipulators <p>I have 3 machines <code>Mach1</code>, <code>Mach2</code>, <code>Mach3</code> and 2 manipulators <code>Man1</code>, <code>Man2</code></p> <p><code>Man1</code> handles <code>Mach1</code> and <code>Mach3</code></p> <p><code>Man2</code> handles <code>Mach2</code> and <code>Mach3</code>, so...
20,165,275
0
<p>See the documentation of Math.log : <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log</a></p> <p>For further help you should ask your math teacher or someone who...
34,662,260
0
<pre><code>var arraySearch = function (subArray,array ) { var i = -1; return subArray.every(function (v) { if(i != -1) { i++; return (array.indexOf(v) === i) } i = array.indexOf(v); return i &gt;= 0; }); }; var arr = [1,3,4,5,9]; console.log(arraySearch([4,5],arr)) </code></pre>
7,086,236
0
Possible to detect bit errors in memory in software? <p>A friend and I were curious as to whether you could detect levels of ionizing radiation by looking at rates of single bit errors in memory. I did a little research and I guess most errors are caught and fixed at the hardware level. Would there be any way to detect...
40,101,080
0
<p>Yor problem is here: <code>$message = wordwrap($message, 70, "\r\n");</code> you neet to add <code>.=</code> <br><br> It is the same as <code>$message = $message . "wordwrap($message, 70, "\r\n")";</code></p>
2,984,603
0
<p><a href="http://tutorialzine.com/2010/03/who-is-online-widget-php-mysql-jquery/" rel="nofollow noreferrer">This is good tutorial.</a> Note that mysql (i believe youll use it) online users table should be typed as MEMORY.</p>