Love yourself one day at a time

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,376
2,667
Arvada, CO
No offense intended, but if you legitimately didn't understand what I said you clearly don't program for a living. If you're just ****ing around (which is fine), then just use Stack Overflow and be done with it.

The problem with ixxy, when you get past the layer of deeply rooted autism, is that his brain is just totally full with a quarter-million posts on a hockey forum. Your simple instructions were far over that landscape.
 
Sep 19, 2008
373,330
24,530
No offense intended, but if you legitimately didn't understand what I said you clearly don't program for a living. If you're just ****ing around (which is fine), then just use Stack Overflow and be done with it.

The problem with ixxy, when you get past the layer of deeply rooted autism, is that his brain is just totally full with a quarter-million posts on a hockey forum. Your simple instructions were far over that landscape.

AttributeError: 'NoneType' object has no attribute 'rfind'
 
Sep 19, 2008
373,330
24,530
If I could solve these issues by using google and stack overflow I would not need to pepper HFBoards with these comments
 
Sep 19, 2008
373,330
24,530
Python is dumb anyway. Dumb picky language. The slightest thing upsets the compiler. "It's not formatted properly." And then you can just declare a variable out of nowhere without any freaking data type. Back in my day we declared variables beforehand with int. Can just declare variable out of nowhere. I don't like that!

var = 3

I mean where's the int??

@Lunazaia Nox Fleuret
 

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,376
2,667
Arvada, CO
stack overflow is rarely ever tailored to your specific issue - it wouldn't make sense to just create stuff other people have already created

the idea is to extrapolate the logic, flow, and functions and apply them to your code. If you want it to just be "solved" - then you're not programming

the whole point is to be a problem solver and apply logic to your issue. That's 90% of being a developer. Just solving unique issues.
 

member 157595

Guest
dude...you really need to look at the API and use re in an interactive Python terminal before attempting to use it in a scripting context, because you clearly don't understand the package well enough.

If you're just trolling then you did a good job of baiting me, so I'll give you credit for that before I get back to work.
 
  • Like
Reactions: HFBCommenter
Sep 19, 2008
373,330
24,530
stack overflow is rarely ever tailored to your specific issue - it wouldn't make sense to just create stuff other people have already created

the idea is to extrapolate the logic, flow, and functions and apply them to your code. If you want it to just be "solved" - then you're not programming

the whole point is to be a problem solver and apply logic to your issue. That's 90% of being a developer. Just solving unique issues.

You're not listening. THE ANSWERS THERE HAVE NOTHING TO DO WITH MY QUESTION.
 
Sep 19, 2008
373,330
24,530
dude...you really need to look at the API and use re in an interactive Python terminal before attempting to use it in a scripting context, because you clearly don't understand the package well enough.

If you're just trolling then you did a good job of baiting me, so I'll give you credit for that before I get back to work.

Well you are right about one thing. I don't know crap about Python.
 
Sep 19, 2008
373,330
24,530
jsonRowStr = str(jsonRow["data"][0])
print(jsonRowStr)

searchJson = re.search(r'(.*)artist(.*/) .*', jsonRowStr, re.M | re.I)k
searchJson = re.search( r'name', jsonRowStr, re.M|re.I)
 

LarryFisherman

o̯̘̍͋̀͌̂͒͋͋ͯ̿ͯͦ̈́ͬ͒̚̚
May 9, 2013
6,376
2,667
Arvada, CO
Code:
import { runCommand } from '../../util/command';
import { listArgumentsDefault } from '../util';
import { itemOutputFormat } from './util';

export = {
    command: 'items <connection>',
    desc: 'Traverse connection items',
    builder: yargs => yargs.options({
        ...listArgumentsDefault,
        parent: {
            desc: 'Parent ID',
            type: 'string',
            group: 'Search'
        },
        path: {
            desc: 'Parent Path',
            type: 'string',
            group: 'Search'
        },
        connectAs: {
            desc: 'Account to connect using',
            type: 'string',
            group: 'Search'
        }
    }),
    handler: argv => {
        runCommand(argv, async (client, output) => {
            const params = {
                q: argv.search,
                offset: argv.offset,
                limit: argv.limit,
                id: argv.parent,
                path: argv.path,
                headers: argv.connectAs && {
                    'X-Connect-As': argv.connectAs
                } || undefined
            };

            const items = await client.connectionItems.list(argv.connection, params);
            output.writeTable(items, itemOutputFormat);
        });
    }
};
 
Sep 19, 2008
373,330
24,530
Code:
import { runCommand } from '../../util/command';
import { listArgumentsDefault } from '../util';
import { itemOutputFormat } from './util';

export = {
    command: 'items <connection>',
    desc: 'Traverse connection items',
    builder: yargs => yargs.options({
        ...listArgumentsDefault,
        parent: {
            desc: 'Parent ID',
            type: 'string',
            group: 'Search'
        },
        path: {
            desc: 'Parent Path',
            type: 'string',
            group: 'Search'
        },
        connectAs: {
            desc: 'Account to connect using',
            type: 'string',
            group: 'Search'
        }
    }),
    handler: argv => {
        runCommand(argv, async (client, output) => {
            const params = {
                q: argv.search,
                offset: argv.offset,
                limit: argv.limit,
                id: argv.parent,
                path: argv.path,
                headers: argv.connectAs && {
                    'X-Connect-As': argv.connectAs
                } || undefined
            };

            const items = await client.connectionItems.list(argv.connection, params);
            output.writeTable(items, itemOutputFormat);
        });
    }
};

that doesn't address my issue
 
Sep 19, 2008
373,330
24,530
Code:
for item in json_data["data"]:
    data_string = str(item["hfb"])
    #This is the precursor
    colon_index = data_string.rfind('username')
    #This is the postcursor
    colon_index2 = data_string.rfind('post')
    differential = colon_index2 - colon_index

    Phase1 = data_string[colon_index+7:]
    Phase2 = data_string[colon_index2:]

    print(Phase2 - Phase1)

Traceback (most recent call last):
File , line 17, in <module>
print(Phase2 - Phase1)
TypeError: unsupported operand type(s) for -: 'str' and 'str'
Process finished with exit code 1

:huh:

@OmniCube @Lunazaia Nox Fleuret
 

member 157595

Guest
Code:
for item in json_data["data"]:
    data_string = str(item["hfb"])
    #This is the precursor
    colon_index = data_string.rfind('username')
    #This is the postcursor
    colon_index2 = data_string.rfind('post')
    differential = colon_index2 - colon_index

    Phase1 = data_string[colon_index+7:]
    Phase2 = data_string[colon_index2:]

    print(Phase2 - Phase1)

Traceback (most recent call last):
File , line 17, in <module>
print(Phase2 - Phase1)
TypeError: unsupported operand type(s) for -: 'str' and 'str'
Process finished with exit code 1

:huh:

@OmniCube @Lunazaia Nox Fleuret

Sorry man, I'm tapping out. You're not following my or Stan's recommendations. I wish you luck.
 
Sep 19, 2008
373,330
24,530
be PROUD of yourself BOYs




"When the sharpest words wanna cut me down
I'm gonna send a flood, gonna drown them out
I am brave, I am bruised
I am who I'm meant to be, this is me

Look out 'cause here I come
And I'm marching on to the beat I drum
I'm not scared to be seen
I make no apologies, this is me"
 
Sep 19, 2008
373,330
24,530
when you read about kev's depression

WnIYHst.gif
 
  • Like
Reactions: Kevs Security

Ad

Upcoming events

Ad

Ad