Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
For a MS Word document, I need to find all occurrences of any month name and replace it with a generic place older. How can I do that with the Find and Replace function?
i.e., How can I search a Word document for every occurance of January February March April ... etc.
I can do this for one month at a time, but would like to do it for any month in a single action.
Your question is off-topic for StackOverflow, as it's not a programming question.
Nevertheless, you can use a wildcard Find/Replace where:
Find = <[JFMASOND][abceghilmnoprstuvy]{2,8}>
Replace = [MONTH]
Note: The above will find abbreviated months also. There is also a small risk of mis-matches if you have capitalized words in the document that the expression can match. For example, 'May' may or may not be a month, whilst 'Feminine' is never a month. If you pair the Find with a day and/or year, you'll eliminate the risk of mis-matches. For example:
Find = <[JFMASOND][abceghilmnoprstuvy]{2,8}( [0-9]{1,4}>)
Replace = [MONTH]/1
will find a month name followed by a day or year number, whilst retaining that number in the replacement.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 3 months ago.
Improve this question
I have been looking around in the documentation, but could not find an explanation of what the "int2vector" type really is. It is found in some system tables like pg_trigger, but that's all a documentation search returns...
It seems to be vaguely similar to int2array, but has a different OID (INT2VECTOROID is 22, INT2ARRAYOID is 1005).
I have found ways to generate int2array in SQL (for instance with SELECT cast('{1,2}' as int2[])), but not int2vector.
The question applies to int4vector & int4array as well, and the uses case is when interfacing with libpq in binary format.
int2vector is an obsolete data type for arrays of smallint from the time before PostgreSQL had array data types. Today you would use smallint[].
You shouldn't use int2vector in your table definitions, as it is not documented. On the other hand, it is unlikely to get removed, since the catalog tables make use of that data type for historical reasons. There is no advantage to be had by using int2vector.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
This post was edited and submitted for review 1 year ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
My app involves repeated equality comparisons of many megabytes of an array of strings. I was (naively?) surprised that such comparisons became immensely faster when I added a shadow array of the count of each string; if the counts are not equal, the strings cannot be equal.
I would have thought that the Swift compiler could easily and efficiently maintain a string's count in the internal representation, and short-circuit string equality comparisons if the counts differ. The initial creation of each string would provide the opportunity to initialize the count, and each manipulation would then know the count of each participant. But it seems not so. If only some applications would benefit from a stored count, a compiler switch to turn it on could help them.
Would this be a reasonable standard library refinement?
The problem with String is that it is not stored always in the same way. There are different types of storage and for them to be properly compared, they have to be converted to the same representation first.
Looking into the source code here: StringComparison.swift, I think you are right and count should be compared first when checking equality.
I recommend filing a bug.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In tableau for its sample super store dataset,I need to get the exclusive customers who buy only furniture and not office supplies and technology.
Want to display the exclusive customer names and their sales.
You can put Customer on the Filter shelf and on the condition tab, use the following formula min([Category] = "Furniture") For boolean expressions, True > False, so MIN(condition) is true if and only if condition is true for every record. MIN() for booleans can thus be read as "every()" and MAX() can be read as "any()"
If you work with this group of customers a lot, you might want to define a set of Customers that only buy furniture, instead of a filter. There are lots of ways to think of sets, but one is just as a saved named filter.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm reading an paper about EDF scheduling algorithm and I'm going to implement it after get it. I couldn't find any acceptable answer for it so I asked this question.
does anybody know this question's answer?
There is no mystery in these terms
relative deadline is a deadline relative to start of the job (start of the thread, ...),
absolute deadline is a specific point in time.
So a periodic job - for example a task that is executed every second - can have constant relative deadline - for example 100ms - but on each run its absolute deadline will be different (11:10:00.100, 11:10:01.100, 11:10:02.100, ...).
See page 335 - http://books.google.pl/books?id=iilIj3JXNrAC&printsec=frontcover&hl=pl&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false (really good source of info about operating systems)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
Someone please suggest the command to cleanup mongodb collection events older than 12 hrs.
I need to configure this as part of cronjob, and will be executing at every 12.00 PM and 12.00 AM.
First, you need to store creation date and time in your documents. Create an additional field, if you do not have it. Having this field i collection, you have two options:
Either running a job with cron, that will remove all documents older than 12 hr. Smthing like db.collection.remove({"createdAt" : {$gt : Date.now() - 43200000}})
Create an TTL index for this field, that will automatically do all the cool things. db.collection.ensureIndex( { "createdAt": 1 }, { "expireAfterSeconds": 43200 } )
I would prefer the second solution.