pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
28,422,403 | 0 | <p>In apps with user sessions, it is usually best to keep login/signup on a separate view hierarchy from the rest of the app and present the internal structure if there is an active session. You can achieve this by checking for</p> <pre><code>[PFUser currentUser] </code></pre> <p>as it will return <code>nil</code> if ... |
1,233,445 | 0 | <p>In Erlang, the <code>and</code> and <code>or</code> operators do not do short-circuit evaluation; you have to use <code>orelse</code> and <code>andalso</code> operators if you want short-circuiting behavior.</p> |
18,693,543 | 0 | <p>If you're using smarty 3, just remove the {literal} tag and it should work fine. If not, and you don't want to be opening and closing literal tags, declare all the variables you need outside the literal section ie:</p> <pre><code><script> var video_link = "{$video_link}"; {literal} function postlike() {... vi... |
7,901,430 | 0 | How to execute multiple async calls in parallel? <p>I have a number of commands that make calls to a soap web service (Betfair API). All are of the classic asynchronous programming model type ...</p> <pre><code>public void DoXXX( <input parameters ...> ) { XXXRequest Request = new XXXRequest(); // populate Reques... |
28,342,923 | 0 | How to access nodejs config parameter in angular side? <p>i have nodejs config file(backend) in which some configuration data is defined:</p> <pre><code>module.exports = { product: { name: 'Event' }, server: { host: '0.0.0.0', port: 8000 }, database: { host: '127.0.0.1', port: 27017, db: 'EventExchange', username: '', ... |
37,735,629 | 0 | recursive attempt to load library - What does that mean in android? <p>I am working with android SIP for VoIP. The application is receiving calls successfully. However, initiation a call is having some bugs.</p> <p>there is no error in the logs but info which says </p> <p>" I/art: Thread[1,tid=23775,WaitingForJniOnLoad... |
8,298,799 | 0 | SSRS Summing Group Variables outside of the group <p>I have succeeded in building a number of group variables within an SSRS report, however what I want to do now is to use that variable outside of the group. </p> <p>eg - I have a variable that calculates a payment within one dataset, and another one that calculates a ... |
35,741,298 | 0 | <p>Yes, you may use inner_product (dot product) to take the result in very simple way.</p> <p>Make vectors </p> <pre><code>V2 = P - P2 V3 = P - P3 V = P3 - P2 </code></pre> <p>Find signs of dot products <code>D2 = Dot(V2,V)</code> and <code>D3 = Dot(V3,V)</code></p> <p>Projection of Point P lies at S(P2, P3), if </p> ... |
13,694,421 | 0 | Resize tumblr videos <p>I have created a tumblr theme. Everything was working till I decided to post a video on tumblr video upload. I have a box on main page 250x196 pixels where everything goes in. </p> <ul> <li>If it is a photo, I just make it 250x196 pixels (I don't care about aspect ratio. I've used jQuery to keep... |
32,471,459 | 0 | How to find visible element and perform click action in robot framework? <p>I have one window on which i have four links</p> <ol> <li><p>Exit Button Link - <code><a id="exitBtn" class="x-btn questionpreview_exitbtn_sb x-unselectable x-btn-toolbar x-box-item x-toolbar-item x-btn-default-toolbar-small x-noicon x-btn-n... |
10,378,109 | 0 | <p>If you look in the code, it looks like there was a pull request to get generators in, but for some reason that hasn't happened. You can use twitter-bootstrap-rails first to get those files, and then overwrite them with bootstrap-sass.</p> <p>You can also try this:</p> <pre><code>compass create compass-test -r boots... |
283,180 | 0 | Is there a way to put aspx files into a class library in Visual Studio 2008 .NET 3.5? <p>I've got a lot of pages in my site, I'm trying to think of a nice way to separate these into areas that are a little more isolated than just simple directories under my base web project. Is there a way to put my web forms into a se... |
2,957,250 | 0 | <p>In your edit you specify that your helper class is in a seperate assembly. If you want to avoid references and you have control over your app.config files you could put an </p> <pre><code><add key="typeOfSystem" value="Forms|Web"/> </code></pre> <p>in your projects and access it with</p> <pre><code>Configurat... |
12,711,362 | 0 | <p>Go to <code>Plugins -> Source Code Formatter -> Format Current Source</code> or just press <code>Ctrl + I</code>.</p> <p>If you want to set up your formatting preferences, choose <code>Plugins -> Source Code Formatter -> Options...</code></p> |
19,805,745 | 0 | <p>The "offender" can be found in <code>TitleAreaDialog.getInitialSize()</code>. It uses some hard-coded constants for minimum size.</p> <p>Depending on how you want the dialog to look like, there are several solutions:</p> <ul> <li>override <code>getInitialSize()</code> and specify whatever size you want</li> <li>ove... |
3,146,328 | 0 | Making an HttpRequest with MultipartEntity in it <p>I've been frustrated at trying to figure out how to make an http request with a multipart entity in it. The multipart has a custom boundary but I can't seem to be able to set it. My code below results in a response message of saying that my message does not contain mu... |
31,508,189 | 0 | Shopify - Untrusted Connection on App Instal <p>I am working on a new app and am installing it manually by typing the URL into my web browser. This is properly bringing me to my Shopify store and is displaying the permissions screen as desired; however, when I click the 'Install app' button, I receive a page that says ... |
12,006,393 | 0 | <p>From the "Core Data Programming Guide":</p> <blockquote> <p>... To summarize, though, if you execute a fetch directly, you should typically not add Objective-C-based predicates or sort descriptors to the fetch request. Instead you should apply these to the results of the fetch.</p> </blockquote> <p>This means that ... |
2,264,213 | 0 | 'MINMAXINFO' : undeclared identifier in MFC application <p>I tried to use MINMAXINFO to resize the window dynamically in MFC application (in VS 2008). i added OnGetMinMaxInfo function through properties window.</p> <p>When i compile the code, i get an error saying that </p> <p>'ON_WM_GETMINMAXINFO': identifier not foun... |
17,204,279 | 0 | Does Java 8 Support Closures? <p>I'm confused. I thought Java8 was going to emerge from the stone age and start supporting lambdas / closures. But when I try:</p> <pre><code>public static void main(String[] args) { int number = 5; ObjectCallback callback = () -> { return (number = number + 1); }; Object result = cal... |
976,465 | 0 | parallel c++ join in .net 1.1 <p>I'm trying to spawn and then join two threads using MS VS 6.0 (2003), MS .NET Framework 1.1.</p> <p>The following seems to be a reasonable solution:</p> <pre><code>CWinThread* thread1 = AfxBeginThread(worker, &parallel_params); CWinThread* thread2 = AfxBeginThread(worker, &paral... |
34,325,120 | 0 | Isabelle and class overloading <p>Two classes are defined containing the same function, but when the two classes is used in a locale there is an unification error:</p> <pre><code>theory Scratch imports Main begin class c1 = fixes getName :: "'a ⇒ string" class c2 = fixes getName :: "'a ⇒ string" locale c12 = fixes matc... |
26,773,244 | 0 | <p>In the code specified there is no implementation of com.konylabs.middleware.common.JavaService2 class. JavaService will work if you implement JavaService2 class in your class file and override its invoke meathod.</p> <p>below is the sample:</p> <pre><code>public class <YOUR CLASS NAME> implements JavaService2... |
27,044,983 | 0 | <p>The Swift solution (thanks @YvesJusot): </p> <pre><code>let calendar = NSCalendar.currentCalendar() let comps = calendar.components(NSCalendarUnit.WeekOfYearCalendarUnit|NSCalendarUnit.YearCalendarUnit|NSCalendarUnit.MonthCalendarUnit|NSCalendarUnit.WeekCalendarUnit|NSCalendarUnit.WeekdayCalendarUnit, fromDate: NSD... |
29,915,283 | 0 | <p>Twilio developer evangelist here.</p> <p>I'm afraid <a href="https://www.twilio.com/docs/api/rest/call#list-get-filters" rel="nofollow">the Calls endpoint only takes one "From" number as a filter</a>, you can't pass a list of numbers to it. You might want to return all calls and then filter manually yourself or alt... |
31,529,310 | 0 | Where is the Java bug in my constructor code for this KnockKnockProtocol class? <p>I'm studying the following client/server code called <a href="https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html" rel="nofollow">KnockKnockServer and KnockKnockClient.</a> It also has a helper class called <a hr... |
9,972,988 | 0 | <p>You have to add your activity in <strong>AndroidManifest.xml</strong>. Refer this link : <a href="http://stackoverflow.com/questions/736571/using-intent-in-an-android-application-to-show-another-activity">Using Intent in an Android application to show another activity</a></p> |
11,364,484 | 0 | <p>I see the join is taking a while can you confirm you have the foreign key in place. Also if you show me the SQL I might be able to help.</p> |
26,804,433 | 0 | <p>Found my problem, had to specify the owner (self) when loading my nib:</p> <pre><code>self.view.addSubview(UINib(nibName: "KeyboardView", bundle: nil).instantiateWithOwner(self, options: nil)[0] as UIView) </code></pre> |
34,060,177 | 0 | <p>Jade indentation is "2 spaces"</p> <p>you should use</p> <pre><code>if !hide_it p hello </code></pre> <p>it would also work with the "-" prefix (javascript mode) but it is not advised in this case where the standard Jade <code>if</code> notation can work.</p> <p>you can test your template in the online demo - <a hr... |
22,724,556 | 0 | <p>Sure it's possible. You'd need to explode the captured pages on the slash <code>/</code> and go from there though.</p> <pre><code>Route::any('{any}', function($pages) { $pages = explode('/', $pages); // Do whatever... })->where('any', '.*'); </code></pre> <p>A few things to be aware of:</p> <ol> <li>This route s... |
24,454,657 | 0 | <p>Unfortunately for your case, I don't think this is possible to do <em>before</em> a bind like that. Here is another question on the subject: <a href="http://stackoverflow.com/questions/1379125/make-drop-down-list-item-unselectable">make drop down list item unselectable</a></p> <p><strong>Update:</strong></p> <p>I'm... |
33,045,588 | 0 | <p>Using data.table...</p> <pre><code>my_rows <- seq.int(max(tabulate(df$Initials))) library(data.table) setDT(df)[ , .SD[my_rows], by=Initials] # Initials data # 1: a 2 # 2: a 3 # 3: b 4 # 4: b NA </code></pre> <p><code>.SD</code> is the <strong>S</strong>ubset of <strong>D</strong>ata associated with each <code>b... |
17,414,398 | 0 | Visual Studio 2012 Express Code Analysis <p>The Microsoft documentation talks about a limited set of code analysis tools being available for the express edition (e.g. <a href="http://blogs.msdn.com/b/visualstudio/archive/2012/09/12/visual-studio-express-2012-for-windows-desktop-is-here.aspx" rel="nofollow noreferrer">M... |
33,832,948 | 0 | <p><strong><a href="http://sqlfiddle.com/#!9/66a621/2" rel="nofollow">Sql Fiddle Demo</a></strong></p> <pre><code>SELECT g.country, g.gender, g.gender_count, (g.gender_count * 1.0 / c.country_count) * 100 FROM ( SELECT country, gender, count(*) as gender_count FROM YourTable GROUP BY country, gender ) g JOIN ( SELECT ... |
35,661,785 | 0 | <blockquote> <p>What I would like is for the Parent component to intercept the props.parentClassName set in GrandParent and change it, or create it if it doesn't exist.</p> </blockquote> <p>A component cannot intercept props from its parent because it has no access to its parent, only to its children!</p> <p>I'm still... |
38,843,315 | 0 | <p>You can make JsonString to NSDicitonary.</p> <pre><code>NSError *jsonError; NSData *objectData = [@"{\"2\":\"3\"}" dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary *json = [NSJSONSerialization JSONObjectWithData:objectData options:NSJSONReadingMutableContainers error:&jsonError]; </code></pre> <p>and It is... |
37,588,321 | 0 | <p>We can use <code>uniqueN</code> from <code>data.table</code></p> <pre><code>library(data.table) setDT(Database)[, NumDates := uniqueN(Date) , by = UserId] Database # UserId Hour Date NumDates #1: 1 18 01.01.2016 3 #2: 1 18 01.01.2016 3 #3: 1 14 02.01.2016 3 #4: 1 14 03.01.2016 3 #5: 2 21 03.01.2016 2 #6: 2 8 05.01.... |
39,119,798 | 0 | <p>There's an example in the documentation that uses a <code>ko.pureComputed</code> layer on top of the "real" number value:</p> <pre><code>this.price = ko.observable(25.99); this.formattedPrice = ko.pureComputed({ read: function () { return '$' + this.price().toFixed(2); }, write: function (value) { // Strip out unwa... |
39,638,973 | 0 | <p>I think this should help you:-</p> <pre><code>var lols = [ { prop1: "h1", prop2: "h2", }, { prop1: "g1", prop2: "g2", } ] Object.keys(lols).map(function(key,index){ var lol = lols[key] lol["props3"]="g3" console.log(lol) }) </code></pre> <p>JS fiddle link <a href="https://jsfiddle.net/bps7zzf8/" rel="nofollow">http... |
14,320,527 | 0 | Android: should I use MimeTypeMap.getFileExtensionFromUrl()? [bugs] <p>For example, I wanted to get the file Extension from the file URL using the function below:</p> <p>File name:</p> <pre><code>Greatest Hits - Lenny Kravitz (Booklet 01) [2000].jpg </code></pre> <p>Url of the file:</p> <pre><code>String url = "/mnt/sd... |
20,947,587 | 0 | <pre><code>array.forEach(function(object) { object.current = false; }); </code></pre> <p>or, if <code>forEach</code> is not present, such as on an ES3 implementation:</p> <pre><code>for (var i = 0, len = array.length; i < len; ++i) { array[i].current = false; } </code></pre> <p>or, with <a href="http://lodash.com/d... |
5,417,746 | 0 | <p>I tested the link on IE6,7,8. The slider works fine but they all throw an error on line 17:</p> <pre><code><script type="text/javascript"> <meta name="generator" content="Big Cartel" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-22000995-1']); _gaq.push(['... |
36,797,358 | 0 | <p>This is some code I knocked up in LinqPad, which does what you want:</p> <pre><code>void Main() { c(); } void a() { using(var id = new IndentedDebug()) { id.Trace("I'm in A"); } } void b() { using(var id = new IndentedDebug()) { id.Trace("I'm in B"); a(); } } void e() { a(); } void d() { e(); } void c() { using(var... |
27,117,083 | 0 | asp.net c# create a new page and refresh routing map <p>I am using the <a href="https://github.com/Haacked/RouteMagic" rel="nofollow">routemagic</a> library and it works great. Except when I create a new page it doesn't refresh the route map.</p> <p>this is my save action:</p> <pre><code> protected void lbSave_Click(ob... |
16,553,371 | 0 | <p>You're looking for <code>.distinct()</code></p> <p><a href="https://docs.djangoproject.com/en/dev/ref/models/querysets/#django.db.models.query.QuerySet.distinct" rel="nofollow">documentation</a></p> |
11,847,754 | 0 | <p>I haven't tried it myself, but possibly an <a href="http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html" rel="nofollow">AnimationDrawable</a> could work.</p> |
3,533,328 | 0 | <p>Put this in your app.config:</p> <pre><code><configuration> <appSettings> <add key="server" value="HASIBPC\SQLEXPRESS" /> <appSettings> </configuration> </code></pre> <p>And then in your code, access it using:</p> <pre><code>return ConfigurationSettings.AppSettings["server"].ToString()... |
27,656,881 | 0 | <p>You can not call private methods, there is no way for it directly. You could create wrappers that are those methods but as public. Best solution move them to public segemnt</p> |
40,920,960 | 0 | Cover flow works in Activity but it gives an error when I convert Activity to Fragment <pre><code> public class AnaSayfa extends Fragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { .... ... ... } public View getView(final int position, View convertView, ViewGro... |
1,733,066 | 0 | <p>PHP Framework: <a href="http://www.pradosoft.com/" rel="nofollow noreferrer">http://www.pradosoft.com/</a></p> |
40,645,269 | 0 | <p>Add the style import above your existing style, then apply the css rule to whichever element you wish. In this case I applied it to the body. I would also recommend using here strings instead of += as they are far more readable.</p> <pre><code>$a = @" <style> @import url('https://fonts.googleapis.com/css?fami... |
19,047,723 | 0 | <p>How is this using <a href="http://apidock.com/ruby/Object/initialize_copy" rel="nofollow"><strong><em><code>initialize_copy</code></em></strong></a>:</p> <pre><code>a=[] b=[] a.object_id # => 11512248 b.object_id # => 11512068 b.send(:initialize_copy,a << 10) a # => [10] b # => [10] a.object_id # ... |
5,528,198 | 0 | <p>If the link is supposed to be "enhanced" with some javascript code, the third party probably gave you a javascript file to include as well. Be sure you're including that javascript file, and that you're doing it in the right place according to the vendor's instructions.</p> |
33,800,089 | 0 | <p>I tested your code, for the first method you took, it works fine by me, I just added a <code>Dispose()</code> in it. And for the second method, I think it may be the problem that you didn't get the <code>ContentLength</code> of your var <code>response</code>.</p> <p>Here is my code, and the commented part of the co... |
32,674,704 | 1 | list's index() method for nested structures OR how to match against particular value of composed element stored in list and get it's index <p>It is possible to get index of particular element in list using <code>index()</code> method, following way (borrowed from <a href="http://stackoverflow.com/questions/176918/findi... |
26,481,816 | 0 | gitlab disable access over ip address <p>I installed gitlab_7.3.2-omnibus-1_amd64 on Ubuntu 14.04.1. </p> <p>I defined a domain name for gitlab and it works well. However, gitlab is still accessible over server's ip address. I want gitlab to be only accessible via domain name, not server's ip. Can you help me?</p> <p>T... |
7,397,790 | 0 | <p>This does not make much sense to begin with. A <code>Derived</code> should be able to be used anywhere a <code>Base</code> is expected, so you should be able to do</p> <pre><code>Base *foo = new Base(); Apple x = foo->func(); // this is fine Base *bar = new Derived(); Apple y = foo->func(); // oops... </code>... |
4,228,451 | 0 | <p>You could also check the most commonly used commercial profiler/coverage tool, AQTime from <a href="http://www.automatedqa.com" rel="nofollow">http://www.automatedqa.com</a></p> <p>Here's a video on features: <a href="http://www.automatedqa.com/products/aqtime/screencasts/coverage-profiling/" rel="nofollow">http://... |
30,118,171 | 0 | <p>No , your regular expression <code>^/flashmediaelement.swf$</code> specifies <strong>exact</strong> match for url , so it won't match <strong>'/mediaplayer/flashmediaelement.swf</strong></p> <p>See first section <a href="https://www.icewarp.com/support/online_help/203030104.htm" rel="nofollow">here for <strong>exac... |
8,787,942 | 0 | <p>I've managed to pull a somewhat 'generic' solution. <em>removeAttribute</em> doesn't work if opacity is between 0 and 1, so my two cents solution follows:</p> <p><em>Put this code just after the first line of jQuery animate method definition (jquery.x.x.x.js)</em></p> <pre><code>animate: function( prop, speed, easi... |
16,697,004 | 0 | jQuery - toggle() a form when a button is clicked in a list <p>Problem: I don't want it to toggle when I am clicking on the table. Only when I click the button(div). Also, there has to be a selector so that other li's tables doesnt toggle.</p> <p>jQuery</p> <pre><code>$(document).ready(function() { $('table.edititem').... |
3,753,443 | 0 | <p>AIR addition to the actionscript 3 language that provide ways to control features from windows, mac, and linux. eg the titlebar and saving files.</p> <p>Flex is an addition to the actionscript 3 language that provides way to new interrogation features from server technologies like java, php, asp and connection betw... |
27,542,746 | 0 | <p>You can also ask the window: </p> <p>var hidpi = ('devicePixelRatio' in window && devicePixelRatio > 1);</p> <p>and create the default Layers like this: </p> <p>var defaultLayers = platform.createDefaultLayers(hidpi ? 512 : 256, hidpi ? 320 : null);</p> |
32,547,416 | 0 | <p>Assuming cell A1 is the range in question, select it and for Data Validation enter this formula under Custom:</p> <pre><code>=AND(LEN(A1)=7,ISTEXT(A1),ISNUMBER(MID(A1,2,6)+0)) </code></pre> |
17,107,499 | 0 | Draw multiple views of scene on single screen <p>I have a class for projection in OpenGL, which a user can use as follows:</p> <pre><code>//inside the draw method customCam1.begin(); //draw various things here customCam1.end(); </code></pre> <p>The <code>begin</code> and <code>end</code> methods in my class are simple ... |
21,018,077 | 0 | <p>The reference you have given seems to be a little misleading. It explains <code>function pointers</code> as <code>callbacks</code> <strong>without actually serving the purpose of a callback</strong>. <br /><a href="http://www.prog2impress.com/downloads/The%20Function%20Pointer%20Tutorials.pdf" rel="nofollow">This</... |
10,346,536 | 0 | <p>Easy enough. </p> <ol> <li><p>First create a database that uses the Contacts template (or you can use your contacts database. </p></li> <li><p>Create your document in Symphony. (I have only used the embedded productivity tools in Notes). </p></li> <li><p>Select Tools->Mail Merge. </p></li> <li><p>Click Browse that ... |
39,204,525 | 0 | <p>Add this into model/User.php Hope it will work</p> <pre><code>public $hasMany = array( 'Phonenumber' => array( 'className' => 'Phonenumber', 'foreignKey' => 'user_id', 'conditions' => array('Phonenumber.user_id' => 'User.id'), 'dependent' => true ) </code></pre> |
18,683,079 | 0 | <p>The regular CursorLoader is based on Android's ContentProvider - so if you're not using it, you'll have to write your own Loader. Here's one way you can do it:</p> <p><a href="https://github.com/commonsguy/cwac-loaderex/blob/master/src/com/commonsware/cwac/loaderex/acl/AbstractCursorLoader.java" rel="nofollow">http... |
40,729,708 | 0 | Track Dependency Property Value Changes WPF <p>I am looking for a Way to be notified on property changed of a dependency property. Similar question was answered <a href="http://stackoverflow.com/questions/4764916/listen-to-changes-of-dependency-property">here</a></p> <p>What is meant by: </p> <p>"If it's a DependencyPr... |
27,047,011 | 0 | <p>This is not an inherent limitation in Windows, problems like these are environmental. A basic check-list:</p> <ul> <li>Try this with a <a href="http://download.linnrecords.com/test/mp3/tone.aspx">known-good MP3 file</a>. That test file is encoded at 320 kbps. This helps eliminate a specific problem with your files,... |
16,054,711 | 0 | How this linq execute? <pre><code>Data = _db.ALLOCATION_D.OrderBy(a => a.ALLO_ID) .Skip(10) .Take(10) .ToList(); </code></pre> <p>Let say I have 100000 rows in <code>ALLOCATION_D</code> table. I want to select first 10 row. Now I want to know how the above statement executes. I don't know but I think it executes in ... |
21,434,037 | 0 | Bash Shell Script - If with Find not returning what I expected <p>My program:</p> <pre><code>find teste1 | while read -r firstResult do find teste2 | while read -r secondResult do if [[ $firstResult == $secondResult ]]; then echo "$firstResult" "$secondResult" > equal.lst else echo "$firstResult" "$secondResult" >... |
10,856,504 | 0 | <p>If you want to compute the <a href="http://en.wikipedia.org/wiki/Euclidean_distance" rel="nofollow">Euclidean distance</a> between vectors <code>a</code> and <code>b</code>, just use <a href="http://en.wikipedia.org/wiki/Pythagorean_theorem" rel="nofollow">Pythagoras</a>. In Matlab:</p> <pre><code>dist = sqrt(sum((... |
37,507,547 | 0 | <p>Try</p> <pre><code>INSERT INTO [dbo].[WordRelationship] SElECT a.WordId, b.WordId from [dbo].[Temp] t JOIN [dbo].{Word] a on t.HeaderWord = a.Word LEFT JOIN [dbo].{Word] b on t.OtherWord = b.Word </code></pre> <p><strong>EDIT</strong></p> <p>removed LEFT in Join over Headerword since it is a not null field in WordR... |
8,227,531 | 0 | <p>You are overwritting the first value in your variable "myAjax" by assigning it a second value. It would be just like doing something like </p> <pre><code>var x=5; x=7; alert(x); </code></pre> <p>Here x would hold the value of 7, because that was the last value assigned to it.</p> <p>This function </p> <pre><code>my... |
12,512,677 | 0 | How to write equations in an Android textview? <p>I want to display some equations in my android app and was wondering how to display a simple equation. Any ideas? </p> <p>EDIT: Is it possible to do to this in the xml file or does it has to defined dynamically in the java code?</p> |
38,906,439 | 0 | <p>Use <a href="https://lodash.com/docs#orderBy" rel="nofollow"><code>orderBy</code></a> with with <code>order</code> ascending or descending to decide if lowest or highest. Group by <code>custormerId</code>, and take the 1st item from each customer orders:</p> <p><div class="snippet" data-lang="js" data-hide="false" ... |
36,383,877 | 0 | <p>i'm sure there are more elegant solutions but maybe it helps:</p> <pre><code>var myString = "___" myString = "1__" let input = "6" for index in 0 ..< myString.characters.count { let startIndex = myString.startIndex.advancedBy(index) let endIndex = startIndex.advancedBy(1) let range = startIndex..<endIndex let... |
40,620,698 | 0 | Text not displaying on screen <p>I cannot get the entire text to display on screen. </p> <p>My code is:</p> <pre><code>akiss =("Romeo.txt") numwords = 0 numchars = 0 with open(akiss, 'r') as file: for line in file: wordslist = line.split() numwords += len(wordslist) numchars += len(line) print (" number of words are:")... |
40,042,882 | 0 | <p>There are two dependencies usually involved: <code>jmh-core</code> and <code>jmh-generator-annprocess</code>. Their versions should agree. If they don't, then generator may produce the benchmark list in a format that core cannot understand. This most probably is such case.</p> |
40,413,480 | 0 | <p><strong>This is my first answer in stackOverflow, so please, go easy.</strong></p> <p>If i'm understanding your question right, you're wondering how the math behind an artificial neuron works. The neuron is made up of 5 components shown in the following list. (The subscript i indicates the i-th input or weight.)</p... |
4,802,584 | 0 | How to get "Internet Call" Information in Android <p>Im working on android application in which i take backup of all contact information and then restore,i retreive all information of contact, For example:</p> <p>Display Name</p> <pre><code>Cursor cursor = getContentResolver().query(ContactsContract.Contacts.CONTENT_UR... |
37,589,894 | 0 | Error while build SyntaxNet with Bazel <p>I am trying to run Syntaxnet on Ubuntu in my VirtualBox following instructions on <a href="https://github.com/tensorflow/models/tree/32ab5a58dd3714d0747da6993a01315dadbf0e0f/syntaxnet#installation" rel="nofollow noreferrer" title="TensorFlow git">SyntaxNet Github page</a></p> <... |
10,457,033 | 0 | <p>I would recommend you to have a look at the <a href="https://github.com/FriendsOfSymfony/FOSRestBundle" rel="nofollow">FOSRestBundle</a>. Another attempt could be to handle the requests yourself, and return the date from the orm/odm via <a href="http://jmsyst.com/bundles/JMSSerializerBundle" rel="nofollow">Serializ... |
20,542,552 | 1 | How to speed up matrix code <p>I have the following simple code which estimates the probability that an h by n binary matrix has a certain property. It runs in exponential time (which is bad to start with) but I am surprised it is so slow even for n = 12 and h = 9. </p> <pre><code>#!/usr/bin/python import numpy as np i... |
22,790,087 | 0 | How to attack on RC4 <p>Friends, I am working on a project where I need to crack as much keys as possible for RC4 algorithm. I would request you to go through RC4 algorithm before reading his question.</p> <p>I have given 50 different files (A00.data,A01.data...A49.data) each containing millions of lines. Every record ... |
12,493,694 | 0 | <p>Use grep:</p> <pre><code> grep ^hello file | awk '{print $2}' </code></pre> <p><code>^</code> is to match lines that starts with "hello". This is assuming you want to print the second word.</p> <p>If you want to print all words except the first then:</p> <pre><code> grep ^hello file | awk '{$1=""; print $0}' </code... |
16,414,051 | 0 | Eclipse RCP - Multi User Installation using Windows Environment Variables <p>I have an Eclipse RCP application.</p> <p>At startup this RCP application creates a folder for the "configuration area" <a href="http://help.eclipse.org/indigo/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/multi_user_installs.ht... |
8,325,059 | 0 | Current Location Simulation on AppCode <p>Please correct me if this question is duplicated.</p> <p>I just started using AppCode for iOS programming.</p> <p>I found it very useful but issues started happening.</p> <p>My application is location based app and I need to simulate the current location but with AppCode I coul... |
8,282,619 | 0 | <p>passthru is a method in PHP see <a href="http://php.net/manual/en/function.passthru.php" rel="nofollow">http://php.net/manual/en/function.passthru.php</a></p> <p>Do you know what the script does? Maybe reverse engineer it into windows batch script?</p> <p>From the looks of it, the script came from a *nix system it:... |
21,318,943 | 0 | Back-office tab and helper form? <p>Following <a href="http://doc.prestashop.com/display/PS14/Creating+a+PrestaShop+module" rel="nofollow">this</a> prestashop instruction on how to make a tab in a back-office I did a class and controller like it's need. But what if I want to use a helper form for form creation in the <... |
26,634,504 | 0 | EF6 DB First Pre-Generated Views difficulties <p>The 50 seconds it takes EF to complete it's first query (as compared to milliseconds for the same or similar queries when it's warm) is making my MVC website look bad. I really need to get pre-compiled views working.</p> <p>I have tried the power tools but when I run 'Ge... |
15,469,534 | 0 | Remove signing from an assembly <p>I have a project open in Visual Studio (it happens to be Enyim.Caching). This assembly wants to be delay-signed. In fact, it desires so strongly to be delay-signed, that I am unable to force Visual studio to compile it <em>without</em> delay signing.</p> <ol> <li><p>I have unchecked "... |
6,933,860 | 0 | <p>Have a look at the quota implementation; this is a mechanism (ok, presumably not available on vfat) which reads/writes files from the kernel.</p> <p>Additionally, the "loop" block device is another example of a kernel facility which does file IO.</p> |
12,704,142 | 0 | <p>You have not initialized <code>locationManager</code> To fix this, in your onCreate method you can do something like:</p> <pre><code>locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); </code></pre> |
14,310,172 | 1 | Python: Extract info from xml to dictionary <p>I need to extract information from an xml file, isolate it from the xml tags before and after, store the information in a dictionary, then loop through the dictionary to print a list. I am an absolute beginner so I'd like to keep it as simple as possible and I apologize if... |
565,460 | 0 | <p>You sound as though you are "rolling your own" authentication system.</p> <p>I would look into using ASP.NET's built in <a href="http://msdn.microsoft.com/en-us/library/xdt4thhy.aspx" rel="nofollow noreferrer">Forms authentication</a> system that is commonly used with an ASP.NET <a href="http://msdn.microsoft.com/e... |
13,068,475 | 0 | <p>Looks like its a date. You can parse the string to DateTime, using <a href="http://msdn.microsoft.com/en-us/library/system.datetime.parseexact.aspx">DateTime.ParseExact</a> and then use .ToString to return formatted result. </p> <pre><code>DateTime dt = DateTime.ParseExact(temp1, "dd MM yyyy", CultureInfo.Invariant... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.