pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
8,494,204
0
<p>what about checking the referral ? are you using php ?, if yes the you can try using refferal instead, like</p> <pre><code>if($_SERVER[’HTTP_REFERER’]!=''){ echo "&lt;script&gt; $(function(){ $.ajax({ type: 'POST', url: this.href, success: updatePortslide, dataType: 'json', data: 'js=2' }); return false; }); &lt;/s...
10,012,221
0
<p>I hope the below code will give u an idea .. If your PEM doesnt have password ...... refer X509.h header file in openssl</p> <pre><code>X509* oCertificate=NULL; FILE *lFp=NULL; lFp=fopen(iFilePath,"rb"); if(lFp==NULL) { oCertificate=NULL; cout &lt;&lt;("Error File cannot be opened(file missing) ")&lt;&lt;iFilePath ...
34,847,873
0
<p>Hopefully It can help you to deal with your question as following code </p> <pre><code>Simple CASE expression: CASE input_expression WHEN when_expression THEN result_expression [ ...n ] [ ELSE else_result_expression ] END </code></pre> <p><strong>Arguments</strong> </p> <pre><code>input_expression Is the expression...
12,409,173
0
<pre><code>$('div[id^="sameId_"]').click(...) </code></pre> <p>Demo: <a href="http://jsfiddle.net/kpcxu/">http://jsfiddle.net/kpcxu/</a></p> <p>For more info, see <a href="http://api.jquery.com/attribute-starts-with-selector/">Attribute Starts With selector</a>.</p>
5,414,451
0
<p>I can think of some easy things Microsoft could have done to the memory allocator that would have greatly reduced LOH fragmentation without major overhaul, such as rounding allocation sizes up to some multiple like 4K. Given that the smallest non-static LOH objects were 85K, that would represent at most a 5% loss o...
26,281,319
0
<p><code>DatePart</code> can accept dates which are actually text instead of Date/Time datatype. However, the text must be something which Access recognizes as a valid date representation. A text date in <em>"yyyymmdd"</em> format doesn't satisfy that requirement. For example, in the Immediate window ...</p> <pre clas...
26,219,052
0
JHipster Persist Data/Access Database <p>Running with Spring Boot v1.1.7.RELEASE, Spring v4.0.7.RELEASE with hot reloading, etc.</p> <p>Hey JHipsters, I'm working on my first project with JHipster. I can successfully create an application that runs, authenticates, etc. My issues really began when I started to try to cr...
17,810,837
0
Dose z3 find all satifiable models <p>There are some constraints such as x + y > 5 , x > 3 , y &lt; 4, so the set of models x = 4 y= 3, which is given by z3. Dose z3 can give models incrementally, such as another set of models x=5,y = 2? Thanks. Regards </p>
33,028,037
0
<p>Use a set comprehension:</p> <pre><code>values = { url.split("/")[3] for url in url_list } </code></pre>
22,545,045
0
Ruby and Rails: setting current_user if statement <p>I'm in a controller method.</p> <pre><code>p current_user p request.referrer != Rails.application.routes.url_helpers.dashboard_patients_add_url if request.referrer != Rails.application.routes.url_helpers.dashboard_patients_add_url p 'in here' current_user = User.find...
8,592,487
0
<p>I received this error with regards to the largeHeap Attribute, my application did not run under eclipse but under ant it still built and ran normally.</p> <p>The android <a href="http://developer.android.com/guide/topics/manifest/manifest-element.html" rel="nofollow">documentation</a> states that:</p> <blockquote> ...
2,572,720
0
<p>Make sure you've got a valid email address for anyone who posts (as per S.O.) and implement a CAPCHA on registration and when you think someone might be behaving oddly. Keep a well-trained copy of spamassassin around and feed the posts through that.</p> <p>C.</p>
22,857,797
0
<p>Your Game Model does not belong to the <code>Games\Controller</code> namespace. </p> <p>I assume from your structure that your Model is not namespaced, so you have these 2 options:</p> <ol> <li><p><code>use Game;</code> as you did for View and BaseController or</p></li> <li><p><code>$data['games'] = \Game::all();</...
16,182,824
0
Ada beginner Stack program <p>Basically, I have 2 files ( .adb and .ads). I am totally new to Ada and also how to compile 2 files. The program is of a basic stack implementation. I got this compile error when I compiled the .adb file.</p> <pre><code>$ gcc -c test_adt_stack.adb abstract_char_stack.ads:22:01: end of file...
19,628,498
0
<p>If its Real device we can not See Data folder inside data </p> <p>but if its Emulator </p> <p>Go to</p> <p>data>data> Search for your package name>database>yourdatabse.db</p> <p><img src="https://i.stack.imgur.com/LSl4m.png" alt="enter image description here"></p> <p>enter image description here</p> <p>Search your ...
7,388,567
0
<p>Some responders have suggested storing the data in ViewState. While this is custom in ASP.NET you need to make sure that you absolutely understand the implications if you want to go down that route, as it can really hurt performance. To this end I would recommend reading <a href="http://weblogs.asp.net/infinitieslo...
34,241,578
0
<p>Same problem here</p> <pre><code>$ mysqldump -h localhost --lock-all-tables --set-gtid-purged=OFF -u root -p --socket=/var/run/mysqld/mysqld.sock --all-databases &gt; dump.sql mysqldump: Couldn't execute 'SHOW VARIABLES LIKE 'ndbinfo\_version'': Native table 'performance_schema'.'session_variables' has the wrong st...
5,869,269
0
How to get call end event in Android App <p>I have made small app for Android mobile.</p> <p>In one situation i am not getting any solution. Actually my app has small functionality for calling to customer.</p> <p>So after call ended i need that event of which last number will dialed or which app is runs.</p> <p>Please ...
24,246,562
0
How to migrate S3 bucket to another account <p>I need to move data from an S3 bucket to another bucket, on a different account. I was able to sync buckets by running:</p> <pre><code>aws s3 sync s3://my_old_bucket s3://my_new_bucket --profile myprofile </code></pre> <p><em>myprofile</em> contents:</p> <pre><code>[profil...
37,333,837
0
Java GUI ActionListener. Finding out which button was pressed <p>I´ve got a two dimensional Array (Matrix) with the Dimension 50x50. In these Matrix every position has the value 0 or 1. This Matrix is presented by a Grid Layout with 50x50 Buttons, which are white oder black, if the value is 0 or 1. If I press a Button ...
9,591,075
0
<p>You can do all the work in the executing threads of the thread pools using an AtomicInteger to monitor the number of runnables executed</p> <pre><code> int numberOfParties = 5; AtomicInteger numberOfJobsToExecute = new AtomicInteger(1000); ExecutorService pool = Executors.newFixedThreadPool(numberOfParties ); for(i...
5,709,975
0
Binary code Error help <p>I forgot to insert my code, sorry on my behalf..</p> <p>I have a Binary Search going in my program, but when I enter 10 student records into an Array and sort them, the last element of Student ID will not be picked up from my binary search.</p> <p>Say when I sort the Array and 232 was the last...
23,991,717
0
Horizontal lines in errorbars disappearing <p>I'm having some troubles with errorbars in ggplot (R) similar to <a href="http://stackoverflow.com/questions/13491829/missing-errorbars-when-using-yscalelog-at-matplotlib">this problem in Python</a>. My horizontal errobars are disappearing when using the <code>scale_y</code...
23,051,546
0
Chromecast Chrome API - senderId <p>The receiver adds a senderId to each message it receives. Is the sender aware of that id? Where can it be found? That would help greatly during development.</p>
32,537,172
0
<p>At the end I went with System.JS and jspm, and I must say it absolutely solves all the problems that I was facing, and then some, flawlessly. It took me a while until I finally found out about it, but I believe this is gonna be the defacto standard for a long while so I'd encourage anyone writing a new project to j...
20,456,422
0
AngularJSFilter not working <p>I am very new to Angular JS. Just started an hour back to dig into it.</p> <p>I cannot get the filter API to work on this page. I am drawing a blank .. </p> <p>I am very sorry to ask such a silly question...</p> <p>jsfiddle.net/khirthane/52hN5/</p>
14,551,224
0
Pass an MFC control to a thread or pass an handle? <p>I've been reading somewhere that it is safer to pass an MFC ui control to a thread as an handle rather than to pass a pointer to the control.</p> <p>Option 1 - pass a pointer to static text:</p> <pre><code>TestDialog dlg1; ::_beginthreadex(NULL, 0, &amp;tSetTextByPo...
13,087,688
0
<p>I find the Ajax Form plugin a good tool for the job.</p> <p><a href="http://www.malsup.com/jquery/form/#tab4" rel="nofollow">http://www.malsup.com/jquery/form/#tab4</a></p> <p>A basic code example could be:</p> <pre><code>$(document).ready(function() { // On Document Ready var options = { target: '#output1', // ID ...
14,656,763
0
<p>You forgot the closing <code>&gt;</code> for the <code>CDATA</code> element:</p> <pre><code>"&lt;Description&gt;&lt;![CDATA["+page+"]]&gt;&lt;/Description&gt;"+\ </code></pre>
3,423,517
0
<p>There is quite a list:</p> <ol> <li><a href="http://code.google.com/p/nstub/" rel="nofollow noreferrer">NStub</a></li> <li><a href="http://sourceforge.net/projects/testgennet/" rel="nofollow noreferrer">TestGen.Net</a></li> <li><a href="http://code.google.com/p/nunitgenaddin/" rel="nofollow noreferrer">NunitGenAddI...
18,483,602
0
Tomcat ClientAbortException Listener? <p>Our Tomcat 6 Server is reporting quite a few ClientAbortException errors, which I believe is down to say a user navigating away from the page before its fully loaded. We are also getting No buffer space available (maximum connections reached? errors.</p> <p>Is there a way of cre...
7,604,272
1
How to select some urls with BeautifulSoup? <p>I want to scrape the following information except the last row and "class="Region" row:</p> <pre><code>... &lt;td&gt;7&lt;/td&gt; &lt;td bgcolor="" align="left" style=" width:496px"&gt;&lt;a class="xnternal" href="http://www.whitecase.com"&gt;White and Case&lt;/a&gt;&lt;/t...
26,668,805
0
<p>try below code :-</p> <pre><code>listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) { Toast.makeText(getApplicationContext(), "Click ListItem Number " + position, Toast.LENGTH_LONG) .show(); } }); </code></pre>...
28,117,005
0
How can I tail -f but only in whole lines? <p>I have a constantly updating huge log file (MainLog).</p> <p>I want to create another file which is only the last n lines of the log file BUT also updating.</p> <p>If I use:</p> <blockquote> <p>tail -f MainLog > RecentLog</p> </blockquote> <p>I get ALMOST what I want except...
3,477,306
0
<p>you left out a for(;true;) loop</p>
5,958,423
0
<p>I had the same problem and resolved it by updating to the latest jQuery (1.6) and jQuery.validate (1.8) libraries. The easiest way to get these is searching NuGet for jQuery.</p>
21,768,410
0
<p>Check the Optimisation Tips section in the Android Developer console for your app, it should give some suggestions for removing that tag.</p>
15,605,544
0
<p>Try this :</p> <pre><code> &lt;%= f.simple_fields_for :picture do |pic| %&gt; &lt;div class="fileupload fileupload-new" data-provides="fileupload"&gt; &lt;div class="input-append"&gt; &lt;div class="uneditable-input span3"&gt; &lt;i class="icon-file fileupload-exists"&gt;&lt;/i&gt; &lt;span class="fileupload-previe...
826,228
0
<p>Use JConsole-- you likely already have it: <a href="http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html" rel="nofollow noreferrer">http://java.sun.com/j2se/1.5.0/docs/guide/management/jconsole.html</a> <a href="http://openjdk.java.net/tools/svc/jconsole/" rel="nofollow noreferrer">http://openjdk.java...
38,570,390
0
ui-router change url after $state.go <p>I have a route:</p> <pre><code>$stateProvider.state('keeper.telepay.category', { url: '/category-{id}/country-{cid}/region-{rid}' } </code></pre> <p>In all cases when I use $state.go with this route, I want to change <strong>rid</strong> to 'all' if it's value is '0', so my url'l...
12,094,773
0
<p>Solution was to add <strong>index index.php</strong></p> <pre><code> index index.php try_files $uri $uri/ $uri/index.php /index.php; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } </code></pre>
20,839,539
0
<p>This problem is quite simple to solve even without jQuery or similar in plain JavaScript. Here it is for your example:</p> <pre><code>var next = (function (sections) { function getTop(node) { return node ? node.offsetTop + getTop(node.offsetParent) : 0; } return function () { var i, nodeTop, top = window.pageYOffse...
40,173,892
0
Center Loss in Keras <p>I want to implement center Loss explained in [<a href="http://ydwen.github.io/papers/WenECCV16.pdf]" rel="nofollow">http://ydwen.github.io/papers/WenECCV16.pdf]</a> in Keras</p> <p>I started to create a network with 2 outputs such as : </p> <pre><code>inputs = Input(shape=(100,100,3)) ... fc = D...
34,796,071
0
Removing multiple objects on Fabric.js canvas <p>Struggling to remove multiple objects from the fabric canvas. Everything seems to be in working order but when the code runs it does not remove the multiple selected objects from the canvas. </p> <pre><code> service.deleteSelectedObject = function () { var selectedObject...
30,085,380
0
<p>Extensions have much lower memory limits than normal apps. You'll have to investigate why you extension is using so much memory. Perhaps there's a leak. </p>
40,490,111
0
<p>Add <code>global next_page</code> to the beginning of function <code>getPosts()</code> instead of pass the parameter into it, so that you update the value of global variable <code>next_page</code> . And declare the global variable next_page as a str <code>''</code> instead of list<code>[]</code>.</p>
39,789,717
0
<p>You can access logs from CLI using <code>yarn logs -applicationId &lt;application ID&gt;</code></p>
19,823,386
0
Cant push to stack, mips <p>I am just trying to print this 'a' to screen, but by first pushing to stack so that I can check whether I did accomplish on pushing to stack or not, seems that I couldn't because it prints a weird character everytime. What's wrong?</p> <pre><code>.data char: .word 'a' .text .globl main main:...
35,683,626
0
Make banner ads responsive <p>Friends! I am working on adding banner ads to my website, the html that I have added to display banner is on <a href="https://jsfiddle.net/1r1kydjz/2/" rel="nofollow">https://jsfiddle.net/1r1kydjz/2/</a></p> <pre><code>&lt;div data-wrid="WRID-145664652759935473" data-widgettype="staticBann...
24,972,989
0
<p>As mentioned by @SirDarius, this is implementation dependent and therefore you would need to check on a per implementation basis.</p> <p><em>Usually</em>, <code>std::set</code> is implemented as a red-black tree with lean iterators. This means that for each element in the set, there is <em>one node</em>, and this n...
24,401,674
0
Running hadoop with compressed files as input. Data Input read by hadoop not in sequence. Number format exception <p>I giving a tar.bz2 file ,.gz and tar.gz files as input after changing the properties in mapred-site.xml. None of the above seem to have worked. What I assumed to happen here is the records read as input ...
13,259,812
0
<p>Welcome to the wonderful world of loose typing. In php, array_search defaults to nonstrict comparisons ("=="), but you can add a third parameter to force strict ("==="). You almost always want strict, though there are times when nonstrict is the correct operation.</p> <p>check out the following:</p> <pre><code>$all...
41,068,081
0
<p><code>UserDefaults</code> is just a bunch of pairs of keys and values. So, you could assign a boolean value ("hidden") for each product:</p> <pre><code>// get the current product - this depends on how your table is set up let product = products[indexPath.row] // set the boolean to true for this product UserDefaults...
30,018,686
1
python threads - please explain <p>I'm trying to understand how threads work in python and I'm slightly confused around a few things. </p> <p>I was under the impression that you could run different tasks at the same time in parallel when using threads? </p> <p>The code below will demonstrate some of the issues I'm expe...
264,933
0
<p>I don't know how if this is an acceptable solution for you, but you can upload your own HTML (or any other type for that matter) files on Google Pages. So the proposes solution would be: write manually the HTML pages with the necessary JS tags and upload them to Google Pages.</p>
89,750
0
<p>And when you need to inject it back into some other DOM (like your HTML page) you can export it again using the $dom->saveXML() method. The problem however is that it also exports an xml header (it's even worse for the saveHTML version). To get rid of that use this:</p> <pre><code>$xml = $dom-&gt;saveXML(); $xml = ...
32,426,365
0
<p>Your first script seems to work just fine with the latest Unicode version of AutoHotkey. Get latest version @ ahkscript.org</p> <p>Added a check for "ы" in the code below:</p> <pre><code>~LWin Up:: Input, key, L1 if (key = "n" or key = "ы") { Run, Notepad.exe } else if (key = "s") { Run, cmd.exe } return </code></p...
12,027,921
0
<p>Try this,</p> <pre><code>int x = 1; if (*(char *)&amp;x == 1) printf("Little Endian [LSB first]"); // or LED1 ON else printf("Big Endian [MSB first]"); // or LED2 ON </code></pre>
40,193,067
0
Sessions in shopping cart <p>I'm trying to show in a table the values that are stored in a session, the problem is: How to show all the information until now the application shows one of my three sessions, what about the rest? Any Idea?</p> <pre><code>&lt;?php $_SESSION['id'][] = $_GET['id']; $_SESSION['name'][] = $_GE...
37,396,786
0
How to count consecutive row where one column have a specific value in SQL Server? <p>I have a data set that looks like this</p> <pre><code>gId mId 226 88825 226 88825 226 88825 226 88825 226 88825 226 88825 226 88832 226 88832 226 88832 226 88832 226 88863 226 88863 226 88863 226 88863 226 88863 227 89080 227 89080 22...
3,195,918
0
<p>You can't prevent the user from switching back because you've spawned a separate process. As far as the operating system is concerned it's as if you'd started the second one via it's desktop icon (for example).</p> <p>I think the best you can hope for is to disable the relevant menus/options when the second process...
31,622,009
0
Nginx server (not showing changes) - Delete cache? <p>I'm running a Laravel Site (Ubuntu) on Nginx (Not a virtual box). When I make changes to a css file, or any file for that matter i'm unable to see the changes right away. I've tried changing sendfile from on to off as noted in this link: </p> <p><a href="http://stac...
25,130,414
0
not being able to set the n° of specified threads desired <p>I have this very simple openmp program that is not creating the four desired threads, #include #include </p> <pre><code>main () { omp_set_num_threads(4); #pragma omp paralel { int id = omp_get_thread_num(); int nt = omp_get_num_threads(); printf ("I am thread...
191,006
0
<p>I also vote for the second version based on<br> this <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/undo.htm" rel="nofollow noreferrer">link</a> (which is Oracle 10.2, but I think it still applies to 9.2 as well). </p> <p>It says: "After a transaction is committed, undo data is no longer ne...
19,807,883
0
<p>Are you getting no errors at all from the Javascript console you're using? I'd say adding parentheses should do the trick:</p> <pre><code>$$('.student-link').invoke('observe','click',draw_report()); $$('.student-link').invoke('observe','click',set_active()); </code></pre> <p><strong>EDIT</strong>: I see you use a j...
3,761,428
0
<p>Since you're asking for the best way, and if Log4J is not a strong requirement, my suggestion would be to use <a href="http://logback.qos.ch/" rel="nofollow noreferrer">Logback</a> and its <a href="http://logback.qos.ch/manual/appenders.html#DBAppender" rel="nofollow noreferrer"><code>DbAppender</code></a>. That's ...
21,531,351
0
how to do URL-Rewriting when browser cookies are disabled? <p>I am trying to achieve URL-Rewriting for my Application. I am using java,servlet, JSP, tomcat 7 as part of the technologies. </p> <p><strong>BackGround:</strong> The reason for URL-Rewriting is that when my browser cookies are disabled the connection between...
34,493,379
0
<pre><code>for (CNContact *contact in contacts) { if (!contacts) { contacts = [[NSMutableArray alloc] init]; if ( contact.imageData != nil ) { // iOS &gt;= 4.1 UIImage *CIMage = [UIImage imageWithData:(NSData *)contact.imageData]; } } NSString *string = [formatter stringFromContact:contact]; NSLog(@"contact = %@", str...
277,436
0
<p>See that the margins and paddings are correct. The scrollbar can be behind something.</p> <p>Put the exterior container height with a fixed value, It can be <em>stretching</em> the listview so it will never show the scrollbar.</p> <p>HTH</p>
35,997,353
0
<p>The cells are reused in iOS, so you need to make sure you properly unhook handlers and reset state when a cell is reused. You can do something like this:</p> <pre><code>public partial class CustomCell : UITableViewCell { EventHandler _likeButtonHandler; public static readonly NSString Key = new NSString (typeof(Cus...
37,774,208
0
MYSQL Nested Query with two select <p>I have:</p> <pre><code>Table1 (UserID -City - Adress - Mobile) Table2 (DeviceID - UserID - Vendor - Model). </code></pre> <p>I want to perform nested query to select the following in one row:</p> <pre><code> select DeviceID, UserID, Model From Table2 Where Vendor=Sony (and for this...
30,385,579
0
<p>Suggest the use of <code>Defined Name Ranges</code> to hold the user maintained list <em>(as show in the picture below)</em></p> <p><img src="https://i.stack.imgur.com/lDiiH.png" alt="enter image description here"></p> <p>Let’s add a worksheet for user input of the requirements called “_Tables”. Then create <code>D...
6,659,690
1
Is there a way to chunk 2 or more repititions of a tag in a tagged sentence using nltk? <p>I'm trying to use the nltk module in python to chunk together any instances where two to five nouns occur in sequence.</p> <p>This is the code I am using:</p> <pre><code>parse_pattern = "Keyword: {&lt; N&gt;{2,5}}" keyword_parser...
37,046,362
0
<p>You could achieve this by looping over the properties of the object itself and sorting the arrays they contain, something like this:</p> <pre><code>for (var key in mainarray) { if (mainarray[key] === Array) mainarray[key].sort(); } </code></pre> <p><a href="https://jsfiddle.net/26gk4h9b/" rel="nofollow"><strong>Wor...
23,489,696
0
How to disabled selected date (asp.net mvc4) <p>I am trying to make an appointment page in MVC4. It is working well but I would like to disable the date which is chosen. Here is my controller to make an appointment:</p> <pre><code>public ActionResult Make() { return View(); } [HttpPost] [ValidateAntiForgeryToken] publi...
4,049,949
0
<p>This website is pretty good but not specific to Java: <a href="http://bigocheatsheet.com/" rel="nofollow noreferrer">http://bigocheatsheet.com/</a></p> <p><strike>A copy of the original link in this answer can be found at <a href="https://github.com/benblack86/java-snippets/blob/master/resources/java_collections.pd...
20,014,292
0
Chain an additional order on a Rails activerecord query? <p>Activerecord seems to ignore my second <code>order</code> in a chained AR query.</p> <p>What I'm trying to do is retrieve the top 5 most-read articles <em>within</em> the top 25 highest-scored (eg. rated by users) articles.</p> <p><code>Article</code> has both...
34,858,841
0
<p>I had the exact same problem with a VS 2012 and oracle.dataAccess.dll In a software my team developed. When looking dipper to the code and spending lots of hours configuring all kinds of stuff eventually turns out it was a compiling error due to a 64x/86x bit mismatch. Your exception is quite general but I hope thi...
25,821,688
0
Swift generic Function (n choose k) <p>I'm trying to make this JavaScript code in Swift: <a href="https://gist.github.com/axelpale/3118596" rel="nofollow">k_combinations</a></p> <p>And so far i have this in Swift:</p> <pre><code>import Foundation import Cocoa extension Array { func slice(args: Int...) -&gt; Array { var...
16,105,116
0
<p>Display as columns - this is a simple way. You may employ Rpad(), Lpad() for this, which would be more advanced I guess:</p> <pre><code>DECLARE v_name varchar2(30) := 'Joe Bloggs'; v_job varchar2(20) := 'Contractor'; v_pay number := 52657.3; BEGIN DBMS_OUTPUT.PUT_LINE('Employee Name'||chr(9)||chr(9)||chr(9)||'Job'|...
30,951,269
0
<p>You are casting the short to AppCacheStatus object below, hence the error.</p> <pre><code> AppCacheStatus status = ((ApplicationCache) (driver)).getStatus(); </code></pre> <p><a href="http://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/html5/ApplicationCache.html#getStatus%28%29" rel="nofollo...
26,393,976
0
Python File Writing Format Issue <p><strong>The Code</strong></p> <pre><code>def rainfallInInches(): file_object = open('rainfalls.txt') list_of_cities = [] list_of_rainfall_inches = [] for line in file_object: cut_up_line = line.split() city = cut_up_line[0] rainfall_mm = int(line[len(line) - 3:]) rainfall_inches = ra...
38,889,709
0
Redirect to another route when `mapHooks` fails <p>I have defined following <code>mapHooks</code>:</p> <pre><code>const mapHooks = { fetch: ({ dispatch, params }) =&gt; dispatch(fetchPost(params.postId)).catch(() =&gt; { console.log('catch'); }), }; </code></pre> <p>Sometimes, post cannot be found and I'd like to redir...
9,367,650
0
Extract KML from Fusion Tables into Google Earth <p>I am trying to extract my KML file from Google's Fusion Tables into Google Earth. I follow what I think are the necessary steps via KML Network Link instructions. I must be missing something because no matter what I do the data will not show in Google Earth. I have th...
30,184,152
0
<p>You can achieve this by specifying things you want to show on card in <code>cardConfig</code></p> <pre><code>cardConfig: { fields: [ 'Name', 'TestCases', 'c_StoryType', 'Children', 'c_TargetRelease', 'PlanEstimate' { name: 'Children', renderer: this._renderChildStories }, ], } </code></pre> <p>and then define <code...
26,008,034
0
How to customise the php script so that the feedback is exactly the same as the user have typed out in a form? <p>Does anyone have any idea how to customize the php page so that the user can see a feedback of what he has already filled in? I noticed many php scripts have a 'thank you' feedback but I want more than that...
20,676,383
0
<p>You need many to many relationship:</p> <p><strong>In your user model:</strong></p> <pre><code>class User extends Eloquent { public function leads() { return $this-&gt;belongsToMany('Lead'); } } </code></pre> <p><strong>In your Lead model:</strong></p> <pre><code>class Lead extends Eloquent { public function users(...
33,968,920
0
postgres database : Insufficient privilege, permission denied for relation table <p>I have been using the postgres database on heroku for a while. and suddenly I had some problems on saving to database I got this error all the time</p> <pre><code> Insufficient privilege, permission denied for relation table </code></pr...
15,274,823
0
<p>You can store a whole matrix in one column of a <code>data.frame</code>:</p> <pre><code>x &lt;- a [, -1] y &lt;- a [, 1] data &lt;- data.frame (y = y, x = I (x)) str (data) ## 'data.frame': 10 obs. of 2 variables: ## $ y: num 0.818 0.767 -0.666 0.788 -0.489 ... ## $ x: AsIs [1:10, 1:9] 0.916274.... 0.386565.... 0.7...
1,469,564
0
<p>The character array contains executable code and the cast is a function cast.</p> <p><code>(*(void(*) ())</code> means "cast to a function pointer that produces void, i.e. nothing. The <code>()</code> after the name is the function call operator.</p>
29,419,642
0
PHP Form With Conditional Fields <p>I am trying to create a PHP form to insert records into a database where the record has conditional start and end dates. I have two radio buttons setup where you can either choose: </p> <ol> <li>No End Date </li> <li>Choose a series of date and time options which are concated into st...
5,088,870
0
xml parsing error <p>I am writing a ocs IM client for android and now I am trying to delete a contact from contact list with the </p> <pre><code>&lt;deleteContact rid="100"&gt;&lt;/deleteContact&gt; &lt;uri&gt;sip:alice@contoso.com&lt;/uri&gt; &lt;/deleteContact&gt; </code></pre> <p>command request to the cwa server......
26,206,286
0
Regular expression to match wordpress like shortcodes, for both self closing and enclosed <p>I am trying to get a regular expression pattern to implement a shortcode feature in Joomla CMS, using plugins, similar to WordPress.</p> <p>The shortcode may be a self closing one like <code>{myshortcode shortcode="codeone"}</c...
27,802,997
0
<pre><code>#graph_bg{ position:relative; width:350px; height:300px; background-color:yellow; overflow:hidden; } #graph_bar{ position: absolute; top: 350px; left: 50px; height:300px; width:50px; background-color:blue; } #pop{ position: absolute; top:50px; left: 50px; width:50px; height:50px; background-color:red; displ...
20,354,188
0
<pre><code>f1 = 1 ; N = 1024 ; fs = 200 ; ts = 1/fs ; t = -(N/(2*fs)):ts:(N/(2*fs) ; y = sin(2*pi*f1*t) ; plot(t,y) </code></pre> <p>You do not need to use i for getting 1024 samples out. this can be done by choosing correct start and stop values for t.</p>
14,991,286
0
Set the background in canvas using layer (zIndex) <p>I need to get a background on canvas using layers. Variable for it's background. I know I should use CSS and set the z-index, but do not know how to do it in this case.</p> <p>JS:</p> <pre><code>function doFirst(){ var x = document.getElementById('canvas'); canvas = ...
12,834,155
0
<p>you may also add Method to Button for onClick in xml and use the same method in activity.As,</p> <pre><code>private void blabla(view v){ if(v= ui_titlebar_back_btn){ //do something } else if(v==blabla){ //do something } } </code></pre>
29,196,683
0
<p>Try it with <code>filename</code>:</p> <pre><code>send_data @clients.pluck(:email).join('; '), filename: file_name </code></pre>
36,973,977
0
<p>Try commenting out the following line of code in your AppDelegate.swift file - </p> <pre><code>PFUser.enableAutomaticUser() </code></pre> <p>enableAutomaticUser() will log in an anonymous user once you call PFUser.logOut(), and the username for an anonymous user is nil.</p>
11,930,477
0
<pre><code>with open("f1") as f1,open("f2") as f2: if f1.read().strip() in f2.read(): print 'found' </code></pre> <p>Edit: As python 2.6 doesn't support multiple context managers on single line:</p> <pre><code>with open("f1") as f1: with open("f2") as f2: if f1.read().strip() in f2.read(): print 'found' </code></pre>