_id
stringlengths
2
6
text
stringlengths
4
46k
title
stringclasses
1 value
d17701
You can group the elements using a dict, always keeping the sublist with the smaller second element: l = [[1, 2, 3], [1, 3, 4], [1, 4, 5], [2, 4, 3], [2, 5, 6], [2, 1, 3]] d = {} for sub in l: k = sub[0] if k not in d or sub[1] < d[k][1]: d[k] = sub Also you can pass two keys to sorted, you don't need ...
d17702
You are sending a function as the data, I think you want the return of the function so you would need to call it by including parens after it: var newGridDataSource = new kendo.data.DataSource({ transport: { read: { url: "/api/Stuff/", dataType: "json", data: ...
d17703
You can use something like this: $f = array_filter(array_keys($arr), function ($k){ return preg_match('~something/(?![_!])~', $k); }); The negative lookahead (?!...) checks if the slash isn't followed by a ! or a _. Note that preg_match returns 1 if found or 0 if not. If you want to return true or false you can ...
d17704
Your base case is only checking if the number is zero. Check this solution, and let me know if you have doubts! public int evenToZero(int number){ //Base case: Only one digit if(number % 10 == number){ if(number % 2 == 0){ return 0; } else{ return number } } else{ //Recursive case: ...
d17705
filename users wouldn't point to the same object as filename users/. That is not true. In most filesystems, you cannot have a file named users and a directory named users in the same parent directory. cd users and cd users/ have the same result. A: Short answer: they may only identify the same resource if one redire...
d17706
There are so many caching back-ends you can use as listed in https://docs.djangoproject.com/en/1.7/topics/cache/ I haven't tried the file system or local memory caching myself, I always needed memcached, but looks like they're available, and the rest is a piece of cake! from django.core import cache cache_key = 'quest...
d17707
I don't see why you have to "cluster" on the fly. Summarize at each zoom level at a resolution you're happy with. Simply have a structure of X, Y, # of links. When someone adds a link, you insert the real locations (Zoom level max, or whatever), then start bubbling up from there. Eventually you'll have 10 sets of disti...
d17708
I wouldn't call it sum statement. The statement var1+1; is equivalent of retain var1 0; var1 = var1 + 1; Nor the 'long' sum statement var1 = var1 + 1; nor var1 = sum(var1, 1); itself would do the RETAIN behavior nor initialization to zero. So to answer the question: initialization to zero is part of RETAIN behavio...
d17709
Are you just trying to evaluate an arbitrary expression inside a double quoted string? Then maybe you're thinking of print "@{[$this->method]}"; There is also a trick to call the method in scalar context, but the syntax is a little less clean. print "${\($this->method)}"; A: Well, if $this->method outputs a string o...
d17710
Make the first column the primary key of the table. A: Set the column as a primary key. I doesn't have to be an identity column to has a PK. A: Create it the same way you would any other column: create table sometable (column1 varchar(10), column2 varchar(20)) or whatever. Do you mean: How can you get the database to...
d17711
Replace text from txt for each line and save as Could somebody help me with the following? I tried making it on my own, but all I could do is open a txt and replace a static word with static word. VBA script: Open and Read first line of ThisVbaPath.WordsToUse.txt Open and Find USER_INPUT in ThisVbaPath.BaseDoc.docx (or...
d17712
You can surround the string with single quotes, since double quotes are used in the string already: >>> print 'q0Ø:;AI"E47FRBQNBG4WNB8B4LQN8ERKC88U8GEN?T6LaNBG4GØ""N6K086HB"Ø8CRHW"+LS79Ø""N29QCLN5WNEBS8GENBG4FØ47a' q0Ã:;AI"E47FRBQNBG4WNB8B4LQN8ERKC88U8GEN?T6LaNBG4GÃ""N6K086HB"Ã8CRHW"+LS79Ã""N29QCLN5WNEBS8GENBG4FÃ47a >>...
d17713
If I don't misunderstood your requirements then you can try this way with json_normalize. I just added the demo for single json, you can use apply or lambda for multiple datasets. import pandas as pd from pandas.io.json import json_normalize df = {":@computed_region_amqz_jbr4":"587",":@computed_region_d3gw_znnf":"18","...
d17714
Each click on an object, adds listener to your button, but you don't ever remove listeners. You end up with multiple listeners, that's why more objects are moved than intended. You could remove listener after each button click, but that seems like a total overkill. Instead of adding multiple listeners, consider adding ...
d17715
Try GNU Obstacks. From Wikipedia: In the C programming language, Obstack is a memory-management GNU extension to the C standard library. An "obstack" is a "stack" of "objects" (data items) which is dynamically managed. Code example from Wikipedia: char *x; void *(*funcp)(); x = (char *) obstack_alloc(obptr, size); /...
d17716
If you want to keep state after reloads you might want to take a look at HTML Web Storage. A: In order of preference I would use: 1) If you are on react 16.3 or greater use the react context api 2) If you are not on 16.3 or greater you can use a library such as redux or flux 3) you can use HTML local storage. Here is ...
d17717
Route matching is powered by https://github.com/pillarjs/path-to-regexp . You can use their documentation to look for a similar case. My first guess would be to try escaping the space: path: '/:NAS\ ID'
d17718
you date(int ,int,int) constructor is assigning the variables incorrectly. What you want is month = m; day =d; year = y; A: Change Date:: Date(int m, int d, int y) // constructor definition { m = month, d = day, y = year; checkDate(); } To Date:: Date(int m, int d, int y) // constructor definition { month...
d17719
Let us look at the four situations for an element in your list (as we iterate through them). If (for terseness) we take old to be the item that is moving's old position and new to be its new position we have the following cases for an item in your list (draw them out on paper to make this clear). * *the current item...
d17720
The index buffer is used to index into the colorBuffer using the same index as is used for indexing into the vertexBuffer, so the corresponding elements in each need to match. The indices in your index buffer are in the range of 0-7, so you will only ever index the first 8 entries of your colorBuffer, which are green a...
d17721
There seems to be no reason to JOIN the users table. You can get all public and your own private templates with SELECT `templates`.`id`, `templates`.`name`, `templates`.`description`, `templates`.`datetime`, FROM `templates` WHERE `templates`.`user_id` = 42 OR `templates`.`private` = 0 I am as...
d17722
These usually refer to anonymous inner classes.
d17723
Why are you trying to use "COM3" on a Linux machine? That's a Windows port name. Linux/Unix port names are of the form /dev/ttyUSB0. But, as the docs show, you can probably just use the port number directly - they start at 0, so you can do ser = serial.Serial(2, 9600). A: If you have the arduino ide open, then python ...
d17724
You cannot do this. A similar question was asked on Kotlin's forum and yole (one of the creators of the language) said this: this in a lambda refers to the instance of the containing class, if any. A lambda is conceptually a function, not a class, so there is no such thing as a lambda instance to which this could refe...
d17725
The first capture is greedy, which means that it will capture everything up to the last / (rather than the first / as you intended). You could make the capture non-greedy by using *? instead of *. But if the captures are not intended to capture /, you should use the [^/] character class instead. For example: rewrite ^/...
d17726
I'll answer the first question only as I haven't used Realm for a while. As you stated yourself, you cannot use Observable fields in the model that you use in Realm and you shouldn't ever do so. Model is to be kept simple. ViewModel is exactly where Observables belong. They should be bound to the view and only them. C...
d17727
I ended up creating the form (document.createElement) on page load with jquery, submitting it (.trigger("click")) and then removing it (.remove()). In addition I obfuscated the jquery code with the tool found here Crazy Obfuscation as @André suggested. That way user cannot see the htaccess username and password in Page...
d17728
You don't really need a loop construct here, you can get the desired output with Select-Object: Get-AzureADUser -All |Select ObjectId,UserPrincipalName,@{Name='CreationDate'; Expression={(Get-AzureADUserExtension -ObjectId $_.ObjectId).Get_Item("createdDateTime")}}
d17729
for more clarification, you may want to use this old colde: $image = file_get_contents($_FILES['photo']['tmp_name']); new code: $imgData= file_get_contents($_FILES['photo']['tmp_name']); $image = imagecreatefromstring( $imgData); this is a clarification of my comment above.
d17730
Questions regarding number generators for C have been asked before here on SO, such as in the article "Create Random Number Sequence with No Repeats". I'd suggest looking at the above article to see if anything is suitable and provides a useful alternative to the standard rand() function in C, assuming that you've alre...
d17731
Inside your clients class you defined a member - client. It is not a collection, and when you deserialize xml file to clients class it deserialize only one node (first). Use List or other collections inside: [Serializable, XmlRoot("clients")] public class Clients { [XmlElement("client")] pub...
d17732
The above is the same problem as in How to get dimensions from dimens.xml None of the LayoutParams attributes have built-in support. As answered in the linked article, data binding of LayoutParams was thought to be too easy to abuse so it was left out of the built-in BindingAdapters. You are not abusing it, so you shou...
d17733
This may not be the most elegant solution, but I would try (for a test) disabling firePHP and use instead a logging tool such as log4php and have it log your exceptions where and when they might be thrown. Thus, if you're not doing so already.. use try and catch blocks and in the catch blocks, log your exception to a f...
d17734
You can make a custom tab bar and add accessibility as you wish in each tab bar item like this: <Tab.Navigator tabBar={(props) => <CustomTabBar/>}> <Tab.Screen .../> </Tab.Navigator> A: Thank you guys for responding. Really appreciate it! I hadn't done the correct research. In the documentation , it says that the...
d17735
getWcmMode() is a final method in WCMUsePojo, mockito does not support mocking final methods by default. you will have to enable it by creating a file named org.mockito.plugins.MockMaker in classpath (put it in the test resources/mockito-extensions folder) and put the following single line mock-maker-inline then you ...
d17736
Base on this you may have to change the way you are configuring your application: var webHost = new WebHostBuilder() .UseKestrel() .UseContentRoot(Directory.GetCurrentDirectory()) .ConfigureAppConfiguration((hostingContext, config) => { var env = hostingContext.HostingEnviron...
d17737
A few things wrong here. The definitive SPF checker is Scott Kitterman's. It finds this error: PermError SPF Permanent Error: Unknown mechanism found: postbox.pidatacenters.com It's not clear why this is presented as this particular error because the syntax itself is valid, but you have a recursive definition - your S...
d17738
You can use Google Stackdrive to setup alerts and have an email sent. However, disk percentage busy is not an available metric. You can chose from Disk Read I/O and Disk Write I/O bytes per second and set a threshold for the metric. * *Go to the Google Console Stackdriver section. Click on Monitoring. *Select Alert...
d17739
This should work Private Sub txtbarcode_KeyPress(KeyAscii As Integer) If KeyAscii = 32 Then 'replace space with underscore KeyAscii = 95 End If End Sub
d17740
It depends (like often). The JDK is a development kit for Java SE including FX. So you can develop desktop applications but also web applications depending on the type of integration you prefer. The Java EE SDK contains also the Glassfish server, examples and tutorials but they are not really needed. The ME is a specia...
d17741
In fact, it was quite easy: if you put the absolute path to an executable file in the browser option, it takes it smoothly. So options should be something like : { port: 9000, server: { baseDir: [... ], routes: { '/bower_components': 'bower_components', '/node_modules': 'node_modu...
d17742
CouchDB, out of the box, does not provide you with any options to control the order of replication. I'm guessing you could piece something together if you keep documents with different priorities in different databases on the master, though. Then, you could replicate the high-priority master database into the slave dat...
d17743
Based on discussions at the Apple dev forums (https://devforums.apple.com/message/749949) it looks like this is a bug affecting a lot of people. Probably due to a change in Apple's validations servers. I was able to work around it by changing the build architecture in Build Settings from Standard(armv7,armv7s) to armv...
d17744
In your activity Replace following PendingIntent pi = PendingIntent.getService(this, 0, notificationmassage, PendingIntent.FLAG_UPDATE_CURRENT); with PendingIntent pi = PendingIntent.getBroadcast(this, 0, notificationmassage, PendingIntent.FLAG_UPDATE_CURRENT); A: public void getNotification(Context c...
d17745
How this assignment can be done is very dependent on the pixel-format you specified when acquiring ddsd. See the field ddpfPixelFormat and also specifically in there: dwRGBBitCount. Maybe you can provide this pixel format information so that i can improve my answer. However, i can easily give you an example of how you ...
d17746
The model should be placed in a new class library project. My preference would be to recreate the model at this point based on the existing model. For the namespace I like to use {CompanyName}.DataAccess. Remove the old model from your web site project, add a reference to the new class library project and build the web...
d17747
You had a couple of errors in your XSD. And one in your XML. To remove this one error in your XML, change the namespace in the <catalog...> element from xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance" to xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance". A simple typo. And your XSD should look like this to v...
d17748
Check out itertools.product(*iterables, repeat=1) here. Use like: > product([-1, 0, 1], repeat=6) [...] (1, 1, 1, 0, -1, -1), (1, 1, 1, 0, -1, 0), (1, 1, 1, 0, -1, 1), (1, 1, 1, 0, 0, -1), (1, 1, 1, 0, 0, 0), (1, 1, 1, 0, 0, 1), (1, 1, 1, 0, 1, -1), (1, 1, 1, 0, 1, 0), (1, 1, 1, 0, 1, 1), (1, 1, 1, 1, -1, -1)...
d17749
Use Bootstrap 3 which can do exactly what you wish using its css media queries. Alternatively you can simpy write your own CSS to be responsive using media queries. A: As mccainz mentioned, you have several options. All of those examples are under an umberalla term called "responsive design". According to Wikipedia, "...
d17750
Since new_list is a dict you should be able to just extract that with a simple instanceid = new_list['facter']['instanceid'] The u you see before your strings are just telling you that the strings are unicode strings, and not a "C-string". In your case it doesn't matter, since there are no unicode characters in any of...
d17751
You simply (I say simply, but if can be one of the most aggravating parts of iOS development) need to make sure you are providing the developers with the private key for the certificate, the certificate, and provisioning profile for development. If your project settings are correct, you should not get the team prefix ...
d17752
Problem solved.I didn't discretize the instance that was to be tested so that the weka didn't know the format of my instance.add the following code: discretize.input(instance);//discretize is a filter instance = discretize.output();
d17753
new HttpPost("localhost:3000/api/send"); every http request needs to be fully qualified. also do not use local host.Android wont recognize your endpoint that way. I always use ngrok to broadcast to internet. switch to new HttpPost("http://your_domain"); also switch to retrofit2, it uses java annotations to compose it...
d17754
Deleting a certain number of rows one by one can be slow. You can try the following method, should be faster and achieve the desired outcome. Private Sub Select_Button_Click() Application.DisplayAlerts = False: Application.ScreenUpdating = False: Application.EnableEvents = False On Error GoTo Cleanup With W...
d17755
There is no direct conversion between these two entities out of the box - the Outlook message file and the MailMessage class from the .net framework. You can automate Outlook to get the instance of the MSG file instantiated using the NameSpace.OpenSharedItem method which is used to open iCalendar appointment (.ics) fil...
d17756
It's not really clear from the question exactly what you are trying to achieve. By reading through the code it seems you are wrapping each word in a span, and then using that span's location to work out whether or not it is on a new line, this then leads to each word on the same line being merged together inside a new ...
d17757
Yes. You should create conection of emr_default of the right type for the operator (you have to pick the right one from the list) . Here is a detailed instruction on what to do. This is is "1.10.11" Airlfow documentation and if you need any other airflow resources and docs you can always go there and use "Saerch" funct...
d17758
only Collections are synced across browsers with publish/subscribe in Meteor. Maybe you can have something like a Users collection with an is_typing field and create a reactive template helper with it? Very basic example: Template.messages.is_typing = function() { return Users.find({is_typing:true}).count() > 0 }; ...
d17759
The better option for large number of files transfer is to use ftp protocol. For that you need an ftp server. And, using org.apache.commons.net.ftp.FTPClient you may upload files in to the server (and also various file management). The storeFile(String, InputStream) method of org.apache.commons.net.ftp.FTPClient can g...
d17760
Instead of return 0 just do return -1 and you'll get desired height smaller by 1. Corrected code is below: def maxDepth(self, node): if node is None: return -1 else: # Compute the depth of each subtree lDepth = self.maxDepth(node.left) rDepth = self.maxDepth(node.right) ...
d17761
Thanks to all that responded for the clues that helped me solve this. I looked in the console and saw the error message "No 'Access-Control-Allow-Origin' header is present on the requested resource". What wasn't clear in my question was that the url I was trying to reach was on a different server and I was encountering...
d17762
Pentaho files are found at: https://sourceforge.net/projects/pentaho/files The server is in the 'Business Intelligence Server' folder. Download the zip file of the latest version, and unzip it. Open a terminal at the location of the unziped directory, and then cd into the directory. Now run ./start-pentaho.sh. It is a ...
d17763
To get the current date, you need to specify which time zone you're in. So given a clock and a time zone, you'd use: LocalDate today = clock.Now.InZone(zone).Date; While you can use SystemClock.Instance, it's generally better to inject an IClock into your code, so you can test it easily. Note that in Noda Time 2.0 thi...
d17764
int lena = a.length(); int lenb = b.length(); int inta[] = new int[lena]; int intb[] = new int[lenb]; int result[]; int carry = 0, maxLen = 0, tempResult; if(lena >lenb) maxLen = lena + 1; else maxLen = lenb + 1; result = new int[maxLen]; for(int i = lena - 1; i>=0 ; i--) { inta[i] = Integer.valueOf( a.char...
d17765
Easy steps to create Cocoapod from existing xcode project * *Create a repository on your git account (Repo name, check README, choose MIT under license). *Copy the url of your repository.Open terminal and run following command. git clone copied your repository url *Now copy your Xcode project inside the cloned re...
d17766
You shall have a field in db which means isDeteled or isRecycled and when it is set to 1 show it in recycleBin/ if user finally deletes record delete if from db. Better choice is to have status field for enum Active/Archived/Deleted or Active/Archived/Deleted/Purged when the record in last state of this enum delete it ...
d17767
There doesn't appear to be a way to disable zoom completely or specifically the slider after looking around. If you're main mission is to avoid someone clicking on the zoom slider I would probably go with hiding the statusbar all together. Application.DisplayStatusBar = False A: To hide the zoom slider alone you can ...
d17768
Assuming you are trying to do a SignalR Client in Windows Forms Appliation then check this post(http://mscodingblog.blogspot.com/2012/12/testing-signalr-in-wpf-console-and.html) on how to do client side SignalR in WPF application in VB. With similar approach I guess you could make Signalr client working in Windows For...
d17769
If you use rake to run rspec tests then you can edit spec/spec.opts http://rspec.info/rails/runners.html A: As you can see in the docs here, the intended use is creating ~/.rspec and in it putting your options, such as --color. To quickly create an ~/.rspec file with the --color option, just run: echo '--color' >> ~/....
d17770
Your module has a minus symbol in the title. That's the reason. Sometimes (nearly never) the underline symbol may be the fault. If you name your module like "myModules" or "modules", there would be no error. WRONG: >>> import my-modules File "<stdin>", line 1 import my-modules ^ SyntaxError: invalid...
d17771
The results of expressions in a Python script are not normally printed - this is a feature of the interpreter and the notebook. In a script it would not make much sense to compute x * y and do nothing with it. Try this instead: print(3j * 9)
d17772
Yes you can add an action hook to wp_head like this: add_action('wp_head', myCallbackToAddMeta); function myCallbacktoAddMeta(){ echo "\t<meta name='keywords' content='$contents' />\n"; }
d17773
Create the ZIP file locally and use either commons-net FTP or SFTP to move the ZIP file across to the remote location, assuming that by "remote location" you mean some FTP server, or possibly a blade on your network. If you are using the renameTo method on java.io.File, note that this doesn't work on some operating sys...
d17774
It seems you forgot the return in the if clause. There's one in the else but none in the if. A: @furas' code made iterative instead of recursive: def radiationExposure2(start, stop, step): totalExposure = 0 time = stop - start newStart = start + step oldStart = start while time > 0: total...
d17775
For setting up of environment variables. 1) Right-click the My Computer icon on your desktop and select Properties. 2) Click the Advanced tab. 3) Click the Environment Variables button. 4) Under System Variables, click New. 5) Enter the variable name as JAVA_HOME. 6) Enter the variable value as the installation path fo...
d17776
The following works with a CSV file. You may need to do this before proceding. <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>StackOverflow</title> </head> <body> <input type="text" id="searchvalue"><button onclick="search()">Search</button> <table id="userslist"></table> <script src=...
d17777
for javaFX there is a library with write back support DataFX2.0 Sample Examples can be found here If you need any further help on datafx then you can post in datafx google groups Link
d17778
seems like you want to query your DOM by a specific tag, similar to jquery selectors. Take a look at the project below, it might be what you are looking for. https://github.com/jamietre/csquery A: Load the HTML into an HtmlDocument object, then select the first node where the text input appears. The node has everyth...
d17779
Google has fixed the issue: https://issuetracker.google.com/issues/112692348 I was able to run queries this morning using ordinal and offset with no issues.
d17780
You need to add a GROUP BY clause: SELECT CHINFO.CHILDID , COUNT(1) FROM BKA.CHILDEVENTS CHE JOIN BKA.CHILDEVENTPROPERITIES CHEP ON CHEP.EVENTID = CHE.EVENTID JOIN BKA.CHILDINFORMATION CHINFO ON CHE.CHILDID = CHINFO.CHILDID WHERE ( CHE.TYPE = 'ACCIDENT' OR ( CHE.TYPE = 'BREAK' ...
d17781
This is a duplicate of SLComposeViewController setInitialText not showing up in View. This behaviour is by design; prefilling was not allowed by policy, and now it's also enforced. About the cancel button; this is a known issue and will be fixed. See bug report: https://developers.facebook.com/bugs/962985360399542/
d17782
The most efficient way might be to import the OSM data of the specific area to a local postGIS database using Osm2pgsql or ImpOsm and do your analytics there.
d17783
Crap4j is one fairly good metrics that I'm aware of... Its a Java implementation of the Change Risk Analysis and Predictions software metric which combines cyclomatic complexity and code coverage from automated tests. A: If you are looking for some useful metrics that tell you about the quality (or lack there of) of y...
d17784
The problem is that your package was encrypted by a user. This could have been you are you loging in to the pc with a diffrent login or from a diffrent machine? Your not going to be able to open it until you figure out who encrypted it or from what account it was encrypted from.
d17785
It is theme issue on your end,probably textcolor set to white in your theme change these <item name="android:textColorPrimary">@color/white</item> <item name="android:textColorSecondary">@color/white</item> change it to black A: your row_layout.xml file textview in set textcolor: <TextView android:layout_width="...
d17786
With gradle 3 implemention was introduced. Replace compile with implementation. Use this instead. pom.withXml { def dependenciesNode = asNode().appendNode('dependencies') configurations.implementation.allDependencies.each { def dependencyNode = dependenciesNode.appendNode('dependency') dependenc...
d17787
('0' to 'z').filter(_.isLetterOrDigit).toSet A: A more functional version of your code is this: scala> Traversable(('A' to 'Z'), ('a' to 'z'), ('0' to '9')) map (_ toSet) reduce (_ ++ _) Combining it with the above solutions, one gets: scala> Seq[Seq[Char]](('A' to 'Z'), ('a' to 'z'), ('0' to '9')) reduce (_ ++ _) t...
d17788
Most Heroku CLI commands support the -a parameter to specify the application, in this case: heroku buildpacks:set heroku/nodejs -a <app name>
d17789
I agree with @Bickknght that the unpacking is unnecessary. Don't use unpacking when dealing with an unknown or variable number of elements. In [57]: alist = [np.arange(10), np.arange(10,20), np.arange(20,30)] Making a list of arrays where the we don't need the ravel. In [58...
d17790
I'm reasonably confident it is to do with the order of your .antMatchers() statements. You currently have .antMatchers("/secured/**").fullyAuthenticated() before .antMatchers("/secured/admin/**").hasRole("ADMIN"). Spring Security is probably matching against this first matcher and applying the fullyAuthenticated() chec...
d17791
In your code printf ( "%d\n", a[0] ); printf ( "%d\n", a[1] ); printf ( "%d\n", a[10] ); printf ( "%d\n", a[100] ); produces undefined behaviour by accessing out-of-bound memory.
d17792
What kind change detection do you use? Is OnPush? https://angular.io/api/core/ChangeDetectionStrategy enum ChangeDetectionStrategy { OnPush: 0 Default: 1 } OnPush: 0 Use the CheckOnce strategy, meaning that automatic change detection is deactivated until reactivated by setting the strategy to Default (CheckAlw...
d17793
You are missing the new, when creating your viewmodel. Your code should look like this: ko.applyBindings(new ViewModel()); Without the new the this refers to the global window object so your remove function is declared globally, that is why the $parent is not working. Demo JsFiddle.
d17794
Although this is a very old question. I was also looking but couldnt find the answer until i found out what the problem is. EasySMPP library is using asynchronous calls to connect to the SMSC which is why when you run the readline() command line you are requested to put your text as readline and while there is a delay...
d17795
You can use a list comprehension. x = [[el[1]] for el in filtered] or: x = [[y] for x,y in filtered] You can also use map with itemgetter. To print it, iterate over the iterable object returned by map. You can use list for instance. from operator import itemgetter x = map(itemgetter(1), filtered) print(list(x)) A: ...
d17796
Can you add width and height map div? If you have blank page instead map, it's probably missing css.
d17797
Your counter is indeed stoppping, but you then reassign mytimeout after the if statement so the timer starts again. I'm guessing the $state.go() still runs but the counter continues in the console. Instead, call the timer if less than 10, otherwise call the resolving function. $scope.startTimer = function() { $scop...
d17798
I finally found the reason why the implicit style didn't work. I'm using ModernUI with WPF4.0 and I deleted the <Style TargetType="{x:Type Rectangle}"/> in app.xaml the other day. Well, it's that simple and everything looks fine now. Except that I still don't know how the empty style works.
d17799
Just reduce the problem dimensionality from 3 to 2 (I know now that it is said "9x9" instead of "3x3", but the important dimensional number for the puzzle is N=3): % SHIDOKU Solve Shidoku using recursive backtracking. % shidoku(X), expects a 4-by-4 array X. function X = shidoku(X) [C,s,e] ...
d17800
This complete example based on tensorflow github worked for me: (I modified few lines of code by removing name scope for x, keep_prob and changing to tf.placeholder_with_default. There's probably a better way to do this somewhere. ​ from __future__ import absolute_import from __future__ import division from __futu...