pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
34,882,019
0
<p>You need target paragraph thus use <a href="http://api.jquery.com/prev/"><code>.prev()</code></a> then use <a href="http://api.jquery.com/append/"><code>append()</code></a></p> <pre><code>$('div.roundbox').prev('p').append('2015-2016'); </code></pre>
24,049,572
0
<p>A fix has been submitted which probably addresses your problem. Please pull the latest version of the component and try again.</p>
29,729,689
0
<p>In the MIDDLEWARE_CLASSES of settings.py, you have <code>'django.middleware.security.SecurityMiddleware',</code>, which is new in Django 1.8. Either make sure Heroku is using Django 1.8, or remove that line from MIDDLEWARE_CLASSES.</p>
23,717,319
0
<p>You have a syntax error in your code: <code>.navbar ul li a: hover</code> Remove the space after the <code>:</code> and it will work.</p>
37,451,462
0
How do I validate my email submission on php? <p>I'm just getting into coding and put together a webpage using dreamweaver. I created a php page with my email coding which is executed from a form and submit button on an html page. I continously recieve blank emails on a daily basis which apparently means I need to add ...
9,735,728
0
How to trace map region while scrolling Map in iPhone <p>I completed to display map view to current location in iPhone with maximize zoom level.</p> <p>But now i want to trace <strong>any scrolling</strong> in map view to get its visible area.</p> <p>Is there any Event to do that if Yes then How??</p> <p>If No the How ...
34,294,017
0
<p>The issue is that DeletionPolicy must be set to one of three strings. And, though your If check will return one of them, from a systematic perspective, it only knows that it's returning a String - but is not guaranteed to be a valid string (same with your map and parameter checks), and thus it only accepts a string...
546,116
0
<p>Why not just use the UNIQUE attribute on the column in your database? Setting that will make the SQL server enforce that and throw an error if you try to insert a dupe.</p>
17,293,944
0
<p>They are like two "Tom"s in your class! Because:</p> <p>In this case, <code>"odp" = "odp"</code> because they are <strong>TWO</strong> strings with <strong>SAME</strong> VALUE!!</p> <p>So they are not <code>==</code> because they are <strong>TWO</strong> different strings store in <strong>different</strong> (Memory...
3,328,794
0
Is there a performance difference between PDO fetch statements? <p>like in</p> <pre><code>/* Exercise PDOStatement::fetch styles */ print("PDO::FETCH_ASSOC: "); print("Return next row as an array indexed by column name\n"); $result = $sth-&gt;fetch(PDO::FETCH_ASSOC); print_r($result); print("\n"); print("PDO::FETCH_BOT...
15,109,170
0
<p>In addition to what @abarnert said, I today had to find out that the default <code>cpio</code> utility on Mountain Lion uses a different archive format per default (not sure which), even with the man page stating it would use the old cpio/odc format. So, if anyone stumbles upon the <code>cpio read error: bad file f...
1,902,402
0
<p>It's possible to set environment variables during the build to alter the path and still have it work in a local environment.</p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/ms184806.aspx" rel="nofollow noreferrer">How to: Parameterize the URL for a Web Performance Tests Web Server</a></li> <li><a href...
27,545,124
0
jQuery file upload plugin error <p>I am trying to implement the basic fileupload from blueimp file upload plugin:</p> <p><a href="http://blueimp.github.io/jQuery-File-Upload/basic.html" rel="nofollow">http://blueimp.github.io/jQuery-File-Upload/basic.html</a></p> <p>each time I run the code ,I select 3 files to upload ...
14,085,986
0
<p>There can be situations when you will need two different <code>lock</code>'s, which are independent of each other. Meaning when one 'lockable' part of code is locked other 'lockable' should not be locked. That's why there is ability to provide lock objects - you can have several of them for several independent <cod...
10,441,567
0
JSP download from intranet <p>I need to read binary file from intranet http server and get it to download to public.</p> <p>SCHEMA</p> <p>intranet file server(Apache)=1 &lt;-->Public http server(Apache Tomcat)=2&lt;-->internet authorized user=3 </p> <p>howto release this without save to filesystem on server 2</p> <p>Th...
6,025,464
0
Reset functions after ajax <p>I have this javascript file: <a href="http://pastebin.com/m2keHsTM" rel="nofollow">http://pastebin.com/m2keHsTM</a></p> <p>A big part of it is a toggle switch that works by sliding your finger or mouse on it. As you see at the end of the document </p> <pre><code>var togglebox = "&lt;div cl...
36,945,788
0
Getting Google API Push Notifications for Resources/Rooms <p>I'm trying to get Google Calendar Push Notifications working for Resources (aka Rooms). They work perfectly for user calendars, but when I call/watch on a Resource, it successfully creates. I get the initial "Sync" call on the server, but then I never hear ba...
19,130,036
0
Text reaching over the specified width of its DIV <p>EDIT: Another image to further showcase my issue:</p> <p><a href="http://imageshack.us/photo/my-images/405/cvtc.png/" rel="nofollow noreferrer">http://imageshack.us/photo/my-images/405/cvtc.png/</a></p> <p>I know this question has been asked but every solution I have...
27,032,258
0
<p>I don't think you can do it from the app level itself, since the push notifications that go to an app are controlled at the OS level (so push notifications for the app, but regardless of what for)</p> <p>However, you can setup tags (or something) on your server so then the app enables/disabled the server to send no...
18,951,440
0
<p>You can covert the PPT file to HTML:</p> <pre><code>unoconv -o image/ -f html SinoProbe_02_02_001.ppt </code></pre> <p>Then the image folder will fill with HTML and JPG files.</p>
1,976,841
0
<p>Cookies are sent via the user-agent every time a page is requested. The user-agent doesn't need to be a browser. It could be a small shell script. Even if it is a browser, there's an "edit cookie" extension for Firefox.</p>
22,849,321
0
<p>Something like this?</p> <p><img src="https://i.stack.imgur.com/IXpfY.png" alt=""></p> <pre><code># generate more illustrative dataset: you have this already set.seed(1) x &lt;- 1:1000 y &lt;- as.POSIXct("06/01/2013",format="%m/%d/%Y")+sample(0:(210*24*60)*60,1000) y &lt;- strftime(y,format="%m/%d/%Y %H:%M") data &...
21,473,935
0
<p>You can do some thing like the following. </p> <ol> <li><p>Use Parameterized Plugin and pass SVN revision to the down stream project.</p></li> <li><p>In the down stream project, no need to select svn as the source code management tool. Instead, add a first build set up to update your working directory to the revisi...
7,126,722
0
For purpose of EF linq query, is First(c=>cond) equiv to Where(c=>cond).First()? <p>Is there any hidden subtlety, is one perferred, or is one just a shorter way to write the other?</p> <pre><code>Client = db.Clients.First(c=&gt;c.Name == "Client 1") </code></pre> <p>and</p> <pre><code>Client = db.Clients.Where(c=&gt;c....
36,534,366
0
<p>Consider wanting to match the word "march":</p> <pre><code>&gt;&gt;&gt; regex = re.compile(r'\bmarch\b') </code></pre> <p>It can come at the end of the sentence...</p> <pre><code>&gt;&gt;&gt; regex.search('I love march') &lt;_sre.SRE_Match object at 0x10568e4a8&gt; </code></pre> <p>Or the beginning ...</p> <pre><co...
6,608,215
0
How to get values from query string and pass it to new page using .htaccess file <p>currently I m using following code in my site in .htaccess file :</p> <pre><code>RewriteRule ^([^/\.]+).php?$ comman.php?cat=$1 [L] </code></pre> <p>This redirects user to comman.php page say, user requests</p> <p><a href="http://www.my...
22,937,691
0
Generate Word (docx) Files with from Templates (dotx) on Server Application <p>I'm currently working on a project where I have to transfer an existing VB program into a Server Application using ASP.NET. While I had success doing that there's one thing that I'm struggeling with:</p> <p>The VB Program was using Microsoft...
15,069,802
0
<p>Is working fine for me, please check the following code:</p> <p>$('input').bind('click mouseup mousedown', function(event) { // some code for a click event</p> <pre><code>if (event.type == 'mousedown'){ console.log('mousedown'); $(this).addClass('active'); } if (event.type == 'mouseup'){ console.log('mouseup'); $(t...
33,727,457
0
What time format is this: 38793.20139 <p>This data is from scientific tracking data. What is this date format:</p> <p>38793.20139</p> <p>I have looked through all of the stackoverflow datetime format entries I could find.</p>
34,701,508
0
<p>You have the fade backwards </p> <pre><code> $(".btn--alt").hover( function () { $("#please").fadeOut(); }, function () { $("#please").fadeIn(); } ); </code></pre> <p>See this example:</p> <p><a href="https://jsfiddle.net/pm7dqk5r/" rel="nofollow">fiddle</a></p>
26,070,327
0
<p>Here's an easy way to do it, using the fact that on the lines in question, if your file follows the same format then the numbers will always appear in the same character of the line. This is a little bit fragile, and it'd be better to make your program more robust, to cope with arbitrary amounts of whitespace, for ...
25,633,238
0
Design Pattern to output separate different files from same input parameter <p>I have this Food class with 20 properties. I need to use this Food class and output 3 different files, using variations of these 20 fields. For example, File 1 contains output only 8 fields. File 2 contains 15 fields. File 3 contains 18 fiel...
15,190,532
0
<p>If you want to use pickle you can use the <code>loads</code> and <code>dumps</code> functions.</p> <pre><code>import pickle a_dict = { x:str(x) for x in range(5) } serialized_dict = pickle.dumps(a_dict) # Send it through the socket and on the receiving end: a_dict = pickle.loads(the_received_string) </code></pre> <...
4,249,424
0
Updating rows in DataTable - why isn't this working? <p>I'm trying to update fields in a DataTable. The field I'm trying to edit is a date, I need to format it.</p> <pre><code>foreach (DataRow row in dt.Rows) { string originalRow = row["Departure Date"].ToString(); //displays "01/01/2010 12:00:00 AM" row["Departure Dat...
15,781,823
0
<p>Correction, you're missing the <code>#</code>, and you're missing the <code>/</code> in <code>&lt;/li&gt;</code></p> <pre><code>for(var i=0; i&lt;test.length; i++) { $("#xyz" + i).html('&lt;li&gt;' + test[i] +'&lt;/li&gt;'); } </code></pre>
31,624,081
0
<p>If you are using the new support library for 5.1 in android studio, you can instead use this on your AppCompatActivity</p> <pre><code> ActionBar actionBar = getSupportActionBar(); actionBar.setHomeButtonEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setHomeAsUpIndicator(R.mipmap.ic_arrow_back_w...
10,515,441
0
<p>Add a check if there's already a video playing, if yes remove it.</p> <pre><code>$(function(){ $('.toggle').click(function(e) { e.preventDefault(); var content = '&lt;video id="my_video"&gt;&lt;source src="animation.mp4" type="video/mp4"/&gt; &lt;/video&gt;', search = $('video#my_video').length; if(search &gt; 0) {...
22,402,516
0
Update and remove GridView items at runtime <p>i am developing a project where i compare the images of two items,So if two items will have same image after clicking these items should be hide. my code is given below and this code encounter a problem. is this a logical error or any other issue? i try to solve the issue ...
36,602,276
0
<p>I have found more flexible solution. I have created xlsx file which will be updated once per week with exactly measured cities. My script will read that xlsx file and pull cities from that. On that way I am avoiding empty printed pdf pages. Thanks all!</p>
15,485,066
0
Condensing repetitive if statements <p>I have the following code, which scans a directory and puts files containing "a" within its filename to a new folder A. Similarly, it puts files with "b" within its filename to a new folder called B. Since the if statements are basically the same, with the only thing that changes ...
31,011,211
0
<p>It's crashing because you have not initialized Sport *one; and you're attempting to call methods on a null pointer. You need to first create a Running object within the Activity constructor using the "new" operator like so:</p> <pre><code>one = new Running(n, time); </code></pre> <p>Create an overloaded constructor...
37,956,697
0
<p>You can aggregate (use <code>max</code> or <code>min</code> etc) in the same query.</p> <pre><code>select VisitIDCode ,MAX(CASE WHEN LeftJustifiedLabel = 'Additional Intervention Information' Then ValueText End) As 'Additional Intervention Information' ,MAX(CASE WHEN LeftJustifiedLabel = 'American Cancer Society Co...
18,591,764
0
<pre><code>/// &lt;summary&gt; /// Returns a collapsed visibility when the price is less than or equal to the comparison price. /// &lt;/summary&gt; public class PriceToVisibilityConverter : IValueConverter { private const double comparePrice = 2000; public object Convert(object value, Type targetType, object paramete...
25,144,180
0
<p>Your issue is with attempting to change your month by adding 1. 1 in date serials in Excel is equal to 1 day. Try changing your month by using the following:</p> <pre><code>NewDate = Format(DateAdd("m",1,StartDate),"dd/mm/yyyy") </code></pre>
28,952,453
0
<p>If you are using Laravel 5, you can do it like this (I am not sure if it is the best way)</p> <pre><code>return view("layout/here", [ "content" =&gt; view("dynamic/content/here") ]); </code></pre> <p>then in your view you can do this</p> <pre><code> &lt;?php echo $content; ?&gt; </code></pre> <p>of course, if you a...
12,957,040
0
wp_ajax_ actions that use object-oriented action handlers? <p>I'm trying to pass an ajax action to /wp-admin/admin-ajax.php, however I can't seem to get it to call any functions that use a class to encapsulate the namespace. I get the following error:</p> <pre><code>Warning: call_user_func_array() expects parameter 1 t...
15,754,009
0
<p>Edit: I updated the code to work better.</p> <p>I'm unsure exactly what the issue is but looking at your code I wouldn't be surprised that the negative look behind regex isn't matching multiple word strings where the "keyword" is not the first word after the src or alt. It might possible to beef up the regex, but I...
7,884,847
0
<p>You can pass command line parameters with ClickOnce. You could have one normal link and then one link that contains a command line parameter that you can read in the startup to activte the app after they login (or any action you want).</p>
24,884,532
0
<p>I did not realize that the BaseEntity also had a <a href="http://symfony.com/doc/current/reference/constraints/Callback.html" rel="nofollow">callback validator</a>.</p> <pre><code>/** * @ORM\Entity ... * @Assert\Callback(callback="validate") */ abstract class Approval { ... /** * @param ExecutionContextInterface $c...
5,737,957
0
Assert that an instance method is called once in the controller <p>I am trying to assert that an instance method is called on a certain controller action once. The test does not work for some reason. The code does indeed do what it is supposed to.</p> <p>I am using Rspec 1.x and factory_girl </p> <p>Test</p> <pre><code...
9,006,017
0
<p>The problem you face is that you wish to go to the bottom of your page which has not loaded yet. I would consider loading the page in a hidden format then show it when it has all loaded and after scrolling the user at the location you want. Use the focus or scroll to methods.</p> <p>Take a look at the filament grou...
25,803,471
0
<p>This is the same case as with forward declaration of class/struct type:</p> <pre><code>struct node; struct node* node_ptr; /* is valid */ struct node node_instance; /* is invalid */ </code></pre> <p>So <code>struct node;</code> basically says: hey there is a structure defined somewhere outside this file. The type i...
7,949,518
0
<p>Ha, figured it out. The progress bar at 0% width was wrapping the overflow text onto multiple lines. Fix was using <code>white-space: nowrap;</code> on the progress bar text</p>
2,234,428
0
<p>In your form, you want PHP to treat your input as an array, so change your HTML like so-> add [] after the name. </p> <pre><code>&lt;input name="price[]" type="checkbox" value="" /&gt; </code></pre> <p>Then in PHP just access the form variable name like you normally would and loop through the values and sum them. <...
37,858,254
0
<p>check with this code </p> <pre><code>override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int { if(self.courses.count &gt; 0){ tablecount = self.courses.count } else { tablecount = 0 self.table.reloaddata() } return tablecount } </code></pre>
31,434,699
0
How to use xpath in camel when the outermost element has an xmlns attribute? <p>I am having some trouble using xpath to extract the "Payload" values below using apache-camel. I use the below xpath in my route for both of the example xml, the first example xml returns SomeElement and SomeOtherElement as expected, but th...
23,808,539
0
<p>Re : 'how' is this used - one place we are finding this useful is when dealing with java api mappings where <code>null</code> is commonplace, e.g. on jdbc prepared statements to nullable sql columns. The <code>Option</code>al internal model fields can be mapped:</p> <pre><code>stmt.setDate("field", myModel.myDateFi...
15,065,043
0
<p>This is quite simple.</p> <ol> <li>Get maximum and minimum values of latitude and longitude.</li> <li>generate random value of longitude (use uniform distribution).</li> <li>generate random value of latitude (you can use uniform distribution or take into account shape of the earth).</li> <li>check if random point i...
41,024,130
0
Filter the array with another array containing the names to be filtered from the first array <pre><code>input : ['Ram', 'Shyam' , 'Hari' , 'Gopal' , 'Hawa'] ['Shyam' , 'Hawa'] output: ['Ram' , 'Hari' , 'Gopal'] </code></pre>
27,035,659
0
view state MAC validation failed <p>I made one web application in asp.net. It works fine but some time it shows the error Validation of view state MAC failed. After refreshing the page all works fine. This error comes at least once in a day. Can any one please help.</p>
38,015,203
0
<p>Starting from iOS 10, <strong>it's mandatory to add "NSCameraUsageDescription"</strong> in info.plist which is just an informatory message to the user stating the reason for accessing camera. It will be displayed to the user while trying to access the camera.</p> <p>Though this key is existing since iOS 7, it has b...
27,023,669
0
<p>That's not the strict solution to the issue. </p> <p>What's happening is that you have only one server block and it becomes the default server block for all requests, even the ones not matching the server name. You simply need to add a default server block in your configuration :</p> <pre><code>server { listen 80 d...
32,940,478
0
<p>First off you are looping through your calculateAverage funtion 4 times. Are you doing this on purpose? I think you should only do this once. </p> <p>Second, in your while loop</p> <pre><code>while (grade &lt;= 100 &amp;&amp; grade != -1) { numberofGrades++; sumofGrades += grade; average = sumofGrades / numberofGra...
3,121,776
0
<blockquote> <p>I'm willing shut the app down when they try but need to do some things first.</p> </blockquote> <p>Having necessary steps at program shutdown leads to fragile programs that break easily. Even if you could prevent someone from killing your program via the task manager, you cannot stop them from turning ...
23,201,155
0
How to choose specific columns when using depth in serializer <p>I have a model which consists of two <code>ForeignKeys</code>. I am only interested in parsing the content of the <code>ForeignKeys</code>, so i'm using the <code>depth</code> variable, which basically gives me all columns of the tables referenced with th...
8,105,280
0
<h2>Solution</h2> <p>Use <code>min-width</code>.</p> <h3>Sample</h3> <p><a href="http://jsfiddle.net/z4PWU/" rel="nofollow">http://jsfiddle.net/z4PWU/</a></p> <h3>HTML</h3> <pre><code>&lt;!-- Empty floating divs --&gt; &lt;div&gt;&lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;div&gt;&lt;/div&gt; &lt;br /&gt; &lt;!-- Non-Emp...
9,071,665
0
<p>You appear to have an extra <code>DECLARE</code> after your connect statement.</p>
619,714
0
<p>The purpose of handlers in non-MVC projects is to provide some type of encoded response, outside of HTML. Typically, a handler would return XML (rss, RESTful, etc), JSON for jQuery or other Javascript, or sometimes just pure data such as file binary downloads. I've used handlers to even return special javascript to...
19,548,077
0
<p>If you want to test this method, you may <a href="http://stackoverflow.com/a/34586/1851024">consider making it public/protected/package local</a>. Then you'll be able to mock or overload it in a subclass you are to test.</p>
25,997,467
0
Ajax is not updating data <p>I've got a forum in which user is allowed to edit and delete only his comments, I've defined an "edit" button, that by a click of mouse brings down a modal, and in that modal user is allowed to get access to the data's he/she has been sent before, I've written an ajax to target these field ...
13,226,987
0
<p>You need to explicitly define getter/setter in your interface. In our case (without changing structure and idea):</p> <pre><code>trait Node { def next: Node def next_=(node: Node) } // `var next: Node` generates implementations for `def next: Node` and `def next_=(node: Node)` case class SpecificNode(var next: Node...
29,704,404
0
<p>Maybe you need:</p> <pre><code>$.ajax({ url: "test.html", error: function(){ // will fire when timeout is reached }, success: function(){ //do something }, timeout: 3000 // sets timeout to 3 seconds }); </code></pre> <p>[READ] <a href="http://api.jquery.com/jQuery.ajax/" rel="nofollow">http://api.jquery.com/jQuery....
15,252,203
0
can I check my cookies to decide what page to load in RegisterRoutes <p>I want to read the cookie to see if they have been to the site before and then decide where they should go at that point.</p> <p>If not cookie, then load default page.</p> <p>Would I handle this in the RegisterRoutes?</p> <p>Here is what I currentl...
16,857,018
0
<p>You can use php libraries tcpdf or dompdf for your need. Both will work fine for your need. <strong>TCPDF</strong> is better than <strong>dompdf</strong> for using <code>DIV</code></p>
2,809,934
0
<p>As they always say, have a look at the MMAPI docs. forum Nokia has good examples of this for the MMAPI. </p> <p>But first you can check your code by adding: </p> <pre><code>p.realize(); p.prefetch(); </code></pre> <p>To pause / stop the player call <code>p.stop()</code>. </p> <p>To get the current position call <co...
706,160
0
<p>In your code $row is a an object (you've used mysql_fetch_object), and the .= operator tries to build a string, concatenating $liResult and $row. I believe this behaviour only works if your object implements a <a href="http://uk3.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring" rel="nofollow ...
40,805,460
0
javascript - onclick() requires two clicks to trigger event <p>My problem is that when <code>onclick()</code> is triggered the first time, nothing happens, but when it is clicked a second time, the code is executed.</p> <p>The <code>onclick()</code> should turn the <code>&lt;div&gt;</code> into a png image file and sav...
20,910,991
0
<p>In HTML GridView render as table , better you can use Jquery to add the values ,</p> <pre><code>var total=0; $('#gridview1').find('tr td').each(function(i, td){ var data= parseInt( $(td).val()); total+=data; }); </code></pre>
3,433,282
0
How is Java's for loop code generated by the compiler <p>How is Java's for loop code generated by the compiler?</p> <p>For example, if I have:</p> <pre><code>for(String s : getStringArray() ) { //do something with s } </code></pre> <p>where <code>getStringArray()</code> is a function that returns the Array I want to lo...
14,182,437
0
<p>While inserting a contact into RAW Contact table, provide A AccountType and accountName.</p> <pre><code> final ContentProviderOperation.Builder newContact = ContentProviderOperation .newInsert(RawContacts.CONTENT_URI); newContact.withValue(RawContacts.ACCOUNT_TYPE, rawContact.accountType); newContact.withValue(RawC...
24,905,558
0
<p>If you use Smarty you shouldn't do such thing at all. What's the point of using Smarty and putting HTML code into PHP? There is none.</p> <p>You should use <code>fetch()</code> instead</p> <p>You can do:</p> <pre><code>function test($smarty){ return $smarty-&gt;fetch('testtemplate.tpl'); } $smarty-&gt;assign('mycod...
35,680,347
0
<p>The standard Javascript way is to pass an "options" object like</p> <pre><code>info({spacing:15, width:46}); </code></pre> <p>used in the code with</p> <pre><code>function info(options) { var spacing = options.spacing || 0; var width = options.width || "50%"; ... } </code></pre> <p>as missing keys in objects return...
14,681,174
0
<p>From Javascript you shouldcatch the event <code>window.onbeforeunload</code></p>
5,233,366
0
<p>A couple ideas:</p> <ol> <li><p>Sometimes this can happen if there are oddities with your system clock or modified dates on the files. Try resetting the modified date. Maybe the easiest way is by zipping up the project, then extracting over top. Also of course delete your <code>.suo</code> and <code>.ncb</code> fil...
34,670,145
0
Generating an edge list from ID and grouping vectors <p>I have a data frame of 205,000+ rows formatted as follows:</p> <pre><code>df &lt;- data.frame(project.id = c('SP001', 'SP001', 'SP001', 'SP017', 'SP018', 'SP017'), supplier.id = c('1224', '5542', '7741', '1224', '2020', '9122')) </code></pre> <p>In the actual data...
13,470,391
0
Need assistance regarding objective-c and opps concept <p>Currently I am working on messaging app, which send text messages, image and audio files.</p> <p>Files get uploaded on http server, for downloading and uploading I am using NSURLConnection. </p> <p>When user tap download button I extract out the cell of table vi...
39,164,377
0
<p>Change the following line:</p> <pre><code>return view('welcome')-&gt;withRestaurants($restaurants); // there is nothing like withRestaurants in laravel </code></pre> <p>to </p> <pre><code>return view('welcome', array('restaurants' =&gt; $restaurants)); </code></pre> <p>and try again.</p>
21,213,935
0
How to select object in muti level array <p>I am attempting to get just the smiling array under tags then attributes. I have tried both to search and simply select. Every attempt results in an undefined variable. If you could explain how to select the smiling array that would be excellent!</p> <pre><code> { "status": "...
12,483,668
0
<p>It's really whichever you like better. I've tried out both and don't see any real advantages which would make one superior </p>
21,629,330
0
How do I embed a JFrame into a JavaFX 2.0 application? <p>I have searched stackoverflow extensively for help on this topic, but the Q&amp;As I found are old and the answers have changed for the current version of the JDK (I'm currently using 7u51). </p> <p>Note that I was never SUPER proficient in Swing to begin with, ...
39,918,363
0
<p>Don't use string comparisons for date/times.</p> <pre><code>SELECT event_cust.* FROM event_cust WHERE TimeValue([start_time]) &gt;= CDate([Forms]![CustEventRptForm]![FromHour]) AND TimeValue([start_time]) &lt;= CDate([Forms]![CustEventRptForm]![ToHour]) </code></pre>
34,697,179
0
<p>Reducer should be aware only of a small part of state.</p> <p>Good place for described logic is the action creator. With redux-thunk you will be able to make a decision based on a global state.</p> <pre><code>function selectFilter(enjoys) { return (dispatch, getState) =&gt; { dispatch({type: SELECT_FILTER, enjoys})...
32,827,497
0
<p>One slow but clear way would be</p> <pre><code>var matched = cars.Where(car =&gt; intList.Contains(car.id)).ToList(); </code></pre> <p>You can make this quicker by turning the <code>intList</code> into a dictionary and using <code>ContainsKey</code> instead.</p> <pre><code>var intLookup = intList.ToDictionary(k =&g...
12,439,300
0
<p>You need to add "px" to left. </p> <pre><code>bouger.style.left= left + "px"; </code></pre> <p>Of course, it also runs so fast you can't see anything happen, so I have a modified version:</p> <p><a href="http://jsfiddle.net/5GEru/2/" rel="nofollow">http://jsfiddle.net/5GEru/2/</a></p> <p>Also, your code should term...
12,400,413
0
<p>It seems like you misunderstanding some concepts in software development process. This:</p> <blockquote> <p>Since I want to manage both projects at the same time, I created a new solution for second application, which subclasses the necessary forms and classes</p> </blockquote> <p>is a very bad idea. </p> <p>In fac...
39,419,031
0
<p>Just change your loop to:</p> <pre><code>for (pos = s.begin(); pos != s.end(); ++pos) { cout &lt;&lt; static_cast&lt;void*&gt;( &amp;*pos ) &lt;&lt; endl; } </code></pre> <p><code>static_cast</code> is necessary because <code>&amp;*pos</code> has type <code>char *</code> which would be printed by <code>std::ostream...
8,098,226
0
<p>As far as I know, the only way to work on a HIT is through the mTurk website. i.e. - not via API.</p> <p>There is a site that is trying to do something very similar to what you have described. <a href="http://www.sparked.com/" rel="nofollow">http://www.sparked.com/</a></p>
21,245,488
0
<p>One way is with a custom binding handler. </p> <pre><code>ko.bindingHandlers.lineBreaks = { init: function (element, valueAccessor, allBindings, data, context) { $(element).html(value.replace(/-/g, '&lt;br /&gt;')); } }; </code></pre> <p>See <a href="http://jsfiddle.net/rwisch45/t5EqM/3/" rel="nofollow">updated fid...
29,477,871
0
<p>Make the first timeout with the offset for the hour.</p> <pre><code>setTimeout(worker,3600000 - ((new Date) % 3600000)) </code></pre> <p>This will be somewhat accurate (Date object construction might take some milliseconds).</p>
29,552,865
0
<p>This is, to me, a good case for many-to-many relationship with additional information (location, timedate, and parcel). Parcel can have many locations (at different times), and a location might belong to many parcels (at different times). I hope I understand you correctly.</p> <p>Here is my suggested design:</p> <p...