Affichage des articles dont le libellé est multiple. Afficher tous les articles
Affichage des articles dont le libellé est multiple. Afficher tous les articles

mardi 18 mars 2014

Re: Find and replace multiple RegEx search expressions topic




Jignesh Sutar wrote:

> Hi,
>
> I'm trying to delete contents of a .txt log file, matching on multiple
> re.sub criteria but not sure how to achieve this.
>
> Below is an illustration of what I am trying to achieve (of course in this
> example I can combine the 3 re.sub into a single re expression but my
> actual code will have a dozen plus expression I need to match on so easier
> to keep them separate). Only the last re.sub will take effect in the
> example below I need all 3 to take effect.
>
>
> import re
> o = open(r"c:\temp\outputfile.txt","w")
> data = open(r"C:\Temp\infile.txt").read()
> o.write( re.sub(".*<X> ","",data) )
> o.write( re.sub(".*<Y> ","",data) )
> o.write( re.sub(".*<Z> ","",data) )
> o.close()


Apply all substitutions to data before you write the result to the file:

with open(infile) as f:
data = f.read()

for expr in list_of_regexes:
data = re.sub(expr, "", data)

with open(outfile, "w") as f:
f.write(data)







Find and replace multiple RegEx search expressions topic




Hi,

I'm trying to delete contents of a .txt log file, matching on multiple
re.sub criteria but not sure how to achieve this.

Below is an illustration of what I am trying to achieve (of course in this
example I can combine the 3 re.sub into a single re expression but my
actual code will have a dozen plus expression I need to match on so easier
to keep them separate). Only the last re.sub will take effect in the
example below I need all 3 to take effect.


import re
o = open(r"c:\temp\outputfile.txt","w")
data = open(r"C:\Temp\infile.txt").read()
o.write( re.sub(".*<X> ","",data) )
o.write( re.sub(".*<Y> ","",data) )
o.write( re.sub(".*<Z> ","",data) )
o.close()


Thanks in advance.
Jignesh






mercredi 12 mars 2014

[MULTI USER] Multiple users on your phone topic




^^ Um, yes, I took it from Him.

Okay guys, we can work with multiple users on this device.

Before we begin, here's what you need:
1- Root access granted
2- Terminal Emulator [from Google play] OR adb enabled
3- Busybox installed [increases the range of commands accepted by the emulator]

Now open Terminal Emulator, and type these codes to see the maximum users allowed

Quote:









su
getprop fw.max_users




It would show 1

To change the maximum users allowed, type

Quote:









su
setprop fw.max_users <your required number>




Mine is 4.

To create a user, type

Quote:









su
pm create-user <username>




To remove a user, type

Quote:









su
pm remove-user <usernumber>




NOTE:- the primary user number is 0. The users you have created would have numbers from 1 and onwards.

If you want to change the user names after creation, go to [B]/data/system/users/userX.xml
here X is the user number, from 0 and onwards.
0 is the primary user.

SECURITY NOTE:
The second user can still access your messages, contacts, etc. It's best if you set a lock screen password on your own user, and select another launcher for the second user, hide all the sensitive applications using some application hider.

If you are on the second user, most of the data from the primary user is hidden (you can not acces it).
For example:
- photos
- unlocked levels in Angry Birds
- music
- contacts
- google account
- clipboard
- home screen

But there are a few exceptions:
- all the apps are there, as if they were just installed
- the recent apps menu
- the use-app-as-default-setting (I don't know the official name). For example: if you set Apex as default in the Guest account, it will also be default in the primary account.
- your messages!!

Original Method for 4.1 below:

[HIDE]
Been featured on the below sites!


 








vendredi 21 février 2014

Enable Multiple Users in KitKat 4.4 topic




I found this Xposed module that will enable multiple users in KitKat 4.4. I'm running it on my locked bootloader Moto X. Download MoDaCo Toolkit Xposed module and enable it then reboot, next open MoDaCo and scroll down to Google Nexus (All) and check Show users on power menu, exit app and reboot phone. After reboot go to settings and under apps you should see users tap on users and tap on add. You will have two choices secured or un-secured. After choosing which one you want just set it up the way you want. Switching between users is easy; just hold down power button and choose which user you want to use. I haven't tried any of the other modifications in the app.

Note: xda, MoDaCo creator nor I are responsible for what you do to you phone.

Download from original thread
http://forum.xda-developers.com/show....php?t=2245765

Sent from my XT1058 using Tapatalk





lundi 10 février 2014

Multiple Google Accounts and Error 403 topic




I have two Google Play accounts. For a few reasons I have purchased Apps on both accounts. From time to time I am unable to download updates for certain Apps. I get a google play error 403. The only way aroumd this that I have found is to remove the account that did not purchase the app download the update and then re-add the second account.

Not all apps do this. Most often the apps that cause the issue are Tinycam Pro and Tapatalk pro.

Does anyone know of a better way to deal with this?

Sent from my Nexus 7 2013 using Tapatalk





vendredi 31 janvier 2014

Multiple Android accounts topic




hi there.
have you tried SwitchMe Multiple Accounts
its a really nice app if you like to play games at full speed without the problem of the other apps eating ram.
here's the link https://play.google.com/store/apps/d....apps.switchme
trie it and reply your opinion cheers.





mercredi 29 janvier 2014

[Q] Running multiple 'adb shell' commands through 'CreateProcess' on Windows PC topic




Hi All,

This query is about running 'multiple adb commands' on 'single adb shell' opened using CreateProcess.

Currently we are able to run single command on adb shell which is created using CreateProcess API. This works fine.

But our requirement is, opening up of single adb shell and executes set of adb commands on that same shell. (ie., reusing of already opened adb shell for executing further adb commands on it)

Kindly let me know if anyone has an idea on this.

Thanks and Regards,
Sridevi.