امروزدخترم رابردم دندانپزشکی .یکی ازهمکاران قدیمی به اسم خانم شریفی رادیدم خوشحال شدم ،راستش برای من فرقی نمی کنه که خاطره خوب ازهمکارام داشته باشم یانه وقتی بعدازمدتهااونهارامی بینم خوشحال میشم،بعدرف...
ادامه مطلبVote count: 219 What exactly are the Python scoping rules? If I have some code: code1 class Foo: code2 def spam..... code3 for code4..: code5 x() Where is x found? Some possible choices include the list above: In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop Also there is the context during execution, when the function spam is passed somewhere else. And maybe lambda functions pass a bit differently? There must be a simple reference or algorithm somewhere. It's a confusing world for intermediate Python programmers. edited Jul 9 '13 at 12:39Nawaz asked Nov 15 '08 at 1:48Charles Merriam 7 Answers Vote count: 204 ac...
ادامه مطلبVote count: 0 I am new at coding and currently leaing swift. I am progressing in my app and just needed a little bit of help... asked 51 secs agoShreyas Prasaa Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am new to powershell and I am just curious if when I use a script to delete logs is there a command that will gather how many logs were deleted and the amount of space that was cleared (memory wise) after deleting logs and put it into a text file? So I can just log in and view the document and know exactly how many logs were deleted and how much memory is now available after deleting those logs. asked 14 secs agoThomasG Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am trying to retrieve data from my own password-protected, free Wordpress.com (not .org) site. The syntax for the API seems pretty simple if the site is not password protected, but there is very little information for novices on how to use the Wordpress.com API with authentication. I am looking to figure out these questions: When applying for an individual token without a formal App, what should I put for "Website URL" and "Redirect URL"? Once I have my token, how do I make authenticated API requests using R/RCurl? asked 15 secs agoarebearit This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read ...
ادامه مطلبVote count: 0 Suppose the following query from fluent query interface thats removed as of v3.x: var tens = graph._vertices(lst).outEdges().restrict("knows").toVertices() .inEdges().restrict("works").fromVertices().inEdges().restrict("owns") .fromVertices().toArray(); here lst is a simply a list of vertices obtained from a prior query, and the vertices in lst may have outgoing edge relationships one of which is of type knows, and the vertices pointed to by these outEdges have incoming edges of type works in tu, how would this be written with AQB? the two (AQB and fluent query interface are supposed to overlap and thats why one was removed). Iv looked at the documentation on github but im not ...
ادامه مطلبVote count: 0 For example testList0. If I run sapply(testList,function(x)is.list(x) & x[[3]]>1) I get Error in x[[3]] : subscript out of bounds. But really the problem is that the x[[3]]>1 should only be applied to the lists, not the vectors. The boolean needs to be of length testList. Any simple way of doing this? asked 40 secs agoColinTea Let's block ads! بخوانید...
ادامه مطلبVote count: 0 After much fiddling, I've finally got the Search Console API working. Unfortunately, I can't figure out how to add multiple OR filters. I presume this is what dimensionFilterGroups[].groupType will eventually be for, but 'or' is not yet an option. Basically, how do you implement a series of filters where the results are retued when any are true? I've tried the following, but none seem to work: "dimensionFilterGroups": [ { "filters": [ { "dimension": 'query', "operator": 'equals', "expression": 'lockers' }, { "dimension": 'query', "operator": 'equals', "expression": 'shelving' } ] } ] "dimensionFilterGroups": [ { "filters": [ { "dimension": 'query', "operator": 'equals', "expres...
ادامه مطلبVote count: 0 I have many json files (sample given below) present in compressed format in a S3 folder (say s3://data/) as foo.json.gz, foo1.json.gz, foo2.json.gz. One of the category (say 1010) has been mistakenly assigned and it needs to be changed across all files to 1020. How do we go about making this change and re-packaging these files in S3 with modified content? foo.json { "flower": "lilly", "animal": "cat", "category": "1010" } { "flower": "rose", "animal": "dog", "category": "1000" } { "flower": "daisy", "animal": "cat", "category": "1010" } asked 31 secs agoRpj Let's block ads! بخوانید...
ادامه مطلبVote count: 0 The Angular 2 docs provide an example for creating an attribute directive that changes the background color of an element: https://angular.io/docs/ts/latest/guide/attribute-directives.html Highlight me! import { Directive, ElementRef } from '@angular/core'; @Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef) { el.nativeElement.style.backgroundColor = 'yellow'; } } Can I also use el.nativeElement to get the content of the element (e.g. Highlight me!), modify this and update the element? asked 49 secs agoGareth Whittaker Let's block ads! بخوانید...
ادامه مطلبVote count: 0 On my local windows 8 setup I have Ruby on Rails env already set up. I'd like to install Java as well without removing RoR and be able to use either from the terminal depending on what project I'm working on. How do switch from one language environment to another and back again when I'm done working on any specific thing? asked 38 secs agoSiouxsie Asylum Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I have a large minified css file and a small non-minified file. I'll be changing the non-minified file regularly, but I want them combined. However re-minifying a large minified file takes WAY too long. What I want is something like this ... var cssnano = require('gulp-cssnano'); var cssjoin = require('gulp-cssjoin'); gulp.task('cssjoin', function() { gulp.src( 'changing.css' ) .pipe(cssnano()) .pipe(rename( 'changed.min.css' )) .pipe(gulp.dest( '.' )); gulp.src( ['big.min.css','changed.min.css'] ) .pipe(cssjoin()) .pipe(gulp.dest( 'final.min.css' )) }); Basically, first minify the small file, then join it to the end of the large one. The code above doesn't work of course, task...
ادامه مطلبVote count: 0 I'm attempting to use the spring social google library with the driveOperations() implementation. Whenever I attempt to download a file, I get an error. I've even tried to download publicly shared files with no success. Authentication is working. I've tried the following variations: Resource resource = google.driveOperations().downloadFile("uniquedocidhere"); // another approach, no error, but getDownloadUrl() is null DriveFile driveFile = google.driveOperations().getFile("uniqeidhere"); google.driveOperations().downloadFile(driveFile); // 404 // finally trying it with a file drive v2 url gives an invalid URI error I added drive to the scope so I know that isn't an issue. I'm p...
ادامه مطلبVote count: 0 I need to read image files in a file and store in a Mat array. To do this, I first read all the image files to a BufferedImage array (this works), and from there, I need to store the BufferedImages to a Mat array. I found many questions regarding this, but none of them seem to work. code error asked 52 secs agoChandika Ambawatte Let's block ads! بخوانید...
ادامه مطلبVote count: 0 For example, I want to generate a plan table web page (like https://trello.com/) with a button. So in trello, you get to make your own plan, then add list, and in each list, you can add cards. I am developing a website which will be able to do something like trello, which you will be able to add list, and cards. Example of trello here In the screen shot, it can be seen that there are 2 lists, "List 1" & "Objectives". In "List 1", there are 3 cards. However, how do I do that? to generate a new web page every time I add a new plan. I am a newbie in web development and need some help. Thank you,. asked 1 min agoJason Christopher Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I need to know the actual width and height of a YouTube video embedded in my website. Here's a crude illustration. I've searched through the API docs and I haven't found a way to do this. I've noticed the player variable contains a method called showVideoInfo() which overlays exactly the data I want on the video player... but unfortunately since it is in the iframe I'm unable to access it from JavaScript. Is there any way to do this without having a backend script that queries the JSON API? Because I'd seriously rather not have to do that. asked 2 mins agoMichael Phillips Let's block ads! بخوانید...
ادامه مطلبVote count: 0 So I have an SQL file with data inside of it. Which libraries do I need to import and what do I need to write in order to export that data into an Excel file? asked 2 mins agoNasif Rob Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I am making a prototype for a database in Access. I have a student table, and a lesson table. one student can have many lessons. I want a field that says which lesson that was for the student, e.g. 'lesson 3'. I am very open to advice on making new tables, queries, fields, etc, my database is a prototype, so if you think it would be better to completely change it, then I am open to suggestions. asked 1 min agoPaul Jackways Let's block ads! بخوانید...
ادامه مطلبVote count: 0 Consider the following code public class myClass{ myClass instanceOfNotYetDefinedClass; ... //etc code } I don't understand how the compiler manages to understand that: I'm telling it to create a class, and then it says: "OK! Let me see what this myClass class has. Oh, its a myClass, let me see whats this has..." etc. It may be a pretty noobish question, but I really don't understand how this could be handled. asked 2 mins agoYoTengoUnLCD Let's block ads! بخوانید...
ادامه مطلبVote count: 0 I'm trying to create a cesar cipher in Javascript and having trouble figuring out how to do the shift. It may be that my approach is complicating it, but I'm trying to understand how to set a max value for adding numbers, but have the addition continue starting from the minimum number. Here is the code I have: $(document).ready(function(){ var alpha = []; var encoded = []; alpha = { '1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g', '8': 'h', '9': 'i', '10': 'j', '11': 'k', '12': 'l', '13': 'm', '14': 'n', '15': 'o', '16': 'p', '17': 'q', '18': 'r', '19': 's', '20': 't', '21': 'u', '22': 'v', '23': 'w', '24': 'x', '25': 'y', '26': 'z' }; $('#cipher_form').sub...
ادامه مطلب