pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
13,929,117
0
Use VB Library that made by VB Net in C# <p>Sometimes we meet some code of VB.net that doesn't support on C#, such as Mid, AscW,Asc, Right, Left .. etc so that i have made the Libraries that made by VBnet. well, my question is simple</p> <p><strong>is this going to get any problem? if i'm developing with 2 language of ...
40,894,719
0
Can search Elasticsearch 5.0 (Windows) using simple query, but prefixed with field name fails (search by example) <p>I am trying to get "search by example" functionality out of ElasticSearch. I have a number of objects which have fields, e.g. name, description, objectID, etc. I want to perform a search where, for examp...
11,380,835
0
<pre><code>private ByteArrayInputStream getPhoto() { Uri contactUri = ContentUris.withAppendedId(Contacts.CONTENT_URI, id); Uri photoUri = Uri.withAppendedPath(contactUri, Contacts.Photo.CONTENT_DIRECTORY); Cursor cursor = getContentResolver().query(photoUri, new String[] {ContactsContract.CommonDataKinds.Photo.PHOTO}...
26,682,699
0
Use case for not declaring a function as a prototype of another custom function? <p>I'm trying to get my head around the proper way of declaring js functions within my existing custom objects.</p> <p>E.g. Usually I've done it this way to add functions to my existing object(s):</p> <pre><code>function whateverController...
7,453,229
0
<p>it is byDefault set, if you dont want any color then you can set a <strong>transparent</strong> color in xml</p> <pre><code>android:listSelector="#00000000" </code></pre>
9,770,068
0
<p>By looking at the HotSpot code there is a node.hpp/node.cpp that declares a node class without a namespace. <br/> Perhaps there is a collision with the pure virtual functions. <br/> I don't have enough VM knowledge to dig any further...</p>
3,553,244
0
Android OpenGL ES and 2D <p>Well, here's my request. I don't know OpenGL already, and I'm not willing to learn it, I want to learn OpenGL ES directly since I'm targeting my development to android, however. I want to learn OpenGL ES in order to develop my <em>2D</em> games. I chose it for performances purpose (since bas...
11,025,128
0
pl/sql Compare with previous row <p>The goal is to combine Time_a within 10 min interval that has same ID. And group the ID.</p> <pre><code>ID Time_a -&gt; ID ------------ ---------- 1 12:10:00 1 1 12:15:00 2 1 12:20:00 2 2 12:25:00 2 12:35:00 2 02:00:00 </code></pre> <p>It became two '2' because time interval between ...
12,724,893
0
Android AndEngine : sprite.detachSelf() doesnt remove the sprite <p>I'm creating small balloon game. where balloons pop up randomly and disappear after a little while. When i clicked on them those i want to disappear them and show +1 instead of the balloon. When i click on the balloon, i want to deattach the balloon sp...
16,710,054
0
<p>I faced this issue couple of days before.</p> <p>Right click your project, Go to properties->Java Build path->Order and Export</p> <p>Check Android Private Library->Click Ok</p> <p>Clean the project and run it.it will work.</p>
12,181,689
0
IllegalStateException while creating a stage in another thread <p>I have a problem with opening one more stage in another thread. No exceptions appears if I'm opening this stage in the same thread.</p> <pre><code>void hashMapDeclaration(){ actions2methods.put("NEW", new Runnable() {@Override public void run() { newNetC...
18,864,100
0
<p>table:</p> <pre><code>CREATE TABLE MyTable ( _id INT(10) AUTO_INCREMENT, imagePath VARCHAR(50) ); </code></pre> <p>HTML/PHP</p> <pre><code>&lt;img src="&lt;?php echo $row['imagePath'] ?&gt;" /&gt; </code></pre>
15,174,929
0
<p>Right click the server name and choose Activity Montior.</p> <p>Alternatively, you can query the process list with:</p> <pre><code>select * from sys.dm_exec_requests </code></pre> <p>An even better solution is <a href="http://sqlblog.com/files/default.aspx" rel="nofollow"><code>sp_WhoIsActive</code></a> from Adam M...
33,552,505
0
Scanner continuous loop <p>Why isn't my inputScanner blocking after the first input? It goes into a continous loop. Ignore other details of this code.</p> <pre><code>public class Test { public static void main(String[] args) { boolean finished; do { Scanner inputScanner = new Scanner(System.in); finished = inputScanner...
40,508,995
0
type is not a member of package controllers <p>I'm currently working on a web app with the play2 framework.</p> <p>Most of the time everything works fine. However when I decide to rebuild the project I get the error: "type HomeController is not a member of package controllers".</p> <p>I've done some research on the web...
26,477,548
1
Filter one dataframe using multi-index of another dataframe <p>I have the following two dataframes DF1 and DF2. I would like to filter DF1 based on the multi-index of DF2.</p> <pre><code>DF1: Value Date ID Name 2014-04-30 1001 n1 1 2014-05-31 1002 n2 2 2014-06-30 1003 n3 3 2014-07-31 1004 n4 4 DF2 (index = Date, ID, Na...
8,760,264
0
<p>You can use <a href="http://api.jquery.com/one/" rel="nofollow"><code>.one()</code></a> for that.</p> <pre><code>$("a").one("click", function() { // do your stuff } </code></pre> <p>Or you could store the fact that the link has already been clicked by adding a <a href="http://api.jquery.com/jQuery.data/" rel="nofol...
5,869,224
0
Serialize large files - store in memory or on disk? <p>I do a networking app using iPhones and their limited memory is something I must consider. My <code>Message</code> class holds both a image and a video. Now I am about to implement the video file transfer (image already implemented, and is working). I guess the ima...
13,222,947
0
How to import data to the database from a CSV file? <p>I am using Ruby 1.9.2, the Ruby on Rails v3.2.2 gem and the MySQL database. I would like to import data to the database from a <a href="http://www.maxmind.com/download/worldcities/worldcitiespop.txt.gz" rel="nofollow">CSV file</a> containing world cities. I think t...
8,530,676
0
<p>There is two approach check which one you prefers. but I think if possible i will follow first approach. But I have never done it.</p> <p><strong>First Approach</strong> Copy the first database and paste with some othername see following url</p> <p><a href="http://stackoverflow.com/questions/5662181/how-to-copy-exi...
31,960,883
0
Text Box custom source as data table <p>I'm trying to set a custom source for my Text Box for the suggest option. I've got so far to this.</p> <pre><code> private void Input_Box_Load(object sender, EventArgs e) { sc.Open(); SqlCommand cmd = new SqlCommand("select MoM_ID from dbo.MoM_Form ORDER BY MoM_ID ASC", sc); SqlD...
23,077,284
1
Stomp.py how to return message from listener <p>I've already read this topic: <a href="http://stackoverflow.com/questions/9328863/stomp-py-return-message-from-listener">Stomp.py return message from listener</a></p> <p>But i still don't get how this works, and why there's no way to retrieve a message from the stomp obje...
22,039,351
0
Set Selected System Font to TextView <p>I'm doing one demo. In that I'm loading the system fonts into the <code>Spinner</code> and I want to set the selected font to <code>TextView</code>. I done with font loading but I'm not able to set it to <code>TextView</code>. I'm confused with the <code>TypeFace</code> ... Follo...
30,141,968
0
Julia file input reading speed <p>I'm giving Julia a go while solving Code Jam problems, in this case Rope Intranet from round 1C 2010 (<a href="https://code.google.com/codejam/contest/619102/dashboard" rel="nofollow">https://code.google.com/codejam/contest/619102/dashboard</a>)</p> <p>Solution is basically: </p> <pre>...
7,686,072
0
<pre><code>NSMutableDictionary *variables = [NSMutableDictionary dictionaryWithCapacity:4]; [variables setObject:[NSString stringWithFormat:@"Hi."] forKey:@"message"]; [variables setObject:@"http://icon.png" forKey:@"picture"]; //http://tinyurl.com/45xy4kw [variables setObject:@"Create post" forKey:@"name"]; [variable...
25,831,462
0
how to make the text box show the date directly without putting the cursor and tap in the keybaord <p>please help me with this issue. I'm using windows forms in C# and I have textbox that I want to display the date on it. but its not working without putting the cursor on the text box and click on the keyboard after tha...
7,275,243
0
<pre><code>;WITH n(n) AS -- just 4 rows - makes it easy to extend to 5 weeks, 6 weeks, etc. ( SELECT 0 UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 ), d(dt) AS -- single row with the end of the current week -- this could be a variable but I get a lot of flack for not inlining ( SELECT dt = CONVERT(DATE, DA...
31,678,421
0
<p>Walk the array, find the relevant month, and update its value:</p> <pre><code>var newData = { "year" : 2015, "month" : "FEB", "value" : 2.33 }; for (var i = 0; i &lt; data.length; i++) { var entry = data[i]; if (entry.year == newData.year &amp;&amp; entry.month == newData.month) entry.value = newData.value; } </cod...
37,094,776
0
<p>There is a major flaw in your design. The error is obvious. In this line</p> <pre><code>final helpers helpers = new helpers(); </code></pre> <p>you are trying to create an object of an activity which is a very very bad practice. You cannot simply create an object of an activity like this. All Activities in Android ...
4,973,986
0
Why the naming: NodeList vs childNodes <p>I have been wondering about a stupid thing about the DOM. Why do the standards define NodeList with the postfix <code>List</code> to make it clear it is an array while have a some properties or functions like <code>childNodes</code> or <code>getElementsByTagName</code> which us...
16,732,393
0
<p>I think, you can use <code>space-bar</code> like this:</p> <pre><code>$('#container1 .item') </code></pre> <p>And, if <code>.item</code> element was under the <code>#container1</code> directly, you can also use this:</p> <pre><code>$('#container1 &gt; .item') </code></pre>
34,891,278
0
<p>A simple approach to error-checking user input is with a while loop. For example:</p> <pre><code>def make_score(): while True: score = raw_input('Air, Water, or Grass? ') if score in Attack: break else: print 'Invalid selection.' return score </code></pre> <p>This will loop to input until the user enters a string t...
6,647,049
0
<p>I finally found the problem. It's fixed.</p> <p>The problem was the Application Pool. On every recycle, the session was lost. So we did turn off the application pool recycling, and are scheduling the recycle once a day.</p>
20,617,177
0
<p>As I was writing the question, I figured out the answer, so I decided to post it right here. But if someone has a different solution, that is more stable or clean, I'm still interested.</p> <p>The dictionary to be passed to <code>.format</code> should be:</p> <p><code>vars(sys.modules[func.__module__])</code></p>
35,874,023
1
Python: list is not mutated after for loop <pre><code>a =[1,2] for entry in a: entry = entry + 1 print a </code></pre> <p>Shouldn't the list be mutated to<code>[2,3]</code>? The result came out as <code>[1,2]</code>. Why?</p>
1,091,457
0
<p>There's one more issue you might need to address if you are using the <strong>Windows 2008 Server</strong> with <strong>IIS7</strong>. The server might report the following error:</p> <p><em>Microsoft Office Excel cannot access the file 'c:\temp\test.xls'. There are several possible reasons:</em></p> <ul> <li><em>T...
10,736,964
0
gitolite-admin clone issue <p>I am going nuts with a problem cloning the gitolite-admin repository. I have followed this <a href="http://sitaramc.github.com/gitolite/install.html#migr" rel="nofollow">http://sitaramc.github.com/gitolite/install.html#migr</a> and it went perfectly.</p> <p>I ran <code>ssh-keygen -t rsa</c...
27,025,300
0
<p>I ran into this same problem. It turned out that I was inadvertently using my machine's version of django-admin.py to start my Django project, rather than the one installed within the virtualenv. I ended up having to <code>source bin/activate</code> again after installing django within the virtualenv, before runnin...
32,371,753
0
Delete duplicate lines in a file after a match in a particular subset of columns <p>I've an unsorted file, containing row data disposed in many columns, as in this example:</p> <pre><code>10:23:55.521803 [INFO] eceb [ 41] 235 870 1 26601 349 910 10:24:11.771454 [INFO] eceb [ 41] 41 870 0 26601 349 910 10:25:18.858675 [...
37,726,516
0
<p>When you invoke the <code>printloop</code> function with <code>5</code> the for loop essentially becomes</p> <pre><code>for (x = 5; x &lt; 5; x++) { //... } </code></pre> <p>And <code>x &lt; 5</code> will never be true.</p> <hr> <p>I guess what you meant was something like </p> <pre><code>for (x = 0; x &lt; valx; x...
18,885,272
0
<p>you can do it in css</p> <pre><code>#rolling { height: 80px !important; } </code></pre> <p><a href="http://screencast.com/t/VNpe7ODkh2Ar" rel="nofollow">http://screencast.com/t/VNpe7ODkh2Ar</a></p>
20,533,516
0
<p>May be you're missing "px" at the end:</p> <pre><code>function resizeText(multiplier) { var elements = document.getElementsByClassName('Resizable'); for(var i = 0; i &lt; elements.length; i++) { elements[i].style.fontSize = parseFloat(elements[i].style.fontSize) + (multiplier + * 0.2) + "px"; } } </code></pre>
6,674,893
0
<p>Alt+Key is one way, like AresAvatar posted above.</p> <p>if you want some more possibilities you can use the <a href="http://msdn.microsoft.com/de-de/library/system.windows.input.keybinding.aspx" rel="nofollow">KeyBinding</a> class</p>
37,718,576
0
How to change the ViewControllers frame position inside the PageViewController? <p>The Code I Have written for loading view controllers in Page View Controllers. Programatically creating four view controllers and adding them to Page View Controller. I have changed the view controllers frame position but still not chang...
5,430,987
0
<p>You don't need EXECUTE IMMEDIATE in this context.</p> <pre><code>DECLARE long_var long:=0; BEGIN DBMS_OUTPUT.PUT_LINE(LENGTH(long_var)); SELECT filesize INTO long_var FROM files; DBMS_OUTPUT.PUT_LINE(LENGTH(long_var)); END; / </code></pre> <p>EXECUTE IMMEDIATE runs a stand alone statement of SQL from your PL/SQL co...
18,362,027
0
<pre><code>function GetAnImage(src) { var newImg = document.createElement('img'); newImg.src = src; return newImg; } var newImg = GetAnImage("abc.jpg"); newImg.onload = function () { var height = this.height; var width = this.width; //do with the image as you want } </code></pre> <p>i hope it helps.</p>
14,680,916
0
On listview only want to click one item at a time <p>I have a listview with item. Click on an item it goes to another activity. My problem is on clicking on multiple items (say 3 0r4 ) all clicked are loaded. But i dont need it. Only want to load 1 item at a time. Tested on HTC one,samsung galaxy s plus. Please help.</...
19,173,979
0
<p>This 'Class' definitoin is special only because it use 'generic' type parameter? if you do not know what 'generic' means, I think you should read a java book before read/write java code like this ~</p> <p><code>class ListNode&lt;K, V&gt;</code> means the <code>ListNode</code> class uses two 'unknown' or 'general' v...
5,963,907
0
<p>Although <code>harry.getObject()</code> is a reference to the original object, you then ruin it with the assignment:</p> <pre><code>harry1 = harry.getObject(); </code></pre> <p>which performs a copy.</p> <p>Instead:</p> <pre><code>Student const&amp; harry1 = harry.getObject(); </code></pre>
18,407,201
0
Html file works locally on IE, but not on server. Works fine for Opera, Chrome, Safari and Firefox <p>Basically, as the title states, the file works locally, but not when uploaded to a server.</p> <p>Here's a live working version: <a href="http://jsfiddle.net/guisasso/WKjT8/" rel="nofollow noreferrer"><strong>jsfiddle<...
17,736,385
0
<p>You have <code>;</code> after the if. Remove it.</p> <p>if statements can't have ; at the end:</p> <pre><code>if(someCondition); is not valid </code></pre>
3,612,795
0
<p>i tried your code, it fades out on first feed, but it doesn't enter the animationDidStop event. thats why it cant call performAnimation again. is there any set for animation (delegate or protocol etc..)</p>
8,740,252
0
Why are these two queries different? <p>Display the details of the employees who have subscribed for Football and Chess but not for Tennis.</p> <pre><code>SELECT * FROM employee WHERE empid IN (SELECT empid FROM subscription WHERE facid IN (SELECT facid FROM facility WHERE facility = 'Chess' OR facility = 'Football')) ...
3,347,454
0
<p>I might not be understanding this completely, but if all you want to do is to output a list of names with their respective email addresses, you could try simplifying to this:</p> <pre><code>name = rs("name") email = rs("email") do while rs.eof &lt;&gt; true response.write(name &amp; " " &amp; email &amp; "&lt;br /&...
26,473,660
0
<p>Using <a href="http://underscorejs.org/#object">underscore's object function</a>, you can do this:</p> <pre><code>form_values = _.object([f.name, f.value] for f in $('input, textarea, select')) </code></pre>
5,453,517
0
<p>Do you want to keep the session variable? If not you can just use the header function:</p> <pre><code>header('http://domain.com/category/health-beauty/'); </code></pre>
5,996,862
0
cakePHP + php5-fpm + memcached = lots of open TCP connections to memcached? <p>I'm pretty sure this is a CakePHP bug, but figured someone here may have run across this and know how to fix. FYI - I've created a <a href="http://cakephp.lighthouseapp.com/projects/42648-cakephp/tickets/1705-cake-138-memcacheengine-does-not...
21,586,693
0
<p>Make will read and operate on a makefile which is in the current directory, unless you specify a different one with <code>-f</code>. From your comments above it sounds like your current directory is not the right one when you run <code>make</code>, so it can't find the makefile</p> <p>You have to either run <code>m...
24,521,695
0
<p><strong>This should do it for you without an array...</strong></p> <pre><code> Dim intcount As Integer = 0 'Used to make sure commas are in order For Each item As Integer In myReader("SchType_ID").ToString.Split("~") If intcount &gt;= 1 Then builder.Append(",") builder.Append(item.ToString) Else builder.Append(item...
18,963,054
0
PySide/QT - How to add horizontal or vertical layout to a grid layout <p>If I wanted to create a window where a grid layout didn't cover the whole frame? Could I do it by adding a horizontal layout to the grid layout and adding a stretch to the horizontal layout. When I try it in the following code, I get this error: <...
20,759,916
0
<p>When using escaped table names take care about this "bug" : <a href="https://github.com/doctrine/doctrine2/pull/615" rel="nofollow">https://github.com/doctrine/doctrine2/pull/615</a> . Doctrine takes the first character of the table name as aliasprefix and thus a quote is used, crushing all your SQLs</p>
10,345,097
0
<p>My Solution</p> <pre><code>Intent buttonUp = new Intent(Intent.ACTION_MEDIA_BUTTON); buttonUp.putExtra(Intent.EXTRA_KEY_EVENT, new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_HEADSETHOOK)); getContext().sendOrderedBroadcast(buttonUp, "android.permission.CALL_PRIVILEGED"); </code></pre>
11,310,045
0
<p>Try a simple trick. Apple has got samples on its site to show how to zoom into a photo using code. Once done zooming, using graphic context take the frame size of the bounding view, and take the image with that. Eg Uiview contains scroll view which has the zoomed image. So the scrollview zooms and so does your imag...
29,459,285
0
Combining Classes through Methods in Java <p>I have two working classes that function independently. I want to combine them, yet I have no working location to add a <code>public void (String Name){</code>. I keep getting a "remove this" or "Add }".</p> <p>Code I have: </p> <pre><code>import java.io.File; import java.aw...
6,721,227
0
AVURLAsset's loadValuesAsynchronouslyForKeys method doesn't call completion block when executed in modal view controller <p>I'm using AV Foundation to replay in-bundle .mov files. I followed Apple's guide to initiate an AVURLAsset instance and called its <strong>- (void)loadValuesAsynchronouslyForKeys:(NSArray *)keys c...
13,334,341
0
LabWindows/CVI is an event-driven, ANSI C89 programming environment developed by National Instruments.
15,265,844
0
<p>Might be a typo but <code>Accounts.OnCreateUser(fn);</code> should be <code>Accounts.onCreateUser(fn);</code> Meteor docs: <a href="http://docs.meteor.com/#accounts_oncreateuser" rel="nofollow">http://docs.meteor.com/#accounts_oncreateuser</a></p> <p>And then another post on the same subject: <a href="http://stacko...
13,461,708
0
How is for...in implemented in JavaScript? <p>I saw a question about the <a href="http://daniel.gredler.net/2008/09/10/javascript-iteration-order/" rel="nofollow">iteration order</a> of for...in statements, and warning that the order cannot be trusted. How is the iteration and tracking of the current and visited nodes ...
28,335,272
0
Noode.js ws: Server doesn't know that the client is disconnected <p>We have a problem in our project using the node <a href="https://github.com/websockets/ws" rel="nofollow">ws websockets library</a>. When the client looses network connection the only way to know that the client is disconnected is by sending a ws.ping(...
14,453,535
0
<p>Consider the following example:</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITable...
4,517,071
0
Controller Namespaces and Routing issue <p>I created a routing test rails3 app with one model 'User':</p> <pre><code>rails new routing_test_app rails generate model User name:string rails generate scaffold_controller admin/user rake db:migrate </code></pre> <p>Added to routes.db: </p> <pre><code>namespace :admin do res...
26,826,856
0
<p>I realized it was as simple as using setMaximumSize().</p> <p><a href="https://docs.oracle.com/javase/tutorial/uiswing/layout/box.html#size" rel="nofollow">https://docs.oracle.com/javase/tutorial/uiswing/layout/box.html#size</a> - got it from here.</p>
5,644,871
0
What's wrong with this PHP/JavaScript form validation? <p>I’m not sure whether the problem I’m having is with JavaScript or with PHP. </p> <p>My objective: To validate a simple yes no form using JavaScript then process it via PHP and have a message displayed.</p> <p>My problem: When JavaScript is enabled and I click th...
3,272,026
0
<p>Orthogonality is feature of your design independent of the language. Sure some language make it easier for you to have an orthogonal design for your system but you shouldn't focus on a specific language to keep your system's design as orthogonal as possible.</p>
4,377,744
0
<p>This is a perfect case for which <code>git submodule</code> was designed: <a href="http://git-scm.com/docs/git-submodule" rel="nofollow">http://git-scm.com/docs/git-submodule</a></p> <p>Within the Project1 and Project2, you add submodule of the Common. And then you <code>git submodule checkout</code></p> <p>In the ...
34,888,739
0
if JS wrapper objects are considered bad style, is type-checking with lodash _.isString etc. considered bad style as well? <p>As other questions and answers have already noted, Google and Douglas Crockford both consider JS wrapper objects bad style and shouldn't be used.</p> <p>If that's the case, should using lodash <...
20,317,775
0
<p>As @page with pagenumbers don't work in browsers for now I was looking for alternatives.<br> I've found an <a href="http://stackoverflow.com/questions/15797161/browser-support-for-css-page-numbers/16651296#16651296">answer</a> posted by <strong><em>Oliver Kohll</em></strong>.<br> I'll repost it here so everyone cou...
10,655,238
0
<p>You would need to capture the three key events separately and fire your action only after the third one.</p> <pre><code>var keys = { d: { code: 100, pressed: false, next: 'e' }, e: { code: 101, pressed: false, next: 'v' }, v: { code: 118, pressed: false, next: 'd' } }, nextKey = 'd'; $(document).keypress(function(e...
5,514,324
0
<p>You could try setting the ActiveRecord logger to stdout in your test somewhere. If you're using rspec, maybe in the spec helper?</p> <pre><code>ActiveRecord::Base.logger = Logger.new(STDOUT) </code></pre>
25,156,169
0
Show HTML table side Columns on middle column hover <p>See <a href="http://jsfiddle.net/38QZ6/1/" rel="nofollow noreferrer">http://jsfiddle.net/38QZ6/1/</a></p> <pre><code>.feelo_table:hover .labels { display:table-cell; } </code></pre> <p>In the above code the expected output is when I hover the middle table column , ...
30,918,657
0
PHP HTML MySQL for offline solution <p>I am trying to develop a website using PHP and MySQL that support for offline.</p> <p>My requirement would be:</p> <ul> <li>when internet is down, user able to use the browser and browse to my full website and doing normal operation. 2</li> <li><p>By doing normal operation, it mea...
24,754,536
0
How can i remove NSInvalidArgumentException Trace: <redacted> <redacted> .. My App Name.. <redacted>.. from Google Analytics? <p>Smart Peoples!!</p> <p>I turned on the uncaught exception logging in my iOS app:</p> <pre><code>[GAI sharedInstance].dispatchInterval = 120; [[[GAI sharedInstance] logger] setLogLevel:kGAILog...
23,066,609
0
Manual tree fitting memory consumption in sklearn <p>I'm using sklearn's <code>RandomForestClassifier</code> for a classification problem. I would like to train the trees of the a forest individually as I am grabbing subsets of a (VERY) large set for each tree. However, when I fit trees manually, memory consumption blo...
28,846,410
0
Select Weekly/Bi-weekly/twice a week in multidatespicker <p>i'm not sure if this is possible but i can't find any clue of doing this with multidatespicker.. i'm creating a web booking system which need to allow customer to select any booking date which they like. But now my client was requesting to create package like ...
31,790,460
0
Haproxy - How to parse and store parts of an incoming URL <p>If I have an incoming url like so:</p> <p>foo.com/FooID/1234/FooLocation/NYC</p> <p>How do I go about extracting these values from the incoming request so I can use them for a lookup in a map file. I know this must be doable with regex, but I was hoping for a...
17,824,017
0
<p>Try this:</p> <pre><code>SELECT count(MobileNo), count( case when m.Month=1 then m.Month else 0 end ) as Month 1, count( case when m.Month=2 then m.Month else 0 end ) as Month 2, count( case when m.Month=3 then m.Month else 0 end ) as Month 3, . . . count( case when m.Month=12 then m.Month else 0 end ) as Month 12 ...
17,701,718
0
Combining solve and dsolve to solve equation systems with differential and algebraic equations <p>I am trying to solve equation systems, which contain algebraic as well as differential equations. To do this symbolically I need to combine dsolve and solve (do I?).</p> <p>Consider the following example: We have three bas...
6,279,882
0
Tutorials for Writing Common Code for use on Windows, OS X, iOS, and potentially Android <p>I'm looking at writing an application that I would like to use on Windows, OSX, and iOS (maybe pushing into Android if other people want to use it). I want to duplicate as little work as possible and I'm having a hard time findi...
14,508,920
0
<p>The new <code>JLabel</code> is not appearing as you would need to call <code>revalidate()</code> and <code>repaint()</code> to update the container to account for the newly added component.</p> <p>From your use of <code>setBounds</code>, it appears you are using absolute positioning (If not, a layout manager will p...
27,698,375
0
How to generate 32 bit UUID in iOS? <p>I know that can generate a UUID with <a href="https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSUUID_Class/index.html" rel="nofollow">NSUUID</a>:</p> <pre><code>NSString *uuid = [[NSUUID UUID] UUIDString]; </code></pre> <p>But this is 128-bit values.</p>...
7,987,073
0
<p><a href="http://en.wikipedia.org/wiki/Indent_style" rel="nofollow">http://en.wikipedia.org/wiki/Indent_style</a> http://en.wikipedia.org/wiki/Coding_conventions</p> <p>Are a good place to start. I personally use the K&amp;R style for clarity. When it comes down to it though all you need to do is find a style you li...
40,384,206
0
<p>I found a solution! Thanks largely to <a href="https://turbofuture.com/computers/Creating-Dynamic-Charts-using-the-OFFSET-function-and-Named-Ranges-in-Excel-2007-and-Excel-2010" rel="nofollow noreferrer">this page</a>. Here's what I did:</p> <p>I created made a named range using this formula: <code>=OFFSET(Report!$...
37,343,369
1
Is there a way to sort custom objects in a custom way in Python? <p>I'm using web.py to spin up endpoints and as such, I present a list of endpoints like so</p> <pre><code>urls = ('/(.*)', 'base', '/shapes/(.*)', 'shapes', '/sounds/(.*)', 'sounds', '/shapes/rectangualar/(.*)', 'rectangualarShapes', '/sounds/loud/(.*)',...
23,432,284
0
<p>Well, you can check if a variable is an array or string using instanceOf or typeOf or .constuctor: See here <a href="http://tobyho.com/2011/01/28/checking-types-in-javascript/" rel="nofollow">http://tobyho.com/2011/01/28/checking-types-in-javascript/</a> </p> <pre><code> if(myVariable instanceOf Array){ //multi sel...
14,997,339
0
<p>One other idea for you is CodeIgniter Template.</p> <p>Here you have the link: <a href="http://williamsconcepts.com/ci/codeigniter/libraries/template/reference.html" rel="nofollow">http://williamsconcepts.com/ci/codeigniter/libraries/template/reference.html</a></p> <p>You can download, read the documentation and cr...
12,595,562
0
<p>u can solve it by using support v4 make the tab2 extends fragment-activity and wish item of list extends fragment and than u call those fragment and open them in the tab2 wish this can help u</p>
15,590,052
0
<p>I tried to understand your code and failed... However I believe that I can recommend you to create special flag, (e.g. <code>buttonClicked</code>). The value of this variable will be <code>false</code>.</p> <p>When user clicks button the flow should arrive to code like this:</p> <pre><code>if (buttonClicked) { retu...
32,698,932
0
<p>Try this. Simply test for what button was pressed when Sale is selected. </p> <p>As always, it is recommended that you validate this in your backend, too.</p> <pre><code>$(document).on('change', '#transfertype', function () { var purchaseprice = $('#purchaseprice'); if ($(this).val() === '' || $(this).val() === 'Sa...
13,009,926
0
<p>Is this what you are looking for?</p> <pre><code>#footer { display: inline-block; max-width: 1600px; min-width: &lt;your min width&gt;; text-align: center; } #footer&gt;* {display: inline-block;text-align: left;} #footer #navJumpMenu{float:right;} #footer #jumperMenu{float:left;} </code></pre> <p>Hope that helps.</...
32,823,117
0
<p>Put a info.php file on your server having code </p> <pre><code> &lt;?php phpinfo(); ?&gt; </code></pre> <p>if this code execute and show you server information then your server configuration is ok and your file name is added with some other extention, if not then you need to first setup it.</p>