pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
17,056,545
0
<p>This process is handled by the Android <code>MediaScanner</code>. This is what scans the phone for new media and stores it in the Android media database. I believe the time frame which it runs is device specific. However, you can call it manually:</p> <pre><code> Uri uri = Uri.fromFile(destFileOrFolder); Intent sca...
36,534,762
0
<p>I know the option the <code>(b)</code> you can entirely disable Silex app error handler and after that, your custom error handler should work fine as you defined it.</p> <p>Entirely disabled Silex error handler:</p> <pre><code>$app['exception_handler']-&gt;disable(); </code></pre> <p>So, It will be like:</p> <pre><...
14,684,312
1
Issue with creating "xlsx" in Python by copying data from csv <p>I am trying to copy all the data in csv to excel "xlsx" file using python. I am using following code to do this:</p> <pre><code>from openpyxl import load_workbook import csv #Open an xlsx for reading wb = load_workbook(filename = "empty_book.xlsx") #Get t...
19,829,235
0
zbar sdk view third party library error in Xcode 5 <p>I am using z bar SDK in x code 5 when i am archiving its getting following errors </p> <pre><code>Undefined symbols for architecture armv7: "_CMSampleBufferGetImageBuffer", referenced from: -[ZBarCaptureReader captureOutput:didOutputSampleBuffer:fromConnection:] in ...
16,146,153
0
XML - Schema Element with attribute and sequence of sub-elements <p>I have a XML schema as follows:</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"&gt; &lt;xs:element name="labels"&gt; &lt;xs:complexType&gt; &lt;xs...
32,910,156
0
<p>Yes, you could do this: </p> <pre><code>&lt;select class="form-control" id="field_cusPro" name="cusPro" ng-model="rentalAgreement.customerProfile" ng-options="cusPro as cusPro.Name+' ('+cusPro.id+')' for cusPro in cuspros track by cusPro.id"&gt; &lt;option value=""&gt;&lt;/option&gt; </code></pre>
15,011,401
0
<p>Try this:</p> <p><a href="http://jsfiddle.net/edz8B/1/" rel="nofollow">DEMO</a></p> <p>JS</p> <pre><code>function setChk(value){ var chk = document.getElementById('check1'); chk.checked = (value != 'null'); } </code></pre> <p>HTML</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;input type="checkbox" name="ch...
20,892,832
0
<p>You can pass in a function to compute the Jacobian as the <code>Dfun</code> argument to the <code>Minimizer.leastsq</code> method: <a href="http://lmfit.github.io/lmfit-py/fitting.html#leastsq" rel="nofollow">http://lmfit.github.io/lmfit-py/fitting.html#leastsq</a></p> <p>By default the function passed in for <code...
19,063,800
0
how to get different hidden field values in multiple form in a page <p>in a page i have 2 forms where both having a hidden field named operation(same name for both form)</p> <pre><code>included jquery.min-1.5.js &amp; jquery-ui.min-1.8.js &lt;script&gt; $(document).ready(function(){ $('#get_val').live('click', function...
12,736,412
0
<p>Add c:/PROGRA~1/Java/JDK16~1.0_3\bin\ to Path environment variable</p>
3,908,059
0
How to set a NSView hidden with FadeOut animation in cocoa? <p>I'm hiding a subview from a CustomView element with the following code:</p> <pre> <code> [[[theViewcont subviews] objectAtIndex:0] setHidden:TRUE] </code> </pre> <p>how can i add a fade animation on hiding this NSVIEW?</p>
6,270,084
0
What's the best way to support array column types with external tables in hive? <p>So i have external tables of tab delimited data. A simple table looks like this:</p> <pre><code>create external table if not exists categories (id string, tag string, legid string, image string, parent string, created_date string, time_s...
34,573,787
0
<p>Your second file - <code>captureit.java</code> - cannot be an Activity. An Activity can only be created by calling <code>startActivity()</code> or <code>startActivityForResult()</code> from another activity with an intent. When you call <code>new CaptureIt()</code> the <code>onCreate()</code> method and other activ...
8,207,980
0
<p>You can use this code for your same work:</p> <pre><code>UIWebView *web = [[UIWebView alloc] initWithFrame:YOUR_FRAME]; NSString *path = [[NSBundle mainBundle] pathForResource:@"terms and conditions" ofType:@"html"]; NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO]; [web loadRequest:[NSURLRequest requestWit...
22,197,264
0
<p>I think this is what you are after:</p> <pre><code>Select student_course_modules.module_id from student_course_modules left join student_courses on student_courses.id = student_course_modules.student_course_id where student_courses.course_id="1" And student_courses.student_id="ST_2014_1" And student_course_modules....
28,009,396
0
<p>If you got <code>caffe</code> from git you should find in <code>data/ilsvrc12</code> folder a shell script <code>get_ilsvrc_aux.sh</code>.<br> This script should download several files used for ilsvrc (sub set of imagenet used for the large scale image recognition challenge) training. </p> <p>The most interesting f...
13,450,229
0
<pre><code>jQuery(document).ready(function () { jQuery(".btnshow").click(function () { var pagename, pid; pid=jQuery(this).attr('rel'); pagename="&lt;?php echo JURI::root();?&gt;index.php?option=com_componentname&amp;view=result&amp;Id="+pid; jQuery.get(pagename, function (data) { jQuery('.para1').html(data); }); }); ...
20,591,374
0
Transparent frame in windows phone 8 / XAML <p>I have two frames, main.xaml and target.xaml. I navigated to target.xaml from main.xaml. target.xaml has some content in a little square. Now I want that besides this square the rest of the area(of target.xaml frame) should be transparent(It should show main.xaml). I could...
1,688,143
0
Finding out where curl was redirected <p>I'm using curl to make php send an http request to some website somewhere and have set CURLOPT_FOLLOWLOCATION to 1 so that it follows redirects. How then, can I find out where it was eventually redirected?</p>
4,880,472
0
Printing with the browser in Silverlight 4 <p>I have a Silverlight 4 app which is essentially a canvas filled with user-drawn controls. When I use Print (or Print Preview) in Firefox 3.6, the canvas is not displayed.</p> <p>Every example wrt printing in Silverlight creates a Print button within their Silverlight app. I...
14,083,692
0
How to autheticate once in google drive api <p>I have this problem about google drive. This is my application <img src="https://i.stack.imgur.com/bdJre.jpg" alt="enter image description here"></p> <p>As you can see here. I want to browse and upload the file to google drive. But every time I upload a file i need to allo...
4,191,293
0
<p>StringTokenizer treats consecutive delimiters as a single delimiter. You say the input contains [tab space] as delimiters, but the rest of your code doesn't seem to be expecting spaces so, without more information, I'm going to guess that the input is delimited only with tabs (not [tab space]), and the adjacent del...
10,519,284
0
<p>There is a 2GB limit for <em>apps</em> from the App Store but as far as user data goes, you should be able to basically fill the disk. When that happens, your saves will start to fail, I believe with 'NSFileWriteOutOfSpaceError' bubbled up from the PSC.</p> <p>As far as limiting entity space, there's no Core Data s...
30,282,411
0
<p>You should just consider using JButton but to answer the question:</p> <hr> <p><br>Try using MouseListener with BevelBorder for example:</p> <pre><code>yourPanel.addMouseListener(new MouseListener() { Border b = new BevelBorder(BevelBorder.LOWERED); Border originalBorder = null; @Override public void mouseReleased(...
30,458,538
0
<p>It seems like a very specialized/unusual use case. It violates LSP. And using exceptions at all is unidiomatic in scala - <code>scala.util.control.Exception</code> is mainly about catching exceptions that library functions might throw and translating them into more idiomatic expressions of potential failures.</p> <...
16,941,640
0
Sed/Awk/Cut GNU transform text lines to single line <p>I have the following type of data:</p> <pre><code>3869|Jennifer Smith 10413 NE 71st Street Vancouver, WA 98662 360-944-9578 jsmith@yahoo.com|1234567890123456|03-2013|123 -- 3875|Joan L Doe 422 1/2 14th Ave E Seattle, WA 98112 206-322-7666 jldoe@comcast.net|1234-123...
7,505,011
0
Bulk ingest into Redis <p>I'm trying to load a large piece of data into Redis as fast as possible.</p> <p>My data looks like:</p> <pre><code>771240491921 SOME;STRING;ABOUT;THIS;LENGTH 345928354912 SOME;STRING;ABOUT;THIS;LENGTH </code></pre> <p>There is a ~12 digit number on the left and a variable length string on the ...
30,767,405
0
<p>Agree with the above, in plain english, your code will be executed like this: </p> <ol> <li>final List studentList = new ArrayList(); </li> <li>ParseQuery query = ParseQuery.getQuery("Student");<br/> ------> 1. query.findInBackground (Popped onto background thread) </li> <li>return studentList (so yes, by the time ...
21,299,032
0
<p>If you want your AJAX request to retrieve and execute code, use <code>dataType: 'script'</code>.</p> <p>Appending script to the DOM isn't going to do anything.</p> <p>See the <a href="http://api.jquery.com/jquery.ajax/" rel="nofollow">documentation</a>:</p> <blockquote> <p><strong>dataType</strong>:<br> ...<br> "sc...
15,263,602
0
<p>It will look something like this in your <code>AppDelegate</code>:</p> <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; WebViewController *webViewController1 = [[We...
12,416,880
0
Getting names from ... (dots) <p>In improving an <code>rbind</code> method, I'd like to extract the names of the objects passed to it so that I might generate unique IDs from those.</p> <p>I've tried <code>all.names(match.call())</code> but that just gives me:</p> <pre><code>[1] "rbind" "deparse.level" "..1" "..2" </co...
9,357,680
0
Doctrine 2 Transaction demarcation: implicit vs explicit <p>Im reading the doctrine 2 docs and have a question about transaction demarcation. Is there any difference between the following two snippets of code (other than syntax obviously)? Or is this just two ways of doing the exact same thing (ie implicitly and explic...
7,860,065
0
Coderush express seems doesn't work <p>I installed Coderush express and I can see that it is installed. (I can see that Camel Case Navigation works). But I can see any other feature works. Based on this page: <a href="http://community.devexpress.com/blogs/markmiller/archive/2009/06/25/coderush-xpress-for-c-and-visual-b...
14,278,186
0
Appending a html tag to php variable <p>I am newbie to php, just starting learning it, while working with wordpress.</p> <p>I want to add html code to a php variable, a anchor tag link actually. First i splitted the text using <code>substr()</code>, and now i want to append a anchor tag at the end of post.</p> <pre><co...
33,310,972
0
<p>The <strong>HTMLFormElement</strong> object/type has an <strong>checkValidity</strong> method you can use to check that.</p> <p>Check it here: <a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement</a></p>
6,344,242
0
Object Comparison using if else | Operator Overloading <p>I have to <code>compare(&gt;,&lt;,==)</code> two <code>class object</code> based upon different criteria, explained below.</p> <pre><code>class Student { int iRollNumber; int iSection; int iMarks; } </code></pre> <ol> <li>I want to do comparison with <code>iRoll...
21,377,635
0
<pre><code>select Id from ( select Id, Month_Id, Customer_Id, Total_Amount from TableA except select Id, Month_Id, Customer_Id, Total_Amount from TableB ) q </code></pre>
14,335,983
0
<p>I used my apple developer support for this. Here's what the support said : </p> <blockquote> <p>The presence of the Voice I/O will result in the input/output being processed very differently. We don't expect these units to have the same gain levels at all, but the levels shouldn't be drastically off as it seems you...
15,069,928
0
<p>Another version w/o building lists. import xml.etree.ElementTree as ET</p> <pre><code>PATH_IN = "sweep.xml" tree = ET.parse(PATH_IN) def convert(root): for p in root.iter('project'): yield p.get('name') for d in p.iter('design'): yield d.get('name') for e in d.iter('param'): yield [e.attrib['name'], [p.text for p i...
22,289,802
0
Spring bean load error using spring-data-mongodb <p>We are using Spring version 3.2.0 and now introducing spring-data-mongodb version 1.4.0 in the codebase. I tried to write a new spring config file (mongo-config.xml) while solely defines mongodb related beans. </p> <p>My Spring config is as follows: </p> <pre><code> &...
6,521,786
0
not able to get and store screen resolution <p>I am using following code to save screen-resolution in cookie</p> <pre><code>var the_cookie="screen_resolution="+screen.width+"x"+screen.height+";expires="+today.setDate(today.getDate()+1); document.cookie=the_cookie; </code></pre> <p>But some-how, it not working on browse...
25,783,086
0
<p>The function isDigit and others like it all work with char types. Thus one you use it on a doulbe (conunt), you get wrong results.</p>
21,931,723
0
Downloading to download folder in Android <p>I have a webview in my app. One of my pages has a link to a mp3 which I should download directly from my app, so using a downloadlistener like this:</p> <pre><code>mWebView.setDownloadListener(new DownloadListener() { public void onDownloadStart(String url, String userAgent,...
33,938,334
0
Weird SQL Server stored procedure behaviour - different results between asp.net and Management Studio <p>We have a stored procedure that’s used to populate a SSRS Report. It’s a bit of a monster – loads of conditional logic (in case statements), casts (sometimes embedded in other casts) from varchar to datetime, and 3 ...
12,841,916
0
phpFlickr proxy not working call to member function error <p>I have downloaded and setup phpFlickr library but I need to use it from behind a proxy, so I have added the line to the example file and it throws an error. As its all pretty much out of the box, im flumaxed I also dont get the call to member function on a no...
1,791,764
0
Variable item height in TreeView gives broken lines <p>Wee.</p> <p>So I finally figured out how the iIntegral member of TVITEMEX works. The MSDN docs didn't think to mention that setting it while inserting an item has no effect, but setting it after the item is inserted works. Yay!</p> <p>However, when using the TVS_HA...
885,474
0
<p>They conceptually organize revisions as changesets which allow you to very easily branch/merge your code. Merging a branch in SVN is an excruciatingly painful experience.</p>
6,869,305
0
<p>Even if static pages are going to be <em>slightly</em> faster than loading every page from the database, with projects such as these you have to take into consideration numerous other factors. It may be appealing to optimize for performance only, but you do not want to be the one to explain to your users why they n...
1,133,816
0
Dump Analysis with Source, using Visual Studio 2008 Express? <p>Is there any way to analyze app-crash minidumps (e.g. created by SetUnhandledExceptionFilter, or minidumpwritedump()) with source, using Visual Studio 2008 Express? </p> <p>I generally do this at work using "real" versions of VS, but when trying to get it ...
16,252,449
0
<p>A byte is a signed value held in 8 bits and may be in the range -128 to 127.</p> <p>The left most bit is used as the sign bit.</p> <p><code>System.out.println(-20 &amp; 0xFF);</code> has nothing to do with bytes, this is an int operation.</p> <p>The binary representation of -20, as a byte is: 1110_1100</p> <p>1110_...
13,513,078
0
User defined hierarchy in cube (dyslexia) <p>I can make 6 level dimension hierarchy with such relationships:</p> <ol> <li>main -> lvl1</li> <li>lvl1 -> lvl2</li> <li>lvl2 -> lvl3</li> <li>lvl3 -> lvl4</li> <li>lvl4 -> lvl5</li> </ol> <p>Hierarchy looks fine in the dimension browser. All attribute keys are composition k...
4,374,475
0
Regarding Good CSS forum <p>i am looking for good css forum where i can post question an get answer very quickly like <a href="http://stackoverflow.com">http://stackoverflow.com</a>.</p> <p>please provide me few url related with css forum.</p>
30,412,318
0
<p>Check out this implementation</p> <pre><code> void OnChatClick (object sender, EventArgs args) { var pic = new Image { Source = "bubble.png", Aspect = Aspect.Fill }; var textLabel = new Label { Text = "Hello", TextColor = Color.White, VerticalOptions = LayoutOptions.Center, LineBreakMode = LineBreakMode.WordWrap };...
40,134,888
0
<pre><code> SELECT ru.whs_code, ru.pdt_code, ru.case_dt_yyyymmdd, ru.fresh_frozen_status, ru.operation, ru.Qty - su.Qty AS Qty_Diff, ru.Wt - su.Wt AS Wt_Diff FROM ( SELECT whs_code, pdt_code, case_dt_yyyymmdd, fresh_frozen_status, operation, SUM(qty_cases_on_hand) AS Qty, SUM(qty_weight_on_hand) AS Wt FROM tbl_invento...
8,817,772
0
<p>This will let the system decide which viewer to use..</p> <pre><code> System::Diagnostics::Process::Start("C:\\MyPdf.pdf"); </code></pre>
12,765,785
0
<p>Your problem is a misunderstanding of how PHP provides your "value" in the foreach construct.</p> <pre><code>foreach($top_level_array as $current_top_level_member) </code></pre> <p>The variable $current_top_level_member is a copy of the value in the array, not a reference to inside the $top_level_array. Therefore a...
8,432,834
0
<p>As in the Hayes modem control commands? These are the commands used to gain the *AT*tention of a modem and cause it to interact with the phone system and/or computer (to test, read, set and execute commands). A tutorial can be found here: <a href="http://www.engineersgarage.com/tutorials/at-commands" rel="nofollow"...
31,325,860
1
Dynamic Datasets and SQLAlchemy <p>I am refactoring some old SQLite3 SQL statements in Python into SQLAlchemy. In our framework, we have the following SQL statements that takes in a dict with certain known keys and potentially any number of unexpected keys and values (depending what information was provided). </p> <pre...
20,426,764
0
<p>Quick suggestion add id as primary key column to users table. Then get that id after new record is inserted and save that id in SharedPreferences, then when ever required you can pull record from users table like using WHERE <code>id</code> = my_id_save. Here is example <a href="http://www.androidhive.info/2012/01/...
29,712,802
0
<p><code>getFileInfoClass</code> returns a class, so <code>getFileInfoClass(f)</code> is a class. When you take a class name and write parentheses after it, you call a constructor. </p> <p>So, <code>[getFileInfoClass(f)(f) for f in fileList]</code> makes a list of <code>FileInfo</code> objects.</p>
35,718,684
0
<p>Exactly like the error states, you are attempting to compare a <a href="https://msdn.microsoft.com/en-us/library/c8f5xwh7.aspx" rel="nofollow"><code>bool</code></a> (<code>xx.Value</code>) with a <a href="https://msdn.microsoft.com/en-us/library/362314fe.aspx" rel="nofollow"><code>string</code></a> (<code>"rcat"</c...
22,794,254
0
<p>i think Template method pattern better suits here. 1. create Hotel interface 2. create 3 Hotel classes(implements Hotel interface) LakeWood,Rosewood and xyzWood</p> <ol> <li><p>now create customer class and it will have series of dates also.</p> <p>here both Customer class and Hotel class both are independent.</p><...
17,076,030
0
How can I find int values within a string <p>I have a string, e.g. <code>"ksl13&lt;br&gt;m4n"</code>, and I want to remove all non-digit characters in order to get the int 134.</p> <p><code>Integer.parseInt(s)</code> obviously isn't going to work, but not sure how else to go about it.</p>
12,599,906
0
<p>Note : When an object is cloned, PHP 5 will perform a shallow copy of all of the object's properties. Any properties that are references to other variables, will remain references. </p> <p>Alternative you can use reflection to create a (deep) copy of your object.</p> <pre><code> $productClone = $this-&gt;objectMana...
14,866,171
0
<p>How about something like this -</p> <pre><code>$cal = New-Object -Type PsObject -Prop @{ Year = 2013 Events = @() } $event = New-Object -Type PsObject -Prop @{ Date = [DateTime] "2013-02-14" Name = "Valentines Day" } $cal.Events += $event </code></pre> <p>If you have a predefined calendar objects which doesn't have...
4,304,264
0
<p>My guess is PHP is evaluating the above as a string, not hex. And Java is doing it as you expect it.</p>
22,943,328
0
Rails app crashes when config.eager_load=true <p>I have a Rails application and an Engine. </p> <p>When i have config.eager_load= true in my environments/production.rb the app crashes giving the following error in the engine </p> <pre><code>FATAL: ActionView::Template::Error(undefined local variable or method `current_...
19,926,022
0
<p>You are inserting means adding one row,, but you want to update,, so use <code>UPDATE</code> instead of <code>INSERT</code></p> <pre><code>UPDATE user SET name = 'abc' WHERE id = 1; </code></pre>
11,389,879
0
Saving Data from iphone app to text file in iPhone app <p>I want to save my application data in text file in documents folder I am using following way to store but it store single string i want that my data is in array how may store all the contents of array in text files</p> <pre><code> NSArray *paths = NSSearchPathFo...
12,458,198
1
merging selenium rc and webdriver <p>I have made most of my automation code using Selenium RC with Python. But, I feel that with the evolution in my product (what I'm testing through selenium RC), my automation needs are changed. I tried Wedriver with python and it works a treat with my product. But, as many features o...
27,961,615
0
Goals with same conversion rate <p>I have a problem with my Google Analytics goals. I'm using Magento as CMS.</p> <p>These are the funnels:</p> <p>Goal 1:</p> <p>Product page: something /product1 Cart: ^/checkout/cart/$ Customer details: ^/checkout/cart/step2/$ Destination: ^/checkout/onepage/success/</p> <p>Goal 2:</p...
24,937,783
0
<p>A good usage would be to implement a chunk to translate to-and from-base64 or any unaligned data structure.</p> <pre><code>struct { unsigned int e1:6; unsigned int e2:6; unsigned int e3:6; unsigned int e4:6; } base64enc; //I don't know if declaring a 4-byte array will have the same effect. struct { unsigned char d1...
26,206,942
0
<p>Assuming you are having <code>Post-&gt;hasMany-&gt;Like</code> relationship and you have declared likes relationship as:</p> <pre><code>class Post{ public function likes(){ return $this-&gt;hasMany('Like'); } } </code></pre> <p>create a new function say <code>likeCountRelation</code> as:</p> <pre><code>public funct...
39,016,704
0
Publish live stream using webrtc and wowza <p>I have taken a preview copy for webrtc. On my streaming server I have setup the streamlock and done with configuration in vhost.xml file. I'm unable to publish stream from the html files provided by wowza. </p> <p>I get error: <code>Refused to set unsafe header “Connection”...
11,495,884
0
carousel like with css, overflow-x (horizontal only) <p>I have an <code>overflow-x:scroll</code> and <code>overflow-y:hidden</code>. I have images, but when I'm trying to make it only scroll horizontally, it doesn't work? When I highlight the images and drag the highlight downwards, its scrolls down vertically.</p> <pr...
11,022,584
0
<p>Uhm, theoretically, how would you know if it is unicode?</p> <p>This is the real question. Truthfully, you cannot know, but you can make a decent guess.</p> <p>See: <a href="http://stackoverflow.com/questions/499010/java-how-to-determine-the-correct-charset-encoding-of-a-stream">Java : How to determine the correct ...
24,884,925
0
Observers and Asynchrony in Ember.js <p>I follewed the guide on <a href="http://www.emberjs.com" rel="nofollow">the ember.js homepage</a> and found that code at <a href="http://emberjs.com/guides/object-model/observers/#toc_observers-and-asynchrony" rel="nofollow">this section</a>:</p> <pre><code>Person.reopen({ lastNa...
38,018,805
0
<p>You should initialize it before using or accessing it's properties. Try this:</p> <pre><code>let mark = TimeMark() let rounded = (mark.rawValue == TimeMark.Current) </code></pre>
18,633,648
0
<pre><code>filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); </code></pre> <p>The rotation property of the BasicImage filter can accept one of four values: 0, 1, 2, or 3 which will rotate the element 0, 90, 180 or 270 degress respectively.</p>
9,843,132
0
<p>Yes, if you really want / need to do it you can use PowerMock. This should be considered a last resort. With PowerMock you can cause it to return a mock from the call to the constructor. Then do the verify on the mock. That said, csturtz's is the "right" answer.</p> <p>Here is the link to <a href="http://code.googl...
34,732,378
0
Anyway to have programs share Windows Explorer icon overlays? <p>The fact that Windows only allows 15 icon overlays is well worn territory at this point. I understand how to rename the registry entries to get the overlays I absolutely <em>need</em> to be visible. But I wonder if there is a better way. </p> <p>I don't k...
37,359,596
0
<p>The <code>00010</code> is octal number, i.e., 8. Remove all the leading zeroes.</p>
38,056,290
0
<pre><code>function isBusinessDay(theDate){ theDay = theDate.getDay(); // Get day returns 0-6, respectively Sunday - Saturday if(theDay == 0 || theDay == 6){ return false; } else { return true; } } </code></pre> <p>Use with zzzzBov's <code>while (!isBusinessDay(date)) { date.setDate(date.getDate() - 1) }</code></p> <p...
25,528,895
0
<p>Apart from using a <code>List&lt;object&gt;</code>, it might help to make your interface generic:</p> <pre><code>public interface MyInterface&lt;T&gt; { Dictionary&lt;string, List&lt;T&gt;&gt; FilterLists { get; set; } } </code></pre>
10,859,098
0
why is php trim is not really remove all whitespace and line breaks? <p>I am grabbing input from a file with the following code</p> <pre><code>$jap= str_replace("\n","",addslashes(strtolower(trim(fgets($fh), " \t\n\r")))); </code></pre> <p>i had also previously tried these while troubleshooting</p> <pre><code>$jap= str...
14,561,942
0
<p>You could use sets for that, but a <code>dict</code> can not be added to a set unfortunately. You need to 'cast' the dictionaries to something that a set <em>can</em> handle, e.g. a immutable type such as a sequence of tuples. Combine that with an index to return the referenced <code>dict</code>:</p> <pre><code>def...
27,043,560
0
My TYPO3 extension's plugin is not visible in the backend <p>I am new to TYPO3 , I started by creating my own extension using Extbase , the extension was successfully created and I could include it into the template of my site , now when I try to include its plugin to a page .. it's not there . I tried many times to de...
10,179,303
0
Accessing matrices stored inside of cell arrays using MEX files in MATLAB <p>I am currently writing a MEX function that will have to work with a cell array in MATLAB. The MEX file is written in C. </p> <p>Essentially, the input to my function will be a cell array where each entry is a numeric matrix with real values. A...
24,168,026
0
Visual Studio C++ Source file accessible despite no #include? <p>I tried searching for similar questions, but I found this difficult to phrase, so I apologize if this is a duplicate.</p> <p>I'm messing around with Visual Studio 2013, writing a pretty simple C++ Console Application. Without going into too much details, ...
31,836,477
0
<p>The default Haar cascade trainings are:</p> <ul> <li>haarcascade_eye.xml</li> <li>haarcascade_eye_tree_eyeglasses.xml</li> <li>haarcascade_frontalcatface.xml</li> <li>haarcascade_frontalcatface_extended.xml</li> <li>haarcascade_frontalface_alt.xml</li> <li>haarcascade_frontalface_alt_tree.xml</li> <li>haarcascade_f...
4,930,397
0
<p>Maybe mine is not the best answer, but i just trying to help you here.</p> <p>After doing a flash googling i found this site <a href="http://nixboxdesigns.com/demos/jquery-uploadprogress.php" rel="nofollow">http://nixboxdesigns.com/demos/jquery-uploadprogress.php</a> that look like promising to solve your problem. ...
13,847,220
0
How can I create virtuals for REST API in Mongoose <p>I have a User model. And there is a follower relationship. </p> <p>What I want is, when client requests for followers of the user, I should return the followers, and append if the follower is followed by the current user. </p> <p>What is the good way to do that?</p>
37,250,670
0
<p>Here is a commented batch code for this task:</p> <pre><code>@echo off setlocal rem Define source and backup path. set "SourcePath=C:\machines\models" set "BackupPath=E:\backup" rem Get current date in format YYYY-MM-DD independent on local date format. for /F "skip=1 tokens=1 delims=." %%T in ('%SystemRoot%\System...
19,935,257
0
<p>On the link that you gave the joins are explained very good. So the problem is that you have several records from table A (no matter that there are no duplicates) is that to 1 record in A there are 2 records in B (in some cases). To avoid this you can use either <code>DISTINCT</code> clause, either <code>GROUP BY</...
35,542,837
0
<p>You can get the size in bytes of your array using: <code>sizeof(array)</code>.</p>
38,695,098
0
<p>You shoud use <a href="https://github.com/romgar/django-dirtyfields" rel="nofollow">django-dirtyfields</a> and send email immediately or add this job_id to RQ. Full docs <a href="http://django-dirtyfields.readthedocs.io/en/develop/" rel="nofollow">here</a></p> <p>Or update <code>updated_at</code> field only when <c...
39,893,312
0
<p>Try marking the <code>@ManyToOne</code> field as lazy: </p> <pre><code>@ManyToOne(fetch = FetchType.LAZY) private Account account; </code></pre> <p>And change your query using a <code>JOIN FETCH</code> of the <code>account</code> field to generate only one query with all you need, like this:</p> <pre><code>String s...
1,709,440
0
<p>The most efficient way probably is to create a completely random array order and cache that for every user.</p> <p>Except for the MySQL sollution postet above, you may use php in a very similar style: You can use the session id as a start for the random number generator and than shuffle the array using that "random...
4,689,977
0
<p>Just assuming: did you put a <code>;</code> at the end of the <code>#define</code> ? Remove that, it will be put where you use <code>MAXZOOM</code>. </p> <p>So instead of</p> <pre><code>#define MAXZOOM 2.0f; </code></pre> <p>make it</p> <pre><code>#define MAXZOOM 2.0f </code></pre>
37,011,075
0
<blockquote> <pre><code>$bucket-&gt;bootstrap(3); </code></pre> </blockquote> <p><a href="http://bandwidth-throttle.github.io/token-bucket/api/class-bandwidthThrottle.tokenBucket.TokenBucket.html#_bootstrap" rel="nofollow"><code>TokenBucket::bootstrap(3)</code></a> puts three initial tokens into the bucket. Those init...