Posts

extracting a set amount of lines from a Text file - Python -

let imagine have text file following inside of it: (each line starts number , contains information next need) 1 325315 2 234265 3 345345 4 234234 5 373432 6 436721 7 325262 8 235268 how go extracting lines after number 3 , before number 6 example? while keeping other data held on same line. i have large text file ~1000 lines, need extract lines starting 300 through 800. either extract or remove lines not need, either way ok. thanks help do this. l = [line line in (open('xyz.txt','r')).readlines() if int(line.split()[0]) > 3 , int(line.split()[0]) < 6 ] output:(output lines between 3 , 6) c:\users\dinesh_pundkar\desktop>python c.py ['4 234234\n', '5 373432\n'] c:\users\dinesh_pundkar\desktop>

ios - Binary upload fails with "Missing 64-bit support" -

i'm building cordova app cordova build --device --release uploading itunes connect pilot upload -i platforms/ios/build/device/askpal.ipa --verbose the publishing process using fastlane pilot fails with: error itms-90086: "missing 64-bit support. ios apps submitted app store must include 64-bit support , built ios 8 sdk or later. recommend using default "standard architectures" build setting "architectures" in xcode, build single binary both 32-bit , 64-bit support." the way i'm "fixing" deleting ios platform cordova, , reinstalling coordova platform add ios . please tell me there way specify build architectures in cordova configs. it not working build active architecture

gradle - How to force build system to ignore resource files in Android Studio? -

i working android studio 2.2. if have resources (xml files, example) have errors in them, when try build these errors bring entire build screeching halt, even if not referencing them activity. don't want delete files directories because eventually fix them, not priority @ moment. how in world can "turn them off" now, or @ least tell build system ignore them? tried doing "keep.xml" tools:discard trick adding paths, doesn't when compiling debug target. way can project build either deleting files out of resources or moving them. seems overkill. lintoptions { abortonerror false } adding in app gradle file force complete build errors in it. or, can comment files.

Override AuthorizeAttribute in ASP.Net Core and respond Json status -

i'm moving asp.net framework asp.net core. in asp.net framework web api 2 project, can customize authorizeattribute : public class apiauthorizeattribute : authorizationfilterattribute { #region methods /// <summary> /// override authorization event custom authorization. /// </summary> /// <param name="httpactioncontext"></param> public override void onauthorization(httpactioncontext httpactioncontext) { // retrieve email , password. var accountemail = httpactioncontext.request.headers.where( x => !string.isnullorempty(x.key) && x.key.equals("email")) .select(x => x.value.firstordefault()) .firstordefault(); // retrieve account password. var accountpassword = httpactioncontext.request.headers.where( x => ...

java - HIVE COUNT * OUT OF MEMORY -

hive> select count(*) ipaddress country='china'; warning: hive-on-mr deprecated in hive 2 , may not available in future versions. consider using different execution engine (i.e. tez, spark) or using hive 1.x releases. query id = pruthviraj_20160922163728_79a0f8d6-5ea6-4cb5-8dd2-d3bb63f8baaf total jobs = 1 launching job 1 out of 1 number of reduce tasks determined @ compile time: 1 in order change average load reducer (in bytes): set hive.exec.reducers.bytes.per.reducer=<number> in order limit maximum number of reducers: set hive.exec.reducers.max=<number> in order set constant number of reducers: set mapreduce.job.reduces=<number> starting job = job_1474512819880_0032, tracking url = http://pruthvis-macbook-pro.local:8088/proxy/application_1474512819880_0032/ kill command = /users/pruthviraj/lab/software/hadoop-2.7.0/bin/hadoop job -kill job_1474512819880_0032 hadoop job information stage-1: number of mappers: 1; number of reducers...

Spotify loudness normalization -

spotify has loudness normalization option (called "play songs @ same volume"). please - know algorithm used calculate loudness of track? @ related broadcast loudness algorithm itu-r bs.1770? and how spotify handle clips if ends scaling clip loudness normalize it? thanks

Error during fetching git repository on Jenkins (not each time) -

i've got jenkins job run unit tests. every 10 minutes checks if there new changes in git repository. if find changes, runs tests. this error occurs every 2-3 builds. other builds ok. logs error: > git rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository > git config remote.origin.url gitlab@gitlab:group/project.git # timeout=10 pruning obsolete local branches fetching upstream changes gitlab@gitlab:group/project.git > git --version # timeout=10 > git fetch --tags --progress gitlab@gitlab:group/project.git +refs/heads/*:refs/remotes/origin/* --prune error: error fetching remote repo 'origin' hudson.plugins.git.gitexception: failed fetch gitlab@gitlab:group/project.git @ hudson.plugins.git.gitscm.fetchfrom(gitscm.java:797) @ hudson.plugins.git.gitscm.retrievechanges(gitscm.java:1051) @ hudson.plugins.git.gitscm.checkout(gitscm.java:1082) @ hudson.scm.scm.checkout(scm.java:485) @ hudson.model.abstract...