pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
25,294,454
0
<p>It really depends on what scope you want the iterator to have. Generally speaking, you want to restrict its scope as much as possible while still letting it to its job<sup>1</sup>.</p> <p>If you're only going to use it inside the body of the loop, then it's preferable to define it in the loop header, so its scope i...
20,264,567
0
<p>First, this line contains undefined behavior</p> <pre><code>print(++ptr,ptr--,ptr,ptr++,++ptr); </code></pre> <p>because it uses a variable that is part of an expression with side effect multiple times without reaching a <a href="http://en.wikipedia.org/wiki/Sequence_point" rel="nofollow"><em>sequence point</em></a...
23,709,460
0
When using the *sync functions in Node.js, what (if any) background operations continue to run <p>When using the Node.js *Sync functions (I understand you shouldn't, and the reasons why), what (if any) background processes continue to run?</p> <p>For example, if I'm using http.createServer, and from one of the requests...
19,637,578
0
Error logging in with PayPal payments <p>I am using PayPal to process payments on my site, direct the user to the paypal checkout site, then redirect them back to the success page on my site, but I am having issues when one is directed to the paypal landing page. It won't accept valid paypal username and or passwords t...
7,393,812
0
Ruby send method with rails associations <p>I have been messing about with making a sortable table module thing. I know some might exist but want to get experience doing this myself. I had the idea of have it like so:</p> <pre><code>SortedTable.new(ModelName, Hash_Of_Columns_And_Fields, ID) </code></pre> <p>example</p>...
35,057,308
0
<p>For me changing back to MAMPS standard port settings did the trick.</p>
4,631,207
0
<p>This should do the trick:</p> <pre><code>#!/bin/bash for file in `find $1 -type f -name "*.txt"`; do nlines=`tail -n 1 $file | grep '^$' | wc -l` if [ $nlines -eq 1 ] then echo $file fi done; </code></pre> <p>Call it this way: <code>./script dir</code></p> <p>E.g. <code>./script /home/user/Documents/</code> -> list...
7,082,702
0
<p>If you want to totally throw it away:</p> <pre><code>import subprocess import os with open(os.devnull, 'w') as fp: cmd = subprocess.Popen(("[command]",), stdout=fp) </code></pre> <p>If you are using Python 2.5, you will need <code>from __future__ import with_statement</code>, or just don't use <code>with</code>.</p...
32,776,749
0
<p>check below query, I tried below eg. and it is working fine for me,</p> <pre><code>SELECT users.*, threads.* FROM users, threads WHERE users.Username LIKE '?' OR threads.Name LIKE '?' </code></pre> <p>eg.</p> <pre><code>select p.name,bi.mrp from billitem bi,product p where p.name like 'a%' or bi.productname like 't...
14,523,648
0
<p>You can use <code>wmic</code> command to get the current Date and time without getting affected by regional settings.</p> <pre><code>@echo off SETLOCAL EnableDelayedExpansion for /f "skip=1 tokens=1-6 delims= " %%a in ('wmic path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') do ( IF NOT...
6,138,103
0
<p>Jboss and Glassfish are great examples of application servers free for commercial use, you have to distinguish the difference between free use and support, both of them are free to use but if you want to get same support (not talking here about forums etc) you would have to probably pay for it.</p>
38,276,018
0
<p>I don't have a spotify account so, not sure with the user name password. But their doc says that they have REST implementation, so your credentials need to be 64 bit encoded.</p> <p>In this line <code>HttpRequest.SetRequestHeader "Authorization", "Basic " &amp; strClient_secret</code></p> <p>the variable <code>strC...
37,001,010
0
<p>I'm not sure you can use a different respond_to as you can only redirect or render once in an action. </p> <p>One approach would be to create a new route / controller method for updating the team name.</p> <p>routes</p> <pre><code>resources :teams do member { post 'update_name' } end </code></pre> <p>show.html.erb<...
27,720,162
0
Caused by: java.lang.NoClassDefFoundError: org/springframework/aop/framework/AbstractAdvisingBeanPostProcessor <p>I am using Spring 3.2.8.RELEASE, here is pom I am using</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://...
22,592,262
0
<p>Try this</p> <pre><code>var formfields = {step: $(this).data('step')}; $(this).parent().parent().parent().find('input').each(function () { formfields[$(this).prop('name')] = $(this).val(); }); console.log(formfields); </code></pre>
15,019,945
0
How many calls to generator are made? <p>Suppose I have the following algorithm:</p> <pre><code>procedure(n) if n == 1 then break R = generaterandom() procedure(n/2) </code></pre> <p>Now I understand that the complexity of this algorithm is <code>log(n)</code> but does it make <code>log(n)</code> calls to the random ge...
11,312,907
0
<p>I managed to fix this. There was two problems I found.</p> <ul> <li>Media Foundation was not initialized</li> </ul> <p><code>MFStartup(MF_VERSION);</code> needs to be called before Media Foundation can be used. I added this code just before creating the media engine.</p> <ul> <li>Referencing a pointer. </li> </ul> ...
31,606,032
0
<p>For this kind of requirement <code>QT</code> has <a href="http://doc.qt.io/qt-4.8/signalsandslots.html" rel="nofollow">Signal and Slots</a>. You have a <code>Signal</code> which will be emitted and consumed by assigned <code>SLOT</code> method. </p> <p>As you want to read Serial Data you should have Signal <code>re...
34,971,930
0
<p>I would keep that logic out of the HTML and in your controller if possible and add another function to set a new value in your view (either num1 * num2 or "Please enter a number"). </p> <pre><code>$scope.isFinite = function(num1, num2) { //Your logic for this function } $scope.checkFinite() { $scope.answer = null; ...
40,944,208
0
<p>Set LayoutParams as FILL_PARENT in both width and height</p> <pre><code> public void onClick(View view) { //getSupportActionBar().hide();if you need hidden actionbar also view.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT)); } </code></pre>
15,787,471
0
Delphi host for JavaFX applets <p>I have created a NPAPI host for JavaFX applets in Delphi 2010. The host uses a private JRE to show the applet. With Java 7 Update 10 it is possible to disable Java content in the browser. I do not want this setting to disable the plugins in my host. Is it possible to override the deplo...
27,144,000
0
<p>The <code>DATATYPE</code> are different in <code>Oracle</code>. </p> <p>Also, <code>auto_increment</code> is not in <code>Oracle</code>. In <code>11g</code> and prior, create a <code>SEQUENCE</code> to populate the ID column, in <code>12c</code>, use <code>IDENTITY COLUMNS</code>.</p> <pre><code>SQL&gt; DROP TABLE ...
3,339,907
0
Why doesn't lint tell me the line number and nature of the parse error? <p>I'm calling php lint from a Windows batch file, like so:</p> <pre><code>@echo off for %%f in (*.php) do php -l %%f </code></pre> <p>When a file contains a syntax error, it only outputs <code>Errors parsing xxx.php</code>. Is there any way to get...
21,121,401
0
<p>You probably have some relations between tables through these fields, as @Wrikken said in comments to your question. I've used a pretty similar table structure, and also added one more table to reproduce the assumption I'm talking about:</p> <blockquote> <p>-- First table, similar to problem table</p> <p>CREATE TAB...
3,529,399
0
<p>The solution for that problem seems to be this: you have to call the <code>[player stop]</code> before releasing it. It appears a little strange since I'm already receiving a notification about the player finished playing. Doing so the memory gets deallocated (only a small amount remains , ~100Kb from CoreMedia, bu...
39,148,051
0
<p>These could be the reason behind "Invalid record error" - </p> <pre><code>Reason - It usually happens when you use "create" and "build" together. create method persists the instance while the build method keeps it only in memory. </code></pre> <p>Firstly, I will suggest you to use build method and please check vali...
32,199,606
0
<p>If the user of the app write the html tags, the app should store them.</p> <p>So as you suggest yourself, you will have to store the string before calling <code>Html.fromHtml</code>.</p>
10,517,964
0
local variable scope in linq anonymous method ( closure) <p>What is the scope of local variable declared in Linq Query.</p> <p>I was writing following code</p> <pre><code> static void Evaluate() { var listNumbers = Enumerable.Range(1, 10).Select(i =&gt; i); int i = 10; } </code></pre> <p>Compiler flagged error on line ...
25,420,017
0
<p>The style you described is not common partially because of the issues you mentioned. If your trying to achieve a functional style, you would be better off just using functions with type aliases.</p> <pre><code>// Alias the function type to a meaningful name type FetchFeed = String =&gt; List[Feed] // Declaring an i...
38,520,501
0
<p><code>var ifExist = YourList.Any(lambda expression)</code> checking if <code>YourList&lt;T&gt;</code> contains object whitch fulifill lambda expression . It's only return <code>true</code> or <code>false</code>. If you want to have list of objects you should use <code>var YourNewList = YourList.Where(lambda express...
18,180,292
0
Bootstrap 3 RC1: Column Ordering <p>I have two primary boxes: an 8-col wide box with a bunch of panels and a second, 4-col (offset-1) to the right as a sidebar.</p> <p>I want to push the sidebar on top of the box o' sidebars on small screens. I've tried applying <code>col-12 col-push-12</code> (panel box) and <code>col...
17,722,353
0
PostSharp: BindingException when using with Microsoft.Bcl in Windows Phone 7 project <p>Following code throws exception during compilation:</p> <pre class="lang-cs prettyprint-override"><code>[PSerializable] public class MyAspectAttribute : OnMethodBoundaryAspect { } [MyAspect] Task&lt;object&gt; Method1&lt;T&gt;() { t...
38,142,733
0
<p>Are you making multiple connection to your database without closing them? If you are you should try implementing a check to see if only one connection is up.</p> <p>To check if your database is open you can do:</p> <pre><code>if(yourConnection.isOpen()){ doSomething(); //Maybe you want to close it here, if thats th...
6,778,704
0
<p>I did not try it, but you should be able to effectively emulate what is done there on the C side - decrypt each 16-byte (=128 bit) block separately, and reset the cipher between two calls.</p> <hr> <p>Please note that using CTR mode for just one block, with a zero initialization vector and counter, defeats the goal...
35,415,014
0
<p>It's impossible, whether in php or jquery.</p>
4,168,455
0
Why Flash Firebug doesn't work with flex 4.5? <p>Why Flash Firebug doesn't work with flex 4.5?</p> <p>UPDATE:</p> <p>Hy! I have Flex 4.5 and in the main application, in the script tag I write:</p> <pre><code>import ominds.Firebug; </code></pre> <p>I use flash player WIN 10,1,85,3 Debug enabled. I export swf as 10.1.85 ...
23,349,358
0
<p>If your target systems are managed by reasonable people, the software will be managed by the packaging system. On Redhat, Fedora, CentOS or SUSE systems that will be RPM. On any system derived from Debian it will be APT.</p> <p>So your script can check for one of those two packaging systems. Although be warned that...
25,524,026
0
<p>I stumbled upon this problem after upgrading php to 5.5 and reinstalling apache.</p> <p>Finally,this fixed it, in case someone else needs it.</p> <p><code>apt-get install libapache2-mod-php5</code></p> <p>(<a href="http://serverfault.com/a/243979/239598">here's the answer</a>)</p>
10,347,769
0
<p>I would strongly recommend that you look at build tools like Ant or Maven. They are defacto standard for Java projects and will help you to achieve such tasks.</p> <p>Look at this link: <a href="http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html" rel="nofollow">http://maven.apache.org/guides/...
4,582,120
0
<p>An update on the last post... the code now includes a class for the list data structure. I've removed some bugs from the code. It should deliver the right results now.</p> <p>It seems that for one dimensional data structures, a list structure can actually be faster that an array. But for two dimensional structures,...
13,422,354
0
<p>Since your parameters are named differently, not too big a deal to query for each one.</p> <pre><code>string ok = string.Empty; NavigationContext.QueryString.TryGetValue("ok", out ok); string ko = string.Empty; NavigationContext.QueryString.TryGetValue("ko", out ko); </code></pre>
187,904
0
<p>If you used double quotes instead of single quotes it would work, but you'd be open to an injection attack if the variables weren't sanitized properly.</p>
12,280,993
0
Google Analytics event tracking - max string length <p>I am using Google Analytics for tracking events in my Android App. My question is: is there a limit for the string length in an event? I have found nothing about this topic on Googles devguide site.</p> <p>Best regards!</p> <p><strong>Edit:</strong> I tried it whit...
32,542
0
<p>The biggest one is making sure you don't put pointers into 32-bit storage locations.</p> <p>But there's no proper 'language-agnostic' answer to this question, really. You couldn't even get a particularly firm answer if you restricted yourself to something like standard 'C' or 'C++' - the size of data storage, point...
16,610,016
0
<p>Try this</p> <pre><code> o = { center : { x:1, y:1 } } o.startPosition = {x:o.center.x, y:o.center.y} </code></pre>
7,736,699
0
Django TinyMCE issues <p>All the textareas are inline, StackedInline</p> <p>All textareas works fine in this model change_view. BUT, when I add a new row the last row is not editiable in the textarea.</p> <p>If I remove the mode:"textareas" in the tunyMCE Init, it abviasly removes the wsgi editor but then the textareas...
35,597,290
0
Invalid argument tag <p>I am doing some customization of block insertion in Autocad. When setting up the attributes, I am getting an error in my procedure:</p> <p>"Invalid argument Tag in setting TagString"</p> <p>The code is as follows:</p> <pre><code>Sub Ch10_GettingAttributes() ' Create the block Dim blockObj As Aca...
2,514,485
0
<p>You need to know both, The RoR framework is an organizational and convenience system if you will, what it organizes is your ruby code.</p> <p>If you have programmed before then here are most of your answers:<br> <a href="http://www.ruby-doc.org/core/" rel="nofollow noreferrer">http://www.ruby-doc.org/core/</a><br> ...
36,150,257
1
Probability Distribution Function Python <p>I have a set of raw data and I have to identify the distribution of that data. What is the easiest way to plot a probability distribution function? I have tried fitting it in normal distribution. </p> <p>But I am more curious to know which distribution does the data carry wit...
36,919,928
0
<p>To understand why it is returning <code>undefined</code> instead of <code>ali</code>, you have to understand <strong>JavaScript binding</strong>.</p> <p>If you are accessing a method through a reference instead of directly through its owner object, as you are doing, the method loses its implicit binding, and <code>...
15,256,560
0
<p>Hard to tell if it's your only problem but <a href="http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.readexisting.aspx" rel="nofollow"><code>SerialPort.ReadExisting()</code></a> only reads the data that is <em>immediately</em> available (ie in the stream and buffer).</p> <p>Your program writes dat...
32,404,260
0
Getting a 404 after starting Artifactory/Tomcat running on centos <p>I'm trying to get Artifactory running on a centos server. This is what I did:</p> <p>Created a new user called artifactory</p> <p>switched to that user</p> <p><code>wget https://bintray.com/artifact/download/jfrog/artifactory-rpms/jfrog-artifactory-os...
35,866,392
0
My imagePickerController didFinishPickingMediaWithInfo newer get called <p>I try to write an App that needs a screen where you can take multible photos. I have used a code example from <a href="http://makeapppie.com/2015/11/04/how-to-make-xib-based-custom-uiimagepickercontroller-cameras-in-swift/" rel="nofollow">http:/...
10,715,315
0
<p>The Sonar extension uses the underlying ant task and passes parameters from buildr to ant. The parameters that you can use will be documented in the next release of Buildr. But to get you started here is a simple example that uses all the configuration parameters. The only property that must be set is "enabled", wh...
29,130,329
0
<p>The problem might be the format of the single quotes you have in your script. They appear to be close quotes instead of straight quotes. Try pasting into notepad and deleting/retyping all single quotes, then save.</p>
23,255,242
0
<p>This is because the function works in a separate workspace than the rest of the script. What you may want to do is change that last line to:</p> <pre><code>Write-Output "$message$ServiceName is not running attemting to start" </code></pre> <p>Then when you call the function you can do:</p> <pre><code>$Message = Sta...
23,344,050
0
<p>Some of the more common problems when users have to deploy a server is that they have to specify previously the security group that the server has to use. In this security group, is mandatory that you specify the port that you want to use, in order that this port will be opened afterward in the server that you want...
2,051,741
0
<p>To disable cell selection you can implement <code>-(NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath</code> method in table view delegate and return nil if you don't want cell with given NSIndexPath to be selected.<br> As already pointed in other answers to disable ...
28,281,830
0
<p>You could get the Threads in the next way:</p> <pre><code>public function getThreads($user) { $em = $this-&gt;getEntityManager(); $query = $em-&gt;createQuery( 'SELECT t FROM AcmeMessageBundle:Thread t WHERE :user MEMBER OF t.users ORDER BY t.date DESC' ) -&gt;setParameter('user', $user) -&gt;setMaxResults( 20 ); $...
6,314,754
0
android how to put progressdialog in TabActivity <p>I hav an application where I have an TabActivity and which have 2tabs(each tab as an activity) First tab(an activity) loads data from internet. So I want there a progressdialog until the 1st tab(an activity) loads data from internet.</p> <pre><code>ProgressDialog.show...
18,271,321
0
<p>You should implement a sliding window approach. In each window, you should apply the SVM to get candidates. Then, once you've done it for the whole image, you should merge the candidates (if you detected an object, then it is very likely that you'll detect it again in shift of a few pixels - that's the meaning of c...
10,857,763
0
<p>There is no public <code>NativeMethods</code> class in .NET. It is considered good practice to put calls in a <code>NativeMethods</code> class, so this is probably what you are seeing.</p> <p>You need to use P/Invoke to call Win32 API functions. See <a href="http://msdn.microsoft.com/en-us/library/aa288468%28v=vs.7...
8,754,679
0
<pre><code>//global flag to check condition var flag = true; $('#yourelement').click(function(){ if(flag == true){ flag = false; $('#yourotherelement').attr('rel', newValue); }else{ flag = true; $('#yourotherelement').attr('rel', oldValue); } }); </code></pre>
21,879,864
0
<p>Check my library <a href="https://github.com/sergey-miryanov/linden-google-play" rel="nofollow">https://github.com/sergey-miryanov/linden-google-play</a>. Now it supports Leaderboard, Achievements and CloudSave. Another my lib <a href="https://github.com/sergey-miryanov/linden-google-iap" rel="nofollow">https://git...
3,778,668
0
<p>It would not be doing you any favors to help you refactor this code. LINQ to Entities queries are eventually translated into SQL, and this SQL is going to be a mess no matter how good the code looks. You need to reconsider your querying strategy based on the tools your database gives you. Ideally, you should be abl...
17,053,885
0
ERROR - The specified data type is not valid. [ Data type (if known) = varchar ] <p>I have recently installed SQL 2008 R2</p> <pre><code>CREATE TABLE TPERSONS( personid int PRIMARY KEY NOT NULL, lastname varchar(50) NULL, firstname varchar(50) NULL, salary money NULL, managerid int NULL -- foreign key to personid ) </c...
4,440,999
0
<p>Any java.util.Collection that does not implement the Set interface. Probably you'll want something that implements a List.</p>
1,920,724
0
<p>One reason for using different tablespaces would be a desire to use tablespace transportation for moving data between databases. If you have a limited set of data that you want to move without having to export and import it then tablespace transport is a good option, particularly if it is important for testing reas...
32,068,613
0
<p>May be unrelated to performance, but the code as it written now has strange parallelization structure.</p> <p>I doubt it can produce correct results, because the <code>while</code> loop inside the <code>parallel</code> does not have barriers (<code>omp master</code> does not have barrier, <code>omp for nowait</code...
24,933,644
0
<p>I had to read your post multiple times to try to get what you were looking for. If I'm reading you correctly, what you want is the first <code>&lt;a&gt;</code> tag to act as a <code>display:block</code> so that when you hover over it the entire width is clickable, but you want the second <code>&lt;a&gt;</code> tag ...
23,938,297
0
capistrano - git ls-remote -h doesn't have the git url <p>I'm new to using Capistrano. I set it up correctly, but when I run cap staging deploy I get this -</p> <pre><code>DEBUG [b678d5eb] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/myproj/git-ssh.sh /usr/bin/env git ls-remote -h ) DEBUG [b678d5eb] usage: git ls-remo...
11,386,052
0
How to set a variable value and start running from that in Netbeans? <p>I run a program step by step with monitoring variable's value by watch in <code>Netbeans</code>. How can I start the running of the program from a special value for a variable.</p> <p>For example i have this simple code just for testing: For saving...
3,765,952
0
ipad - keyboard inside popover? <p>Is it possible to have the keyboard show inside a UIPopOver instead of filling the screen width?</p> <p>something like the image...</p> <p><img src="https://i.stack.imgur.com/QOt97.png" alt="alt text"></p>
13,015,714
0
<p>Solution: It seems that the Opacity was the guilty one, instead of making it solid, I have set the opacity to .99 and works without any issues.</p>
38,657,702
0
<p>Please try the following </p> <pre><code>... if (typeof(conPeek(a, i)) == Types::Container) { info("It's a container"); } ... </code></pre>
10,465,242
0
ASP.Net/Ruby/PHP MVC Website, jQuery Mobile and Phonegap <p>I have an ASP.Net MVC3 application (it doesn't matter if it is ASP.NET MVC, PHP or RAILS coz in the end it is serving out plaing HTML) which is using jquery mobile and works great in all mobile browsers. The next step for me is to create a native ios app using...
20,042,416
0
<p>If you can find out the first and last values of the labels and store them in variables before itself, then you can do some thing like this <a href="http://jsfiddle.net/E7GBd/" rel="nofollow">http://jsfiddle.net/E7GBd/</a> using </p> <pre><code>formatter: function(){} </code></pre> <p>Hope this will help you.</p>
1,318,627
0
<p>Looping with String.contains() is the way unless you want to move in some heavy artillery like <a href="http://lucene.apache.org/java/docs/" rel="nofollow noreferrer">Lucene</a>.</p>
29,423,834
0
How to apply JSON data to an EmberJS Model Attribute <p>I'm very new to JS and I'm retrying EmberJS due to the impending 2.0 but especially because of EMBER CLI which I really like the structure.</p> <p>Anyways, I'm building a basic app and what I'm currently looking to do is make a JSON call to reddit to grab the subs...
9,774,106
0
<p>I would expect them to compile to identical bytecode.</p>
13,476,260
0
How to transform {{{...}}} to markdown code blocks with sed or vim? <p>How can I transform comments like</p> <pre><code>{{{ abc def }}} </code></pre> <p>to markdown comments like</p> <pre><code> abc def </code></pre> <p>(4 spaces at the start of each line) in vim or sed?</p> <p>I tried the following but I didn't get th...
10,878,568
0
<p>According to your error log,</p> <p>TextView resource not found "android.content.res.Resources$NotFoundException". for solving it please check fallowing, 1-: Have you mention id for that textview in xml file. 2-: May be possible same id for more then one resource.</p> <p>I hope its help full to you. </p>
31,160,772
0
how to create vertical scroll effect for slider using js ,html,css <p><a href="http://www.squarespace.com/" rel="nofollow">http://www.squarespace.com/</a> i want to create similar sliding effect for my website could someone suggest how to create such kind of effect I tried using fullpage.js but it doesnot give the same...
28,026,010
0
How to run the script both 'on load' and 'on resize' (on a particular window width!) in jQuery? <p>In my current website project I've integrated <a href="https://github.com/alvarotrigo/fullPage.js" rel="nofollow">Alvaro Trigo's FullPage plugin</a> but since it had a very uncommon behaviour on mobile devices (also due t...
3,322,826
0
<p>The answer would be yes, assuming you consider this a good example of what you want to do:</p> <p><a href="http://pyjs.org/examples/Space.html" rel="nofollow noreferrer">http://pyjs.org/examples/Space.html</a></p> <p>This browser-based version of Asteroids was created using Pyjamas, which enables you to write the c...
10,943,872
0
<p>You should probably adapt your server side code to ignore the null values and return only the fields that are set (thus avoiding unnecessary bandwidth usage).<br> In your clientside code I suggest you have a set of defaults for your template and extend them received JSON with the defaults.<br> I'd you're using jque...
35,793,271
0
<p>Pipe Get-ChildItem to select-object :</p> <pre><code>$source=Get-ChildItem "$source_path\\CUST_MEA_*.csv" | select -Last 1 </code></pre>
10,476,158
0
<pre><code>if (preg_match('/\b\d{4}-\d{2}-\d{2}\b/' $str)) { // ... } </code></pre> <p>If the word boundary (<code>\b</code>) doesn't do the trick, you could try <a href="http://www.regular-expressions.info/lookaround.html" rel="nofollow">negative lookbehind and lookaheads</a>:</p> <pre><code>if (preg_match('/(?&lt;!\...
10,634,537
0
V4l2 : difference between : Enque, Deque and Queue(ing) of the buffer? <p>I am a noob in <strong>v4l2</strong> and tryign to find out the difference bweeten the various ioctl calls made during the camera image capture. I am following this <a href="http://linuxtv.org/downloads/presentations/summit_jun_2010/20100206-fosd...
26,593,446
0
Write the plugin when Selcting the lookup flied and according to filed selection Show/Hide Address filed in form.....? <p>We Have Contact Entities in contact Entitie one lookup filed company Name in that lookup having two values 1.Account and 2.Contact . When we are selecting contact show the address filed when we sele...
31,593,196
0
<p>Try this,</p> <pre><code>session_start(); if(isset($_POST['viewrecord'])){ $sup_code = $_POST['vhidden']; } $_SESSION["sup_code"] = $sup_code; </code></pre> <p>SQL Query</p> <pre><code>$sql = "SELECT sup_code, firstname, lastname, email, telephone FROM dbo.table WHERE sup_code = '".$_SESSION["sup_code"]."'"; </code...
10,849,567
0
Upgrade setup with inno setup <p>I have installed the setup which has build from inno setup advanced installer, and installed the patch with fixes and replaced the old assemblies.</p> <p>Now we upgrade the setup, during installation, the old version has uninstalled and installing new version but the two assemblies has ...
21,176,064
0
<p>You can use <code>Regex</code> when you search a string in MongoDB:</p> <pre><code>Query.Matches("story","&lt;Regex for: moon or cow or Neil&gt;"); </code></pre> <p>Look <a href="http://stackoverflow.com/questions/5421952/how-to-match-multiple-words-in-regex">here</a> to see how to write a regex that matches multip...
35,457,343
0
How to add year display script in $('body').append Script? <p>Javas experts, </p> <p>i have this script:</p> <pre><code>&lt;script type='text/javascript'&gt; //&lt;![CDATA[ $(document).ready(function() { var credits= $('body').append('&lt;div id="wrap"&gt;&lt;div id="wrapp-inner"&gt;&lt;div id="wrapleft"&gt;&lt;/div&gt...
7,559,073
0
android - Cursor returning wrong values <p>I'm querying some products in SQLite database, but same base in 2 differents android's versions return differents values.</p> <p>Select result in database.db3 using SQLite Expert:</p> <p><img src="https://i.stack.imgur.com/RHvaU.png" alt="result"></p> <p>I create this code aft...
13,480,810
0
<p>You can't access the Downloads folder directly as - contrary to the Documents library - there's no special capability for this folder. </p> <p>You'll have to use a FileOpenPicker to let the user select a folder where they want to have their downloads stored. Then you can store the access token and use it for subseq...
3,867,644
0
Grouped UITableView & edit-mode: strange behaviour <p>recently I implemented an grouped UITableView with editing, but the problem is: if the UITableView is in edit-mode, the content of the cells is moved to the right and this looks really unattractive.</p> <p>Thanks in advance.</p> <p>Regards, Sascha</p>
22,882,892
0
Website directory structure different from eclipse <p>I am coding a website using java servlets and am using eclipse and tomcat. When I test it using localhost, it works fine. But when I am deploying it on my actual website, the directory structure is messed up and the files are not called properly. </p> <p>My eclipse ...
29,800,284
0
How do i setup magnific-popup <p>I am Really new to this so please keep that in mind before judging me.</p> <p>I am having problems getting the script to work for me. </p> <p>What i did was following:</p> <ol> <li><p>I built my js with the builder on the Page <a href="http://dimsemenov.com/plugins/magnific-popup/#mfp-b...
34,606,214
0
<p>Is your routes inside the <code>web</code> middleware ? Laravel 5.2 has a new feature called middleware groups. In order to use session, your route should be inside the <code>web</code> middleware. If you check your <code>Kernel.php</code>, you will get a clear idea about the middlewares inside the <code>web</code>...