Xcode: Number of rows in section [closed] - plist

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
i've got a plist dictionary with a couple of arrays like this:
<dict>
<key>DebtA</key>
<array>
<dict>
<key>name</key>
<string>NameA</string>
<key>tel</key>
<string>11111111</string>
<key>email</key>
<string>namea#abc.com</string>
</dict>
</array>
<key>DebtB</key>
<array>
<dict>
<key>name</key>
<string>NameB1</string>
<key>tel</key>
<string>22222222</string>
<key>email</key>
<string>nameb1#abc.com</string>
</dict>
<dict>
<key>name</key>
<string>NameB2</string>
<key>tel</key>
<string>22222223</string>
<key>email</key>
<string>nameb2#abc.com</string>
</dict>
</array>
.. more arrays
</dict>
What i want to achieve is that in a table view the number of rows in section is equal to the amount of items of the subsidiary arrays.
I've tried the following, without success.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [[[afdDict allKeys]objectAtIndex:section]numberOfItems];
}
How do i get the number of items (eg in DebtA, one. In DebtB two) of a given array ?

return [[[afdDict allValues] objectAtIndex:section] count];

Related

Using Firestore: How to prevent a malicious ip from sending too many requests? [duplicate]

This question already has an answer here:
How do I implement a write rate limit in Cloud Firestore security rules?
(1 answer)
Closed 1 year ago.
Because I didn't see any other posts that specifically asked this question phrased in this way, I thought I might ask.
An example of "too many requests" might be a malicious user altering the client-side code so that it creates a new user (stored in Firecloud) as frequently as possible.
Like Frank van Puffelen pointed out, this has already been answered and is found here: How do I implement a write rate limit in Cloud Firestore security rules?
The keywords used in this post are different than the one used in the post linked above, so I feel like it's worth it to keep this post around just in case someone gets here via a Google search using these keywords.

How to customize woocommerce password rule , i want write own password rule [duplicate]

This question already has answers here:
Change WooCommerce default password security level
(3 answers)
Closed 4 years ago.
I am new to Wordpress, i need to change password rule of woocommerce something like this :
Minimum 6 character length.
one special character required
Please help .
Thanks in Advance.
See here: https://wordpress.stackexchange.com/questions/278084/is-it-possible-to-reduce-the-minimum-character-length-for-passwords
Passwords do not have a minimum character requirement, but there is an minimum strength requirement. The strength is determined by zxcvbn. There are plugins that let you change the strength requirements however, like this one: https://wordpress.org/plugins/wc-password-strength-settings/
I think is good to use a security plugin, every day on 2017 60.000 wordpress sites were hacked (every day).
I recommend you the wordfence security plugin, within this plugin you will find alternatives and solutions to your asked problem

How to open a .txt.enc file? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a .txt.enc file. When I try to open it in a text editor like Emacs, I get an arbitrary number of characters and numbers. It is encrypted, actually. I also have tried the openssl command line tools, but they don't give the correct result either.
Does anybody know how I can open such a file?
It looks like the file is encrypted or encoded somehow, but the obvious question is, how?
If program used to encrypt the file is a fairly common one, and if it includes a known header in its output, then the Unix file command might be able to recognize it. If not, it may come down to guesswork.
Note that the file might not actually be encrypted with a secret key: it seems that the .enc extension is sometimes used e.g. for uuencoded files, which are just binary files encoded as ASCII text, very similar to base64 encoding. The file command definitely ought to recognize those, though.
If the file is encrypted, though, then even after finding the software used to encrypt it, you'll still have a bigger problem: finding the correct key. If the encryption is any good, the only way (assuming you don't know the key already) to do that will be to all possible keys by brute force. If the key is based on a password, and if the password is fairly weak (i.e. very short and/or common, like "abc123"), it might be possible to find it using a brute-force password cracker. But I wouldn't hold my breath.
(Of course, if the file is encrypted and you don't know the password, the next obvious question is, how did you end up with the file, anyway?)
It appears that the file is encrypted. The original file will be something like xxx.txt and the encoded file is xxx.txt.enc and it has been encoded using some proprietary utility.
You need access to that application which has encoded this file or at least knowledge of what encoding system is used by that application in order to decode it.

what's the difference between .db and sqlite3 extensions? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
SQlite extension name
The title is definitely the question. So, when I start to manage an sqlite database, so I am getting the options how to save file on disk. I mean the extension .db or .sqlite(3). So, is the some difference, restrictions or other issues.
Thank you in advance.
From my past sqlite naming i used .db extension but when i read this post below i change it to .sqlite3db. i add db to specify that the file is an sqlite3 database.
SQlite extension name
and check the answer of Brian Campbell
Hope this help.
Regards

How to apply config transformations to an external config file

I can't find an example of my question on the web and was wondering if anybody knew a solution. Basically, if on our web.config we point to another file, like so:
<configuration>
<configSections />
<appSettings file="AppSettings.config">
</configuration>
then how do we apply transformations to that external file?
Basically, I want to create an AppSettings.config, AppSettings.Debug.config, AppSettings.Release.config and have a transformation run over it... Is this even possible?
Thanks in advance,
Sergio
There are few workarounds:
Workaround 1
Write AppSettings.Debug.config, AppSettings.Release.config with full values (not with transform attributes)
In your web.config, using transformation, substitute with the appropriate file:
web.debug.config
<appSettings file="AppSettings.debug.config"
xdt:Transform="SetAttributes" xdt:Locator="Match(file)"/>
web.release.config
<appSettings file="AppSettings.release.config"
xdt:Transform="SetAttributes" xdt:Locator="Match(file)"/>
Its less than ideal, kinda defeats the purpose of transforms but may be appropriate based on one's situation than using something like SlowCheetah.
Workaround 2
Use TransformXml build task to transform your files during build as pointed here and here
There's a Visual Studio plugin project called Slow Cheetah that takes the idea of transformations and allows you to apply it to files other than web.config, I haven't used it but I think it'll do what you want to do. Scott Hanselman did a blog on it.
Workaround 1 in the accepted answer put me on the right track, but didn't work as is because the transformation isn't quite right. The correct transformation is just
<appSettings file="AppSettings.debug.config"
xdt:Transform="SetAttributes"/>
I had to remove xdt:Locator="Match(file)" so that the file attribute itself would change. Web Config Transformations explains that Match(key) will locate the element to change, but will only change the other elements of the node, not the locator/match key itself. There will be only one appSetting per config file, so we don't need to locate a particular instance.
(I don't have enough reputation to comment on the accepted answer, so I posted this as another answer.)

Resources